Greasy Fork is available in English.
A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本)
当前为
// ==UserScript== // @name KISS Translator // @namespace https://github.com/fishjar/kiss-translator // @version 2.0.20 // @description A simple bilingual translation extension & Greasemonkey script (一个简约的双语对照翻译扩展 & 油猴脚本) // @author Gabe<[email protected]> // @homepageURL https://github.com/fishjar/kiss-translator // @license GPL-3.0 // @match *://*/* // @icon https://fishjar.github.io/kiss-translator/images/logo192.png // @grant GM.xmlHttpRequest // @grant GM_xmlhttpRequest // @grant GM.registerMenuCommand // @grant GM_registerMenuCommand // @grant GM.unregisterMenuCommand // @grant GM_unregisterMenuCommand // @grant GM.setValue // @grant GM_setValue // @grant GM.getValue // @grant GM_getValue // @grant GM.deleteValue // @grant GM_deleteValue // @grant GM.info // @grant GM_info // @grant unsafeWindow // @connect translate.googleapis.com // @connect translate-pa.googleapis.com // @connect generativelanguage.googleapis.com // @connect api-edge.cognitive.microsofttranslator.com // @connect edge.microsoft.com // @connect bing.com // @connect api-free.deepl.com // @connect api.deepl.com // @connect www2.deepl.com // @connect api.openai.com // @connect generativelanguage.googleapis.com // @connect openai.azure.com // @connect workers.dev // @connect github.io // @connect github.com // @connect githubusercontent.com // @connect kiss-translator.rayjar.com // @connect ghproxy.com // @connect dav.jianguoyun.com // @connect fanyi.baidu.com // @connect transmart.qq.com // @connect niutrans.com // @connect translate.volcengine.com // @connect dict.youdao.com // @connect api.anthropic.com // @connect api.siliconflow.cn // @connect api.cloudflare.com // @connect openrouter.ai // @connect localhost // @connect 127.0.0.1 // @run-at document-end // ==/UserScript== (()=>{var e,t,n={32(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6175).A},43(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"}),"Favorite")},73(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2577).A},171(e,t,n){"use strict";n.d(t,{b:()=>i});n(8661);var r=n(7441);n(5089);function i(e){return(0,r.b)(e)}},288(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(6253)},457(e,t,n){"use strict";n.d(t,{C:()=>c,E:()=>m,T:()=>d,c:()=>f,h:()=>h,w:()=>u});var r=n(8661),i=n(5449),o=n(696),a=n(3385),s=n(4430),l=r.createContext("undefined"!=typeof HTMLElement?(0,i.A)({key:"css"}):null),c=l.Provider,u=function(e){return(0,r.forwardRef)(function(t,n){var i=(0,r.useContext)(l);return e(t,i,n)})},d=r.createContext({});var h={}.hasOwnProperty,p="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f=function(e,t){var n={};for(var r in t)h.call(t,r)&&(n[r]=t[r]);return n[p]=e,n},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,o.SF)(t,n,r),(0,s.s)(function(){return(0,o.sk)(t,n,r)}),null},m=u(function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var s=e[p],l=[i],c="";"string"==typeof e.className?c=(0,o.Rk)(t.registered,l,e.className):null!=e.className&&(c=e.className+" ");var u=(0,a.J)(l,void 0,r.useContext(d));c+=t.key+"-"+u.name;var f={};for(var m in e)h.call(e,m)&&"css"!==m&&m!==p&&(f[m]=e[m]);return f.className=c,n&&(f.ref=n),r.createElement(r.Fragment,null,r.createElement(g,{cache:t,serialized:u,isStringTag:"string"==typeof s}),r.createElement(s,f))})},609(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"m12.87 15.07-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7 1.62-4.33L19.12 17z"}),"Translate")},696(e,t,n){"use strict";n.d(t,{Rk:()=>r,SF:()=>i,sk:()=>o});function r(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var i=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},o=function(e,t,n){i(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}},727(e,t,n){"use strict";var r=n(8898);t.X4=p,t.e$=f,t.tL=m,t.eM=function(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=g;var i=r(n(288)),o=r(n(8442));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,o.default)(e,t,n)}function s(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(s(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,i.default)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,i.default)(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function d(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)};let s="rgb";const c=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),u({type:s,values:c})}function h(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function p(e,t){return e=l(e),t=a(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,u(e)}function f(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function g(e,t){if(e=l(e),t=a(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?f(e,t):g(e,t)}},785(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"m18 12 4-4-4-4v3H3v2h15zM6 12l-4 4 4 4v-3h15v-2H6z"}),"SyncAlt")},1092(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||f}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var w=b.prototype=new y;w.constructor=b,g(w,v.prototype),w.isPureReactComponent=!0;var x=Array.isArray,A=Object.prototype.hasOwnProperty,S={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)A.call(t,i)&&!k.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:S.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===o?"."+T(l,0):o,x(a)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),I(a,t,i,"",function(e){return e})):null!=a&&(C(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",x(e))for(var c=0;c<e.length;c++){var u=o+T(s=e[c],c);l+=I(s,t,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=I(s=s.value,t,i,u=o+T(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var r=[],i=0;return I(e,r,"","",function(e){return t.call(n,e,i++)}),r}function L(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},j={transition:null},R={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:j,ReactCurrentOwner:S};function O(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=a,t.PureComponent=b,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.act=O,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=g({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=S.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)A.call(t,c)&&!k.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=j.transition;j.transition={};try{e()}finally{j.transition=t}},t.unstable_act=O,t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return N.current.useTransition()},t.version="18.3.1"},1093(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2561).A},1099(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy")},1163(e,t,n){"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,{A:()=>r})},1229(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports},1257(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(4320),i=n(8661),o=n(8915),a=n(5553),s=n(1163),l=n(32),c=n(171),u=n(7562),d=n(5421),h=n(4089);function p(e){return(0,h.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(5089);const g=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],m=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i,o,a,s,l,c,u,d,h,p,f,g;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(i=r.create)?void 0:i.call(r,"fill",{duration:null==(o=t.transitions)||null==(o=o.duration)?void 0:o.shorter}),fontSize:{inherit:"inherit",small:(null==(a=t.typography)||null==(s=a.pxToRem)?void 0:s.call(a,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?h:{action:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(g=(t.vars||t).palette)||null==(g=g.action)?void 0:g.disabled,inherit:void 0}[n.color]}}),v=i.forwardRef(function(e,t){const n=(0,c.b)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:h="inherit",component:v="svg",fontSize:y="medium",htmlColor:b,inheritViewBox:w=!1,titleAccess:x,viewBox:A="0 0 24 24"}=n,S=(0,o.A)(n,g),k=i.isValidElement(u)&&"svg"===u.type,_=(0,r.A)({},n,{color:h,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:w,viewBox:A,hasSvgAsChild:k}),C={};w||(C.viewBox=A);const E=(e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,s.A)(i,p,r)})(_);return(0,f.jsxs)(m,(0,r.A)({as:v,className:(0,a.A)(E.root,d),focusable:"false",color:b,"aria-hidden":!x||void 0,role:x?"img":void 0,ref:t},C,S,k&&u.props,{ownerState:_,children:[k?u.props.children:u,x?(0,f.jsx)("title",{children:x}):null]}))});v.muiName="SvgIcon";const y=v;function b(e,t){function n(n,i){return(0,f.jsx)(y,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:i},n,{children:e}))}return n.muiName=y.muiName,i.memo(i.forwardRef(n))}},1296(e,t,n){"use strict";n.r(t),n.d(t,{GlobalStyles:()=>A.A,StyledEngineProvider:()=>x,ThemeContext:()=>i.T,css:()=>v.AH,default:()=>S,internal_processStyles:()=>k,internal_serializeStyles:()=>C,keyframes:()=>v.i7});var r=n(4320),i=n(457),o=n(3385),a=n(4430),s=n(696),l=n(8661),c=n(7601),u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,d=(0,c.A)(function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),h=function(e){return"theme"!==e},p=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:h},f=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,s.SF)(t,n,r),(0,a.s)(function(){return(0,s.sk)(t,n,r)}),null},m=function e(t,n){var a,c,u=t.__emotion_real===t,d=u&&t.__emotion_base||t;void 0!==n&&(a=n.label,c=n.target);var h=f(t,n,u),m=h||p(d),v=!m("as");return function(){var y=arguments,b=u&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==a&&b.push("label:"+a+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{var w=y[0];b.push(w[0]);for(var x=y.length,A=1;A<x;A++)b.push(y[A],w[A])}var S=(0,i.w)(function(e,t,n){var r=v&&e.as||d,a="",u=[],f=e;if(null==e.theme){for(var y in f={},e)f[y]=e[y];f.theme=l.useContext(i.T)}"string"==typeof e.className?a=(0,s.Rk)(t.registered,u,e.className):null!=e.className&&(a=e.className+" ");var w=(0,o.J)(b.concat(u),t.registered,f);a+=t.key+"-"+w.name,void 0!==c&&(a+=" "+c);var x=v&&void 0===h?p(r):m,A={};for(var S in e)v&&"as"===S||x(S)&&(A[S]=e[S]);return A.className=a,n&&(A.ref=n),l.createElement(l.Fragment,null,l.createElement(g,{cache:t,serialized:w,isStringTag:"string"==typeof r}),l.createElement(r,A))});return S.displayName=void 0!==a?a:"Styled("+("string"==typeof d?d:d.displayName||d.name||"Component")+")",S.defaultProps=t.defaultProps,S.__emotion_real=S,S.__emotion_base=d,S.__emotion_styles=b,S.__emotion_forwardProp=h,Object.defineProperty(S,"toString",{value:function(){return"."+c}}),S.withComponent=function(t,i){return e(t,(0,r.A)({},n,i,{shouldForwardProp:f(S,i,!0)})).apply(void 0,b)},S}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){m[e]=m(e)});var v=n(1834),y=n(5449),b=n(5089);const w=new Map;function x(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,o=l.useMemo(()=>{const e="".concat(t,"-").concat(n);if("object"==typeof document&&w.has(e))return w.get(e);const r=function(e,t){const n=(0,y.A)({key:"css",prepend:e});if(t){const e=n.insert;n.insert=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n[1].styles.match(/^@layer\s+[^{]*$/)||(n[1].styles="@layer mui {".concat(n[1].styles,"}")),e(...n)}}return n}(t,n);return w.set(e,r),r},[t,n]);return t||n?(0,b.jsx)(i.C,{value:o,children:r}):r}var A=n(7802);function S(e,t){return m(e,t)}const k=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},_=[];function C(e){return _[0]=e,(0,o.J)(_)}},1446(e,t,n){"use strict";var r=n(8661),i=n(4651);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},f={};function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){m[e]=new g(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];m[t]=new g(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){m[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){m[e]=new g(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){m[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){m[e]=new g(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){m[e]=new g(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){m[e]=new g(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){m[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=m.hasOwnProperty(t)?m[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(f,e)||!d.call(p,e)&&(h.test(e)?f[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(v,y);m[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){m[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),A=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var j=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var R=Symbol.iterator;function O(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=R&&e[R]||e["@@iterator"])?e:null}var z,D=Object.assign;function M(e){if(void 0===z)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||""}return"\n"+z+e}var F=!1;function B(e,t){if(!e||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?M(e):""}function W(e){switch(e.tag){case 5:return M(e.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return e=B(e.type,!1);case 11:return e=B(e.type.render,!1);case 1:return e=B(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case A:return"Portal";case _:return"Profiler";case k:return"StrictMode";case I:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case L:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return U(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function G(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=G(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=G(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var n=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){J(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&$(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function oe(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ue(e,t)})}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fe=["Webkit","ms","Moz","O"];function ge(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=ge(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(pe).forEach(function(e){fe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]})});var ve=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,Se=null,ke=null;function _e(e){if(e=bi(e)){if("function"!=typeof Ae)throw Error(o(280));var t=e.stateNode;t&&(t=xi(t),Ae(e.stateNode,e.type,t))}}function Ce(e){Se?ke?ke.push(e):ke=[e]:Se=e}function Ee(){if(Se){var e=Se,t=ke;if(ke=Se=null,_e(e),t)for(e=0;e<t.length;e++)_e(t[e])}}function Te(e,t){return e(t)}function Ie(){}var Pe=!1;function Le(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Te(e,t,n)}finally{Pe=!1,(null!==Se||null!==ke)&&(Ie(),Ee())}}function Ne(e,t){var n=e.stateNode;if(null===n)return null;var r=xi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var je=!1;if(u)try{var Re={};Object.defineProperty(Re,"passive",{get:function(){je=!0}}),window.addEventListener("test",Re,Re),window.removeEventListener("test",Re,Re)}catch(ue){je=!1}function Oe(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var ze=!1,De=null,Me=!1,Fe=null,Be={onError:function(e){ze=!0,De=e}};function We(e,t,n,r,i,o,a,s,l){ze=!1,De=null,Oe.apply(Be,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function He(e){if(Ue(e)!==e)throw Error(o(188))}function Ge(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return He(i),e;if(a===r)return He(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var Ke=i.unstable_scheduleCallback,$e=i.unstable_cancelCallback,Xe=i.unstable_shouldYield,Ye=i.unstable_requestPaint,Je=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,ot=null;var at=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=dt(s):0!==(o&=a)&&(r=dt(o))}else 0!==(a=n&~i)?r=dt(a):0!==o&&(r=dt(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-at(t)),r|=e[n],t&=~i;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function gt(){var e=ct;return!(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var xt,At,St,kt,_t,Ct=!1,Et=[],Tt=null,It=null,Pt=null,Lt=new Map,Nt=new Map,jt=[],Rt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ot(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":It=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Lt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function zt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=bi(t))&&At(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Dt(e){var t=yi(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void _t(e.priority,function(){St(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=bi(n))&&At(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function Ft(e,t,n){Mt(e)&&n.delete(t)}function Bt(){Ct=!1,null!==Tt&&Mt(Tt)&&(Tt=null),null!==It&&Mt(It)&&(It=null),null!==Pt&&Mt(Pt)&&(Pt=null),Lt.forEach(Ft),Nt.forEach(Ft)}function Wt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Bt)))}function Ut(e){function t(t){return Wt(t,e)}if(0<Et.length){Wt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Wt(Tt,e),null!==It&&Wt(It,e),null!==Pt&&Wt(Pt,e),Lt.forEach(t),Nt.forEach(t),n=0;n<jt.length;n++)(r=jt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<jt.length&&null===(n=jt[0]).blockedOn;)Dt(n),null===n.blockedOn&&jt.shift()}var Vt=w.ReactCurrentBatchConfig,Ht=!0;function Gt(e,t,n,r){var i=bt,o=Vt.transition;Vt.transition=null;try{bt=1,Kt(e,t,n,r)}finally{bt=i,Vt.transition=o}}function qt(e,t,n,r){var i=bt,o=Vt.transition;Vt.transition=null;try{bt=4,Kt(e,t,n,r)}finally{bt=i,Vt.transition=o}}function Kt(e,t,n,r){if(Ht){var i=Xt(e,t,n,r);if(null===i)Hr(e,t,r,$t,n),Ot(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=zt(Tt,e,t,n,r,i),!0;case"dragenter":return It=zt(It,e,t,n,r,i),!0;case"mouseover":return Pt=zt(Pt,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Lt.set(o,zt(Lt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Nt.set(o,zt(Nt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ot(e,r),4&t&&-1<Rt.indexOf(e)){for(;null!==i;){var o=bi(i);if(null!==o&&xt(o),null===(o=Xt(e,t,n,r))&&Hr(e,t,r,$t,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var $t=null;function Xt(e,t,n,r){if($t=null,null!==(e=yi(e=xe(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $t=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Jt=null,Qt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Qt,r=n.length,i="value"in Jt?Jt.value:Jt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),dn=D({},cn,{view:0,detail:0}),hn=on(dn),pn=D({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),fn=on(pn),gn=on(D({},pn,{dataTransfer:0})),mn=on(D({},dn,{relatedTarget:0})),vn=on(D({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=D({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),wn=on(D({},cn,{data:0})),xn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function _n(){return kn}var Cn=D({},dn,{key:function(e){if(e.key){var t=xn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=on(Cn),Tn=on(D({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),In=on(D({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Pn=on(D({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=D({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=on(Ln),jn=[9,13,27,32],Rn=u&&"CompositionEvent"in window,On=null;u&&"documentMode"in document&&(On=document.documentMode);var zn=u&&"TextEvent"in window&&!On,Dn=u&&(!Rn||On&&8<On&&11>=On),Mn=String.fromCharCode(32),Fn=!1;function Bn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Gn(e,t,n,r){Ce(r),0<(t=qr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Kn=null;function $n(e){Mr(e,0)}function Xn(e){if(K(wi(e)))return e}function Yn(e,t){if("change"===e)return t}var Jn=!1;if(u){var Qn;if(u){var Zn="oninput"in document;if(!Zn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Zn="function"==typeof er.oninput}Qn=Zn}else Qn=!1;Jn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Kn=qn=null)}function nr(e){if("value"===e.propertyName&&Xn(Kn)){var t=[];Gn(t,Kn,e,xe(e)),Le($n,t)}}function rr(e,t,n){"focusin"===e?(tr(),Kn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn(Kn)}function or(e,t){if("click"===e)return Xn(t)}function ar(e,t){if("input"===e||"change"===e)return Xn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!sr(e[i],t[i]))return!1}return!0}function cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hr(){for(var e=window,t=$();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=$((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function fr(e){var t=hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ur(n,o);var a=ur(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gr=u&&"documentMode"in document&&11>=document.documentMode,mr=null,vr=null,yr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==mr||mr!==$(r)||("selectionStart"in(r=mr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=qr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ar={animationend:xr("Animation","AnimationEnd"),animationiteration:xr("Animation","AnimationIteration"),animationstart:xr("Animation","AnimationStart"),transitionend:xr("Transition","TransitionEnd")},Sr={},kr={};function _r(e){if(Sr[e])return Sr[e];if(!Ar[e])return e;var t,n=Ar[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return Sr[e]=n[t];return e}u&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);var Cr=_r("animationend"),Er=_r("animationiteration"),Tr=_r("animationstart"),Ir=_r("transitionend"),Pr=new Map,Lr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Pr.set(e,t),l(t,[e])}for(var jr=0;jr<Lr.length;jr++){var Rr=Lr[jr];Nr(Rr.toLowerCase(),"on"+(Rr[0].toUpperCase()+Rr.slice(1)))}Nr(Cr,"onAnimationEnd"),Nr(Er,"onAnimationIteration"),Nr(Tr,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Ir,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Or));function Dr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(We.apply(this,arguments),ze){if(!ze)throw Error(o(198));var u=De;ze=!1,De=null,Me||(Me=!0,Fe=u)}}(r,t,void 0,e),e.currentTarget=null}function Mr(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Dr(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Dr(i,s,c),o=l}}}if(Me)throw e=Fe,Me=!1,Fe=null,e}function Fr(e,t){var n=t[gi];void 0===n&&(n=t[gi]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Br(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var Wr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[Wr]){e[Wr]=!0,a.forEach(function(t){"selectionchange"!==t&&(zr.has(t)||Br(t,!1,e),Br(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Wr]||(t[Wr]=!0,Br("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(Yt(t)){case 1:var i=Gt;break;case 4:i=qt;break;default:i=Kt}n=i.bind(null,t,n,e),i=void 0,!je||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=yi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Le(function(){var r=o,i=xe(n),a=[];e:{var s=Pr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=In;break;case Cr:case Er:case Tr:l=vn;break;case Ir:l=Pn;break;case"scroll":l=hn;break;case"wheel":l=Nn;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var u=!!(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var p,f=r;null!==f;){var g=(p=f).stateNode;if(5===p.tag&&null!==g&&(p=g,null!==h&&(null!=(g=Ne(f,h))&&u.push(Gr(f,g,p)))),d)break;f=f.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[fi])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(d=Ue(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,g="onMouseLeave",h="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Tn,g="onPointerLeave",h="onPointerEnter",f="pointer"),d=null==l?s:wi(l),p=null==c?s:wi(c),(s=new u(g,f+"leave",l,n,i)).target=d,s.relatedTarget=p,g=null,yi(i)===r&&((u=new u(h,f+"enter",c,n,i)).target=p,u.relatedTarget=d,g=u),d=g,l&&c)e:{for(h=c,f=0,p=u=l;p;p=Kr(p))f++;for(p=0,g=h;g;g=Kr(g))p++;for(;0<f-p;)u=Kr(u),f--;for(;0<p-f;)h=Kr(h),p--;for(;f--;){if(u===h||null!==h&&u===h.alternate)break e;u=Kr(u),h=Kr(h)}u=null}else u=null;null!==l&&$r(a,s,l,u,!1),null!==c&&null!==d&&$r(a,d,c,u,!0)}if("select"===(l=(s=r?wi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var m=Yn;else if(Hn(s))if(Jn)m=ar;else{m=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=or);switch(m&&(m=m(e,r))?Gn(a,m,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?wi(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(mr=v,vr=r,yr=null);break;case"focusout":yr=vr=mr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,i);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":wr(a,n,i)}var y;if(Rn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Bn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Dn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=en()):(Qt="value"in(Jt=i)?Jt.value:Jt.textContent,Un=!0)),0<(v=qr(r,b)).length&&(b=new wn(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Wn(n))&&(b.data=y))),(y=zn?function(e,t){switch(e){case"compositionend":return Wn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Mn);case"textInput":return(e=t.data)===Mn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Rn&&Bn(e,t)?(e=en(),Zt=Qt=Jt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=qr(r,"onBeforeInput")).length&&(i=new wn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Mr(a,t)})}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Ne(e,n))&&r.unshift(Gr(e,o,i)),null!=(o=Ne(e,t))&&r.push(Gr(e,o,i))),e=e.return}return r}function Kr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function $r(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Ne(n,o))&&a.unshift(Gr(n,l,s)):i||null!=(l=Ne(n,o))&&a.push(Gr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Jr(e){return("string"==typeof e?e:""+e).replace(Xr,"\n").replace(Yr,"")}function Qr(e,t,n){if(t=Jr(t),Jr(e)!==t&&n)throw Error(o(425))}function Zr(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,oi="function"==typeof Promise?Promise:void 0,ai="function"==typeof queueMicrotask?queueMicrotask:void 0!==oi?function(e){return oi.resolve(null).then(e).catch(si)}:ri;function si(e){setTimeout(function(){throw e})}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ut(t)}function ci(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ui(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var di=Math.random().toString(36).slice(2),hi="__reactFiber$"+di,pi="__reactProps$"+di,fi="__reactContainer$"+di,gi="__reactEvents$"+di,mi="__reactListeners$"+di,vi="__reactHandles$"+di;function yi(e){var t=e[hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fi]||n[hi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[hi])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function bi(e){return!(e=e[hi]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function xi(e){return e[pi]||null}var Ai=[],Si=-1;function ki(e){return{current:e}}function _i(e){0>Si||(e.current=Ai[Si],Ai[Si]=null,Si--)}function Ci(e,t){Si++,Ai[Si]=e.current,e.current=t}var Ei={},Ti=ki(Ei),Ii=ki(!1),Pi=Ei;function Li(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ni(e){return null!=(e=e.childContextTypes)}function ji(){_i(Ii),_i(Ti)}function Ri(e,t,n){if(Ti.current!==Ei)throw Error(o(168));Ci(Ti,t),Ci(Ii,n)}function Oi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,V(e)||"Unknown",i));return D({},n,r)}function zi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Pi=Ti.current,Ci(Ti,e),Ci(Ii,Ii.current),!0}function Di(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Oi(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,_i(Ii),_i(Ti),Ci(Ti,e)):_i(Ii),Ci(Ii,n)}var Mi=null,Fi=!1,Bi=!1;function Wi(e){null===Mi?Mi=[e]:Mi.push(e)}function Ui(){if(!Bi&&null!==Mi){Bi=!0;var e=0,t=bt;try{var n=Mi;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Mi=null,Fi=!1}catch(t){throw null!==Mi&&(Mi=Mi.slice(e+1)),Ke(Ze,Ui),t}finally{bt=t,Bi=!1}}return null}var Vi=[],Hi=0,Gi=null,qi=0,Ki=[],$i=0,Xi=null,Yi=1,Ji="";function Qi(e,t){Vi[Hi++]=qi,Vi[Hi++]=Gi,Gi=e,qi=t}function Zi(e,t,n){Ki[$i++]=Yi,Ki[$i++]=Ji,Ki[$i++]=Xi,Xi=e;var r=Yi;e=Ji;var i=32-at(r)-1;r&=~(1<<i),n+=1;var o=32-at(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Yi=1<<32-at(t)+i|n<<i|r,Ji=o+e}else Yi=1<<o|n<<i|r,Ji=e}function eo(e){null!==e.return&&(Qi(e,1),Zi(e,1,0))}function to(e){for(;e===Gi;)Gi=Vi[--Hi],Vi[Hi]=null,qi=Vi[--Hi],Vi[Hi]=null;for(;e===Xi;)Xi=Ki[--$i],Ki[$i]=null,Ji=Ki[--$i],Ki[$i]=null,Yi=Ki[--$i],Ki[$i]=null}var no=null,ro=null,io=!1,oo=null;function ao(e,t){var n=Pc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function so(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,ro=ci(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,ro=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Xi?{id:Yi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Pc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,ro=null,!0);default:return!1}}function lo(e){return!(!(1&e.mode)||128&e.flags)}function co(e){if(io){var t=ro;if(t){var n=t;if(!so(e,t)){if(lo(e))throw Error(o(418));t=ci(n.nextSibling);var r=no;t&&so(e,t)?ao(r,n):(e.flags=-4097&e.flags|2,io=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,io=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!io)return uo(e),io=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ro)){if(lo(e))throw po(),Error(o(418));for(;t;)ao(e,t),t=ci(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ro=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ro=null}}else ro=no?ci(e.stateNode.nextSibling):null;return!0}function po(){for(var e=ro;e;)e=ci(e.nextSibling)}function fo(){ro=no=null,io=!1}function go(e){null===oo?oo=[e]:oo.push(e)}var mo=w.ReactCurrentBatchConfig;function vo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function yo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bo(e){return(0,e._init)(e._payload)}function wo(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Nc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=zc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===N&&bo(o)===t.type)?((r=i(t,n.props)).ref=vo(e,t,n),r.return=e,r):((r=jc(n.type,n.key,n.props,null,e.mode,r)).ref=vo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Dc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Rc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=zc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=jc(t.type,t.key,t.props,null,e.mode,n)).ref=vo(e,null,t),n.return=e,n;case A:return(t=Dc(t,e.mode,n)).return=e,t;case N:return h(e,(0,t._init)(t._payload),n)}if(te(t)||O(t))return(t=Rc(t,e.mode,n,null)).return=e,t;yo(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case N:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||O(n))return null!==i?null:d(e,t,n,r,null);yo(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case N:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||O(r))return d(t,e=e.get(n)||null,r,i,null);yo(t,r)}return null}function g(i,o,s,l){for(var c=null,u=null,d=o,g=o=0,m=null;null!==d&&g<s.length;g++){d.index>g?(m=d,d=null):m=d.sibling;var v=p(i,d,s[g],l);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(i,d),o=a(v,o,g),null===u?c=v:u.sibling=v,u=v,d=m}if(g===s.length)return n(i,d),io&&Qi(i,g),c;if(null===d){for(;g<s.length;g++)null!==(d=h(i,s[g],l))&&(o=a(d,o,g),null===u?c=d:u.sibling=d,u=d);return io&&Qi(i,g),c}for(d=r(i,d);g<s.length;g++)null!==(m=f(d,i,g,s[g],l))&&(e&&null!==m.alternate&&d.delete(null===m.key?g:m.key),o=a(m,o,g),null===u?c=m:u.sibling=m,u=m);return e&&d.forEach(function(e){return t(i,e)}),io&&Qi(i,g),c}function m(i,s,l,c){var u=O(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,g=s,m=s=0,v=null,y=l.next();null!==g&&!y.done;m++,y=l.next()){g.index>m?(v=g,g=null):v=g.sibling;var b=p(i,g,y.value,c);if(null===b){null===g&&(g=v);break}e&&g&&null===b.alternate&&t(i,g),s=a(b,s,m),null===d?u=b:d.sibling=b,d=b,g=v}if(y.done)return n(i,g),io&&Qi(i,m),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=h(i,y.value,c))&&(s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return io&&Qi(i,m),u}for(g=r(i,g);!y.done;m++,y=l.next())null!==(y=f(g,i,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),s=a(y,s,m),null===d?u=y:d.sibling=y,d=y);return e&&g.forEach(function(e){return t(i,e)}),io&&Qi(i,m),u}return function e(r,o,a,l){if("object"==typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case x:e:{for(var c=a.key,u=o;null!==u;){if(u.key===c){if((c=a.type)===S){if(7===u.tag){n(r,u.sibling),(o=i(u,a.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===N&&bo(c)===u.type){n(r,u.sibling),(o=i(u,a.props)).ref=vo(r,u,a),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===S?((o=Rc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=jc(a.type,a.key,a.props,null,r.mode,l)).ref=vo(r,o,a),l.return=r,r=l)}return s(r);case A:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Dc(a,r.mode,l)).return=r,r=o}return s(r);case N:return e(r,o,(u=a._init)(a._payload),l)}if(te(a))return g(r,o,a,l);if(O(a))return m(r,o,a,l);yo(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=zc(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var xo=wo(!0),Ao=wo(!1),So=ki(null),ko=null,_o=null,Co=null;function Eo(){Co=_o=ko=null}function To(e){var t=So.current;_i(So),e._currentValue=t}function Io(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Po(e,t){ko=e,Co=_o=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bs=!0),e.firstContext=null)}function Lo(e){var t=e._currentValue;if(Co!==e)if(e={context:e,memoizedValue:t,next:null},null===_o){if(null===ko)throw Error(o(308));_o=e,ko.dependencies={lanes:0,firstContext:e}}else _o=_o.next=e;return t}var No=null;function jo(e){null===No?No=[e]:No.push(e)}function Ro(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,jo(t)):(n.next=i.next,i.next=n),t.interleaved=n,Oo(e,r)}function Oo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var zo=!1;function Do(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Fo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&El){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Oo(e,n)}return null===(i=r.interleaved)?(t.next=t,jo(r)):(t.next=i.next,i.next=t),r.interleaved=t,Oo(e,n)}function Wo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Uo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vo(e,t,n,r){var i=e.updateQueue;zo=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var h=s.lane,p=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,g=s;switch(h=t,p=n,g.tag){case 1:if("function"==typeof(f=g.payload)){d=f.call(p,d,h);break e}d=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=g.payload)?f.call(p,d,h):f))break e;d=D({},d,h);break e;case 2:zo=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Ol|=a,e.lanes=a,e.memoizedState=d}}function Ho(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Go={},qo=ki(Go),Ko=ki(Go),$o=ki(Go);function Xo(e){if(e===Go)throw Error(o(174));return e}function Yo(e,t){switch(Ci($o,t),Ci(Ko,e),Ci(qo,Go),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}_i(qo),Ci(qo,t)}function Jo(){_i(qo),_i(Ko),_i($o)}function Qo(e){Xo($o.current);var t=Xo(qo.current),n=le(t,e.type);t!==n&&(Ci(Ko,e),Ci(qo,n))}function Zo(e){Ko.current===e&&(_i(qo),_i(Ko))}var ea=ki(0);function ta(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var na=[];function ra(){for(var e=0;e<na.length;e++)na[e]._workInProgressVersionPrimary=null;na.length=0}var ia=w.ReactCurrentDispatcher,oa=w.ReactCurrentBatchConfig,aa=0,sa=null,la=null,ca=null,ua=!1,da=!1,ha=0,pa=0;function fa(){throw Error(o(321))}function ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ma(e,t,n,r,i,a){if(aa=a,sa=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ia.current=null===e||null===e.memoizedState?Za:es,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ca=la=null,t.updateQueue=null,ia.current=ts,e=n(r,i)}while(da)}if(ia.current=Qa,t=null!==la&&null!==la.next,aa=0,ca=la=sa=null,ua=!1,t)throw Error(o(300));return e}function va(){var e=0!==ha;return ha=0,e}function ya(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ca?sa.memoizedState=ca=e:ca=ca.next=e,ca}function ba(){if(null===la){var e=sa.alternate;e=null!==e?e.memoizedState:null}else e=la.next;var t=null===ca?sa.memoizedState:ca.next;if(null!==t)ca=t,la=e;else{if(null===e)throw Error(o(310));e={memoizedState:(la=e).memoizedState,baseState:la.baseState,baseQueue:la.baseQueue,queue:la.queue,next:null},null===ca?sa.memoizedState=ca=e:ca=ca.next=e}return ca}function wa(e,t){return"function"==typeof t?t(e):t}function xa(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=la,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((aa&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,sa.lanes|=d,Ol|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,sr(r,t.memoizedState)||(bs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,sa.lanes|=a,Ol|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Aa(e){var t=ba(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);sr(a,t.memoizedState)||(bs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Sa(){}function ka(e,t){var n=sa,r=ba(),i=t(),a=!sr(r.memoizedState,i);if(a&&(r.memoizedState=i,bs=!0),r=r.queue,za(Ea.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ca&&1&ca.memoizedState.tag){if(n.flags|=2048,La(9,Ca.bind(null,n,r,i,t),void 0,null),null===Tl)throw Error(o(349));30&aa||_a(n,t,i)}return i}function _a(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ca(e,t,n,r){t.value=n,t.getSnapshot=r,Ta(t)&&Ia(e)}function Ea(e,t,n){return n(function(){Ta(t)&&Ia(e)})}function Ta(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function Ia(e){var t=Oo(e,1);null!==t&&tc(t,e,1,-1)}function Pa(e){var t=ya();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t.queue=e,e=e.dispatch=$a.bind(null,sa,e),[t.memoizedState,e]}function La(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=sa.updateQueue)?(t={lastEffect:null,stores:null},sa.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Na(){return ba().memoizedState}function ja(e,t,n,r){var i=ya();sa.flags|=e,i.memoizedState=La(1|t,n,void 0,void 0===r?null:r)}function Ra(e,t,n,r){var i=ba();r=void 0===r?null:r;var o=void 0;if(null!==la){var a=la.memoizedState;if(o=a.destroy,null!==r&&ga(r,a.deps))return void(i.memoizedState=La(t,n,o,r))}sa.flags|=e,i.memoizedState=La(1|t,n,o,r)}function Oa(e,t){return ja(8390656,8,e,t)}function za(e,t){return Ra(2048,8,e,t)}function Da(e,t){return Ra(4,2,e,t)}function Ma(e,t){return Ra(4,4,e,t)}function Fa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!=n?n.concat([e]):null,Ra(4,4,Fa.bind(null,t,e),n)}function Wa(){}function Ua(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Va(e,t){var n=ba();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ga(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ha(e,t,n){return 21&aa?(sr(n,t)||(n=gt(),sa.lanes|=n,Ol|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bs=!0),e.memoizedState=n)}function Ga(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=oa.transition;oa.transition={};try{e(!1),t()}finally{bt=n,oa.transition=r}}function qa(){return ba().memoizedState}function Ka(e,t,n){var r=ec(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xa(e))Ya(t,n);else if(null!==(n=Ro(e,t,n,r))){tc(n,e,r,Zl()),Ja(n,t,r)}}function $a(e,t,n){var r=ec(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xa(e))Ya(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,a)){var l=t.interleaved;return null===l?(i.next=i,jo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Ro(e,t,i,r))&&(tc(n,e,r,i=Zl()),Ja(n,t,r))}}function Xa(e){var t=e.alternate;return e===sa||null!==t&&t===sa}function Ya(e,t){da=ua=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ja(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var Qa={readContext:Lo,useCallback:fa,useContext:fa,useEffect:fa,useImperativeHandle:fa,useInsertionEffect:fa,useLayoutEffect:fa,useMemo:fa,useReducer:fa,useRef:fa,useState:fa,useDebugValue:fa,useDeferredValue:fa,useTransition:fa,useMutableSource:fa,useSyncExternalStore:fa,useId:fa,unstable_isNewReconciler:!1},Za={readContext:Lo,useCallback:function(e,t){return ya().memoizedState=[e,void 0===t?null:t],e},useContext:Lo,useEffect:Oa,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ja(4194308,4,Fa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ja(4194308,4,e,t)},useInsertionEffect:function(e,t){return ja(4,2,e,t)},useMemo:function(e,t){var n=ya();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ya();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ka.bind(null,sa,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ya().memoizedState=e},useState:Pa,useDebugValue:Wa,useDeferredValue:function(e){return ya().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Ga.bind(null,e[1]),ya().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=sa,i=ya();if(io){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Tl)throw Error(o(349));30&aa||_a(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Oa(Ea.bind(null,r,a,e),[e]),r.flags|=2048,La(9,Ca.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ya(),t=Tl.identifierPrefix;if(io){var n=Ji;t=":"+t+"R"+(n=(Yi&~(1<<32-at(Yi)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},es={readContext:Lo,useCallback:Ua,useContext:Lo,useEffect:za,useImperativeHandle:Ba,useInsertionEffect:Da,useLayoutEffect:Ma,useMemo:Va,useReducer:xa,useRef:Na,useState:function(){return xa(wa)},useDebugValue:Wa,useDeferredValue:function(e){return Ha(ba(),la.memoizedState,e)},useTransition:function(){return[xa(wa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:ka,useId:qa,unstable_isNewReconciler:!1},ts={readContext:Lo,useCallback:Ua,useContext:Lo,useEffect:za,useImperativeHandle:Ba,useInsertionEffect:Da,useLayoutEffect:Ma,useMemo:Va,useReducer:Aa,useRef:Na,useState:function(){return Aa(wa)},useDebugValue:Wa,useDeferredValue:function(e){var t=ba();return null===la?t.memoizedState=e:Ha(t,la.memoizedState,e)},useTransition:function(){return[Aa(wa)[0],ba().memoizedState]},useMutableSource:Sa,useSyncExternalStore:ka,useId:qa,unstable_isNewReconciler:!1};function ns(e,t){if(e&&e.defaultProps){for(var n in t=D({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function rs(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:D({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var is={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Zl(),i=ec(e),o=Fo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(tc(t,e,i,r),Wo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Zl(),i=ec(e),o=Fo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Bo(e,o,i))&&(tc(t,e,i,r),Wo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zl(),r=ec(e),i=Fo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Bo(e,i,r))&&(tc(t,e,r,n),Wo(t,e,r))}};function os(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(i,o))}function as(e,t,n){var r=!1,i=Ei,o=t.contextType;return"object"==typeof o&&null!==o?o=Lo(o):(i=Ni(t)?Pi:Ti.current,o=(r=null!=(r=t.contextTypes))?Li(e,i):Ei),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=is,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ss(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&is.enqueueReplaceState(t,t.state,null)}function ls(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Do(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Lo(o):(o=Ni(t)?Pi:Ti.current,i.context=Li(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(rs(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&is.enqueueReplaceState(i,i.state,null),Vo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function cs(e,t){try{var n="",r=t;do{n+=W(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function us(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Fo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vl||(Vl=!0,Hl=r),ds(0,t)},n}function fs(e,t,n){(n=Fo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ds(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function ms(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Fo(-1,1)).tag=2,Bo(n,t,1))),n.lanes|=1),e)}var ys=w.ReactCurrentOwner,bs=!1;function ws(e,t,n,r){t.child=null===e?Ao(t,null,n,r):xo(t,e.child,n,r)}function xs(e,t,n,r,i){n=n.render;var o=t.ref;return Po(t,i),r=ma(e,t,n,r,o,i),n=va(),null===e||bs?(io&&n&&eo(t),t.flags|=1,ws(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function As(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Lc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=jc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Ss(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Nc(o,r)).ref=t.ref,e.return=t,t.child=e}function Ss(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref){if(bs=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);131072&e.flags&&(bs=!0)}}return Cs(e,t,n,r,i)}function ks(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Nl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Ci(Nl,Ll),Ll|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Nl,Ll),Ll|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ci(Nl,Ll),Ll|=r;return ws(e,t,i,n),t.child}function _s(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Cs(e,t,n,r,i){var o=Ni(n)?Pi:Ti.current;return o=Li(t,o),Po(t,i),n=ma(e,t,n,r,o,i),r=va(),null===e||bs?(io&&r&&eo(t),t.flags|=1,ws(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Es(e,t,n,r,i){if(Ni(n)){var o=!0;zi(t)}else o=!1;if(Po(t,i),null===t.stateNode)Us(e,t),as(t,n,r),ls(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Lo(c):c=Li(t,c=Ni(n)?Pi:Ti.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ss(t,a,r,c),zo=!1;var h=t.memoizedState;a.state=h,Vo(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Ii.current||zo?("function"==typeof u&&(rs(t,n,u,r),l=t.memoizedState),(s=zo||os(t,n,s,r,h,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Mo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ns(t.type,s),a.props=c,d=t.pendingProps,h=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Lo(l):l=Li(t,l=Ni(n)?Pi:Ti.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&ss(t,a,r,l),zo=!1,h=t.memoizedState,a.state=h,Vo(t,r,a,i);var f=t.memoizedState;s!==d||h!==f||Ii.current||zo?("function"==typeof p&&(rs(t,n,p,r),f=t.memoizedState),(c=zo||os(t,n,c,r,h,f,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Ts(e,t,n,r,o,i)}function Ts(e,t,n,r,i,o){_s(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Di(t,n,!1),Vs(e,t,o);r=t.stateNode,ys.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=xo(t,e.child,null,o),t.child=xo(t,null,s,o)):ws(e,t,s,o),t.memoizedState=r.state,i&&Di(t,n,!0),t.child}function Is(e){var t=e.stateNode;t.pendingContext?Ri(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ri(0,t.context,!1),Yo(e,t.containerInfo)}function Ps(e,t,n,r,i){return fo(),go(i),t.flags|=256,ws(e,t,n,r),t.child}var Ls,Ns,js,Rs={dehydrated:null,treeContext:null,retryLane:0};function Os(e){return{baseLanes:e,cachePool:null,transitions:null}}function zs(e,t,n){var r,i=t.pendingProps,a=ea.current,s=!1,l=!!(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ci(ea,1&a),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},1&i||null===s?s=Oc(l,i,0,null):(s.childLanes=0,s.pendingProps=l),e=Rc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Os(n),t.memoizedState=Rs,e):Ds(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,Ms(e,t,s,r=us(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Oc({mode:"visible",children:r.children},i,0,null),(a=Rc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&xo(t,e.child,null,s),t.child.memoizedState=Os(s),t.memoizedState=Rs,a);if(!(1&t.mode))return Ms(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Ms(e,t,s,r=us(a=Error(o(419)),r,void 0))}if(l=0!==(s&e.childLanes),bs||l){if(null!==(r=Tl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Oo(e,i),tc(r,e,i,-1))}return fc(),Ms(e,t,s,r=us(Error(o(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Cc.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,ro=ci(i.nextSibling),no=t,io=!0,oo=null,null!==e&&(Ki[$i++]=Yi,Ki[$i++]=Ji,Ki[$i++]=Xi,Yi=e.id,Ji=e.overflow,Xi=t),t=Ds(t,r.children),t.flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 1&l||t.child===a?(i=Nc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null),null!==r?s=Nc(r,s):(s=Rc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Os(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Rs,i}return e=(s=e.child).sibling,i=Nc(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ds(e,t){return(t=Oc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ms(e,t,n,r){return null!==r&&go(r),xo(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Io(e.return,t,n)}function Bs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ws(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ws(e,t,r.children,n),2&(r=ea.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ci(ea,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ta(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ta(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bs(t,!0,n,null,o);break;case"together":Bs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Us(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ol|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Nc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Nc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Hs(e,t){if(!io)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function qs(e,t,n){var r=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gs(t),null;case 1:case 17:return Ni(t.type)&&ji(),Gs(t),null;case 3:return r=t.stateNode,Jo(),_i(Ii),_i(Ti),ra(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==oo&&(oc(oo),oo=null))),Gs(t),null;case 5:Zo(t);var i=Xo($o.current);if(n=t.type,null!==e&&null!=t.stateNode)Ns(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Gs(t),null}if(e=Xo(qo.current),ho(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[hi]=t,r[pi]=a,e=!!(1&t.mode),n){case"dialog":Fr("cancel",r),Fr("close",r);break;case"iframe":case"object":case"embed":Fr("load",r);break;case"video":case"audio":for(i=0;i<Or.length;i++)Fr(Or[i],r);break;case"source":Fr("error",r);break;case"img":case"image":case"link":Fr("error",r),Fr("load",r);break;case"details":Fr("toggle",r);break;case"input":Y(r,a),Fr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Fr("invalid",r);break;case"textarea":ie(r,a),Fr("invalid",r)}for(var l in ye(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Fr("scroll",r)}switch(n){case"input":q(r),Z(r,a,!0);break;case"textarea":q(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Zr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[hi]=t,e[pi]=r,Ls(e,t),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Fr("cancel",e),Fr("close",e),i=r;break;case"iframe":case"object":case"embed":Fr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Or.length;i++)Fr(Or[i],e);i=r;break;case"source":Fr("error",e),i=r;break;case"img":case"image":case"link":Fr("error",e),Fr("load",e),i=r;break;case"details":Fr("toggle",e),i=r;break;case"input":Y(e,r),i=X(e,r),Fr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=D({},r,{value:void 0}),Fr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Fr("invalid",e)}for(a in ye(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?me(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Fr("scroll",e):null!=u&&b(e,a,u,l))}switch(n){case"input":q(e),Z(e,r,!1);break;case"textarea":q(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Zr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Gs(t),null;case 6:if(e&&null!=t.stateNode)js(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Xo($o.current),Xo(qo.current),ho(t)){if(r=t.stateNode,n=t.memoizedProps,r[hi]=t,(a=r.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qr(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[hi]=t,t.stateNode=r}return Gs(t),null;case 13:if(_i(ea),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(io&&null!==ro&&1&t.mode&&!(128&t.flags))po(),fo(),t.flags|=98560,a=!1;else if(a=ho(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[hi]=t}else fo(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Gs(t),a=!1}else null!==oo&&(oc(oo),oo=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ea.current?0===jl&&(jl=3):fc())),null!==t.updateQueue&&(t.flags|=4),Gs(t),null);case 4:return Jo(),null===e&&Ur(t.stateNode.containerInfo),Gs(t),null;case 10:return To(t.type._context),Gs(t),null;case 19:if(_i(ea),null===(a=t.memoizedState))return Gs(t),null;if(r=!!(128&t.flags),null===(l=a.rendering))if(r)Hs(a,!1);else{if(0!==jl||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=ta(e))){for(t.flags|=128,Hs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(ea,1&ea.current|2),t.child}e=e.sibling}null!==a.tail&&Je()>Wl&&(t.flags|=128,r=!0,Hs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ta(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Hs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!io)return Gs(t),null}else 2*Je()-a.renderingStartTime>Wl&&1073741824!==n&&(t.flags|=128,r=!0,Hs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Je(),t.sibling=null,n=ea.current,Ci(ea,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return uc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ll)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ks(e,t){switch(to(t),t.tag){case 1:return Ni(t.type)&&ji(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Jo(),_i(Ii),_i(Ti),ra(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Zo(t),null;case 13:if(_i(ea),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));fo()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return _i(ea),null;case 4:return Jo(),null;case 10:return To(t.type._context),null;case 22:case 23:return uc(),null;default:return null}}Ls=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ns=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Xo(qo.current);var o,a=null;switch(n){case"input":i=X(e,i),r=X(e,r),a=[];break;case"select":i=D({},i,{value:void 0}),r=D({},r,{value:void 0}),a=[];break;case"textarea":i=re(e,i),r=re(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Zr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Fr("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},js=function(e,t,n,r){n!==r&&(t.flags|=4)};var $s=!1,Xs=!1,Ys="function"==typeof WeakSet?WeakSet:Set,Js=null;function Qs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Sc(e,t,n)}else n.current=null}function Zs(e,t,n){try{n()}catch(n){Sc(e,t,n)}}var el=!1;function tl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Zs(t,n,o)}i=i.next}while(i!==r)}}function nl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function il(e){var t=e.alternate;null!==t&&(e.alternate=null,il(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[hi],delete t[pi],delete t[gi],delete t[mi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ol(e){return 5===e.tag||3===e.tag||4===e.tag}function al(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ol(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function sl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Zr));else if(4!==r&&null!==(e=e.child))for(sl(e,t,n),e=e.sibling;null!==e;)sl(e,t,n),e=e.sibling}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}var cl=null,ul=!1;function dl(e,t,n){for(n=n.child;null!==n;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(ot&&"function"==typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Xs||Qs(n,t);case 6:var r=cl,i=ul;cl=null,dl(e,t,n),ul=i,null!==(cl=r)&&(ul?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(ul?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ut(e)):li(cl,n.stateNode));break;case 4:r=cl,i=ul,cl=n.stateNode.containerInfo,ul=!0,dl(e,t,n),cl=r,ul=i;break;case 0:case 11:case 14:case 15:if(!Xs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Zs(n,t,a),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!Xs&&(Qs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Sc(n,t,e)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,dl(e,t,n),Xs=r):dl(e,t,n);break;default:dl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ys),t.forEach(function(t){var r=Ec.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function fl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,ul=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,ul=!0;break e}l=l.return}if(null===cl)throw Error(o(160));hl(a,s,i),cl=null,ul=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Sc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),ml(e),4&r){try{tl(3,e,e.return),nl(3,e)}catch(t){Sc(e,e.return,t)}try{tl(5,e,e.return)}catch(t){Sc(e,e.return,t)}}break;case 1:fl(t,e),ml(e),512&r&&null!==n&&Qs(n,n.return);break;case 5:if(fl(t,e),ml(e),512&r&&null!==n&&Qs(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){Sc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(i,a),be(l,s);var u=be(l,a);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?me(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,a);break;case"textarea":oe(i,a);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var f=a.value;null!=f?ne(i,!!a.multiple,f,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(i,!!a.multiple,a.defaultValue,!0):ne(i,!!a.multiple,a.multiple?[]:"",!1))}i[pi]=a}catch(t){Sc(e,e.return,t)}}break;case 6:if(fl(t,e),ml(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){Sc(e,e.return,t)}}break;case 3:if(fl(t,e),ml(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(t){Sc(e,e.return,t)}break;case 4:default:fl(t,e),ml(e);break;case 13:fl(t,e),ml(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Bl=Je())),4&r&&pl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Xs=(u=Xs)||d,fl(t,e),Xs=u):fl(t,e),ml(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Js=e,d=e.child;null!==d;){for(h=Js=d;null!==Js;){switch(f=(p=Js).child,p.tag){case 0:case 11:case 14:case 15:tl(4,p,p.return);break;case 1:Qs(p,p.return);var g=p.stateNode;if("function"==typeof g.componentWillUnmount){r=p,n=p.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:Qs(p,p.return);break;case 22:if(null!==p.memoizedState){wl(h);continue}}null!==f?(f.return=p,Js=f):wl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=ge("display",s))}catch(t){Sc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){Sc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fl(t,e),ml(e),4&r&&pl(e);case 21:}}function ml(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ol(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),ll(e,al(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;sl(e,al(e),a);break;default:throw Error(o(161))}}catch(t){Sc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function vl(e,t,n){Js=e,yl(e,t,n)}function yl(e,t,n){for(var r=!!(1&e.mode);null!==Js;){var i=Js,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||$s;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Xs;s=$s;var c=Xs;if($s=a,(Xs=l)&&!c)for(Js=i;null!==Js;)l=(a=Js).child,22===a.tag&&null!==a.memoizedState?xl(i):null!==l?(l.return=a,Js=l):xl(i);for(;null!==o;)Js=o,yl(o,t,n),o=o.sibling;Js=i,$s=s,Xs=c}bl(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Js=o):bl(e)}}function bl(e){for(;null!==Js;){var t=Js;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Xs||nl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ns(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Ho(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Ho(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Ut(h)}}}break;default:throw Error(o(163))}Xs||512&t.flags&&rl(t)}catch(e){Sc(t,t.return,e)}}if(t===e){Js=null;break}if(null!==(n=t.sibling)){n.return=t.return,Js=n;break}Js=t.return}}function wl(e){for(;null!==Js;){var t=Js;if(t===e){Js=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Js=n;break}Js=t.return}}function xl(e){for(;null!==Js;){var t=Js;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{nl(4,t)}catch(e){Sc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sc(t,i,e)}}var o=t.return;try{rl(t)}catch(e){Sc(t,o,e)}break;case 5:var a=t.return;try{rl(t)}catch(e){Sc(t,a,e)}}}catch(e){Sc(t,t.return,e)}if(t===e){Js=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Js=s;break}Js=t.return}}var Al,Sl=Math.ceil,kl=w.ReactCurrentDispatcher,_l=w.ReactCurrentOwner,Cl=w.ReactCurrentBatchConfig,El=0,Tl=null,Il=null,Pl=0,Ll=0,Nl=ki(0),jl=0,Rl=null,Ol=0,zl=0,Dl=0,Ml=null,Fl=null,Bl=0,Wl=1/0,Ul=null,Vl=!1,Hl=null,Gl=null,ql=!1,Kl=null,$l=0,Xl=0,Yl=null,Jl=-1,Ql=0;function Zl(){return 6&El?Je():-1!==Jl?Jl:Jl=Je()}function ec(e){return 1&e.mode?2&El&&0!==Pl?Pl&-Pl:null!==mo.transition?(0===Ql&&(Ql=gt()),Ql):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type):1}function tc(e,t,n,r){if(50<Xl)throw Xl=0,Yl=null,Error(o(185));vt(e,n,r),2&El&&e===Tl||(e===Tl&&(!(2&El)&&(zl|=n),4===jl&&ac(e,Pl)),nc(e,r),1===n&&0===El&&!(1&t.mode)&&(Wl=Je()+500,Fi&&Ui()))}function nc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-at(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ht(e,e===Tl?Pl:0);if(0===r)null!==n&&$e(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&$e(n),1===t)0===e.tag?function(e){Fi=!0,Wi(e)}(sc.bind(null,e)):Wi(sc.bind(null,e)),ai(function(){!(6&El)&&Ui()}),n=null;else{switch(wt(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Tc(n,rc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rc(e,t){if(Jl=-1,Ql=0,6&El)throw Error(o(327));var n=e.callbackNode;if(xc()&&e.callbackNode!==n)return null;var r=ht(e,e===Tl?Pl:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=El;El|=2;var a=pc();for(Tl===e&&Pl===t||(Ul=null,Wl=Je()+500,dc(e,t));;)try{vc();break}catch(t){hc(e,t)}Eo(),kl.current=a,El=i,null!==Il?t=0:(Tl=null,Pl=0,t=jl)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=ic(e,i))),1===t)throw n=Rl,dc(e,0),ac(e,r),nc(e,Je()),n;if(6===t)ac(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!sr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=gc(e,r),2===t&&(a=ft(e),0!==a&&(r=a,t=ic(e,a))),1!==t)))throw n=Rl,dc(e,0),ac(e,r),nc(e,Je()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:wc(e,Fl,Ul);break;case 3:if(ac(e,r),(130023424&r)===r&&10<(t=Bl+500-Je())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Zl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(wc.bind(null,e,Fl,Ul),t);break}wc(e,Fl,Ul);break;case 4:if(ac(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Je()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(wc.bind(null,e,Fl,Ul),r);break}wc(e,Fl,Ul);break;default:throw Error(o(329))}}}return nc(e,Je()),e.callbackNode===n?rc.bind(null,e):null}function ic(e,t){var n=Ml;return e.current.memoizedState.isDehydrated&&(dc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Fl,Fl=n,null!==t&&oc(t)),e}function oc(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function ac(e,t){for(t&=~Dl,t&=~zl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function sc(e){if(6&El)throw Error(o(327));xc();var t=ht(e,0);if(!(1&t))return nc(e,Je()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ic(e,r))}if(1===n)throw n=Rl,dc(e,0),ac(e,t),nc(e,Je()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wc(e,Fl,Ul),nc(e,Je()),null}function lc(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Wl=Je()+500,Fi&&Ui())}}function cc(e){null!==Kl&&0===Kl.tag&&!(6&El)&&xc();var t=El;El|=1;var n=Cl.transition,r=bt;try{if(Cl.transition=null,bt=1,e)return e()}finally{bt=r,Cl.transition=n,!(6&(El=t))&&Ui()}}function uc(){Ll=Nl.current,_i(Nl)}function dc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Il)for(n=Il.return;null!==n;){var r=n;switch(to(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&ji();break;case 3:Jo(),_i(Ii),_i(Ti),ra();break;case 5:Zo(r);break;case 4:Jo();break;case 13:case 19:_i(ea);break;case 10:To(r.type._context);break;case 22:case 23:uc()}n=n.return}if(Tl=e,Il=e=Nc(e.current,null),Pl=Ll=t,jl=0,Rl=null,Dl=zl=Ol=0,Fl=Ml=null,null!==No){for(t=0;t<No.length;t++)if(null!==(r=(n=No[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}No=null}return e}function hc(e,t){for(;;){var n=Il;try{if(Eo(),ia.current=Qa,ua){for(var r=sa.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ua=!1}if(aa=0,ca=la=sa=null,da=!1,ha=0,_l.current=null,null===n||null===n.return){jl=1,Rl=t,Il=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Pl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(!(1&d.mode||0!==h&&11!==h&&15!==h)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=ms(s);if(null!==f){f.flags&=-257,vs(f,s,l,0,t),1&f.mode&&gs(a,u,t),c=u;var g=(t=f).updateQueue;if(null===g){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}if(!(1&t)){gs(a,u,t),fc();break e}c=Error(o(426))}else if(io&&1&l.mode){var v=ms(s);if(null!==v){!(65536&v.flags)&&(v.flags|=256),vs(v,s,l,0,t),go(cs(c,l));break e}}a=c=cs(c,l),4!==jl&&(jl=2),null===Ml?Ml=[a]:Ml.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,ps(0,c,t));break e;case 1:l=c;var y=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof y.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Gl&&Gl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Uo(a,fs(a,l,t));break e}}a=a.return}while(null!==a)}bc(n)}catch(e){t=e,Il===n&&null!==n&&(Il=n=n.return);continue}break}}function pc(){var e=kl.current;return kl.current=Qa,null===e?Qa:e}function fc(){0!==jl&&3!==jl&&2!==jl||(jl=4),null===Tl||!(268435455&Ol)&&!(268435455&zl)||ac(Tl,Pl)}function gc(e,t){var n=El;El|=2;var r=pc();for(Tl===e&&Pl===t||(Ul=null,dc(e,t));;)try{mc();break}catch(t){hc(e,t)}if(Eo(),El=n,kl.current=r,null!==Il)throw Error(o(261));return Tl=null,Pl=0,jl}function mc(){for(;null!==Il;)yc(Il)}function vc(){for(;null!==Il&&!Xe();)yc(Il)}function yc(e){var t=Al(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?bc(e):Il=t,_l.current=null}function bc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Ks(n,t)))return n.flags&=32767,void(Il=n);if(null===e)return jl=6,void(Il=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=qs(n,t,Ll)))return void(Il=n);if(null!==(t=t.sibling))return void(Il=t);Il=t=e}while(null!==t);0===jl&&(jl=5)}function wc(e,t,n){var r=bt,i=Cl.transition;try{Cl.transition=null,bt=1,function(e,t,n,r){do{xc()}while(null!==Kl);if(6&El)throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-at(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===Tl&&(Il=Tl=null,Pl=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||ql||(ql=!0,Tc(tt,function(){return xc(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=Cl.transition,Cl.transition=null;var s=bt;bt=1;var l=El;El|=4,_l.current=null,function(e,t){if(ei=Ht,pr(e=hr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,p=null;t:for(;;){for(var f;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==a||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(f=h.firstChild);)p=h,h=f;for(;;){if(h===e)break t;if(p===n&&++u===i&&(l=s),p===a&&++d===r&&(c=s),null!==(f=h.nextSibling))break;p=(h=p).parentNode}h=f}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Ht=!1,Js=t;null!==Js;)if(e=(t=Js).child,1028&t.subtreeFlags&&null!==e)e.return=t,Js=e;else for(;null!==Js;){t=Js;try{var g=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==g){var m=g.memoizedProps,v=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:ns(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(o(163))}}catch(e){Sc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Js=e;break}Js=t.return}g=el,el=!1}(e,n),gl(n,e),fr(ti),Ht=!!ei,ti=ei=null,e.current=n,vl(n,e,i),Ye(),El=l,bt=s,Cl.transition=a}else e.current=n;if(ql&&(ql=!1,Kl=e,$l=i),a=e.pendingLanes,0===a&&(Gl=null),function(e){if(ot&&"function"==typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(it,e,void 0,!(128&~e.current.flags))}catch(e){}}(n.stateNode),nc(e,Je()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Vl)throw Vl=!1,e=Hl,Hl=null,e;!!(1&$l)&&0!==e.tag&&xc(),a=e.pendingLanes,1&a?e===Yl?Xl++:(Xl=0,Yl=e):Xl=0,Ui()}(e,t,n,r)}finally{Cl.transition=i,bt=r}return null}function xc(){if(null!==Kl){var e=wt($l),t=Cl.transition,n=bt;try{if(Cl.transition=null,bt=16>e?16:e,null===Kl)var r=!1;else{if(e=Kl,Kl=null,$l=0,6&El)throw Error(o(331));var i=El;for(El|=4,Js=e.current;null!==Js;){var a=Js,s=a.child;if(16&Js.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Js=u;null!==Js;){var d=Js;switch(d.tag){case 0:case 11:case 15:tl(8,d,a)}var h=d.child;if(null!==h)h.return=d,Js=h;else for(;null!==Js;){var p=(d=Js).sibling,f=d.return;if(il(d),d===u){Js=null;break}if(null!==p){p.return=f,Js=p;break}Js=f}}}var g=a.alternate;if(null!==g){var m=g.child;if(null!==m){g.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}Js=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Js=s;else e:for(;null!==Js;){if(2048&(a=Js).flags)switch(a.tag){case 0:case 11:case 15:tl(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Js=y;break e}Js=a.return}}var b=e.current;for(Js=b;null!==Js;){var w=(s=Js).child;if(2064&s.subtreeFlags&&null!==w)w.return=s,Js=w;else e:for(s=b;null!==Js;){if(2048&(l=Js).flags)try{switch(l.tag){case 0:case 11:case 15:nl(9,l)}}catch(e){Sc(l,l.return,e)}if(l===s){Js=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,Js=x;break e}Js=l.return}}if(El=i,Ui(),ot&&"function"==typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Cl.transition=t}}return!1}function Ac(e,t,n){e=Bo(e,t=ps(0,t=cs(n,t),1),1),t=Zl(),null!==e&&(vt(e,1,t),nc(e,t))}function Sc(e,t,n){if(3===e.tag)Ac(e,e,n);else for(;null!==t;){if(3===t.tag){Ac(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Gl||!Gl.has(r))){t=Bo(t,e=fs(t,e=cs(n,e),1),1),e=Zl(),null!==t&&(vt(t,1,e),nc(t,e));break}}t=t.return}}function kc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Zl(),e.pingedLanes|=e.suspendedLanes&n,Tl===e&&(Pl&n)===n&&(4===jl||3===jl&&(130023424&Pl)===Pl&&500>Je()-Bl?dc(e,0):Dl|=n),nc(e,t)}function _c(e,t){0===t&&(1&e.mode?(t=ut,!(130023424&(ut<<=1))&&(ut=4194304)):t=1);var n=Zl();null!==(e=Oo(e,t))&&(vt(e,t,n),nc(e,n))}function Cc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),_c(e,n)}function Ec(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),_c(e,n)}function Tc(e,t){return Ke(e,t)}function Ic(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pc(e,t,n,r){return new Ic(e,t,n,r)}function Lc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Nc(e,t){var n=e.alternate;return null===n?((n=Pc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jc(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Lc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Rc(n.children,i,a,t);case k:s=8,i|=8;break;case _:return(e=Pc(12,n,t,2|i)).elementType=_,e.lanes=a,e;case I:return(e=Pc(13,n,t,i)).elementType=I,e.lanes=a,e;case P:return(e=Pc(19,n,t,i)).elementType=P,e.lanes=a,e;case j:return Oc(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case E:s=9;break e;case T:s=11;break e;case L:s=14;break e;case N:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Pc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Rc(e,t,n,r){return(e=Pc(7,e,r,t)).lanes=n,e}function Oc(e,t,n,r){return(e=Pc(22,e,r,t)).elementType=j,e.lanes=n,e.stateNode={isHidden:!1},e}function zc(e,t,n){return(e=Pc(6,e,null,t)).lanes=n,e}function Dc(e,t,n){return(t=Pc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,i,o,a,s,l){return e=new Mc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Pc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Do(o),e}function Bc(e){if(!e)return Ei;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ni(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Ni(n))return Oi(e,n,t)}return t}function Wc(e,t,n,r,i,o,a,s,l){return(e=Fc(n,r,!0,e,0,o,0,s,l)).context=Bc(null),n=e.current,(o=Fo(r=Zl(),i=ec(n))).callback=null!=t?t:null,Bo(n,o,i),e.current.lanes=i,vt(e,i,r),nc(e,r),e}function Uc(e,t,n,r){var i=t.current,o=Zl(),a=ec(i);return n=Bc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Fo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Bo(i,t,a))&&(tc(e,i,a,o),Wo(e,i,a)),a}function Vc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Gc(e,t){Hc(e,t),(e=e.alternate)&&Hc(e,t)}Al=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ii.current)bs=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return bs=!1,function(e,t,n){switch(t.tag){case 3:Is(t),fo();break;case 5:Qo(t);break;case 1:Ni(t.type)&&zi(t);break;case 4:Yo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(So,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(ea,1&ea.current),t.flags|=128,null):0!==(n&t.child.childLanes)?zs(e,t,n):(Ci(ea,1&ea.current),null!==(e=Vs(e,t,n))?e.sibling:null);Ci(ea,1&ea.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Ws(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(ea,ea.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return Vs(e,t,n)}(e,t,n);bs=!!(131072&e.flags)}else bs=!1,io&&1048576&t.flags&&Zi(t,qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Us(e,t),e=t.pendingProps;var i=Li(t,Ti.current);Po(t,n),i=ma(null,t,r,e,i,n);var a=va();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ni(r)?(a=!0,zi(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Do(t),i.updater=is,t.stateNode=i,i._reactInternals=t,ls(t,r,e,n),t=Ts(null,t,r,!0,a,n)):(t.tag=0,io&&a&&eo(t),ws(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Us(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Lc(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===L)return 14}return 2}(r),e=ns(r,e),i){case 0:t=Cs(null,t,r,e,n);break e;case 1:t=Es(null,t,r,e,n);break e;case 11:t=xs(null,t,r,e,n);break e;case 14:t=As(null,t,r,ns(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Cs(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 1:return r=t.type,i=t.pendingProps,Es(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 3:e:{if(Is(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,Mo(e,t),Vo(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Ps(e,t,r,n,i=cs(Error(o(423)),t));break e}if(r!==i){t=Ps(e,t,r,n,i=cs(Error(o(424)),t));break e}for(ro=ci(t.stateNode.containerInfo.firstChild),no=t,io=!0,oo=null,n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fo(),r===i){t=Vs(e,t,n);break e}ws(e,t,r,n)}t=t.child}return t;case 5:return Qo(t),null===e&&co(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,ni(r,i)?s=null:null!==a&&ni(r,a)&&(t.flags|=32),_s(e,t),ws(e,t,s,n),t.child;case 6:return null===e&&co(t),null;case 13:return zs(e,t,n);case 4:return Yo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=xo(t,null,r,n):ws(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,xs(e,t,r,i=t.elementType===r?i:ns(r,i),n);case 7:return ws(e,t,t.pendingProps,n),t.child;case 8:case 12:return ws(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,Ci(So,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===i.children&&!Ii.current){t=Vs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Fo(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Io(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Io(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ws(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Po(t,n),r=r(i=Lo(i)),t.flags|=1,ws(e,t,r,n),t.child;case 14:return i=ns(r=t.type,t.pendingProps),As(e,t,r,i=ns(r.type,i),n);case 15:return Ss(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ns(r,i),Us(e,t),t.tag=1,Ni(r)?(e=!0,zi(t)):e=!1,Po(t,n),as(t,r,i),ls(t,r,i,n),Ts(null,t,r,!0,e,n);case 19:return Ws(e,t,n);case 22:return ks(e,t,n)}throw Error(o(156,t.tag))};var qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function $c(e){this._internalRoot=e}function Xc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Jc(){}function Qc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Vc(a);s.call(e)}}Uc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Vc(a);o.call(e)}}var a=Wc(t,r,e,0,null,!1,0,"",Jc);return e._reactRootContainer=a,e[fi]=a.current,Ur(8===e.nodeType?e.parentNode:e),cc(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Vc(l);s.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Jc);return e._reactRootContainer=l,e[fi]=l.current,Ur(8===e.nodeType?e.parentNode:e),cc(function(){Uc(t,l,n,r)}),l}(n,t,e,i,r);return Vc(a)}$c.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Uc(e,t,null,null)},$c.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cc(function(){Uc(null,e,null,null)}),t[fi]=null}},$c.prototype.unstable_scheduleHydration=function(e){if(e){var t=kt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jt.length&&0!==t&&t<jt[n].priority;n++);jt.splice(n,0,e),0===n&&Dt(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),nc(t,Je()),!(6&El)&&(Wl=Je()+500,Ui()))}break;case 13:cc(function(){var t=Oo(e,1);if(null!==t){var n=Zl();tc(t,e,1,n)}}),Gc(e,1)}},At=function(e){if(13===e.tag){var t=Oo(e,134217728);if(null!==t)tc(t,e,134217728,Zl());Gc(e,134217728)}},St=function(e){if(13===e.tag){var t=ec(e),n=Oo(e,t);if(null!==n)tc(n,e,t,Zl());Gc(e,t)}},kt=function(){return bt},_t=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Ae=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=xi(r);if(!i)throw Error(o(90));K(r),Q(r,i)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=lc,Ie=cc;var Zc={usingClientEntryPoint:!1,Events:[bi,wi,xi,Ce,Ee,lc]},eu={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},tu={bundleType:eu.bundleType,version:eu.version,rendererPackageName:eu.rendererPackageName,rendererConfig:eu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ge(e))?null:e.stateNode},findFiberByHostInstance:eu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nu.isDisabled&&nu.supportsFiber)try{it=nu.inject(tu),ot=nu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Xc(t))throw Error(o(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Xc(e))throw Error(o(299));var n=!1,r="",i=qc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Kc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ge(t))?null:e.stateNode},t.flushSync=function(e){return cc(e)},t.hydrate=function(e,t,n){if(!Yc(t))throw Error(o(200));return Qc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Xc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=qc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Wc(t,null,e,1,null!=n?n:null,i,0,a,s),e[fi]=t.current,Ur(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $c(t)},t.render=function(e,t,n){if(!Yc(t))throw Error(o(200));return Qc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Yc(e))throw Error(o(40));return!!e._reactRootContainer&&(cc(function(){Qc(null,null,e,!1,function(){e._reactRootContainer=null,e[fi]=null})}),!0)},t.unstable_batchedUpdates=lc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Qc(e,t,n,!1,r)},t.version="18.3.1-next-f1338f8080-20240426"},1464(e,t,n){"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>g,Lc:()=>y,Ms:()=>b});var r=n(2680),i=n(8853),o=n(7304);const a={m:"margin",p:"padding"},s={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=a[t],i=s[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(e,t,n,r){var o;const a=null!=(o=(0,i.Yn)(e,t,!1))?o:n;return"number"==typeof a?e=>"string"==typeof e?e:a*e:Array.isArray(a)?e=>"string"==typeof e?e:a[e]:"function"==typeof a?a:()=>{}}function f(e){return p(e,"spacing",8)}function g(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}function m(e,t,n,i){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=g(t,n),e),{})}(c(n),i),a=e[n];return(0,r.NI)(e,a,o)}function v(e,t){const n=f(e.theme);return Object.keys(e).map(r=>m(e,t,r,n)).reduce(o.A,{})}function y(e){return v(e,u)}function b(e){return v(e,d)}function w(e){return v(e,h)}y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=d,w.propTypes={},w.filterProps=h},1496(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen")},1508(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,g=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(m=!1,w(e),!g)if(null!==r(c))g=!0,j(A);else{var t=r(u);null!==t&&R(x,t.startTime-e)}}function A(e,n){g=!1,m&&(m=!1,y(C),C=-1),f=!0;var o=p;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!I());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&R(x,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,k=!1,_=null,C=-1,E=5,T=-1;function I(){return!(t.unstable_now()-T<E)}function P(){if(null!==_){var e=t.unstable_now();T=e;var n=!0;try{n=_(!0,e)}finally{n?S():(k=!1,_=null)}}else k=!1}if("function"==typeof b)S=function(){b(P)};else if("undefined"!=typeof MessageChannel){var L=new MessageChannel,N=L.port2;L.port1.onmessage=P,S=function(){N.postMessage(null)}}else S=function(){v(P,0)};function j(e){_=e,k||(k=!0,S())}function R(e,n){C=v(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||f||(g=!0,j(A))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(m?(y(C),C=-1):m=!0,R(x,o-a))):(e.sortIndex=s,n(c,e),g||f||(g=!0,j(A))),e},t.unstable_shouldYield=I,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},1683(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661),i=n(1941);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo(()=>t.every(e=>null==e)?null:e=>{t.forEach(t=>{(0,i.A)(t,e)})},t)}},1687(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661);const i={};function o(e,t){const n=r.useRef(i);return n.current===i&&(n.current=e(t)),n}},1770(e,t,n){"use strict";n.d(t,{Ay:()=>w});var r=n(4320),i=n(8915),o=n(6253),a=n(6997),s=n(727),l=n(5450),c=n(3184),u=n(7973),d=n(9868),h=n(2045),p=n(7035),f=n(7439),g=n(9088);const m=["mode","contrastThreshold","tonalOffset"],v={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:l.A.white,default:l.A.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},y={text:{primary:l.A.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:l.A.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function b(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,s.a)(e.main,i):"dark"===t&&(e.dark=(0,s.e$)(e.main,o)))}function w(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:w=.2}=e,x=(0,i.A)(e,m),A=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p.A[200],light:p.A[50],dark:p.A[400]}:{main:p.A[700],light:p.A[400],dark:p.A[800]}}(t),S=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:u.A[200],light:u.A[50],dark:u.A[400]}:{main:u.A[500],light:u.A[300],dark:u.A[700]}}(t),k=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:d.A[500],light:d.A[300],dark:d.A[700]}:{main:d.A[700],light:d.A[400],dark:d.A[800]}}(t),_=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f.A[400],light:f.A[300],dark:f.A[700]}:{main:f.A[700],light:f.A[500],dark:f.A[900]}}(t),C=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g.A[400],light:g.A[300],dark:g.A[700]}:{main:g.A[800],light:g.A[500],dark:g.A[900]}}(t),E=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:h.A[400],light:h.A[300],dark:h.A[700]}:{main:"#ed6c02",light:h.A[500],dark:h.A[900]}}(t);function T(e){return(0,s.eM)(e,y.text.primary)>=n?y.text.primary:v.text.primary}const I=e=>{let{color:t,name:n,mainShade:i=500,lightShade:a=300,darkShade:s=700}=e;if(t=(0,r.A)({},t),!t.main&&t[i]&&(t.main=t[i]),!t.hasOwnProperty("main"))throw new Error((0,o.A)(11,n?" (".concat(n,")"):"",i));if("string"!=typeof t.main)throw new Error((0,o.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return b(t,"light",a,w),b(t,"dark",s,w),t.contrastText||(t.contrastText=T(t.main)),t},P={dark:y,light:v};return(0,a.A)((0,r.A)({common:(0,r.A)({},l.A),mode:t,primary:I({color:A,name:"primary"}),secondary:I({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:I({color:k,name:"error"}),warning:I({color:E,name:"warning"}),info:I({color:_,name:"info"}),success:I({color:C,name:"success"}),grey:c.A,contrastThreshold:n,getContrastText:T,augmentColor:I,tonalOffset:w},P[t]),x)}},1834(e,t,n){"use strict";n.d(t,{AH:()=>u,i7:()=>d,mL:()=>c});var r=n(457),i=n(8661),o=n(696),a=n(4430),s=n(3385),l=(n(5449),n(8720),function(e,t){var n=arguments;if(null==t||!r.h.call(t,"css"))return i.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=r.E,a[1]=(0,r.c)(e,t);for(var s=2;s<o;s++)a[s]=n[s];return i.createElement.apply(null,a)});!function(e){var t;t||(t=e.JSX||(e.JSX={}))}(l||(l={}));var c=(0,r.w)(function(e,t){var n=e.styles,l=(0,s.J)([n],void 0,i.useContext(r.T)),c=i.useRef();return(0,a.i)(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,i=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==i&&(r=!0,i.setAttribute("data-emotion",e),n.hydrate([i])),c.current=[n,r],function(){n.flush()}},[t]),(0,a.i)(function(){var e=c.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,o.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}},[t,l.name]),null});function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.J)(t)}function d(){var e=u.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},1852(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"}),"Home")},1941(e,t,n){"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},1957(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3m-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05"}),"FavoriteBorder")},1985(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7.53 12L9 10.5l1.4-1.41 2.07 2.08L17.6 6 19 7.41zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4z"}),"LibraryAddCheck")},2037(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8661);function i(e){let{controlled:t,default:n,name:i,state:o="value"}=e;const{current:a}=r.useRef(void 0!==t),[s,l]=r.useState(n);return[a?t:s,r.useCallback(e=>{a||l(e)},[])]}},2045(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"}},2372(e,t,n){"use strict";n.d(t,{A:()=>y});var r=n(4320),i=n(8915),o=n(6253),a=n(6997),s=n(3367),l=n(9718),c=n(3013),u=n(4987),d=n(1770),h=n(2436),p=n(5096),f=n(5293),g=n(3851);const m=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:v={},typography:y={}}=e,b=(0,i.A)(e,m);if(e.vars&&void 0===e.generateCssVars)throw new Error((0,o.A)(18));const w=(0,d.Ay)(n),x=(0,c.A)(e);let A=(0,a.A)(x,{mixins:(0,u.A)(x.breakpoints,t),palette:w,shadows:p.A.slice(),typography:(0,h.A)(w,y),transitions:(0,f.Ay)(v),zIndex:(0,r.A)({},g.A)});A=(0,a.A)(A,b);for(var S=arguments.length,k=new Array(S>1?S-1:0),_=1;_<S;_++)k[_-1]=arguments[_];return A=k.reduce((e,t)=>(0,a.A)(e,t),A),A.unstable_sxConfig=(0,r.A)({},l.A,null==b?void 0:b.unstable_sxConfig),A.unstable_sx=function(e){return(0,s.A)({sx:e,theme:this})},A}const y=v},2392(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6489).A},2436(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(4320),i=n(8915),o=n(6997);const a=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const s={textTransform:"uppercase"},l='"Roboto", "Helvetica", "Arial", sans-serif';function c(e,t){const n="function"==typeof t?t(e):t,{fontFamily:c=l,fontSize:u=14,fontWeightLight:d=300,fontWeightRegular:h=400,fontWeightMedium:p=500,fontWeightBold:f=700,htmlFontSize:g=16,allVariants:m,pxToRem:v}=n,y=(0,i.A)(n,a);const b=u/14,w=v||(e=>"".concat(e/g*b,"rem")),x=(e,t,n,i,o)=>{return(0,r.A)({fontFamily:c,fontWeight:e,fontSize:w(t),lineHeight:n},c===l?{letterSpacing:"".concat((a=i/t,Math.round(1e5*a)/1e5),"em")}:{},o,m);var a},A={h1:x(d,96,1.167,-1.5),h2:x(d,60,1.2,-.5),h3:x(h,48,1.167,0),h4:x(h,34,1.235,.25),h5:x(h,24,1.334,0),h6:x(p,20,1.6,.15),subtitle1:x(h,16,1.75,.15),subtitle2:x(p,14,1.57,.1),body1:x(h,16,1.5,.15),body2:x(h,14,1.43,.15),button:x(p,14,1.75,.4,s),caption:x(h,12,1.66,.4),overline:x(h,12,2.66,1,s),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,o.A)((0,r.A)({htmlFontSize:g,pxToRem:w,fontFamily:c,fontSize:u,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:p,fontWeightBold:f},A),y,{clone:!1})}},2561(e,t,n){"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout(()=>{e.apply(this,i)},n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},2577(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(8661),i=n(8791);let o=!0,a=!1;const s=new i.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(o=!0)}function u(){o=!1}function d(){"hidden"===this.visibilityState&&a&&(o=!0)}function h(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return o||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function p(){const e=r.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))},[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!h(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(a=!0,s.start(100,()=>{a=!1}),t.current=!1,!0)},ref:e}}},2621(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>o});var r=n(5823);const i=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function o(e){const t="".concat(e).match(i);return t&&t[1]||""}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||o(e)||t}function s(e,t,n){const r=a(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return a(e,"Component");if("object"==typeof e)switch(e.$$typeof){case r.vM:return s(e,e.render,"ForwardRef");case r.lD:return s(e,e.type,"memo");default:return}}}},2623(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(6997)},2680(e,t,n){"use strict";n.d(t,{EU:()=>s,NI:()=>a,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>i});var r=n(6997);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},o={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(i[e],"px)")};function a(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||o;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||o;return Object.keys(t).reduce((r,o)=>{if(-1!==Object.keys(e.values||i).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r},{})}return n(t)}function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function l(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function c(e){const t=s(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];const a=[t,...i].reduce((e,t)=>(0,r.A)(e,t),{});return l(Object.keys(t),a)}function u(e){let{values:t,breakpoints:n,base:r}=e;const i=r||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}(t,n),o=Object.keys(i);if(0===o.length)return t;let a;return o.reduce((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[a],a=r):"object"==typeof t?(e[n]=null!=t[n]?t[n]:t[a],a=n):e[n]=t,e),{})}},2902(e,t,n){"use strict";e.exports=n(9770)},2964(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp")},3013(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(4320),i=n(8915),o=n(6997),a=n(9682);const s={borderRadius:4};var l=n(1464);var c=n(3367),u=n(9718),d=n(6620);const h=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:f={}}=e,g=(0,i.A)(e,h),m=(0,a.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0===n.length?[1]:n).map(e=>{const n=t(e);return"number"==typeof n?"".concat(n,"px"):n}).join(" ")};return n.mui=!0,n}(p);let y=(0,o.A)({breakpoints:m,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},s,f)},g);y.applyStyles=d.A;for(var b=arguments.length,w=new Array(b>1?b-1:0),x=1;x<b;x++)w[x-1]=arguments[x];return y=w.reduce((e,t)=>(0,o.A)(e,t),y),y.unstable_sxConfig=(0,r.A)({},u.A,null==g?void 0:g.unstable_sxConfig),y.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},y}},3072(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{fillRule:"evenodd",d:"M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3"}),"PushPin")},3181(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(6175)},3184(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"}},3367(e,t,n){"use strict";n.d(t,{A:()=>u,k:()=>l});var r=n(6175),i=n(7304),o=n(8853),a=n(2680),s=n(9718);function l(){function e(e,t,n,i){const s={[e]:t,theme:n},l=i[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,o.Yn)(n,u)||{};if(h)return h(s);return(0,a.NI)(s,t,t=>{let n=(0,o.BO)(p,d,t);return t===n&&"string"==typeof t&&(n=(0,o.BO)(p,d,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}})}return function t(n){var r;const{sx:o,theme:l={},nested:c}=n||{};if(!o)return null;const u=null!=(r=l.unstable_sxConfig)?r:s.A;function d(n){let r=n;if("function"==typeof n)r=n(l);else if("object"!=typeof n)return n;if(!r)return null;const o=(0,a.EU)(l.breakpoints),s=Object.keys(o);let d=o;return Object.keys(r).forEach(n=>{const o=(s=r[n],c=l,"function"==typeof s?s(c):s);var s,c;if(null!=o)if("object"==typeof o)if(u[n])d=(0,i.A)(d,e(n,o,l,u));else{const e=(0,a.NI)({theme:l},o,e=>({[n]:e}));!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>e.concat(Object.keys(t)),[]),i=new Set(r);return t.every(e=>i.size===Object.keys(e).length)}(e,o)?d=(0,i.A)(d,e):d[n]=t({sx:o,theme:l,nested:!0})}else d=(0,i.A)(d,e(n,o,l,u))}),!c&&l.modularCssLayers?{"@layer sx":(0,a.vf)(s,d)}:(0,a.vf)(s,d)}return Array.isArray(o)?o.map(d):d(o)}}const c=l();c.filterProps=["sx"];const u=c},3385(e,t,n){"use strict";n.d(t,{J:()=>f});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(7601),o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},c=(0,i.A)(function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()}),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,function(e,t,n){return h={name:t,styles:n,next:h},t})}return 1===r[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return h={name:i.name,styles:i.styles,next:h},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)h={name:a.name,styles:a.styles,next:h},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":l(s)&&(r+=c(o)+":"+u(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var h=d(e,t,a);switch(o){case"animation":case"animationName":r+=c(o)+":"+h+";";break;default:r+=o+"{"+h+"}"}}else for(var p=0;p<a.length;p++)l(a[p])&&(r+=c(o)+":"+u(o,a[p])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=h,p=n(e);return h=s,d(e,t,p)}}var f=n;if(null==t)return f;var g=t[f];return void 0!==g?g:f}var h,p=/label:\s*([^\s;{]+)\s*(;|$)/g;function f(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";h=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=d(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=d(n,t,e[a]),r)i+=o[a]}p.lastIndex=0;for(var s,l="";null!==(s=p.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:h}}},3413(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>i.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>o.A});var r=n(3367),i=n(5219),o=n(9718)},3473(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(2037).A},3598(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(1683).A},3699(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4320);function i(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach(o=>{if(o.toString().match(/^(components|slots)$/))n[o]=(0,r.A)({},e[o],n[o]);else if(o.toString().match(/^(componentsProps|slotProps)$/)){const a=e[o]||{},s=t[o];n[o]={},s&&Object.keys(s)?a&&Object.keys(a)?(n[o]=(0,r.A)({},s),Object.keys(a).forEach(e=>{n[o][e]=i(a[e],s[e])})):n[o]=s:n[o]=a}else void 0===n[o]&&(n[o]=e[o])}),n}},3851(e,t,n){"use strict";n.d(t,{A:()=>r});const r={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},3948(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6267).A},4089(e,t,n){"use strict";n.d(t,{Ay:()=>o});var r=n(7599);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t){const n=i[t];return n?"".concat(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui","-").concat(n):"".concat(r.A.generate(e),"-").concat(t)}},4320(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},4430(e,t,n){"use strict";var r;n.d(t,{i:()=>s,s:()=>a});var i=n(8661),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()},s=o||i.useLayoutEffect},4481(e,t,n){"use strict";var r=n(8898);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,u=e=>(0,c.default)((0,i.default)({},e,{theme:y((0,i.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:d,slot:p,skipVariantsResolver:g,skipSx:m,overridesResolver:x=b(v(p))}=c,A=(0,o.default)(c,h),S=d&&d.startsWith("Mui")||p?"components":"custom",k=void 0!==g?g:p&&"Root"!==p&&"root"!==p||!1,_=m||!1;let C=f;"Root"===p||"root"===p?C=r:p?C=l:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const E=(0,a.default)(e,(0,i.default)({shouldForwardProp:C,label:undefined},A)),T=e=>"function"==typeof e&&e.__emotion_real!==e||(0,s.isPlainObject)(e)?r=>{const o=y({theme:r.theme,defaultTheme:n,themeId:t});return w(e,(0,i.default)({},r,{theme:o}),o.modularCssLayers?S:void 0)}:e,I=function(r){let o=T(r);for(var a=arguments.length,s=new Array(a>1?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];const c=s?s.map(T):[];d&&x&&c.push(e=>{const r=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const o=r.components[d].styleOverrides,a={};return Object.entries(o).forEach(t=>{let[n,o]=t;a[n]=w(o,(0,i.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),x(e,a)}),d&&!k&&c.push(e=>{var r;const o=y((0,i.default)({},e,{defaultTheme:n,themeId:t}));return w({variants:null==o||null==(r=o.components)||null==(r=r[d])?void 0:r.variants},(0,i.default)({},e,{theme:o}),o.modularCssLayers?"theme":void 0)}),_||c.push(u);const h=c.length-s.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const p=E(o,...c);return e.muiName&&(p.muiName=e.muiName),p};return E.withConfig&&(I.withConfig=E.withConfig),I}};var i=r(n(4858)),o=r(n(1229)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n(1296)),s=n(2623),l=(r(n(3181)),r(n(2621)),r(n(7946))),c=r(n(3413));const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function g(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const m=(0,l.default)(),v=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function y(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function b(e){return e?(t,n)=>n[e]:null}function w(e,t,n){let{ownerState:r}=t,s=(0,o.default)(t,u);const l="function"==typeof e?e((0,i.default)({ownerState:r},s)):e;if(Array.isArray(l))return l.flatMap(e=>w(e,(0,i.default)({ownerState:r},s),n));if(l&&"object"==typeof l&&Array.isArray(l.variants)){const{variants:e=[]}=l;let t=(0,o.default)(l,d);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,i.default)({ownerState:r},s,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&s[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"==typeof e.style?e.style((0,i.default)({ownerState:r},s,r)):e.style;t.push(n?g((0,a.internal_serializeStyles)(o),n):o)}}),t}return n?g((0,a.internal_serializeStyles)(l),n):l}},4519(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(6333).A},4651(e,t,n){"use strict";e.exports=n(1508)},4690(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore")},4743(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste")},4849(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((e,t)=>null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)},()=>{})}n.d(t,{A:()=>r})},4858(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4882(e,t,n){"use strict";n.d(t,{A:()=>r});const r="$$material"},4987(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4320);function i(e,t){return(0,r.A)({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}},5089(e,t,n){"use strict";e.exports=n(7811)},5096(e,t,n){"use strict";n.d(t,{A:()=>i});function r(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const i=["none",r(0,2,1,-1,0,1,1,0,0,1,3,0),r(0,3,1,-2,0,2,2,0,0,1,5,0),r(0,3,3,-2,0,3,4,0,0,1,8,0),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)]},5219(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(4320),i=n(8915),o=n(6997),a=n(9718);const s=["sx"];function l(e){const{sx:t}=e,n=(0,i.A)(e,s),{systemProps:l,otherProps:c}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:a.A;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r})(n);let u;return u=Array.isArray(t)?[l,...t]:"function"==typeof t?function(){const e=t(...arguments);return(0,o.Q)(e)?(0,r.A)({},l,e):l}:(0,r.A)({},l,t),(0,r.A)({},c,{sx:u})}},5293(e,t,n){"use strict";n.d(t,{Ay:()=>u});var r=n(8915),i=n(4320);const o=["duration","easing","delay"],a={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},s={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l(e){return"".concat(Math.round(e),"ms")}function c(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function u(e){const t=(0,i.A)({},a,e.easing),n=(0,i.A)({},s,e.duration);return(0,i.A)({getAutoHeightDuration:c,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:a=n.standard,easing:s=t.easeInOut,delay:c=0}=i;(0,r.A)(i,o);return(Array.isArray(e)?e:[e]).map(e=>"".concat(e," ").concat("string"==typeof a?a:l(a)," ").concat(s," ").concat("string"==typeof c?c:l(c))).join(",")}},e,{easing:t,duration:n})}},5362(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M14 4v5c0 1.12.37 2.16 1 3H9c.65-.86 1-1.9 1-3V4zm3-2H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3V4h1c.55 0 1-.45 1-1s-.45-1-1-1"}),"PushPinOutlined")},5421(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(4089);function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i={};return t.forEach(t=>{i[t]=(0,r.Ay)(e,t,n)}),i}},5449(e,t,n){"use strict";n.d(t,{A:()=>ie});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function c(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function p(e){return e.length}function f(e,t){return t.push(e),e}var g=1,m=1,v=0,y=0,b=0,w="";function x(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:g,column:m,length:a,return:""}}function A(e,t){return a(x("",null,null,"",null,null,0),e,{length:-e.length},t)}function S(){return b=y>0?u(w,--y):0,m--,10===b&&(m=1,g--),b}function k(){return b=y<v?u(w,y++):0,m++,10===b&&(m=1,g++),b}function _(){return u(w,y)}function C(){return y}function E(e,t){return d(w,e,t)}function T(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function I(e){return g=m=1,v=h(w=e),y=0,[]}function P(e){return w="",e}function L(e){return s(E(y-1,R(91===e?e+2:40===e?e+1:e)))}function N(e){for(;(b=_())&&b<33;)k();return T(e)>2||T(b)>3?"":" "}function j(e,t){for(;--t&&k()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return E(e,C()+(t<6&&32==_()&&32==k()))}function R(e){for(;k();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&R(b);break;case 40:41===e&&R(e);break;case 92:k()}return y}function O(e,t){for(;k()&&e+b!==57&&(e+b!==84||47!==_()););return"/*"+E(t,y-1)+"*"+o(47===e?e:k())}function z(e){for(;!T(_());)k();return E(e,y)}var D="-ms-",M="-moz-",F="-webkit-",B="comm",W="rule",U="decl",V="@keyframes";function H(e,t){for(var n="",r=p(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function G(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case U:return e.return=e.return||e.value;case B:return"";case V:return e.return=e.value+"{"+H(e.children,r)+"}";case W:e.value=e.props.join(",")}return h(n=H(e.children,r))?e.return=e.value+"{"+n+"}":""}function q(e){return P(K("",null,null,null,[""],e=I(e),0,[0],e))}function K(e,t,n,r,i,a,s,d,p){for(var g=0,m=0,v=s,y=0,b=0,w=0,x=1,A=1,E=1,T=0,I="",P=i,R=a,D=r,M=I;A;)switch(w=T,T=k()){case 40:if(108!=w&&58==u(M,v-1)){-1!=c(M+=l(L(T),"&","&\f"),"&\f")&&(E=-1);break}case 34:case 39:case 91:M+=L(T);break;case 9:case 10:case 13:case 32:M+=N(w);break;case 92:M+=j(C()-1,7);continue;case 47:switch(_()){case 42:case 47:f(X(O(k(),C()),t,n),p);break;default:M+="/"}break;case 123*x:d[g++]=h(M)*E;case 125*x:case 59:case 0:switch(T){case 0:case 125:A=0;case 59+m:-1==E&&(M=l(M,/\f/g,"")),b>0&&h(M)-v&&f(b>32?Y(M+";",r,n,v-1):Y(l(M," ","")+";",r,n,v-2),p);break;case 59:M+=";";default:if(f(D=$(M,t,n,g,m,i,d,I,P=[],R=[],v),a),123===T)if(0===m)K(M,t,D,D,P,a,v,d,R);else switch(99===y&&110===u(M,3)?100:y){case 100:case 108:case 109:case 115:K(e,D,D,r&&f($(e,D,D,0,0,i,d,I,i,P=[],v),R),i,R,v,d,r?P:R);break;default:K(M,D,D,D,[""],R,0,d,R)}}g=m=b=0,x=E=1,I=M="",v=s;break;case 58:v=1+h(M),b=w;default:if(x<1)if(123==T)--x;else if(125==T&&0==x++&&125==S())continue;switch(M+=o(T),T*x){case 38:E=m>0?1:(M+="\f",-1);break;case 44:d[g++]=(h(M)-1)*E,E=1;break;case 64:45===_()&&(M+=L(k())),y=_(),m=v=h(I=M+=z(C())),T++;break;case 45:45===w&&2==h(M)&&(x=0)}}return a}function $(e,t,n,r,o,a,c,u,h,f,g){for(var m=o-1,v=0===o?a:[""],y=p(v),b=0,w=0,A=0;b<r;++b)for(var S=0,k=d(e,m+1,m=i(w=c[b])),_=e;S<y;++S)(_=s(w>0?v[S]+" "+k:l(k,/&\f/g,v[S])))&&(h[A++]=_);return x(e,t,n,0===o?W:u,h,f,g)}function X(e,t,n){return x(e,t,n,B,o(b),d(e,2,-2),0)}function Y(e,t,n,r){return x(e,t,n,U,d(e,0,r),d(e,r+1,-1),r)}var J=function(e,t,n){for(var r=0,i=0;r=i,i=_(),38===r&&12===i&&(t[n]=1),!T(i);)k();return E(e,y)},Q=function(e,t){return P(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===_()&&(t[n]=1),e[n]+=J(y-1,t,n);break;case 2:e[n]+=L(r);break;case 4:if(44===r){e[++n]=58===_()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=k());return e}(I(e),t))},Z=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Z.get(n))&&!r){Z.set(e,!0);for(var i=[],o=Q(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},te=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ne(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return F+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return F+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return F+e+M+e+D+e+e;case 6828:case 4268:return F+e+D+e+e;case 6165:return F+e+D+"flex-"+e+e;case 5187:return F+e+l(e,/(\w+).+(:[^]+)/,F+"box-$1$2"+D+"flex-$1$2")+e;case 5443:return F+e+D+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return F+e+D+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return F+e+D+l(e,"shrink","negative")+e;case 5292:return F+e+D+l(e,"basis","preferred-size")+e;case 6060:return F+"box-"+l(e,"-grow","")+F+e+D+l(e,"grow","positive")+e;case 4554:return F+l(e,/([^-])(transform)/g,"$1"+F+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,F+"$1"),/(image-set)/,F+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,F+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,F+"box-pack:$3"+D+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+F+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,F+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+F+"$2-$3$1"+M+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+F)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+F+(45===u(e,14)?"inline-":"")+"box$3$1"+F+"$2$3$1"+D+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return F+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return F+e+D+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return F+e+D+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return F+e+D+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=ne(e.value,e.length);break;case V:return H([A(e,{value:l(e.value,"@","@"+F)})],r);case W:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([A(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([A(e,{props:[l(t,/:(plac\w+)/,":"+F+"input-$1")]}),A(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[l(t,/:(plac\w+)/,D+"input-$1")]})],r)}return""})}}],ie=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var i,o,a=e.stylisPlugins||re,s={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;l.push(e)});var c,u,d,h,f=[G,(h=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],g=(u=[ee,te].concat(a,f),d=p(u),function(e,t,n,r){for(var i="",o=0;o<d;o++)i+=u[o](e,t,n,r)||"";return i});o=function(e,t,n,r){c=n,H(q(e?e+"{"+t.styles+"}":t.styles),g),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return m.sheet.hydrate(l),m}},5450(e,t,n){"use strict";n.d(t,{A:()=>r});const r={black:"#000",white:"#fff"}},5460(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6228);const i=e=>(0,r.A)(e)&&"classes"!==e},5553(e,t,n){"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}n.d(t,{A:()=>i});const i=function(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}},5823(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),g=Symbol.for("react.client.reference");function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case a:case o:case u:case d:case f:return e;default:switch(e=e&&e.$$typeof){case l:case c:case p:case h:case s:return e;default:return t}}case r:return t}}}t.vM=c,t.lD=h},5950(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>o.A,createSvgIcon:()=>a.A,debounce:()=>s.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>h,setRef:()=>p,unstable_ClassNameGenerator:()=>x,unstable_useEnhancedEffect:()=>f.A,unstable_useId:()=>g.A,unsupportedProp:()=>m,useControlled:()=>v.A,useEventCallback:()=>y.A,useForkRef:()=>b.A,useIsFocusVisible:()=>w.A});var r=n(7599),i=n(32),o=n(8711),a=n(1257),s=n(1093);const l=function(e,t){return()=>null};var c=n(7026),u=n(9894),d=n(4519);const h=function(e,t){return()=>null};const p=n(1941).A;var f=n(2392),g=n(8338);const m=function(e,t,n,r,i){return null};var v=n(3473),y=n(3948),b=n(3598),w=n(73);const x={configure:e=>{r.A.configure(e)}}},5995(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close")},6175(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6253);function i(e){if("string"!=typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},6228(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},6253(e,t,n){"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}n.d(t,{A:()=>r})},6267(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661),i=n(6489);const o=function(e){const t=r.useRef(e);return(0,i.A)(()=>{t.current=e}),r.useRef(function(){return(0,t.current)(...arguments)}).current}},6333(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(9669);function i(e){return(0,r.A)(e).defaultView||window}},6489(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8661);const i="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},6620(e,t,n){"use strict";function r(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},6811(e,t,n){"use strict";var r=n(7458);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},6997(e,t,n){"use strict";n.d(t,{A:()=>s,Q:()=>o});var r=n(4320),i=n(8661);function o(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function a(e){if(i.isValidElement(e)||!o(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=a(e[n])}),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const l=n.clone?(0,r.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach(r=>{i.isValidElement(t[r])?l[r]=t[r]:o(t[r])&&Object.prototype.hasOwnProperty.call(e,r)&&o(e[r])?l[r]=s(e[r],t[r],n):n.clone?l[r]=o(t[r])?a(t[r]):t[r]:l[r]=t[r]}),l}},7026(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(8661);const i=function(e,t){var n,i;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(i=e.type)||null==(i=i._payload)||null==(i=i.value)?void 0:i.muiName)}},7029(e,t,n){e.exports=function(e){"use strict";var t=Object.freeze({__proto__:null,get ExpressionStatement(){return Ue},get BlockStatement(){return Ve},get EmptyStatement(){return He},get DebuggerStatement(){return Ge},get ReturnStatement(){return qe},get BreakStatement(){return Ke},get ContinueStatement(){return $e},get LabeledStatement(){return Xe},get WithStatement(){return Ye},get IfStatement(){return Je},get SwitchStatement(){return Qe},get SwitchCase(){return Ze},get ThrowStatement(){return et},get TryStatement(){return tt},get CatchClause(){return nt},get WhileStatement(){return rt},get DoWhileStatement(){return it},get ForStatement(){return ot},get ForInStatement(){return at},get ForOfStatement(){return st}}),r=Object.freeze({__proto__:null,get FunctionDeclaration(){return lt},get VariableDeclaration(){return ct},get VariableDeclarator(){return ut},get ClassDeclaration(){return dt},get ClassBody(){return ht},get MethodDefinition(){return pt},get PropertyDefinition(){return ft},get StaticBlock(){return gt},get ImportDeclaration(){return mt},get ExportDefaultDeclaration(){return vt},get ExportNamedDeclaration(){return yt},get ExportAllDeclaration(){return bt}}),i=Object.freeze({__proto__:null,get ExpressionStatement(){return on},get BlockStatement(){return an},get EmptyStatement(){return sn},get DebuggerStatement(){return ln},get ReturnStatement(){return cn},get BreakStatement(){return un},get ContinueStatement(){return dn},get LabeledStatement(){return hn},get WithStatement(){return pn},get IfStatement(){return fn},get SwitchStatement(){return gn},get SwitchCase(){return mn},get ThrowStatement(){return vn},get TryStatement(){return yn},get CatchClause(){return bn},get WhileStatement(){return wn},get DoWhileStatement(){return xn},get ForStatement(){return An},get ForInStatement(){return Sn},get ForOfStatement(){return kn}}),o=Object.freeze({__proto__:null,get FunctionDeclaration(){return _n},get VariableDeclaration(){return Cn},get VariableDeclarator(){return En},get ClassDeclaration(){return Tn},get ClassBody(){return In},get MethodDefinition(){return Pn},get PropertyDefinition(){return Ln},get StaticBlock(){return Nn},get ImportDeclaration(){return jn},get ExportDefaultDeclaration(){return Rn},get ExportNamedDeclaration(){return On},get ExportAllDeclaration(){return zn}});function a(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(l(arguments[t]));return e}var u=Object.freeze,d=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=Object.prototype.hasOwnProperty;function f(e,t){return p.call(e,t)}var g=Object.getOwnPropertyNames,m=Object.setPrototypeOf;function v(e,t){m?m(e,t):e.__proto__=t}var y=Object.getPrototypeOf;function b(e){return y?y(e):e.__proto__}var w=Object.getOwnPropertyDescriptor;function x(e,t,n){for(;t;){var r=w(t,n),i=void 0!==r&&void 0===r.writable&&"function"==typeof r[e]&&r[e];if(i)return i;t=b(t)}}function A(e,t){return x("get",e,t)}function S(e,t){return x("set",e,t)}var k=Object.create;function _(e,t){v(e,t),e.prototype=k(t.prototype,{constructor:{value:e,writable:!0}})}function C(e){for(var t=1;t<arguments.length;++t){var n=arguments[t];for(var r in n)f(n,r)&&(e[r]=n[r])}return e}var E=Object.assign||C,T=[],I=k(null);try{if(!window.Object)throw 0;T=g(I=window).filter(function(e){return"webkitStorageInfo"!==e})}catch(e){try{if(!n.g.Object)throw 0;T=g(I=n.g).filter(function(e){return"GLOBAL"!==e&&"root"!==e})}catch(e){try{I.Object=Object}catch(e){}try{I.Function=Function}catch(e){}try{I.Array=Array}catch(e){}try{I.Number=Number}catch(e){}try{I.parseFloat=parseFloat}catch(e){}try{I.parseInt=parseInt}catch(e){}try{I.Infinity=1/0}catch(e){}try{I.NaN=NaN}catch(e){}try{I.undefined=void 0}catch(e){}try{I.Boolean=Boolean}catch(e){}try{I.String=String}catch(e){}try{I.Symbol=Symbol}catch(e){}try{I.Date=Date}catch(e){}try{I.Promise=Promise}catch(e){}try{I.RegExp=RegExp}catch(e){}try{I.Error=Error}catch(e){}try{I.EvalError=EvalError}catch(e){}try{I.RangeError=RangeError}catch(e){}try{I.ReferenceError=ReferenceError}catch(e){}try{I.SyntaxError=SyntaxError}catch(e){}try{I.TypeError=TypeError}catch(e){}try{I.URIError=URIError}catch(e){}try{I.JSON=JSON}catch(e){}try{I.Math=Math}catch(e){}try{I.console=console}catch(e){}try{I.Intl=Intl}catch(e){}try{I.ArrayBuffer=ArrayBuffer}catch(e){}try{I.Uint8Array=Uint8Array}catch(e){}try{I.Int8Array=Int8Array}catch(e){}try{I.Uint16Array=Uint16Array}catch(e){}try{I.Int16Array=Int16Array}catch(e){}try{I.Uint32Array=Uint32Array}catch(e){}try{I.Int32Array=Int32Array}catch(e){}try{I.Float32Array=Float32Array}catch(e){}try{I.Float64Array=Float64Array}catch(e){}try{I.Uint8ClampedArray=Uint8ClampedArray}catch(e){}try{I.DataView=DataView}catch(e){}try{I.Map=Map}catch(e){}try{I.Set=Set}catch(e){}try{I.WeakMap=WeakMap}catch(e){}try{I.WeakSet=WeakSet}catch(e){}try{I.Proxy=Proxy}catch(e){}try{I.Reflect=Reflect}catch(e){}try{I.BigInt=BigInt}catch(e){}try{I.decodeURI=decodeURI}catch(e){}try{I.decodeURIComponent=decodeURIComponent}catch(e){}try{I.encodeURI=encodeURI}catch(e){}try{I.encodeURIComponent=encodeURIComponent}catch(e){}try{I.escape=escape}catch(e){}try{I.unescape=unescape}catch(e){}try{I.eval=eval}catch(e){}try{I.isFinite=isFinite}catch(e){}try{I.isNaN=isNaN}catch(e){}try{I.SharedArrayBuffer=SharedArrayBuffer}catch(e){}try{I.Atomics=Atomics}catch(e){}try{I.WebAssembly=WebAssembly}catch(e){}try{I.clearInterval=clearInterval}catch(e){}try{I.clearTimeout=clearTimeout}catch(e){}try{I.setInterval=setInterval}catch(e){}try{I.setTimeout=setTimeout}catch(e){}try{I.crypto=crypto}catch(e){}try{I.URL=URL}catch(e){}T=g(I)}}I.Symbol&&(!I.Symbol.iterator&&(I.Symbol.iterator=O("iterator")),!I.Symbol.asyncIterator&&(I.Symbol.asyncIterator=O("asynciterator")));for(var P=k({}),L=0;L<T.length;L++){var N=T[L];try{P[N]=I[N]}catch(e){}}var j=O("window");function R(){var e;return E(k(((e={})[j]=I,e)),P)}function O(e){return e+Math.random().toString(36).substring(2)}function z(e){var t;if("function"==typeof Symbol&&!(t=e[Symbol.asyncIterator])&&(t=e[Symbol.iterator]),t)return t.call(e);if("function"==typeof e.next)return e;var n=0;return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}var D={RES:void 0},M={RES:void 0},F={LABEL:void 0},B={LABEL:void 0},W=O("super"),U=O("supercall"),V=O("noctor"),H=O("clsctor"),G=O("newtarget"),q=O("private"),K=O("noinit"),$=O("deadzone"),X=O("import"),Y=O("exports"),J="0.5.9",Q=function(){function e(e,t){this.kind=e,this.value=t}return e.prototype.get=function(){return this.value},e.prototype.set=function(e){if("const"===this.kind)throw new TypeError("Assignment to constant variable");return this.value=e},e}(),Z=function(){function e(e,t){this.object=e,this.property=t}return e.prototype.get=function(){return this.object[this.property]},e.prototype.set=function(e){return this.object[this.property]=e,!0},e.prototype.del=function(){return delete this.object[this.property]},e}(),ee=function(){function e(e,t){void 0===e&&(e=null),void 0===t&&(t=!1),this.context=k(null),this.withContext=k(null),this.parent=e,this.isolated=t}return e.prototype.global=function(){for(var e=this;e.parent;)e=e.parent;return e},e.prototype.find=function(e){if(this.context[e])return this.context[e];if(e in this.withContext)return new Z(this.withContext,e);if(this.parent)return this.parent.find(e);var t=this.global().find("window").get();return e in t?new Z(t,e):null},e.prototype.var=function(e,t){for(var n=this;n.parent&&!n.isolated;)n=n.parent;var r=n.context[e];if(r){if("var"!==r.kind)throw new SyntaxError("Identifier '"+e+"' has already been declared");t!==K&&r.set(t)}else n.context[e]=new Q("var",t===K?void 0:t);if(!n.parent){var i=n.find("window").get();t!==K&&d(i,e,{value:t,writable:!0,enumerable:!0})}},e.prototype.let=function(e,t){var n=this.context[e];if(n&&n.get()!==$)throw new SyntaxError("Identifier '"+e+"' has already been declared");this.context[e]=new Q("let",t)},e.prototype.const=function(e,t){var n=this.context[e];if(n&&n.get()!==$)throw new SyntaxError("Identifier '"+e+"' has already been declared");this.context[e]=new Q("const",t)},e.prototype.func=function(e,t){var n=this.context[e];if(n&&"var"!==n.kind)throw new SyntaxError("Identifier '"+e+"' has already been declared");this.context[e]=new Q("var",t)},e.prototype.with=function(e){Object.keys(e)&&(this.withContext=e)},e}();function te(e,t){void 0===t&&(t={});var n=t.res,r=t.err,i=t.ret,o=t.fullRet;return new Promise(function(a,s){if("ret"in t)return a(e.return(i));function l(t){var n;try{n=e.next(t)}catch(e){return s(e)}return u(n),null}function c(t){var n;try{n=e.throw(t)}catch(e){return s(e)}u(n)}function u(e){if(e.done)return a(o?e:e.value);if(e.value!==D)return a(e);var t=e.value.RES;return(t&&"function"===t.then?t:Promise.resolve(t)).then(l,c)}"err"in t?c(r):l(n)})}function ne(e,t,n){var r,i,o,s,l,c;return void 0===n&&(n={}),a(this,function(a){if(r=n.getVar,i=void 0!==r&&r,o=n.throwErr,s=void 0===o||o,"undefined"===e.name)return[2,void 0];if(l=t.find(e.name)){if(i)return[2,l];if((c=l.get())===$)throw new ReferenceError(e.name+" is not defined");return[2,c]}if(s)throw new ReferenceError(e.name+" is not defined");return[2,void 0]})}var re=Object.freeze({__proto__:null,Identifier:ne});function ie(e,t){return a(this,function(t){return[2,e.value]})}var oe=Object.freeze({__proto__:null,Literal:ie});function ae(e,t){var n;return a(this,function(e){if((n=t.find(U))&&!n.get())throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return[2,t.find("this").get()]})}function se(e,t){var n,r,i,o,l,c,u;return a(this,function(a){switch(a.label){case 0:n=[],r=0,a.label=1;case 1:return r<e.elements.length?"SpreadElement"!==(i=e.elements[r]).type?[3,3]:(l=(o=n).concat,[5,s(Ee(i,t))]):[3,6];case 2:return n=l.apply(o,[a.sent()]),[3,5];case 3:return u=(c=n).push,[5,s(We(i,t))];case 4:u.apply(c,[a.sent()]),a.label=5;case 5:return r++,[3,1];case 6:return[2,n]}})}function le(e,t){var n,r,i,o,l,c,u,p,f,g,m;return a(this,function(a){switch(a.label){case 0:n={},r=0,a.label=1;case 1:return r<e.properties.length?"SpreadElement"!==(i=e.properties[r]).type?[3,3]:(o=E,l=[n],[5,s(Ee(i,t,{spreadProps:!0}))]):[3,11];case 2:return o.apply(void 0,l.concat([a.sent()])),[3,10];case 3:return c=void 0,u=i.key,i.computed?[5,s(We(u,t))]:[3,5];case 4:return c=a.sent(),[3,8];case 5:return"Identifier"!==u.type?[3,6]:(c=u.name,[3,8]);case 6:return p="",[5,s(ie(u))];case 7:c=p+a.sent(),a.label=8;case 8:return[5,s(We(i.value,t))];case 9:f=a.sent(),"init"===(g=i.kind)?n[c]=f:"get"===g?(m=h(n,c),d(n,c,{get:f,set:m&&m.set,enumerable:!0,configurable:!0})):(m=h(n,c),d(n,c,{get:m&&m.get,set:f,enumerable:!0,configurable:!0})),a.label=10;case 10:return r++,[3,1];case 11:return[2,n]}})}function ce(e,t){var n,r;return a(this,function(i){return e.id&&e.id.name?(n=new ee(t),r=qn(e,n),n.const(e.id.name,r),[2,r]):[2,qn(e,t)]})}function ue(e,t){var n;return a(this,function(r){switch(r.label){case 0:switch(n=e.argument,e.operator){case"+":return[3,1];case"-":return[3,3];case"!":return[3,5];case"~":return[3,7];case"void":return[3,9];case"typeof":return[3,11];case"delete":return[3,15]}return[3,20];case 1:case 3:case 5:case 7:case 9:case 13:case 18:return[5,s(We(n,t))];case 2:return[2,+r.sent()];case 4:return[2,-r.sent()];case 6:return[2,!r.sent()];case 8:return[2,~r.sent()];case 10:return[2,void r.sent()];case 11:return"Identifier"!==n.type?[3,13]:[5,s(ne(n,t,{throwErr:!1}))];case 12:case 14:return[2,typeof r.sent()];case 15:return"MemberExpression"!==n.type?[3,17]:[5,s(ge(n,t,{getVar:!0}))];case 16:return[2,r.sent().del()];case 17:if("Identifier"!==n.type)return[3,18];throw new SyntaxError("Delete of an unqualified identifier in strict mode");case 19:return r.sent(),[2,!0];case 20:throw new SyntaxError("Unexpected token "+e.operator)}})}function de(e,t){var n,r,i;return a(this,function(o){switch(o.label){case 0:return"Identifier"!==(n=e.argument).type?[3,2]:[5,s(ne(n,t,{getVar:!0}))];case 1:case 3:return r=o.sent(),[3,5];case 2:return"MemberExpression"!==n.type?[3,4]:[5,s(ge(n,t,{getVar:!0}))];case 4:throw new SyntaxError("Unexpected token");case 5:if(i=r.get(),"++"===e.operator)return r.set(i+1),[2,e.prefix?r.get():i];if("--"===e.operator)return r.set(i-1),[2,e.prefix?r.get():i];throw new SyntaxError("Unexpected token "+e.operator)}})}function he(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return"PrivateIdentifier"!==e.left.type?[3,2]:(n=e.left.name,[5,s(We(e.right,t))]);case 1:return r=(r=i.sent())[q]||{},[3,5];case 2:return[5,s(We(e.left,t))];case 3:return n=i.sent(),[5,s(We(e.right,t))];case 4:r=i.sent(),i.label=5;case 5:switch(e.operator){case"==":return[2,n==r];case"!=":return[2,n!=r];case"===":return[2,n===r];case"!==":return[2,n!==r];case"<":return[2,n<r];case"<=":return[2,n<=r];case">":return[2,n>r];case">=":return[2,n>=r];case"<<":return[2,n<<r];case">>":return[2,n>>r];case">>>":return[2,n>>>r];case"+":return[2,n+r];case"-":return[2,n-r];case"*":return[2,n*r];case"**":return[2,Math.pow(n,r)];case"/":return[2,n/r];case"%":return[2,n%r];case"|":return[2,n|r];case"^":return[2,n^r];case"&":return[2,n&r];case"in":return[2,n in r];case"instanceof":return[2,n instanceof r];default:throw new SyntaxError("Unexpected token "+e.operator)}}})}function pe(e,t){var n,r,i,o,l,c;return a(this,function(a){switch(a.label){case 0:return"Identifier"!==(n=e.left).type?[3,2]:[5,s(ne(n,t,{getVar:!0,throwErr:!1}))];case 1:return(r=a.sent())||(i=t.global().find("window").get(),r=new Z(i,n.name)),[3,7];case 2:return"MemberExpression"!==n.type?[3,4]:[5,s(ge(n,t,{getVar:!0}))];case 3:return r=a.sent(),[3,7];case 4:case 7:return[5,s(We(e.right,t))];case 5:return o=a.sent(),[5,s(Gn(n,t,{feed:o}))];case 6:return[2,a.sent()];case 8:switch(l=a.sent(),e.operator){case"=":return r.set(l),[2,r.get()];case"+=":return r.set(r.get()+l),[2,r.get()];case"-=":return r.set(r.get()-l),[2,r.get()];case"*=":return r.set(r.get()*l),[2,r.get()];case"/=":return r.set(r.get()/l),[2,r.get()];case"%=":return r.set(r.get()%l),[2,r.get()];case"**=":return r.set(Math.pow(r.get(),l)),[2,r.get()];case"<<=":return r.set(r.get()<<l),[2,r.get()];case">>=":return r.set(r.get()>>l),[2,r.get()];case">>>=":return r.set(r.get()>>>l),[2,r.get()];case"|=":return r.set(r.get()|l),[2,r.get()];case"^=":return r.set(r.get()^l),[2,r.get()];case"&=":return r.set(r.get()&l),[2,r.get()];case"??=":return r.set(null!==(c=r.get())&&void 0!==c?c:l),[2,r.get()];case"&&=":return r.set(r.get()&&l),[2,r.get()];case"||=":return r.set(r.get()||l),[2,r.get()];default:throw new SyntaxError("Unexpected token "+e.operator)}}})}function fe(e,t){var n,r,i,o;return a(this,function(a){switch(a.label){case 0:switch(e.operator){case"||":return[3,1];case"&&":return[3,5];case"??":return[3,9]}return[3,14];case 1:return[5,s(We(e.left,t))];case 2:return(n=a.sent())?[3,4]:[5,s(We(e.right,t))];case 3:n=a.sent(),a.label=4;case 4:return[2,n];case 5:return[5,s(We(e.left,t))];case 6:return(r=a.sent())?[5,s(We(e.right,t))]:[3,8];case 7:r=a.sent(),a.label=8;case 8:return[2,r];case 9:return[5,s(We(e.left,t))];case 10:return null===(o=a.sent())||void 0===o?[3,11]:(i=o,[3,13]);case 11:return[5,s(We(e.right,t))];case 12:i=a.sent(),a.label=13;case 13:return[2,i];case 14:throw new SyntaxError("Unexpected token "+e.operator)}})}function ge(e,t,n){var r,i,o,l,c,u,h,p,f,g,m;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.getObj,i=void 0!==r&&r,o=n.getVar,l=void 0!==o&&o,"Super"!==e.object.type?[3,2]:[5,s(Ce(e.object,t,{getProto:!0}))];case 1:return c=a.sent(),[3,4];case 2:return[5,s(We(e.object,t))];case 3:c=a.sent(),a.label=4;case 4:return i?[2,c]:(h=!1,e.computed?[5,s(We(e.property,t))]:[3,6]);case 5:return u=a.sent(),[3,7];case 6:"PrivateIdentifier"===e.property.type?(u=e.property.name,h=!0):u=e.property.name,a.label=7;case 7:return h&&(c=c[q]),l?(p=S(c,u),"Super"===e.object.type&&p?(m=t.find("this").get(),f=O(u),d(m,f,{set:p}),[2,new Z(m,f)]):[2,new Z(c,u)]):(g=A(c,u),"Super"===e.object.type&&g?(m=t.find("this").get(),e.optional&&null==m?[2,void 0]:[2,g.call(m)]):e.optional&&null==c?[2,void 0]:[2,c[u]])}})}function me(e,t){var n;return a(this,function(r){switch(r.label){case 0:return[5,s(We(e.test,t))];case 1:return r.sent()?[5,s(We(e.consequent,t))]:[3,3];case 2:return n=r.sent(),[3,5];case 3:return[5,s(We(e.alternate,t))];case 4:n=r.sent(),r.label=5;case 5:return[2,n]}})}function ve(e,t){var n,r,i,o,l,c,u,d,h,p,f,g,m,v,y;return a(this,function(a){switch(a.label){case 0:return"MemberExpression"!==e.callee.type?[3,5]:[5,s(ge(e.callee,t,{getObj:!0}))];case 1:return r=a.sent(),e.callee.optional&&null==r?[2,void 0]:(i=void 0,o=!1,e.callee.computed?[5,s(We(e.callee.property,t))]:[3,3]);case 2:return i=a.sent(),[3,4];case 3:"PrivateIdentifier"===e.callee.property.type?(i=e.callee.property.name,o=!0):i=e.callee.property.name,a.label=4;case 4:if(l=r,o&&(l=l[q]),"Super"===e.callee.object.type?(c=t.find("this").get(),n=l[i].bind(c)):n=l[i],e.optional&&null==n)return[2,void 0];if("function"!=typeof n)throw new TypeError(i+" is not a function");if(n[H])throw new TypeError("Class constructor "+i+" cannot be invoked without 'new'");return[3,7];case 5:return r=t.find("this").get(),[5,s(We(e.callee,t))];case 6:if(n=a.sent(),e.optional&&null==n)return[2,void 0];if("function"!=typeof n||"Super"!==e.callee.type&&n[H]){if("Identifier"===e.callee.type)u=e.callee.name;else try{u=JSON.stringify(n)}catch(e){u=""+n}throw"function"!=typeof n?new TypeError(u+" is not a function"):new TypeError("Class constructor "+u+" cannot be invoked without 'new'")}a.label=7;case 7:d=[],h=0,a.label=8;case 8:return h<e.arguments.length?"SpreadElement"!==(p=e.arguments[h]).type?[3,10]:(g=(f=d).concat,[5,s(Ee(p,t))]):[3,13];case 9:return d=g.apply(f,[a.sent()]),[3,12];case 10:return v=(m=d).push,[5,s(We(p,t))];case 11:v.apply(m,[a.sent()]),a.label=12;case 12:return h++,[3,8];case 13:if("Super"===e.callee.type){if(t.find(U).get())throw new ReferenceError("Super constructor may only be called once");t.find(U).set(!0)}try{return[2,n.apply(r,d)]}catch(e){if(e instanceof TypeError&&"Illegal invocation"===e.message&&-1!==n.toString().indexOf("[native code]")&&(y=t.global().find("window").get())&&y[j])return[2,n.apply(y[j],d)];throw e}}})}function ye(e,t){var n,r,i,o,l,u,d,h,p;return a(this,function(a){switch(a.label){case 0:return[5,s(We(e.callee,t))];case 1:if("function"!=typeof(n=a.sent())){if("Identifier"===e.callee.type)r=e.callee.name;else try{r=JSON.stringify(n)}catch(e){r=""+n}throw new TypeError(r+" is not a constructor")}if(n[V])throw new TypeError((n.name||"(intermediate value)")+" is not a constructor");i=[],o=0,a.label=2;case 2:return o<e.arguments.length?"SpreadElement"!==(l=e.arguments[o]).type?[3,4]:(d=(u=i).concat,[5,s(Ee(l,t))]):[3,7];case 3:return i=d.apply(u,[a.sent()]),[3,6];case 4:return p=(h=i).push,[5,s(We(l,t))];case 5:p.apply(h,[a.sent()]),a.label=6;case 6:return o++,[3,2];case 7:return[2,new(n.bind.apply(n,c([void 0],i)))]}})}function be(e,t){return a(this,function(n){return"new"===e.meta.name&&"target"===e.property.name?[2,t.find(G).get()]:"import"===e.meta.name&&"meta"===e.property.name?[2,{url:""}]:[2]})}function we(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<e.expressions.length?[5,s(We(e.expressions[r],t))]:[3,4];case 2:n=i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2,n]}})}function xe(e,t){return a(this,function(n){return[2,qn(e,t)]})}function Ae(e,t){var n,r,i,o,l,c,u;return a(this,function(a){switch(a.label){case 0:n=e.quasis.slice(),r=e.expressions.slice(),i="",a.label=1;case 1:return(o=n.shift())?(c=i,[5,s(ke(o))]):[3,5];case 2:return i=c+a.sent(),(l=r.shift())?(u=i,[5,s(We(l,t))]):[3,4];case 3:i=u+a.sent(),a.label=4;case 4:return[3,1];case 5:return[2,i]}})}function Se(e,t){var n,r,i,o,l,h,p,f,g;return a(this,function(a){switch(a.label){case 0:return[5,s(We(e.tag,t))];case 1:if(n=a.sent(),r=e.quasi.quasis,i=r.map(function(e){return e.value.cooked}),o=r.map(function(e){return e.value.raw}),d(i,"raw",{value:u(o)}),l=e.quasi.expressions,h=[],!l)return[3,5];p=0,a.label=2;case 2:return p<l.length?(g=(f=h).push,[5,s(We(l[p],t))]):[3,5];case 3:g.apply(f,[a.sent()]),a.label=4;case 4:return p++,[3,2];case 5:return[2,n.apply(void 0,c([u(i)],h))]}})}function ke(e,t){return a(this,function(t){return[2,e.value.raw]})}function _e(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return e.id&&e.id.name?(n=new ee(t),[5,s(Kn(e,n))]):[3,2];case 1:return r=i.sent(),n.const(e.id.name,r),[2,r];case 2:return[5,s(Kn(e,t))];case 3:return[2,i.sent()]}})}function Ce(e,t,n){var r,i,o;return void 0===n&&(n={}),a(this,function(e){return r=n.getProto,i=void 0!==r&&r,o=t.find(W).get(),[2,i?o.prototype:o]})}function Ee(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.argument,t))];case 1:return r=i.sent(),[2,n.spreadProps?r:c(r)]}})}function Te(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(We(e.expression,t))];case 1:return[2,n.sent()]}})}function Ie(e,t){var n,r,i,o,l;return a(this,function(a){switch(a.label){case 0:return n=t.global(),[5,s(We(e.source,t))];case 1:return r=a.sent(),(i=n.find(X+r))&&(l=i.get())&&("function"==typeof l?o=l():"object"==typeof l&&(o=l)),o&&"object"==typeof o?[2,Promise.resolve(o)]:[2,Promise.reject(new TypeError('Failed to resolve module specifier "'+r+'"'))]}})}function Pe(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return[5,s(We(e.argument,t))];case 1:return n=i.sent(),e.delegate?[5,s(n)]:[3,3];case 2:return r=i.sent(),[3,5];case 3:return[4,n];case 4:r=i.sent(),i.label=5;case 5:return[2,r]}})}function Le(e,t){var n;return a(this,function(r){switch(r.label){case 0:return n=D,[5,s(We(e.argument,t))];case 1:return n.RES=r.sent(),[4,D];case 2:return[2,r.sent()]}})}var Ne=Object.freeze({__proto__:null,ThisExpression:ae,ArrayExpression:se,ObjectExpression:le,FunctionExpression:ce,UnaryExpression:ue,UpdateExpression:de,BinaryExpression:he,AssignmentExpression:pe,LogicalExpression:fe,MemberExpression:ge,ConditionalExpression:me,CallExpression:ve,NewExpression:ye,MetaProperty:be,SequenceExpression:we,ArrowFunctionExpression:xe,TemplateLiteral:Ae,TaggedTemplateExpression:Se,TemplateElement:ke,ClassExpression:_e,Super:Ce,SpreadElement:Ee,ChainExpression:Te,ImportExpression:Ie,YieldExpression:Pe,AwaitExpression:Le});function je(e,t,n){var r,i,o,l,c,u,d,h,p,f,g,m,v,y,b;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.kind,i=void 0===r?"var":r,o=n.hoist,l=void 0!==o&&o,c=n.onlyBlock,u=void 0!==c&&c,d=n.feed,h=void 0===d?{}:d,p=[],f=0,a.label=1;case 1:return f<e.properties.length?(g=e.properties[f],l?u||"var"===i?"Property"!==g.type?[3,5]:"Identifier"!==(v=g.value).type?[3,2]:(t[i](v.name,u?$:"var"===i?K:void 0),[3,4]):[3,7]:[3,8]):[3,18];case 2:return[5,s(Gn(v,t,{kind:i,hoist:l,onlyBlock:u}))];case 3:a.sent(),a.label=4;case 4:return[3,7];case 5:return[5,s(Oe(g,t,{kind:i,hoist:l,onlyBlock:u}))];case 6:a.sent(),a.label=7;case 7:return[3,17];case 8:return"Property"!==g.type?[3,15]:(m=void 0,g.computed?[5,s(We(g.key,t))]:[3,10]);case 9:return m=a.sent(),[3,11];case 10:m=g.key.name,a.label=11;case 11:return p.push(m),"Identifier"!==(v=g.value).type?[3,12]:(t[i](v.name,h[m]),[3,14]);case 12:return[5,s(Gn(v,t,{kind:i,feed:h[m]}))];case 13:a.sent(),a.label=14;case 14:return[3,17];case 15:for(y=E({},h),b=0;b<p.length;b++)delete y[p[b]];return[5,s(Oe(g,t,{kind:i,feed:y}))];case 16:a.sent(),a.label=17;case 17:return f++,[3,1];case 18:return[2]}})}function Re(e,t,n){var r,i,o,l,c,u,d,h,p,f,g;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.kind,i=n.hoist,o=void 0!==i&&i,l=n.onlyBlock,c=void 0!==l&&l,u=n.feed,d=void 0===u?[]:u,h=[],p=0,a.label=1;case 1:return p<e.elements.length?(f=e.elements[p])?o?c||"var"===r?"Identifier"!==f.type?[3,2]:(t[r](f.name,c?$:"var"===r?K:void 0),[3,4]):[3,4]:[3,5]:[3,13]:[3,14];case 2:return[5,s(Gn(f,t,{kind:r,hoist:o,onlyBlock:c}))];case 3:a.sent(),a.label=4;case 4:return[3,13];case 5:return"Identifier"!==f.type?[3,9]:r?(t[r](f.name,d[p]),[3,8]):[3,6];case 6:return[5,s(ne(f,t,{getVar:!0}))];case 7:(g=a.sent()).set(d[p]),h.push(g.get()),a.label=8;case 8:return[3,13];case 9:return"RestElement"!==f.type?[3,11]:[5,s(Oe(f,t,{kind:r,feed:d.slice(p)}))];case 10:return a.sent(),[3,13];case 11:return[5,s(Gn(f,t,{kind:r,feed:d[p]}))];case 12:a.sent(),a.label=13;case 13:return p++,[3,1];case 14:return h.length?[2,h]:[2]}})}function Oe(e,t,n){var r,i,o,l,c,u,d,h;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.kind,i=n.hoist,o=void 0!==i&&i,l=n.onlyBlock,c=void 0!==l&&l,u=n.feed,d=void 0===u?[]:u,h=e.argument,o?c||"var"===r?"Identifier"!==h.type?[3,1]:(t[r](h.name,c?$:"var"===r?K:void 0),[3,3]):[3,3]:[3,4];case 1:return[5,s(Gn(h,t,{kind:r,hoist:o,onlyBlock:c}))];case 2:a.sent(),a.label=3;case 3:return[3,10];case 4:return"Identifier"!==h.type?[3,8]:r?(t[r](h.name,d),[3,7]):[3,5];case 5:return[5,s(ne(h,t,{getVar:!0}))];case 6:a.sent().set(d),a.label=7;case 7:return[3,10];case 8:return[5,s(Gn(h,t,{kind:r,feed:d}))];case 9:a.sent(),a.label=10;case 10:return[2]}})}function ze(e,t,n){var r,i,o,l,c,u,d,h,p,f;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.kind,i=void 0===r?"var":r,o=n.hoist,l=void 0!==o&&o,c=n.onlyBlock,u=void 0!==c&&c,void 0!==(d=n.feed)?[3,2]:[5,s(We(e.right,t))];case 1:return p=a.sent(),[3,3];case 2:p=d,a.label=3;case 3:return h=p,f=e.left,l?u||"var"===i?"Identifier"!==f.type?[3,4]:(t[i](f.name,u?$:"var"===i?K:void 0),[3,6]):[3,6]:[3,7];case 4:return[5,s(Gn(f,t,{kind:i,hoist:l,onlyBlock:u}))];case 5:a.sent(),a.label=6;case 6:return[3,10];case 7:return"Identifier"!==f.type?[3,8]:(t[i](f.name,h),[3,10]);case 8:return[5,s(Gn(f,t,{kind:i,feed:h}))];case 9:a.sent(),a.label=10;case 10:return[2]}})}var De=Object.freeze({__proto__:null,ObjectPattern:je,ArrayPattern:Re,RestElement:Oe,AssignmentPattern:ze});function Me(e,t){var n;return a(this,function(r){switch(r.label){case 0:n=0,r.label=1;case 1:return n<e.body.length?[5,s(We(e.body[n],t))]:[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}})}var Fe,Be=Object.freeze({__proto__:null,Program:Me});function We(e,n){var i;return a(this,function(o){switch(o.label){case 0:return e?(Fe||(Fe=E({},r,Ne,re,t,oe,De,Be)),(i=Fe[e.type])?[5,s(i(e,n))]:[3,2]):[2];case 1:return[2,o.sent()];case 2:throw new Error(e.type+" isn't implemented")}})}function Ue(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(We(e.expression,t))];case 1:return n.sent(),[2]}})}function Ve(e,t,n){var r,i,o,l,c,u,d;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.invasived,i=void 0!==r&&r,o=n.hoisted,l=void 0!==o&&o,c=i?t:new ee(t),l?[3,2]:[5,s(Vn(e,c,{onlyBlock:!0}))];case 1:a.sent(),a.label=2;case 2:u=0,a.label=3;case 3:return u<e.body.length?[5,s(We(e.body[u],c))]:[3,6];case 4:if((d=a.sent())===B)return d.LABEL&&d.LABEL===n.label?[3,6]:[2,d];if(d===F||d===M)return[2,d];a.label=5;case 5:return u++,[3,3];case 6:return[2]}})}function He(){return a(this,function(e){return[2]})}function Ge(){return a(this,function(e){return[2]})}function qe(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:return n=M,e.argument?[5,s(We(e.argument,t))]:[3,2];case 1:return r=i.sent(),[3,3];case 2:r=void 0,i.label=3;case 3:return n.RES=r,[2,M]}})}function Ke(e){var t;return a(this,function(n){return B.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,[2,B]})}function $e(e){var t;return a(this,function(n){return F.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,[2,F]})}function Xe(e,t){var n;return a(this,function(r){switch(r.label){case 0:return n=e.label.name,"WhileStatement"!==e.body.type?[3,2]:[5,s(rt(e.body,t,{label:n}))];case 1:case 3:case 5:case 7:case 9:case 11:case 13:case 15:case 17:case 19:return[2,r.sent()];case 2:return"DoWhileStatement"!==e.body.type?[3,4]:[5,s(it(e.body,t,{label:n}))];case 4:return"ForStatement"!==e.body.type?[3,6]:[5,s(ot(e.body,t,{label:n}))];case 6:return"ForInStatement"!==e.body.type?[3,8]:[5,s(at(e.body,t,{label:n}))];case 8:return"ForOfStatement"!==e.body.type?[3,10]:[5,s(st(e.body,t,{label:n}))];case 10:return"BlockStatement"!==e.body.type?[3,12]:[5,s(Ve(e.body,t,{label:n}))];case 12:return"WithStatement"!==e.body.type?[3,14]:[5,s(Ye(e.body,t,{label:n}))];case 14:return"IfStatement"!==e.body.type?[3,16]:[5,s(Je(e.body,t,{label:n}))];case 16:return"SwitchStatement"!==e.body.type?[3,18]:[5,s(Qe(e.body,t,{label:n}))];case 18:return"TryStatement"!==e.body.type?[3,20]:[5,s(tt(e.body,t,{label:n}))];case 20:throw new SyntaxError(e.body.type+" cannot be labeled")}})}function Ye(e,t,n){var r,i,o,l;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=new ee(t),o=(i=r).with,[5,s(We(e.object,t))];case 1:return o.apply(i,[a.sent()]),[5,s(We(e.body,r))];case 2:return(l=a.sent())===B?l.LABEL&&l.LABEL===n.label?[2]:[2,l]:l===F||l===M?[2,l]:[2]}})}function Je(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.test,t))];case 1:return i.sent()?[5,s(We(e.consequent,t))]:[3,3];case 2:return r=i.sent(),[3,5];case 3:return[5,s(We(e.alternate,t))];case 4:r=i.sent(),i.label=5;case 5:return r===B?r.LABEL&&r.LABEL===n.label?[2]:[2,r]:r===F||r===M?[2,r]:[2]}})}function Qe(e,t,n){var r,i,o,l,c,u,d;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return[5,s(We(e.discriminant,t))];case 1:r=a.sent(),i=!1,o=0,a.label=2;case 2:return o<e.cases.length?(l=e.cases[o],(c=!i)?(u=!l.test)?[3,4]:[5,s(We(l.test,t))]:[3,5]):[3,8];case 3:u=a.sent()===r,a.label=4;case 4:c=u,a.label=5;case 5:return c&&(i=!0),i?[5,s(Ze(l,t))]:[3,7];case 6:if((d=a.sent())===B)return d.LABEL===n.label?[3,8]:[2,d];if(d===F||d===M)return[2,d];a.label=7;case 7:return o++,[3,2];case 8:return[2]}})}function Ze(e,t){var n,r;return a(this,function(i){switch(i.label){case 0:n=0,i.label=1;case 1:return n<e.consequent.length?[5,s(We(e.consequent[n],t))]:[3,4];case 2:if((r=i.sent())===B||r===F||r===M)return[2,r];i.label=3;case 3:return n++,[3,1];case 4:return[2]}})}function et(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(We(e.argument,t))];case 1:throw n.sent()}})}function tt(e,t,n){var r,i,o,l,c;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,9,12]),[5,s(Ve(e.block,t))];case 1:return r=a.sent(),[3,12];case 2:return i=a.sent(),e.handler?(o=new ee(t),(l=e.handler.param)?"Identifier"!==l.type?[3,3]:(c=l.name,o.var(c,i),[3,5]):[3,5]):[3,7];case 3:return[5,s(Gn(l,t,{feed:i}))];case 4:a.sent(),a.label=5;case 5:return[5,s(nt(e.handler,o))];case 6:return r=a.sent(),[3,8];case 7:throw i;case 8:return[3,12];case 9:return e.finalizer?[5,s(Ve(e.finalizer,t))]:[3,11];case 10:r=a.sent(),a.label=11;case 11:return[7];case 12:return r===B?r.LABEL&&r.LABEL===n.label?[2]:[2,r]:r===F||r===M?[2,r]:[2]}})}function nt(e,t){return a(this,function(n){switch(n.label){case 0:return[5,s(Ve(e.body,t,{invasived:!0}))];case 1:return[2,n.sent()]}})}function rt(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.test,t))];case 1:return i.sent()?[5,s(We(e.body,t))]:[3,3];case 2:return(r=i.sent())===B?r.LABEL===n.label?[3,3]:[2,r]:r===F?r.LABEL===n.label?[3,0]:[2,r]:r===M?[2,r]:[3,0];case 3:return[2]}})}function it(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:return[5,s(We(e.body,t))];case 1:if((r=i.sent())===B)return r.LABEL===n.label?[3,4]:[2,r];if(r===F)return r.LABEL===n.label?[3,2]:[2,r];if(r===M)return[2,r];i.label=2;case 2:return[5,s(We(e.test,t))];case 3:if(i.sent())return[3,0];i.label=4;case 4:return[2]}})}function ot(e,t,n){var r,i,o,l;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=new ee(t),[5,s(We(e.init,r))];case 1:a.sent(),a.label=2;case 2:return e.test?[5,s(We(e.test,r))]:[3,4];case 3:return i=a.sent(),[3,5];case 4:i=!0,a.label=5;case 5:return i?(o=new ee(r),l=void 0,"BlockStatement"!==e.body.type?[3,7]:[5,s(Ve(e.body,o,{invasived:!0}))]):[3,12];case 6:return l=a.sent(),[3,9];case 7:return[5,s(We(e.body,o))];case 8:l=a.sent(),a.label=9;case 9:if(l===B)return l.LABEL===n.label?[3,12]:[2,l];if(l===F)return l.LABEL===n.label?[3,10]:[2,l];if(l===M)return[2,l];a.label=10;case 10:return[5,s(We(e.update,r))];case 11:return a.sent(),[3,2];case 12:return[2]}})}function at(e,t,n){var r,i,o,l,c;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=[],[5,s(We(e.right,t))];case 1:for(i in a.sent())r.push(i);o=0,a.label=2;case 2:return o<r.length?(l=r[o],[5,s($n(e,t,{value:l}))]):[3,5];case 3:if((c=a.sent())===B)return c.LABEL===n.label?[3,5]:[2,c];if(c===F)return c.LABEL===n.label?[3,4]:[2,c];if(c===M)return[2,c];a.label=4;case 4:return o++,[3,2];case 5:return[2]}})}function st(e,t,n){var r,i,o,l,c,u,d,h,p,f;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return[5,s(We(e.right,t))];case 1:return r=a.sent(),e.await?(i=z(r),o=void 0,D.RES=i.next(),[4,D]):[3,8];case 2:o=a.sent(),a.label=3;case 3:return o.done?[3,7]:[5,s($n(e,t,{value:o.value}))];case 4:if((d=a.sent())===B)return d.LABEL===n.label?[3,7]:[2,d];if(d===F)return d.LABEL===n.label?[3,5]:[2,d];if(d===M)return[2,d];a.label=5;case 5:return D.RES=i.next(),[4,D];case 6:return o=a.sent(),[3,3];case 7:return[3,15];case 8:a.trys.push([8,13,14,15]),l=s(r),c=l.next(),a.label=9;case 9:return c.done?[3,12]:(u=c.value,[5,s($n(e,t,{value:u}))]);case 10:if((d=a.sent())===B)return d.LABEL===n.label?[3,12]:[2,d];if(d===F)return d.LABEL===n.label?[3,11]:[2,d];if(d===M)return[2,d];a.label=11;case 11:return c=l.next(),[3,9];case 12:return[3,15];case 13:return h=a.sent(),p={error:h},[3,15];case 14:try{c&&!c.done&&(f=l.return)&&f.call(l)}finally{if(p)throw p.error}return[7];case 15:return[2]}})}function lt(e,t){return a(this,function(n){return t.func(e.id.name,qn(e,t)),[2]})}function ct(e,t,n){var r;return void 0===n&&(n={}),a(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<e.declarations.length?[5,s(ut(e.declarations[r],t,E({kind:e.kind},n)))]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}})}function ut(e,t,n){var r,i,o,l,c,u,h,p,f,g,m;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.kind,i=void 0===r?"var":r,o=n.hoist,l=void 0!==o&&o,c=n.onlyBlock,u=void 0!==c&&c,h=n.feed,l?u||"var"===i?"Identifier"!==e.id.type?[3,1]:(t[i](e.id.name,u?$:"var"===i?K:void 0),[3,3]):[3,3]:[3,4];case 1:return[5,s(Gn(e.id,t,{kind:i,hoist:l,onlyBlock:u}))];case 2:a.sent(),a.label=3;case 3:return[3,10];case 4:return(p="feed"in n)?(g=h,[3,7]):[3,5];case 5:return[5,s(We(e.init,t))];case 6:g=a.sent(),a.label=7;case 7:return f=g,"Identifier"!==e.id.type?[3,8]:(m=e.id.name,"var"!==i||e.init||p?t[i](m,f):t.var(m,K),e.init&&-1!==["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)&&!f.name&&d(f,"name",{value:m,configurable:!0}),[3,10]);case 8:return[5,s(Gn(e.id,t,{kind:i,feed:f}))];case 9:a.sent(),a.label=10;case 10:return[2]}})}function dt(e,t){var n,r,i;return a(this,function(o){switch(o.label){case 0:return r=(n=t).func,i=[e.id.name],[5,s(Kn(e,t))];case 1:return r.apply(n,i.concat([o.sent()])),[2]}})}function ht(e,t,n){var r,i,o,l;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.klass,i=n.superClass,o=0,a.label=1;case 1:return o<e.body.length?"MethodDefinition"!==(l=e.body[o]).type?[3,3]:[5,s(pt(l,t,{klass:r,superClass:i}))]:[3,8];case 2:return a.sent(),[3,7];case 3:return"PropertyDefinition"===l.type&&l.static?[5,s(ft(l,t,{klass:r,superClass:i}))]:[3,5];case 4:return a.sent(),[3,7];case 5:return"StaticBlock"!==l.type?[3,7]:[5,s(gt(l,t,{klass:r,superClass:i}))];case 6:a.sent(),a.label=7;case 7:return o++,[3,1];case 8:return[2]}})}function pt(e,t,n){var r,i,o,l,c,u,p;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.klass,i=n.superClass,l=!1,e.computed?[5,s(We(e.key,t))]:[3,2];case 1:return o=a.sent(),[3,3];case 2:if("Identifier"===e.key.type)o=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");o=e.key.name,l=!0}a.label=3;case 3:switch(c=e.static?r:r.prototype,l&&(c[q]||d(c,q,{value:{}}),c=c[q]),u=qn(e.value,t,{superClass:i}),e.kind){case"constructor":break;case"method":d(c,o,{value:u,writable:!0,configurable:!0});break;case"get":p=h(c,o),d(c,o,{get:u,set:p&&p.set,configurable:!0});break;case"set":p=h(c,o),d(c,o,{get:p&&p.get,set:u,configurable:!0});break;default:throw new SyntaxError("Unexpected token")}return[2]}})}function ft(e,t,n){var r,i,o,l,c,u,h,p;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:return r=n.klass,i=n.superClass,l=!1,e.computed?[5,s(We(e.key,t))]:[3,2];case 1:return o=a.sent(),[3,3];case 2:if("Identifier"===e.key.type)o=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");o=e.key.name,l=!0}a.label=3;case 3:return(c=new ee(t,!0)).const("this",r),u=r,l&&(u[q]||d(u,q,{value:{}}),u=u[q]),e.value?[3,4]:(u[o]=void 0,[3,7]);case 4:return"FunctionExpression"!==e.value.type&&"ArrowFunctionExpression"!==e.value.type?[3,5]:(u[o]=qn(e.value,c,{superClass:i}),[3,7]);case 5:return h=u,p=o,[5,s(We(e.value,c))];case 6:h[p]=a.sent(),a.label=7;case 7:return[2]}})}function gt(e,t,n){var r,i;return void 0===n&&(n={}),a(this,function(o){switch(o.label){case 0:return r=n.klass,(i=new ee(t,!0)).const("this",r),[5,s(Ve(e,i,{invasived:!0}))];case 1:return[2,o.sent()]}})}function mt(e,t){var n,r,i,o,s,l,c;return a(this,function(a){if(n=t.global(),(r=n.find(X+e.source.value))&&(o=r.get())&&("function"==typeof o?i=o():"object"==typeof o&&(i=o)),!i||"object"!=typeof i)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');for(s=0;s<e.specifiers.length;s++){if(l=e.specifiers[s],c=void 0,"ImportSpecifier"===l.type?c="Identifier"===l.imported.type?l.imported.name:l.imported.value:"ImportDefaultSpecifier"===l.type?c="default":"ImportNamespaceSpecifier"===l.type&&(c="*"),"*"!==c&&!f(i,c))throw new SyntaxError('The requested module "'+e.source.value+'" does not provide an export named "'+c+'"');t.var(l.local.name,"*"===c?E({},i):i[c])}return[2]})}function vt(e,t){var n,r,i,o;return a(this,function(a){switch(a.label){case 0:return n=t.global(),"FunctionDeclaration"!==e.declaration.type?[3,1]:(r=qn(e.declaration,t),t.func(e.declaration.id.name,r),[3,5]);case 1:return"ClassDeclaration"!==e.declaration.type?[3,3]:[5,s(Kn(e.declaration,t))];case 2:return r=a.sent(),t.func(e.declaration.id.name,r),[3,5];case 3:return[5,s(We(e.declaration,t))];case 4:r=a.sent(),a.label=5;case 5:return(i=n.find(Y))&&(o=i.get())&&"object"==typeof o&&(o.default=r),[2]}})}function yt(e,t){var n,r,i,o,l,c,u,d,h,p,f,g;return a(this,function(a){switch(a.label){case 0:return n=t.global(),e.declaration?"FunctionDeclaration"!==e.declaration.type?[3,1]:(i=qn(e.declaration,t),t.func(e.declaration.id.name,i),(u=n.find(Y))&&(r=u.get())&&"object"==typeof r&&(r[e.declaration.id.name]=i),[3,5]):[3,6];case 1:return"ClassDeclaration"!==e.declaration.type?[3,3]:[5,s(Kn(e.declaration,t))];case 2:return i=a.sent(),t.func(e.declaration.id.name,i),(u=n.find(Y))&&(o=u.get())&&"object"==typeof o&&(o[e.declaration.id.name]=i),[3,5];case 3:return"VariableDeclaration"!==e.declaration.type?[3,5]:[5,s(ct(e.declaration,t))];case 4:if(a.sent(),(u=n.find(Y))&&(l=u.get())&&"object"==typeof l)for(h=0;h<e.declaration.declarations.length;h++)c=e.declaration.declarations[h].id.name,(g=t.find(c))&&(l[c]=g.get());a.label=5;case 5:return[3,7];case 6:if(e.specifiers&&(u=n.find(Y))&&(d=u.get())&&"object"==typeof d)for(h=0;h<e.specifiers.length;h++)p=e.specifiers[h],f="Identifier"===p.local.type?p.local.name:p.local.value,(g=t.find(f))&&(d["Identifier"===p.exported.type?p.exported.name:p.exported.value]=g.get());a.label=7;case 7:return[2]}})}function bt(e,t){var n,r,i,o,s,l;return a(this,function(a){if(n=t.global(),(r=n.find(X+e.source.value))&&(o=r.get())&&("function"==typeof o?i=o():"object"==typeof o&&(i=o)),!i||"object"!=typeof i)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');return(s=n.find(Y))&&(l=s.get())&&"object"==typeof l&&E(l,i),[2]})}function wt(e,t,n){void 0===n&&(n={});var r=n.getVar,i=void 0!==r&&r,o=n.throwErr,a=void 0===o||o;if("undefined"!==e.name){var s=t.find(e.name);if(s){if(i)return s;var l=s.get();if(l===$)throw new ReferenceError(e.name+" is not defined");return l}if(a)throw new ReferenceError(e.name+" is not defined")}}var xt=Object.freeze({__proto__:null,Identifier:wt});function At(e,t){return e.value}var St=Object.freeze({__proto__:null,Literal:At});function kt(e,t){var n=t.find(U);if(n&&!n.get())throw new ReferenceError("Must call super constructor in derived class before accessing 'this' or returning from derived constructor");return t.find("this").get()}function _t(e,t){for(var n=[],r=0;r<e.elements.length;r++){var i=e.elements[r];"SpreadElement"===i.type?n=n.concat(Gt(i,t)):n.push(rn(i,t))}return n}function Ct(e,t){for(var n={},r=0;r<e.properties.length;r++){var i=e.properties[r];if("SpreadElement"===i.type)E(n,Gt(i,t,{spreadProps:!0}));else{var o=void 0,a=i.key;o=i.computed?rn(a,t):"Identifier"===a.type?a.name:""+At(a);var s=rn(i.value,t),l=i.kind;if("init"===l)n[o]=s;else if("get"===l){var c=h(n,o);d(n,o,{get:s,set:c&&c.set,enumerable:!0,configurable:!0})}else c=h(n,o),d(n,o,{get:c&&c.get,set:s,enumerable:!0,configurable:!0})}}return n}function Et(e,t){if(e.id&&e.id.name){var n=new ee(t),r=Bn(e,n);return n.const(e.id.name,r),r}return Bn(e,t)}function Tt(e,t){var n=e.argument;switch(e.operator){case"+":return+rn(n,t);case"-":return-rn(n,t);case"!":return!rn(n,t);case"~":return~rn(n,t);case"void":return void rn(n,t);case"typeof":return"Identifier"===n.type?typeof wt(n,t,{throwErr:!1}):typeof rn(n,t);case"delete":if("MemberExpression"===n.type)return jt(n,t,{getVar:!0}).del();if("Identifier"===n.type)throw new SyntaxError("Delete of an unqualified identifier in strict mode");return rn(n,t),!0;default:throw new SyntaxError("Unexpected token "+e.operator)}}function It(e,t){var n,r=e.argument;if("Identifier"===r.type)n=wt(r,t,{getVar:!0});else{if("MemberExpression"!==r.type)throw new SyntaxError("Unexpected token");n=jt(r,t,{getVar:!0})}var i=n.get();if("++"===e.operator)return n.set(i+1),e.prefix?n.get():i;if("--"===e.operator)return n.set(i-1),e.prefix?n.get():i;throw new SyntaxError("Unexpected token "+e.operator)}function Pt(e,t){var n,r;switch("PrivateIdentifier"===e.left.type?(n=e.left.name,r=(r=rn(e.right,t))[q]||{}):(n=rn(e.left,t),r=rn(e.right,t)),e.operator){case"==":return n==r;case"!=":return n!=r;case"===":return n===r;case"!==":return n!==r;case"<":return n<r;case"<=":return n<=r;case">":return n>r;case">=":return n>=r;case"<<":return n<<r;case">>":return n>>r;case">>>":return n>>>r;case"+":return n+r;case"-":return n-r;case"*":return n*r;case"**":return Math.pow(n,r);case"/":return n/r;case"%":return n%r;case"|":return n|r;case"^":return n^r;case"&":return n&r;case"in":return n in r;case"instanceof":return n instanceof r;default:throw new SyntaxError("Unexpected token "+e.operator)}}function Lt(e,t){var n,r,i=e.left;if("Identifier"===i.type){if(!(r=wt(i,t,{getVar:!0,throwErr:!1}))){var o=t.global().find("window").get();r=new Z(o,i.name)}}else{if("MemberExpression"!==i.type)return Fn(i,t,{feed:rn(e.right,t)});r=jt(i,t,{getVar:!0})}var a=rn(e.right,t);switch(e.operator){case"=":return r.set(a),r.get();case"+=":return r.set(r.get()+a),r.get();case"-=":return r.set(r.get()-a),r.get();case"*=":return r.set(r.get()*a),r.get();case"/=":return r.set(r.get()/a),r.get();case"%=":return r.set(r.get()%a),r.get();case"**=":return r.set(Math.pow(r.get(),a)),r.get();case"<<=":return r.set(r.get()<<a),r.get();case">>=":return r.set(r.get()>>a),r.get();case">>>=":return r.set(r.get()>>>a),r.get();case"|=":return r.set(r.get()|a),r.get();case"^=":return r.set(r.get()^a),r.get();case"&=":return r.set(r.get()&a),r.get();case"??=":return r.set(null!==(n=r.get())&&void 0!==n?n:a),r.get();case"&&=":return r.set(r.get()&&a),r.get();case"||=":return r.set(r.get()||a),r.get();default:throw new SyntaxError("Unexpected token "+e.operator)}}function Nt(e,t){var n;switch(e.operator){case"||":return rn(e.left,t)||rn(e.right,t);case"&&":return rn(e.left,t)&&rn(e.right,t);case"??":return null!==(n=rn(e.left,t))&&void 0!==n?n:rn(e.right,t);default:throw new SyntaxError("Unexpected token "+e.operator)}}function jt(e,t,n){void 0===n&&(n={});var r,i,o=n.getObj,a=void 0!==o&&o,s=n.getVar,l=void 0!==s&&s;if(r="Super"===e.object.type?Ht(e.object,t,{getProto:!0}):rn(e.object,t),a)return r;var c=!1;if(e.computed?i=rn(e.property,t):"PrivateIdentifier"===e.property.type?(i=e.property.name,c=!0):i=e.property.name,c&&(r=r[q]),l){var u=S(r,i);if("Super"===e.object.type&&u){var h=t.find("this").get(),p=O(i);return d(h,p,{set:u}),new Z(h,p)}return new Z(r,i)}var f=A(r,i);if("Super"===e.object.type&&f){if(h=t.find("this").get(),e.optional&&null==h)return;return f.call(h)}return e.optional&&null==r?void 0:r[i]}function Rt(e,t){return rn(e.test,t)?rn(e.consequent,t):rn(e.alternate,t)}function Ot(e,t){var n,r;if("MemberExpression"===e.callee.type){if(r=jt(e.callee,t,{getObj:!0}),e.callee.optional&&null==r)return;var i=void 0,o=!1;e.callee.computed?i=rn(e.callee.property,t):"PrivateIdentifier"===e.callee.property.type?(i=e.callee.property.name,o=!0):i=e.callee.property.name;var a=r;if(o&&(a=a[q]),"Super"===e.callee.object.type){var s=t.find("this").get();n=a[i].bind(s)}else n=a[i];if(e.optional&&null==n)return;if("function"!=typeof n)throw new TypeError(i+" is not a function");if(n[H])throw new TypeError("Class constructor "+i+" cannot be invoked without 'new'")}else{if(r=t.find("this").get(),n=rn(e.callee,t),e.optional&&null==n)return;if("function"!=typeof n||"Super"!==e.callee.type&&n[H]){var l;if("Identifier"===e.callee.type)l=e.callee.name;else try{l=JSON.stringify(n)}catch(e){l=""+n}throw"function"!=typeof n?new TypeError(l+" is not a function"):new TypeError("Class constructor "+l+" cannot be invoked without 'new'")}}for(var c=[],u=0;u<e.arguments.length;u++){var d=e.arguments[u];"SpreadElement"===d.type?c=c.concat(Gt(d,t)):c.push(rn(d,t))}if("Super"===e.callee.type){if(t.find(U).get())throw new ReferenceError("Super constructor may only be called once");t.find(U).set(!0)}try{return n.apply(r,c)}catch(e){if(e instanceof TypeError&&"Illegal invocation"===e.message&&-1!==n.toString().indexOf("[native code]")){var h=t.global().find("window").get();if(h&&h[j])return n.apply(h[j],c)}throw e}}function zt(e,t){var n=rn(e.callee,t);if("function"!=typeof n){var r;if("Identifier"===e.callee.type)r=e.callee.name;else try{r=JSON.stringify(n)}catch(e){r=""+n}throw new TypeError(r+" is not a constructor")}if(n[V])throw new TypeError((n.name||"(intermediate value)")+" is not a constructor");for(var i=[],o=0;o<e.arguments.length;o++){var a=e.arguments[o];"SpreadElement"===a.type?i=i.concat(Gt(a,t)):i.push(rn(a,t))}return new(n.bind.apply(n,c([void 0],i)))}function Dt(e,t){return"new"===e.meta.name&&"target"===e.property.name?t.find(G).get():"import"===e.meta.name&&"meta"===e.property.name?{url:""}:void 0}function Mt(e,t){for(var n,r=0;r<e.expressions.length;r++)n=rn(e.expressions[r],t);return n}function Ft(e,t){return Bn(e,t)}function Bt(e,t){for(var n,r,i=e.quasis.slice(),o=e.expressions.slice(),a="";n=i.shift();)a+=Ut(n),(r=o.shift())&&(a+=rn(r,t));return a}function Wt(e,t){var n=rn(e.tag,t),r=e.quasi.quasis,i=r.map(function(e){return e.value.cooked}),o=r.map(function(e){return e.value.raw});d(i,"raw",{value:u(o)});var a=e.quasi.expressions,s=[];if(a)for(var l=0;l<a.length;l++)s.push(rn(a[l],t));return n.apply(void 0,c([u(i)],s))}function Ut(e,t){return e.value.raw}function Vt(e,t){if(e.id&&e.id.name){var n=new ee(t),r=Wn(e,n);return n.const(e.id.name,r),r}return Wn(e,t)}function Ht(e,t,n){void 0===n&&(n={});var r=n.getProto,i=void 0!==r&&r,o=t.find(W).get();return i?o.prototype:o}function Gt(e,t,n){void 0===n&&(n={});var r=rn(e.argument,t);return n.spreadProps?r:c(r)}function qt(e,t){return rn(e.expression,t)}function Kt(e,t){var n,r=t.global(),i=rn(e.source,t),o=r.find(X+i);if(o){var a=o.get();a&&("function"==typeof a?n=a():"object"==typeof a&&(n=a))}return n&&"object"==typeof n?Promise.resolve(n):Promise.reject(new TypeError('Failed to resolve module specifier "'+i+'"'))}var $t=Object.freeze({__proto__:null,ThisExpression:kt,ArrayExpression:_t,ObjectExpression:Ct,FunctionExpression:Et,UnaryExpression:Tt,UpdateExpression:It,BinaryExpression:Pt,AssignmentExpression:Lt,LogicalExpression:Nt,MemberExpression:jt,ConditionalExpression:Rt,CallExpression:Ot,NewExpression:zt,MetaProperty:Dt,SequenceExpression:Mt,ArrowFunctionExpression:Ft,TemplateLiteral:Bt,TaggedTemplateExpression:Wt,TemplateElement:Ut,ClassExpression:Vt,Super:Ht,SpreadElement:Gt,ChainExpression:qt,ImportExpression:Kt});function Xt(e,t,n){void 0===n&&(n={});for(var r=n.kind,i=void 0===r?"var":r,o=n.hoist,a=void 0!==o&&o,s=n.onlyBlock,l=void 0!==s&&s,c=n.feed,u=void 0===c?{}:c,d=[],h=0;h<e.properties.length;h++){var p=e.properties[h];if(a)(l||"var"===i)&&("Property"===p.type?"Identifier"===(f=p.value).type?t[i](f.name,l?$:"var"===i?K:void 0):Fn(f,t,{kind:i,hoist:a,onlyBlock:l}):Jt(p,t,{kind:i,hoist:a,onlyBlock:l}));else if("Property"===p.type){var f,g=void 0;g=p.computed?rn(p.key,t):p.key.name,d.push(g),"Identifier"===(f=p.value).type?t[i](f.name,u[g]):Fn(f,t,{kind:i,feed:u[g]})}else{for(var m=E({},u),v=0;v<d.length;v++)delete m[d[v]];Jt(p,t,{kind:i,feed:m})}}}function Yt(e,t,n){void 0===n&&(n={});for(var r=n.kind,i=n.hoist,o=void 0!==i&&i,a=n.onlyBlock,s=void 0!==a&&a,l=n.feed,c=void 0===l?[]:l,u=[],d=0;d<e.elements.length;d++){var h=e.elements[d];if(h)if(o)(s||"var"===r)&&("Identifier"===h.type?t[r](h.name,s?$:"var"===r?K:void 0):Fn(h,t,{kind:r,hoist:o,onlyBlock:s}));else if("Identifier"===h.type)if(r)t[r](h.name,c[d]);else{var p=wt(h,t,{getVar:!0});p.set(c[d]),u.push(p.get())}else"RestElement"===h.type?Jt(h,t,{kind:r,feed:c.slice(d)}):Fn(h,t,{kind:r,feed:c[d]})}if(u.length)return u}function Jt(e,t,n){void 0===n&&(n={});var r=n.kind,i=n.hoist,o=void 0!==i&&i,a=n.onlyBlock,s=void 0!==a&&a,l=n.feed,c=void 0===l?[]:l,u=e.argument;o?(s||"var"===r)&&("Identifier"===u.type?t[r](u.name,s?$:"var"===r?K:void 0):Fn(u,t,{kind:r,hoist:o,onlyBlock:s})):"Identifier"===u.type?r?t[r](u.name,c):wt(u,t,{getVar:!0}).set(c):Fn(u,t,{kind:r,feed:c})}function Qt(e,t,n){void 0===n&&(n={});var r=n.kind,i=void 0===r?"var":r,o=n.hoist,a=void 0!==o&&o,s=n.onlyBlock,l=void 0!==s&&s,c=n.feed,u=void 0===c?rn(e.right,t):c,d=e.left;a?(l||"var"===i)&&("Identifier"===d.type?t[i](d.name,l?$:"var"===i?K:void 0):Fn(d,t,{kind:i,hoist:a,onlyBlock:l})):"Identifier"===d.type?t[i](d.name,u):Fn(d,t,{kind:i,feed:u})}var Zt=Object.freeze({__proto__:null,ObjectPattern:Xt,ArrayPattern:Yt,RestElement:Jt,AssignmentPattern:Qt});function en(e,t){for(var n=0;n<e.body.length;n++)rn(e.body[n],t)}var tn,nn=Object.freeze({__proto__:null,Program:en});function rn(e,t){if(e){tn||(tn=E({},o,$t,xt,i,St,Zt,nn));var n=tn[e.type];if(n)return n(e,t);throw new Error(e.type+" isn't implemented")}}function on(e,t){rn(e.expression,t)}function an(e,t,n){void 0===n&&(n={});var r=n.invasived,i=void 0!==r&&r,o=n.hoisted,a=void 0!==o&&o,s=i?t:new ee(t);a||Dn(e,s,{onlyBlock:!0});for(var l=0;l<e.body.length;l++){var c=rn(e.body[l],s);if(c===B){if(c.LABEL&&c.LABEL===n.label)break;return c}if(c===F||c===M)return c}}function sn(){}function ln(){}function cn(e,t){return M.RES=e.argument?rn(e.argument,t):void 0,M}function un(e){var t;return B.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,B}function dn(e){var t;return F.LABEL=null===(t=e.label)||void 0===t?void 0:t.name,F}function hn(e,t){var n=e.label.name;if("WhileStatement"===e.body.type)return wn(e.body,t,{label:n});if("DoWhileStatement"===e.body.type)return xn(e.body,t,{label:n});if("ForStatement"===e.body.type)return An(e.body,t,{label:n});if("ForInStatement"===e.body.type)return Sn(e.body,t,{label:n});if("ForOfStatement"===e.body.type)return kn(e.body,t,{label:n});if("BlockStatement"===e.body.type)return an(e.body,t,{label:n});if("WithStatement"===e.body.type)return pn(e.body,t,{label:n});if("IfStatement"===e.body.type)return fn(e.body,t,{label:n});if("SwitchStatement"===e.body.type)return gn(e.body,t,{label:n});if("TryStatement"===e.body.type)return yn(e.body,t,{label:n});throw new SyntaxError(e.body.type+" cannot be labeled")}function pn(e,t,n){void 0===n&&(n={});var r=new ee(t);r.with(rn(e.object,t));var i=rn(e.body,r);if(i===B){if(i.LABEL&&i.LABEL===n.label)return;return i}if(i===F||i===M)return i}function fn(e,t,n){var r;if(void 0===n&&(n={}),(r=rn(e.test,t)?rn(e.consequent,t):rn(e.alternate,t))===B){if(r.LABEL&&r.LABEL===n.label)return;return r}if(r===F||r===M)return r}function gn(e,t,n){void 0===n&&(n={});for(var r=rn(e.discriminant,t),i=!1,o=0;o<e.cases.length;o++){var a=e.cases[o];if(i||a.test&&rn(a.test,t)!==r||(i=!0),i){var s=mn(a,t);if(s===B){if(s.LABEL===n.label)break;return s}if(s===F||s===M)return s}}}function mn(e,t){for(var n=0;n<e.consequent.length;n++){var r=rn(e.consequent[n],t);if(r===B||r===F||r===M)return r}}function vn(e,t){throw rn(e.argument,t)}function yn(e,t,n){var r;void 0===n&&(n={});try{r=an(e.block,t)}catch(n){if(!e.handler)throw n;var i=new ee(t),o=e.handler.param;if(o)if("Identifier"===o.type){var a=o.name;i.var(a,n)}else Fn(o,t,{feed:n});r=bn(e.handler,i)}finally{e.finalizer&&(r=an(e.finalizer,t))}if(r===B){if(r.LABEL&&r.LABEL===n.label)return;return r}if(r===F||r===M)return r}function bn(e,t){return an(e.body,t,{invasived:!0})}function wn(e,t,n){for(void 0===n&&(n={});rn(e.test,t);){var r=rn(e.body,t);if(r===B){if(r.LABEL===n.label)break;return r}if(r===F){if(r.LABEL===n.label)continue;return r}if(r===M)return r}}function xn(e,t,n){void 0===n&&(n={});do{var r=rn(e.body,t);if(r===B){if(r.LABEL===n.label)break;return r}if(r===F){if(r.LABEL===n.label)continue;return r}if(r===M)return r}while(rn(e.test,t))}function An(e,t,n){void 0===n&&(n={});var r=new ee(t);for(rn(e.init,r);!e.test||rn(e.test,r);rn(e.update,r)){var i=new ee(r),o=void 0;if((o="BlockStatement"===e.body.type?an(e.body,i,{invasived:!0}):rn(e.body,i))===B){if(o.LABEL===n.label)break;return o}if(o===F){if(o.LABEL===n.label)continue;return o}if(o===M)return o}}function Sn(e,t,n){for(var r in void 0===n&&(n={}),rn(e.right,t)){var i=Un(e,t,{value:r});if(i===B){if(i.LABEL===n.label)break;return i}if(i===F){if(i.LABEL===n.label)continue;return i}if(i===M)return i}}function kn(e,t,n){var r,i;void 0===n&&(n={});var o=rn(e.right,t);try{for(var a=s(o),l=a.next();!l.done;l=a.next()){var c=Un(e,t,{value:l.value});if(c===B){if(c.LABEL===n.label)break;return c}if(c===F){if(c.LABEL===n.label)continue;return c}if(c===M)return c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function _n(e,t){t.func(e.id.name,Bn(e,t))}function Cn(e,t,n){void 0===n&&(n={});for(var r=0;r<e.declarations.length;r++)En(e.declarations[r],t,E({kind:e.kind},n))}function En(e,t,n){void 0===n&&(n={});var r=n.kind,i=void 0===r?"var":r,o=n.hoist,a=void 0!==o&&o,s=n.onlyBlock,l=void 0!==s&&s,c=n.feed;if(a)(l||"var"===i)&&("Identifier"===e.id.type?t[i](e.id.name,l?$:"var"===i?K:void 0):Fn(e.id,t,{kind:i,hoist:a,onlyBlock:l}));else{var u="feed"in n,h=u?c:rn(e.init,t);if("Identifier"===e.id.type){var p=e.id.name;"var"!==i||e.init||u?t[i](p,h):t.var(p,K),e.init&&-1!==["ClassExpression","FunctionExpression","ArrowFunctionExpression"].indexOf(e.init.type)&&!h.name&&d(h,"name",{value:p,configurable:!0})}else Fn(e.id,t,{kind:i,feed:h})}}function Tn(e,t){t.func(e.id.name,Wn(e,t))}function In(e,t,n){void 0===n&&(n={});for(var r=n.klass,i=n.superClass,o=0;o<e.body.length;o++){var a=e.body[o];"MethodDefinition"===a.type?Pn(a,t,{klass:r,superClass:i}):"PropertyDefinition"===a.type&&a.static?Ln(a,t,{klass:r,superClass:i}):"StaticBlock"===a.type&&Nn(a,t,{klass:r,superClass:i})}}function Pn(e,t,n){void 0===n&&(n={});var r,i=n.klass,o=n.superClass,a=!1;if(e.computed)r=rn(e.key,t);else if("Identifier"===e.key.type)r=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");r=e.key.name,a=!0}var s=e.static?i:i.prototype;a&&(s[q]||d(s,q,{value:{}}),s=s[q]);var l=Bn(e.value,t,{superClass:o});switch(e.kind){case"constructor":break;case"method":d(s,r,{value:l,writable:!0,configurable:!0});break;case"get":var c=h(s,r);d(s,r,{get:l,set:c&&c.set,configurable:!0});break;case"set":c=h(s,r),d(s,r,{get:c&&c.get,set:l,configurable:!0});break;default:throw new SyntaxError("Unexpected token")}}function Ln(e,t,n){void 0===n&&(n={});var r,i=n.klass,o=n.superClass,a=!1;if(e.computed)r=rn(e.key,t);else if("Identifier"===e.key.type)r=e.key.name;else{if("PrivateIdentifier"!==e.key.type)throw new SyntaxError("Unexpected token");r=e.key.name,a=!0}var s=new ee(t,!0);s.const("this",i);var l=i;a&&(l[q]||d(l,q,{value:{}}),l=l[q]),e.value?"FunctionExpression"===e.value.type||"ArrowFunctionExpression"===e.value.type?l[r]=Bn(e.value,s,{superClass:o}):l[r]=rn(e.value,s):l[r]=void 0}function Nn(e,t,n){void 0===n&&(n={});var r=n.klass,i=new ee(t,!0);return i.const("this",r),an(e,i,{invasived:!0})}function jn(e,t){var n,r=t.global().find(X+e.source.value);if(r){var i=r.get();i&&("function"==typeof i?n=i():"object"==typeof i&&(n=i))}if(!n||"object"!=typeof n)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');for(var o=0;o<e.specifiers.length;o++){var a=e.specifiers[o],s=void 0;if("ImportSpecifier"===a.type?s="Identifier"===a.imported.type?a.imported.name:a.imported.value:"ImportDefaultSpecifier"===a.type?s="default":"ImportNamespaceSpecifier"===a.type&&(s="*"),"*"!==s&&!f(n,s))throw new SyntaxError('The requested module "'+e.source.value+'" does not provide an export named "'+s+'"');t.var(a.local.name,"*"===s?E({},n):n[s])}}function Rn(e,t){var n,r=t.global();"FunctionDeclaration"===e.declaration.type?(n=Bn(e.declaration,t),t.func(e.declaration.id.name,n)):"ClassDeclaration"===e.declaration.type?(n=Wn(e.declaration,t),t.func(e.declaration.id.name,n)):n=rn(e.declaration,t);var i=r.find(Y);if(i){var o=i.get();o&&"object"==typeof o&&(o.default=n)}}function On(e,t){var n=t.global();if(e.declaration){if("FunctionDeclaration"===e.declaration.type){var r=Bn(e.declaration,t);if(t.func(e.declaration.id.name,r),c=n.find(Y)){var i=c.get();i&&"object"==typeof i&&(i[e.declaration.id.name]=r)}}else if("ClassDeclaration"===e.declaration.type){if(r=Wn(e.declaration,t),t.func(e.declaration.id.name,r),c=n.find(Y)){var o=c.get();o&&"object"==typeof o&&(o[e.declaration.id.name]=r)}}else if("VariableDeclaration"===e.declaration.type&&(Cn(e.declaration,t),c=n.find(Y))){var a=c.get();if(a&&"object"==typeof a)for(var s=0;s<e.declaration.declarations.length;s++){var l=e.declaration.declarations[s].id.name;(d=t.find(l))&&(a[l]=d.get())}}}else if(e.specifiers){var c;if(c=n.find(Y)){var u=c.get();if(u&&"object"==typeof u)for(s=0;s<e.specifiers.length;s++){var d,h=e.specifiers[s],p="Identifier"===h.local.type?h.local.name:h.local.value;(d=t.find(p))&&(u["Identifier"===h.exported.type?h.exported.name:h.exported.value]=d.get())}}}}function zn(e,t){var n,r=t.global(),i=r.find(X+e.source.value);if(i){var o=i.get();o&&("function"==typeof o?n=o():"object"==typeof o&&(n=o))}if(!n||"object"!=typeof n)throw new TypeError('Failed to resolve module specifier "'+e.source.value+'"');var a=r.find(Y);if(a){var s=a.get();s&&"object"==typeof s&&E(s,n)}}function Dn(e,t,n){void 0===n&&(n={});for(var r=n.onlyBlock,i=void 0!==r&&r,o=[],a=[],s=0;s<e.body.length;s++){var l=e.body[s];"FunctionDeclaration"===l.type?(o.push(l),a.push(s)):"VariableDeclaration"===l.type&&-1!==["const","let"].indexOf(l.kind)?Cn(l,t,{hoist:!0,onlyBlock:!0}):i||Mn(l,t)}if(a.length){for(s=a.length-1;s>-1;s--)e.body.splice(a[s],1);e.body=o.concat(e.body)}}function Mn(e,t){switch(e.type){case"VariableDeclaration":Cn(e,t,{hoist:!0});break;case"ForInStatement":case"ForOfStatement":"VariableDeclaration"===e.left.type&&Cn(e.left,t,{hoist:!0});case"ForStatement":"ForStatement"===e.type&&"VariableDeclaration"===e.init.type&&Cn(e.init,t,{hoist:!0});case"WhileStatement":case"DoWhileStatement":Mn(e.body,t);break;case"IfStatement":Mn(e.consequent,t),e.alternate&&Mn(e.alternate,t);break;case"BlockStatement":for(var n=0;n<e.body.length;n++)Mn(e.body[n],t);break;case"SwitchStatement":for(n=0;n<e.cases.length;n++)for(var r=0;r<e.cases[n].consequent.length;r++)Mn(e.cases[n].consequent[r],t);break;case"TryStatement":var i=e.block.body;for(n=0;n<i.length;n++)Mn(i[n],t);var o=e.handler&&e.handler.body.body;if(o)for(n=0;n<o.length;n++)Mn(o[n],t);var a=e.finalizer&&e.finalizer.body;if(a)for(n=0;n<a.length;n++)Mn(a[n],t)}}function Fn(e,t,n){switch(void 0===n&&(n={}),e.type){case"ObjectPattern":return Xt(e,t,n);case"ArrayPattern":return Yt(e,t,n);case"RestElement":return Jt(e,t,n);case"AssignmentPattern":return Qt(e,t,n);default:throw new SyntaxError("Unexpected token")}}function Bn(e,t,n){var r;if(void 0===n&&(n={}),e.generator||e.async)return qn(e,t,n);var i=n.superClass,o=n.construct,a=e.params,s=function n(){for(var r=this&&this instanceof n?this.constructor:void 0,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];var c,u=new ee(t,!0);"ArrowFunctionExpression"!==e.type&&(u.const("this",this),u.let("arguments",arguments),u.const(G,r),o&&o(this),i&&(u.const(W,i),o&&u.let(U,!1)));for(var d=0;d<a.length;d++){var h=a[d];"Identifier"===h.type?u.var(h.name,s[d]):"RestElement"===h.type?Jt(h,u,{kind:"var",feed:s.slice(d)}):Fn(h,u,{kind:"var",feed:s[d]})}if("BlockStatement"===e.body.type?(Dn(e.body,u),c=an(e.body,u,{invasived:!0,hoisted:!0})):(c=rn(e.body,u),"ArrowFunctionExpression"===e.type&&(M.RES=c,c=M)),c===M)return c.RES},l=s;"ArrowFunctionExpression"===e.type&&d(l,V,{value:!0}),d(l,"name",{value:e.id&&e.id.name||"",configurable:!0}),d(l,"length",{value:a.length,configurable:!0});var c=null===(r=e.loc)||void 0===r?void 0:r.source;return c&&d(l,"toString",{value:function(){return c.substring(e.start,e.end)},configurable:!0}),l}function Wn(e,t){for(var n=rn(e.superClass,t),r=e.body.body,i=function(e){for(var i=0;i<r.length;i++){var o=r[i];"PropertyDefinition"!==o.type||o.static||Ln(o,t,{klass:e,superClass:n})}},o=function(){i(this),n&&n.apply(this)},a=0;a<r.length;a++){var s=r[a];if("MethodDefinition"===s.type&&"constructor"===s.kind){o=Bn(s.value,t,{superClass:n,construct:i});break}}return n&&_(o,n),In(e.body,t,{klass:o,superClass:n}),d(o,H,{value:!0}),d(o,"name",{value:e.id&&e.id.name||"",configurable:!0}),o}function Un(e,t,n){var r=n.value,i=e.left,o=new ee(t);return"VariableDeclaration"===i.type?Cn(i,o,{feed:r}):"Identifier"===i.type?wt(i,t,{getVar:!0}).set(r):Fn(i,t,{feed:r}),"BlockStatement"===e.body.type?an(e.body,o,{invasived:!0}):rn(e.body,o)}function Vn(e,t,n){var r,i,o,l,c,u;return void 0===n&&(n={}),a(this,function(a){switch(a.label){case 0:r=n.onlyBlock,i=void 0!==r&&r,o=[],l=[],u=0,a.label=1;case 1:return u<e.body.length?"FunctionDeclaration"!==(c=e.body[u]).type?[3,2]:(o.push(c),l.push(u),[3,6]):[3,7];case 2:return"VariableDeclaration"!==c.type||-1===["const","let"].indexOf(c.kind)?[3,4]:[5,s(ct(c,t,{hoist:!0,onlyBlock:!0}))];case 3:return a.sent(),[3,6];case 4:return i?[3,6]:[5,s(Hn(c,t))];case 5:a.sent(),a.label=6;case 6:return u++,[3,1];case 7:if(l.length){for(u=l.length-1;u>-1;u--)e.body.splice(l[u],1);e.body=o.concat(e.body)}return[2]}})}function Hn(e,t){var n,r,i,o,l;return a(this,function(a){switch(a.label){case 0:switch(e.type){case"VariableDeclaration":return[3,1];case"ForInStatement":case"ForOfStatement":return[3,3];case"ForStatement":return[3,5];case"WhileStatement":case"DoWhileStatement":return[3,7];case"IfStatement":return[3,9];case"BlockStatement":return[3,13];case"SwitchStatement":return[3,18];case"TryStatement":return[3,25]}return[3,38];case 1:return[5,s(ct(e,t,{hoist:!0}))];case 2:return a.sent(),[3,38];case 3:return"VariableDeclaration"!==e.left.type?[3,5]:[5,s(ct(e.left,t,{hoist:!0}))];case 4:a.sent(),a.label=5;case 5:return"ForStatement"!==e.type||"VariableDeclaration"!==e.init.type?[3,7]:[5,s(ct(e.init,t,{hoist:!0}))];case 6:a.sent(),a.label=7;case 7:return[5,s(Hn(e.body,t))];case 8:return a.sent(),[3,38];case 9:return[5,s(Hn(e.consequent,t))];case 10:return a.sent(),e.alternate?[5,s(Hn(e.alternate,t))]:[3,12];case 11:a.sent(),a.label=12;case 12:return[3,38];case 13:l=0,a.label=14;case 14:return l<e.body.length?[5,s(Hn(e.body[l],t))]:[3,17];case 15:a.sent(),a.label=16;case 16:return l++,[3,14];case 17:return[3,38];case 18:l=0,a.label=19;case 19:if(!(l<e.cases.length))return[3,24];n=0,a.label=20;case 20:return n<e.cases[l].consequent.length?[5,s(Hn(e.cases[l].consequent[n],t))]:[3,23];case 21:a.sent(),a.label=22;case 22:return n++,[3,20];case 23:return l++,[3,19];case 24:return[3,38];case 25:r=e.block.body,l=0,a.label=26;case 26:return l<r.length?[5,s(Hn(r[l],t))]:[3,29];case 27:a.sent(),a.label=28;case 28:return l++,[3,26];case 29:if(!(i=e.handler&&e.handler.body.body))return[3,33];l=0,a.label=30;case 30:return l<i.length?[5,s(Hn(i[l],t))]:[3,33];case 31:a.sent(),a.label=32;case 32:return l++,[3,30];case 33:if(!(o=e.finalizer&&e.finalizer.body))return[3,37];l=0,a.label=34;case 34:return l<o.length?[5,s(Hn(o[l],t))]:[3,37];case 35:a.sent(),a.label=36;case 36:return l++,[3,34];case 37:return[3,38];case 38:return[2]}})}function Gn(e,t,n){return void 0===n&&(n={}),a(this,function(r){switch(r.label){case 0:switch(e.type){case"ObjectPattern":return[3,1];case"ArrayPattern":return[3,3];case"RestElement":return[3,5];case"AssignmentPattern":return[3,7]}return[3,9];case 1:return[5,s(je(e,t,n))];case 2:case 4:case 6:case 8:return[2,r.sent()];case 3:return[5,s(Re(e,t,n))];case 5:return[5,s(Oe(e,t,n))];case 7:return[5,s(ze(e,t,n))];case 9:throw new SyntaxError("Unexpected token")}})}function qn(e,t,n){var r;if(void 0===n&&(n={}),!e.generator&&!e.async)return Bn(e,t,n);var i,o=n.superClass,l=n.construct,c=e.params,u=function n(){var r,i,u,d,h,p=this&&this instanceof n?this.constructor:void 0,f=[];for(r=0;r<arguments.length;r++)f[r]=arguments[r];return a(this,function(n){switch(n.label){case 0:return i=new ee(t,!0),"ArrowFunctionExpression"===e.type?[3,3]:(i.const("this",this),i.let("arguments",arguments),i.const(G,p),l?[5,s(l(this))]:[3,2]);case 1:n.sent(),n.label=2;case 2:o&&(i.const(W,o),l&&i.let(U,!1)),n.label=3;case 3:u=0,n.label=4;case 4:return u<c.length?"Identifier"!==(d=c[u]).type?[3,5]:(i.var(d.name,f[u]),[3,9]):[3,10];case 5:return"RestElement"!==d.type?[3,7]:[5,s(Oe(d,i,{kind:"var",feed:f.slice(u)}))];case 6:return n.sent(),[3,9];case 7:return[5,s(Gn(d,i,{kind:"var",feed:f[u]}))];case 8:n.sent(),n.label=9;case 9:return u++,[3,4];case 10:return"BlockStatement"!==e.body.type?[3,13]:[5,s(Vn(e.body,i))];case 11:return n.sent(),[5,s(Ve(e.body,i,{invasived:!0,hoisted:!0}))];case 12:return h=n.sent(),[3,15];case 13:return[5,s(We(e.body,i))];case 14:h=n.sent(),"ArrowFunctionExpression"===e.type&&(M.RES=h,h=M),n.label=15;case 15:return h===M?[2,h.RES]:[2]}})};i=e.async&&e.generator?function(){var e=u.apply(this,arguments),t=Promise.resolve(),n=!1,r=function(r){return t=t.then(function(){return te(e,E({fullRet:!0},r))}).catch(function(e){if(!n)return n=!0,Promise.reject(e)})},i={next:function(e){return r({res:e})},throw:function(e){return r({err:e})},return:function(e){return r({ret:e})}};return"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i}:e.async?function(){return te(u.apply(this,arguments))}:u,d(i,V,{value:!0}),d(i,"name",{value:e.id&&e.id.name||"",configurable:!0}),d(i,"length",{value:c.length,configurable:!0});var h=null===(r=e.loc)||void 0===r?void 0:r.source;return h&&d(i,"toString",{value:function(){return h.substring(e.start,e.end)},configurable:!0}),i}function Kn(e,t){var n,r,i,o,l,c;return a(this,function(u){switch(u.label){case 0:return[5,s(We(e.superClass,t))];case 1:for(n=u.sent(),r=e.body.body,i=function(e){var i,o;return a(this,function(a){switch(a.label){case 0:i=0,a.label=1;case 1:return i<r.length?"PropertyDefinition"!==(o=r[i]).type||o.static?[3,3]:[5,s(ft(o,t,{klass:e,superClass:n}))]:[3,4];case 2:a.sent(),a.label=3;case 3:return i++,[3,1];case 4:return[2]}})},o=function(){return a(this,function(e){switch(e.label){case 0:return[5,s(i(this))];case 1:return e.sent(),n&&n.apply(this),[2]}})},l=0;l<r.length;l++)if("MethodDefinition"===(c=r[l]).type&&"constructor"===c.kind){o=qn(c.value,t,{superClass:n,construct:i});break}return n&&_(o,n),[5,s(ht(e.body,t,{klass:o,superClass:n}))];case 2:return u.sent(),d(o,H,{value:!0}),d(o,"name",{value:e.id&&e.id.name||"",configurable:!0}),[2,o]}})}function $n(e,t,n){var r,i,o,l;return a(this,function(a){switch(a.label){case 0:return r=n.value,i=e.left,o=new ee(t),"VariableDeclaration"!==i.type?[3,2]:[5,s(ct(i,o,{feed:r}))];case 1:return a.sent(),[3,6];case 2:return"Identifier"!==i.type?[3,4]:[5,s(wt(i,t,{getVar:!0}))];case 3:return a.sent().set(r),[3,6];case 4:return[5,s(Gn(i,t,{feed:r}))];case 5:a.sent(),a.label=6;case 6:return"BlockStatement"!==e.body.type?[3,8]:[5,s(Ve(e.body,o,{invasived:!0}))];case 7:return l=a.sent(),[3,10];case 8:return[5,s(We(e.body,o))];case 9:l=a.sent(),a.label=10;case 10:return[2,l]}})}var Xn=15;return function(){function t(e){void 0===e&&(e={}),this.options={ecmaVersion:"latest"},this.scope=new ee(null,!0),this.exports={};var t=e.ecmaVer,n=void 0===t?"latest":t,r=e.sandBox,i=void 0===r||r,o=e.sourceType,a=void 0===o?"script":o;if("number"==typeof n&&(n-=n<2015?0:2009),"latest"!==n&&3!==n&&(n<5||n>Xn))throw new Error("unsupported ecmaVer");if(this.options.ecmaVersion=n,this.options.sourceType=a,i){var s=R();this.scope.let("globalThis",s),this.scope.let("window",s),this.scope.let("this",s)}else this.scope.let("globalThis",I),this.scope.let("window",I),this.scope.let("this",I);this.scope.const("module"===a?Y:"exports",this.exports={})}return t.prototype.import=function(e,t){var n;if("string"==typeof e&&((n={})[e]=t,e=n),"object"==typeof e)for(var r=g(e),i=0;i<r.length;i++){var o=r[i],a="module"===this.options.sourceType?X+o:o;this.scope.var(a,e[o])}},t.prototype.parse=function(t,n){return"function"==typeof n?n(t,E({},this.options)):e.parse(t,this.options)},t.prototype.run=function(e){var t="string"==typeof e?this.parse(e):e,n=this.scope;"module"===this.options.sourceType&&("latest"===this.options.ecmaVersion||this.options.ecmaVersion>=13)?te(function(){return a(this,function(e){switch(e.label){case 0:return[5,s(Vn(t,n))];case 1:return e.sent(),[5,s(We(t,n))];case 2:return e.sent(),[2]}})}()):(Dn(t,n),rn(t,n))},t.version=J,t}()}(n(8202))},7035(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"}},7239(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(2372).A)()},7304(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(6997);const i=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},7439(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"}},7441(e,t,n){"use strict";n.d(t,{A:()=>l,b:()=>s});var r=n(8661),i=n(3699),o=n(5089);const a=r.createContext(void 0);function s(e){let{props:t,name:n}=e;return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?(0,i.A)(o.defaultProps,r):o.styleOverrides||o.variants?r:(0,i.A)(o,r)}({props:t,name:n,theme:{components:r.useContext(a)}})}const l=function(e){let{value:t,children:n}=e;return(0,o.jsx)(a.Provider,{value:t,children:n})}},7458(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(1446)},7461(e,t,n){"use strict";var r;n.d(t,{A:()=>s});var i=n(8661);let o=0;const a=(r||(r=n.t(i,2)))["useId".toString()];function s(e){if(void 0!==a){const t=a();return null!=e?e:t}return function(e){const[t,n]=i.useState(e),r=e||t;return i.useEffect(()=>{null==t&&(o+=1,n("mui-".concat(o)))},[t]),r}(e)}},7562(e,t,n){"use strict";n.d(t,{Ay:()=>s});var r=n(4481),i=n(7239),o=n(4882),a=n(5460);const s=(0,r.Ay)({themeId:o.A,defaultTheme:i.A,rootShouldForwardProp:a.A})},7599(e,t,n){"use strict";n.d(t,{A:()=>i});const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},7601(e,t,n){"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},7698(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"}),"UnfoldLess")},7802(e,t,n){"use strict";n.d(t,{A:()=>o});n(8661);var r=n(1834),i=n(5089);function o(e){const{styles:t,defaultTheme:n={}}=e,o="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(r.mL,{styles:o})}},7811(e,t,n){"use strict";var r=n(8661),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},7876(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNew")},7946(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>i.A,unstable_applyStyles:()=>o.A});var r=n(3013),i=n(9682),o=n(6620)},7973(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"}},7997(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(8661);const i=[];function o(e){r.useEffect(e,i)}},8202(e,t){!function(e){"use strict";var t=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239],n=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",i="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ꟑꟑꟓꟕ-ꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},a="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",s={5:a,"5module":a+" export import",6:a+" const class extends export import super"},l=/^in(stanceof)?$/,c=new RegExp("["+i+"]"),u=new RegExp("["+i+r+"]");function d(e,t){for(var n=65536,r=0;r<t.length;r+=2){if((n+=t[r])>e)return!1;if((n+=t[r+1])>=e)return!0}return!1}function h(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==t&&d(e,n)))}function p(e,r){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&u.test(String.fromCharCode(e)):!1!==r&&(d(e,n)||d(e,t)))))}var f=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function g(e,t){return new f(e,{beforeExpr:!0,binop:t})}var m={beforeExpr:!0},v={startsExpr:!0},y={};function b(e,t){return void 0===t&&(t={}),t.keyword=e,y[e]=new f(e,t)}var w={num:new f("num",v),regexp:new f("regexp",v),string:new f("string",v),name:new f("name",v),privateId:new f("privateId",v),eof:new f("eof"),bracketL:new f("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new f("]"),braceL:new f("{",{beforeExpr:!0,startsExpr:!0}),braceR:new f("}"),parenL:new f("(",{beforeExpr:!0,startsExpr:!0}),parenR:new f(")"),comma:new f(",",m),semi:new f(";",m),colon:new f(":",m),dot:new f("."),question:new f("?",m),questionDot:new f("?."),arrow:new f("=>",m),template:new f("template"),invalidTemplate:new f("invalidTemplate"),ellipsis:new f("...",m),backQuote:new f("`",v),dollarBraceL:new f("${",{beforeExpr:!0,startsExpr:!0}),eq:new f("=",{beforeExpr:!0,isAssign:!0}),assign:new f("_=",{beforeExpr:!0,isAssign:!0}),incDec:new f("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new f("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:g("||",1),logicalAND:g("&&",2),bitwiseOR:g("|",3),bitwiseXOR:g("^",4),bitwiseAND:g("&",5),equality:g("==/!=/===/!==",6),relational:g("</>/<=/>=",7),bitShift:g("<</>>/>>>",8),plusMin:new f("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:g("%",10),star:g("*",10),slash:g("/",10),starstar:new f("**",{beforeExpr:!0}),coalesce:g("??",1),_break:b("break"),_case:b("case",m),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",m),_do:b("do",{isLoop:!0,beforeExpr:!0}),_else:b("else",m),_finally:b("finally"),_for:b("for",{isLoop:!0}),_function:b("function",v),_if:b("if"),_return:b("return",m),_switch:b("switch"),_throw:b("throw",m),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:!0}),_with:b("with"),_new:b("new",{beforeExpr:!0,startsExpr:!0}),_this:b("this",v),_super:b("super",v),_class:b("class",v),_extends:b("extends",m),_export:b("export"),_import:b("import",v),_null:b("null",v),_true:b("true",v),_false:b("false",v),_in:b("in",{beforeExpr:!0,binop:7}),_instanceof:b("instanceof",{beforeExpr:!0,binop:7}),_typeof:b("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:b("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:b("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},x=/\r\n?|\n|\u2028|\u2029/,A=new RegExp(x.source,"g");function S(e){return 10===e||13===e||8232===e||8233===e}function k(e,t,n){void 0===n&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(S(i))return r<n-1&&13===i&&10===e.charCodeAt(r+1)?r+2:r+1}return-1}var _=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,E=Object.prototype,T=E.hasOwnProperty,I=E.toString,P=Object.hasOwn||function(e,t){return T.call(e,t)},L=Array.isArray||function(e){return"[object Array]"===I.call(e)},N=Object.create(null);function j(e){return N[e]||(N[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function R(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var O=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,z=function(e,t){this.line=e,this.column=t};z.prototype.offset=function(e){return new z(this.line,this.column+e)};var D=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function M(e,t){for(var n=1,r=0;;){var i=k(e,r,t);if(i<0)return new z(n,t-r);++n,r=i}}var F={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},B=!1;function W(e){var t={};for(var n in F)t[n]=e&&P(e,n)?e[n]:F[n];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!B&&"object"==typeof console&&console.warn&&(B=!0,console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),L(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return L(t.onComment)&&(t.onComment=U(t,t.onComment)),t}function U(e,t){return function(n,r,i,o,a,s){var l={type:n?"Block":"Line",value:r,start:i,end:o};e.locations&&(l.loc=new D(this,a,s)),e.ranges&&(l.range=[i,o]),t.push(l)}}var V=1,H=2,G=4,q=8,K=16,$=32,X=64,Y=128,J=256,Q=512,Z=V|H|J;function ee(e,t){return H|(e?G:0)|(t?q:0)}var te=0,ne=1,re=2,ie=3,oe=4,ae=5,se=function(e,t,n){this.options=e=W(e),this.sourceFile=e.sourceFile,this.keywords=j(s[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var r="";!0!==e.allowReserved&&(r=o[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(r+=" await")),this.reservedWords=j(r);var i=(r?r+" ":"")+o.strict;this.reservedWordsStrict=j(i),this.reservedWordsStrictBind=j(i+" "+o.strictBind),this.input=String(t),this.containsEsc=!1,n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(x).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=w.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(V),this.regexpState=null,this.privateNameStack=[]},le={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};se.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},le.inFunction.get=function(){return(this.currentVarScope().flags&H)>0},le.inGenerator.get=function(){return(this.currentVarScope().flags&q)>0},le.inAsync.get=function(){return(this.currentVarScope().flags&G)>0},le.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(J|Q))return!1;if(t&H)return(t&G)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},le.allowSuper.get=function(){return(this.currentThisScope().flags&X)>0||this.options.allowSuperOutsideMethod},le.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Y)>0},le.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},le.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(J|Q)||t&H&&!(t&K))return!0}return!1},le.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&J)>0},se.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},se.parse=function(e,t){return new this(t,e).parse()},se.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},se.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(se.prototype,le);var ce=se.prototype,ue=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ce.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=ue.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){C.lastIndex=e+t[0].length;var n=C.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return";"===i||"}"===i||x.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(r+1))}e+=t[0].length,C.lastIndex=e,e+=C.exec(this.input)[0].length,";"===this.input[e]&&e++}},ce.eat=function(e){return this.type===e&&(this.next(),!0)},ce.isContextual=function(e){return this.type===w.name&&this.value===e&&!this.containsEsc},ce.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},ce.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},ce.canInsertSemicolon=function(){return this.type===w.eof||this.type===w.braceR||x.test(this.input.slice(this.lastTokEnd,this.start))},ce.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},ce.semicolon=function(){this.eat(w.semi)||this.insertSemicolon()||this.unexpected()},ce.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},ce.expect=function(e){this.eat(e)||this.unexpected()},ce.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var de=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ce.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?"Assigning to rvalue":"Parenthesized pattern")}},ce.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property")},ce.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},ce.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var he=se.prototype;he.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==w.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var o=i[r];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var pe={kind:"loop"},fe={kind:"switch"};he.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;C.lastIndex=this.pos;var t=C.exec(this.input),n=this.pos+t[0].length,r=this.input.charCodeAt(n);if(91===r||92===r)return!0;if(e)return!1;if(123===r||r>55295&&r<56320)return!0;if(h(r,!0)){for(var i=n+1;p(r=this.input.charCodeAt(i),!0);)++i;if(92===r||r>55295&&r<56320)return!0;var o=this.input.slice(n,i);if(!l.test(o))return!0}return!1},he.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;C.lastIndex=this.pos;var e,t=C.exec(this.input),n=this.pos+t[0].length;return!(x.test(this.input.slice(this.pos,n))||"function"!==this.input.slice(n,n+8)||n+8!==this.input.length&&(p(e=this.input.charCodeAt(n+8))||e>55295&&e<56320))},he.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;C.lastIndex=this.pos;var n=C.exec(this.input),r=this.pos+n[0].length;if(x.test(this.input.slice(this.pos,r)))return!1;if(e){var i,o=r+5;if("using"!==this.input.slice(r,o)||o===this.input.length||p(i=this.input.charCodeAt(o))||i>55295&&i<56320)return!1;C.lastIndex=o;var a=C.exec(this.input);if(a&&x.test(this.input.slice(o,o+a[0].length)))return!1}if(t){var s,l=r+2;if(!("of"!==this.input.slice(r,l)||l!==this.input.length&&(p(s=this.input.charCodeAt(l))||s>55295&&s<56320)))return!1}var c=this.input.charCodeAt(r);return h(c,!0)||92===c},he.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},he.isUsing=function(e){return this.isUsingKeyword(!1,e)},he.parseStatement=function(e,t,n){var r,i=this.type,o=this.startNode();switch(this.isLet(e)&&(i=w._var,r="let"),i){case w._break:case w._continue:return this.parseBreakContinueStatement(o,i.keyword);case w._debugger:return this.parseDebuggerStatement(o);case w._do:return this.parseDoStatement(o);case w._for:return this.parseForStatement(o);case w._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(o,!1,!e);case w._class:return e&&this.unexpected(),this.parseClass(o,!0);case w._if:return this.parseIfStatement(o);case w._return:return this.parseReturnStatement(o);case w._switch:return this.parseSwitchStatement(o);case w._throw:return this.parseThrowStatement(o);case w._try:return this.parseTryStatement(o);case w._const:case w._var:return r=r||this.value,e&&"var"!==r&&this.unexpected(),this.parseVarStatement(o,r);case w._while:return this.parseWhileStatement(o);case w._with:return this.parseWithStatement(o);case w.braceL:return this.parseBlock(!0,o);case w.semi:return this.parseEmptyStatement(o);case w._export:case w._import:if(this.options.ecmaVersion>10&&i===w._import){C.lastIndex=this.pos;var a=C.exec(this.input),s=this.pos+a[0].length,l=this.input.charCodeAt(s);if(40===l||46===l)return this.parseExpressionStatement(o,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===w._import?this.parseImport(o):this.parseExport(o,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(o,!0,!e);var c=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(c)return t&&"script"===this.options.sourceType&&this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script`"),"await using"===c&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(o,!1,c),this.semicolon(),this.finishNode(o,"VariableDeclaration");var u=this.value,d=this.parseExpression();return i===w.name&&"Identifier"===d.type&&this.eat(w.colon)?this.parseLabeledStatement(o,u,d,e):this.parseExpressionStatement(o,d)}},he.parseBreakContinueStatement=function(e,t){var n="break"===t;this.next(),this.eat(w.semi)||this.insertSemicolon()?e.label=null:this.type!==w.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(n||"loop"===i.kind))break;if(e.label&&n)break}}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,n?"BreakStatement":"ContinueStatement")},he.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},he.parseDoStatement=function(e){return this.next(),this.labels.push(pe),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(w._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(w.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},he.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(pe),this.enterScope(0),this.expect(w.parenL),this.type===w.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===w._var||this.type===w._const||n){var r=this.startNode(),i=n?"let":this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var o=this.isContextual("let"),a=!1,s=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(s){var l=this.startNode();return this.next(),"await using"===s&&this.next(),this.parseVar(l,!0,s),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var c=this.containsEsc,u=new de,d=this.start,h=t>-1?this.parseExprSubscripts(u,"await"):this.parseExpression(!0,u);return this.type===w._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===w._in&&this.unexpected(t),e.await=!0):a&&this.options.ecmaVersion>=8&&(h.start!==d||c||"Identifier"!==h.type||"async"!==h.name?this.options.ecmaVersion>=9&&(e.await=!1):this.unexpected()),o&&a&&this.raise(h.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(h,!1,u),this.checkLValPattern(h),this.parseForIn(e,h)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,h))},he.parseForAfterInit=function(e,t,n){return(this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===t.declarations.length?(this.options.ecmaVersion>=9&&(this.type===w._in?n>-1&&this.unexpected(n):e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},he.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,me|(n?0:ve),!1,t)},he.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(w._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},he.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(w.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},he.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(w.braceL),this.labels.push(fe),this.enterScope(0);for(var n=!1;this.type!==w.braceR;)if(this.type===w._case||this.type===w._default){var r=this.type===w._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(w.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},he.parseThrowStatement=function(e){return this.next(),x.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var ge=[];he.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?$:0),this.checkLValPattern(e,t?oe:re),this.expect(w.parenR),e},he.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===w._catch){var t=this.startNode();this.next(),this.eat(w.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(w._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},he.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")},he.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(pe),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},he.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},he.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},he.parseLabeledStatement=function(e,t,n,r){for(var i=0,o=this.labels;i<o.length;i+=1)o[i].name===t&&this.raise(n.start,"Label '"+t+"' is already declared");for(var a=this.type.isLoop?"loop":this.type===w._switch?"switch":null,s=this.labels.length-1;s>=0;s--){var l=this.labels[s];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(r?-1===r.indexOf("label")?r+"label":r:"label"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},he.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},he.parseBlock=function(e,t,n){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(w.braceL),e&&this.enterScope(0);this.type!==w.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},he.parseFor=function(e,t){return e.init=t,this.expect(w.semi),e.test=this.type===w.semi?null:this.parseExpression(),this.expect(w.semi),e.update=this.type===w.parenR?null:this.parseExpression(),this.expect(w.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},he.parseForIn=function(e,t){var n=this.type===w._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(n?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(w.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")},he.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(w.eq)?i.init=this.parseMaybeAssign(t):r||"const"!==n||this.type===w._in||this.options.ecmaVersion>=6&&this.isContextual("of")?r||"using"!==n&&"await using"!==n||!(this.options.ecmaVersion>=17)||this.type===w._in||this.isContextual("of")?r||"Identifier"===i.id.type||t&&(this.type===w._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.raise(this.lastTokEnd,"Missing initializer in "+n+" declaration"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(w.comma))break}return e},he.parseVarId=function(e,t){e.id="using"===t||"await using"===t?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?ne:re,!1)};var me=1,ve=2,ye=4;function be(e,t){var n=t.key.name,r=e[n],i="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(i=(t.static?"s":"i")+t.kind),"iget"===r&&"iset"===i||"iset"===r&&"iget"===i||"sget"===r&&"sset"===i||"sset"===r&&"sget"===i?(e[n]="true",!1):!!r||(e[n]=i,!1)}function we(e,t){var n=e.computed,r=e.key;return!n&&("Identifier"===r.type&&r.name===t||"Literal"===r.type&&r.value===t)}he.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===w.star&&t&ve&&this.unexpected(),e.generator=this.eat(w.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&me&&(e.id=t&ye&&this.type!==w.name?null:this.parseIdent(),!e.id||t&ve||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?ne:re:ie));var o=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ee(e.async,e.generator)),t&me||(e.id=this.type===w.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,t&me?"FunctionDeclaration":"FunctionExpression")},he.parseFunctionParams=function(e){this.expect(w.parenL),e.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},he.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),o=!1;for(i.body=[],this.expect(w.braceL);this.type!==w.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(i.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(o&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),o=!0):a.key&&"PrivateIdentifier"===a.key.type&&be(r,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=n,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},he.parseClassElement=function(e){if(this.eat(w.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r="",i=!1,o=!1,a="method",s=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(w.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===w.star?s=!0:r="static"}if(n.static=s,!r&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==w.star||this.canInsertSemicolon()?r="async":o=!0),!r&&(t>=9||!o)&&this.eat(w.star)&&(i=!0),!r&&!o&&!i){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:r=l)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,"Identifier")):this.parseClassElementName(n),t<13||this.type===w.parenL||"method"!==a||i||o){var c=!n.static&&we(n,"constructor"),u=c&&e;c&&"method"!==a&&this.raise(n.key.start,"Constructor can't have get/set modifier"),n.kind=c?"constructor":a,this.parseClassMethod(n,i,o,u)}else this.parseClassField(n);return n},he.isClassElementNameStart=function(){return this.type===w.name||this.type===w.privateId||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword},he.parseClassElementName=function(e){this.type===w.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},he.parseClassMethod=function(e,t,n,r){var i=e.key;"constructor"===e.kind?(t&&this.raise(i.start,"Constructor can't be a generator"),n&&this.raise(i.start,"Constructor can't be an async method")):e.static&&we(e,"prototype")&&this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,n,r);return"get"===e.kind&&0!==o.params.length&&this.raiseRecoverable(o.start,"getter should have no params"),"set"===e.kind&&1!==o.params.length&&this.raiseRecoverable(o.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===o.params[0].type&&this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},he.parseClassField=function(e){return we(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&we(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(w.eq)?(this.enterScope(Q|X),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")},he.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(J|X);this.type!==w.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},he.parseClassId=function(e,t){this.type===w.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,re,!1)):(!0===t&&this.unexpected(),e.id=null)},he.parseClassSuper=function(e){e.superClass=this.eat(w._extends)?this.parseExprSubscripts(null,!1):null},he.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},he.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=0===r?null:this.privateNameStack[r-1],o=0;o<n.length;++o){var a=n[o];P(t,a.name)||(i?i.used.push(a):this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class"))}},he.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==w.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},he.parseExport=function(e,t){if(this.next(),this.eat(w.star))return this.parseExportAllDeclaration(e,t);if(this.eat(w._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==w.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),"Literal"===i.local.type&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},he.parseExportDeclaration=function(e){return this.parseStatement(null)},he.parseExportDefaultDeclaration=function(){var e;if(this.type===w._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,me|ye,!1,e)}if(this.type===w._class){var n=this.startNode();return this.parseClass(n,"nullableID")}var r=this.parseMaybeAssign();return this.semicolon(),r},he.checkExport=function(e,t,n){e&&("string"!=typeof t&&(t="Identifier"===t.type?t.name:t.value),P(e,t)&&this.raiseRecoverable(n,"Duplicate export '"+t+"'"),e[t]=!0)},he.checkPatternExport=function(e,t){var n=t.type;if("Identifier"===n)this.checkExport(e,t,t.start);else if("ObjectPattern"===n)for(var r=0,i=t.properties;r<i.length;r+=1){var o=i[r];this.checkPatternExport(e,o)}else if("ArrayPattern"===n)for(var a=0,s=t.elements;a<s.length;a+=1){var l=s[a];l&&this.checkPatternExport(e,l)}else"Property"===n?this.checkPatternExport(e,t.value):"AssignmentPattern"===n?this.checkPatternExport(e,t.left):"RestElement"===n&&this.checkPatternExport(e,t.argument)},he.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},he.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},he.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")},he.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(w.braceL);!this.eat(w.braceR);){if(n)n=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;t.push(this.parseExportSpecifier(e))}return t},he.parseImport=function(e){return this.next(),this.type===w.string?(e.specifiers=ge,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===w.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},he.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,re),this.finishNode(e,"ImportSpecifier")},he.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,re),this.finishNode(e,"ImportDefaultSpecifier")},he.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,re),this.finishNode(e,"ImportNamespaceSpecifier")},he.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===w.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(w.comma)))return e;if(this.type===w.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(w.braceL);!this.eat(w.braceR);){if(t)t=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;e.push(this.parseImportSpecifier())}return e},he.parseWithClause=function(){var e=[];if(!this.eat(w._with))return e;this.expect(w.braceL);for(var t={},n=!0;!this.eat(w.braceR);){if(n)n=!1;else if(this.expect(w.comma),this.afterTrailingComma(w.braceR))break;var r=this.parseImportAttribute(),i="Identifier"===r.key.type?r.key.name:r.key.value;P(t,i)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+i+"'"),t[i]=!0,e.push(r)}return e},he.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===w.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved),this.expect(w.colon),this.type!==w.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")},he.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===w.string){var e=this.parseLiteral(this.value);return O.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},he.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},he.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var xe=se.prototype;xe.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.toAssignable(o,t),"RestElement"!==o.type||"ArrayPattern"!==o.argument.type&&"ObjectPattern"!==o.argument.type||this.raise(o.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,n);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else n&&this.checkPatternErrors(n,!0);return e},xe.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var o=e[n-1];6===this.options.ecmaVersion&&t&&o&&"RestElement"===o.type&&"Identifier"!==o.argument.type&&this.unexpected(o.argument.start)}return e},xe.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},xe.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==w.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},xe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case w.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(w.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case w.braceL:return this.parseObj(!0)}return this.parseIdent()},xe.parseBindingList=function(e,t,n,r){for(var i=[],o=!0;!this.eat(e);)if(o?o=!1:this.expect(w.comma),t&&this.type===w.comma)i.push(null);else{if(n&&this.afterTrailingComma(e))break;if(this.type===w.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),i.push(a),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}i.push(this.parseAssignableListItem(r))}return i},xe.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},xe.parseBindingListItem=function(e){return e},xe.parseMaybeDefault=function(e,t,n){if(n=n||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(w.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")},xe.checkLValSimple=function(e,t,n){void 0===t&&(t=te);var r=t!==te;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===re&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),n&&(P(n,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),n[e.name]=!0),t!==ae&&this.declareName(e.name,t,e.start));break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue")}},xe.checkLValPattern=function(e,t,n){switch(void 0===t&&(t=te),e.type){case"ObjectPattern":for(var r=0,i=e.properties;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,t,n)}break;case"ArrayPattern":for(var a=0,s=e.elements;a<s.length;a+=1){var l=s[a];l&&this.checkLValInnerPattern(l,t,n)}break;default:this.checkLValSimple(e,t,n)}},xe.checkLValInnerPattern=function(e,t,n){switch(void 0===t&&(t=te),e.type){case"Property":this.checkLValInnerPattern(e.value,t,n);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,n);break;case"RestElement":this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var Ae=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},Se={b_stat:new Ae("{",!1),b_expr:new Ae("{",!0),b_tmpl:new Ae("${",!1),p_stat:new Ae("(",!1),p_expr:new Ae("(",!0),q_tmpl:new Ae("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Ae("function",!1),f_expr:new Ae("function",!0),f_expr_gen:new Ae("function",!0,!1,null,!0),f_gen:new Ae("function",!1,!1,null,!0)},ke=se.prototype;ke.initialContext=function(){return[Se.b_stat]},ke.curContext=function(){return this.context[this.context.length-1]},ke.braceIsBlock=function(e){var t=this.curContext();return t===Se.f_expr||t===Se.f_stat||(e!==w.colon||t!==Se.b_stat&&t!==Se.b_expr?e===w._return||e===w.name&&this.exprAllowed?x.test(this.input.slice(this.lastTokEnd,this.start)):e===w._else||e===w.semi||e===w.eof||e===w.parenR||e===w.arrow||(e===w.braceL?t===Se.b_stat:e!==w._var&&e!==w._const&&e!==w.name&&!this.exprAllowed):!t.isExpr)},ke.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ke.updateContext=function(e){var t,n=this.type;n.keyword&&e===w.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},ke.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},w.parenR.updateContext=w.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===Se.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},w.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Se.b_stat:Se.b_expr),this.exprAllowed=!0},w.dollarBraceL.updateContext=function(){this.context.push(Se.b_tmpl),this.exprAllowed=!0},w.parenL.updateContext=function(e){var t=e===w._if||e===w._for||e===w._with||e===w._while;this.context.push(t?Se.p_stat:Se.p_expr),this.exprAllowed=!0},w.incDec.updateContext=function(){},w._function.updateContext=w._class.updateContext=function(e){!e.beforeExpr||e===w._else||e===w.semi&&this.curContext()!==Se.p_stat||e===w._return&&x.test(this.input.slice(this.lastTokEnd,this.start))||(e===w.colon||e===w.braceL)&&this.curContext()===Se.b_stat?this.context.push(Se.f_stat):this.context.push(Se.f_expr),this.exprAllowed=!1},w.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},w.backQuote.updateContext=function(){this.curContext()===Se.q_tmpl?this.context.pop():this.context.push(Se.q_tmpl),this.exprAllowed=!1},w.star.updateContext=function(e){if(e===w._function){var t=this.context.length-1;this.context[t]===Se.f_expr?this.context[t]=Se.f_expr_gen:this.context[t]=Se.f_gen}this.exprAllowed=!0},w.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==w.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var _e=se.prototype;function Ce(e){return"Identifier"===e.type||"ParenthesizedExpression"===e.type&&Ce(e.expression)}function Ee(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&Ee(e.expression)||"ParenthesizedExpression"===e.type&&Ee(e.expression)}_e.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r,i=e.key;switch(i.type){case"Identifier":r=i.name;break;case"Literal":r=String(i.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===r&&"init"===o&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[r="$"+r];a?("init"===o?this.strict&&a.init||a.get||a.set:a.init||a[o])&&this.raiseRecoverable(i.start,"Redefinition of property"):a=t[r]={init:!1,get:!1,set:!1},a[o]=!0}}},_e.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===w.comma){var o=this.startNodeAt(n,r);for(o.expressions=[i];this.eat(w.comma);)o.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return i},_e.parseMaybeAssign=function(e,t,n){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,o=-1,a=-1;t?(i=t.parenthesizedAssign,o=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new de,r=!0);var s=this.start,l=this.startLoc;this.type!==w.parenL&&this.type!==w.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(n&&(c=n.call(this,c,s,l)),this.type.isAssign){var u=this.startNodeAt(s,l);return u.operator=this.value,this.type===w.eq&&(c=this.toAssignable(c,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===w.eq?this.checkLValPattern(c):this.checkLValSimple(c),u.left=c,this.next(),u.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(u,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),o>-1&&(t.trailingComma=o),c},_e.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(w.question)){var o=this.startNodeAt(n,r);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(w.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i},_e.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},_e.parseExprOp=function(e,t,n,r,i){var o=this.type.binop;if(null!=o&&(!i||this.type!==w._in)&&o>r){var a=this.type===w.logicalOR||this.type===w.logicalAND,s=this.type===w.coalesce;s&&(o=w.logicalAND.binop);var l=this.value;this.next();var c=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),c,u,o,i),h=this.buildBinary(t,n,e,d,l,a||s);return(a&&this.type===w.coalesce||s&&(this.type===w.logicalOR||this.type===w.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(h,t,n,r,i)}return e},_e.buildBinary=function(e,t,n,r,i,o){"PrivateIdentifier"===r.type&&this.raise(r.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=n,a.operator=i,a.right=r,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")},_e.parseMaybeUnary=function(e,t,n,r){var i,o=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)i=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),l=this.type===w.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,l,r),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(s.argument):this.strict&&"delete"===s.operator&&Ce(s.argument)?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):"delete"===s.operator&&Ee(s.argument)?this.raiseRecoverable(s.start,"Private fields can not be deleted"):t=!0,i=this.finishNode(s,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==w.privateId){if(i=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(o,a);c.operator=this.value,c.prefix=!1,c.argument=i,this.checkLValSimple(i),this.next(),i=this.finishNode(c,"UpdateExpression")}}else(r||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),i=this.parsePrivateIdent(),this.type!==w._in&&this.unexpected();return n||!this.eat(w.starstar)?i:t?void this.unexpected(this.lastTokStart):this.buildBinary(o,a,i,this.parseMaybeUnary(null,!1,!1,r),"**",!1)},_e.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return i;var o=this.parseSubscripts(i,n,r,!1,t);return e&&"MemberExpression"===o.type&&(e.parenthesizedAssign>=o.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=o.start&&(e.parenthesizedBind=-1),e.trailingComma>=o.start&&(e.trailingComma=-1)),o},_e.parseSubscripts=function(e,t,n,r,i){for(var o=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;;){var s=this.parseSubscript(e,t,n,r,o,a,i);if(s.optional&&(a=!0),s===e||"ArrowFunctionExpression"===s.type){if(a){var l=this.startNodeAt(t,n);l.expression=s,s=this.finishNode(l,"ChainExpression")}return s}e=s}},_e.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(w.arrow)},_e.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},_e.parseSubscript=function(e,t,n,r,i,o,a){var s=this.options.ecmaVersion>=11,l=s&&this.eat(w.questionDot);r&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(w.bracketL);if(c||l&&this.type!==w.parenL&&this.type!==w.backQuote||this.eat(w.dot)){var u=this.startNodeAt(t,n);u.object=e,c?(u.property=this.parseExpression(),this.expect(w.bracketR)):this.type===w.privateId&&"Super"!==e.type?u.property=this.parsePrivateIdent():u.property=this.parseIdent("never"!==this.options.allowReserved),u.computed=!!c,s&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!r&&this.eat(w.parenL)){var d=new de,h=this.yieldPos,p=this.awaitPos,f=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var g=this.parseExprList(w.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=p,this.awaitIdentPos=f,this.parseSubscriptAsyncArrow(t,n,g,a);this.checkExpressionErrors(d,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=f||this.awaitIdentPos;var m=this.startNodeAt(t,n);m.callee=e,m.arguments=g,s&&(m.optional=l),e=this.finishNode(m,"CallExpression")}else if(this.type===w.backQuote){(l||o)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var v=this.startNodeAt(t,n);v.tag=e,v.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(v,"TaggedTemplateExpression")}return e},_e.parseExprAtom=function(e,t,n){this.type===w.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case w._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type!==w.parenL||this.allowDirectSuper||this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==w.dot&&this.type!==w.bracketL&&this.type!==w.parenL&&this.unexpected(),this.finishNode(r,"Super");case w._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case w.name:var o=this.start,a=this.startLoc,s=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(w._function))return this.overrideContext(Se.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(w.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===w.name&&!s&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(w.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(o,a),[l],!0,t)}return l;case w.regexp:var c=this.value;return(r=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},r;case w.num:case w.string:return this.parseLiteral(this.value);case w._null:case w._true:case w._false:return(r=this.startNode()).value=this.type===w._null?null:this.type===w._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case w.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case w.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(w.bracketR,!0,!0,e),this.finishNode(r,"ArrayExpression");case w.braceL:return this.overrideContext(Se.b_expr),this.parseObj(!1,e);case w._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case w._class:return this.parseClass(this.startNode(),!1);case w._new:return this.parseNew();case w.backQuote:return this.parseTemplate();case w._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},_e.parseExprAtomDefault=function(){this.unexpected()},_e.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===w.parenL&&!e)return this.parseDynamicImport(t);if(this.type===w.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name="import",t.meta=this.finishNode(n,"Identifier"),this.parseImportMeta(t)}this.unexpected()},_e.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(w.parenR)?e.options=null:(this.expect(w.comma),this.afterTrailingComma(w.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(w.parenR)||(this.expect(w.comma),this.afterTrailingComma(w.parenR)||this.unexpected())));else if(!this.eat(w.parenR)){var t=this.start;this.eat(w.comma)&&this.eat(w.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},_e.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},_e.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=null!=t.value?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},_e.parseParenExpression=function(){this.expect(w.parenL);var e=this.parseExpression();return this.expect(w.parenR),e},_e.shouldParseArrow=function(e){return!this.canInsertSemicolon()},_e.parseParenAndDistinguishExpression=function(e,t){var n,r=this.start,i=this.startLoc,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,s=this.start,l=this.startLoc,c=[],u=!0,d=!1,h=new de,p=this.yieldPos,f=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==w.parenR;){if(u?u=!1:this.expect(w.comma),o&&this.afterTrailingComma(w.parenR,!0)){d=!0;break}if(this.type===w.ellipsis){a=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var g=this.lastTokEnd,m=this.lastTokEndLoc;if(this.expect(w.parenR),e&&this.shouldParseArrow(c)&&this.eat(w.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=f,this.parseParenArrowList(r,i,c,t);c.length&&!d||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(h,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=f||this.awaitPos,c.length>1?((n=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(n,"SequenceExpression",g,m)):n=c[0]}else n=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(r,i);return v.expression=n,this.finishNode(v,"ParenthesizedExpression")}return n},_e.parseParenItem=function(e){return e},_e.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var Te=[];_e.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===w.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),n&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),this.eat(w.parenL)?e.arguments=this.parseExprList(w.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Te,this.finishNode(e,"NewExpression")},_e.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===w.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value.replace(/\r\n?/g,"\n"),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===w.backQuote,this.finishNode(n,"TemplateElement")},_e.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===w.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(w.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(w.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},_e.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===w.name||this.type===w.num||this.type===w.string||this.type===w.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===w.star)&&!x.test(this.input.slice(this.lastTokEnd,this.start))},_e.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(w.braceR);){if(r)r=!1;else if(this.expect(w.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(w.braceR))break;var o=this.parseProperty(e,t);e||this.checkPropClash(o,i,t),n.properties.push(o)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},_e.parseProperty=function(e,t){var n,r,i,o,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(w.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===w.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,t),this.type===w.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(i=this.start,o=this.startLoc),e||(n=this.eat(w.star)));var s=this.containsEsc;return this.parsePropertyName(a),!e&&!s&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(a)?(r=!0,n=this.options.ecmaVersion>=9&&this.eat(w.star),this.parsePropertyName(a)):r=!1,this.parsePropertyValue(a,e,n,r,i,o,t,s),this.finishNode(a,"Property")},_e.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n="get"===e.kind?0:1;if(e.value.params.length!==n){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},_e.parsePropertyValue=function(e,t,n,r,i,o,a,s){(n||r)&&this.type===w.colon&&this.unexpected(),this.eat(w.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===w.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind="init"):t||s||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===w.comma||this.type===w.braceR||this.type===w.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key)):this.type===w.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected():((n||r)&&this.unexpected(),this.parseGetterSetter(e))},_e.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(w.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(w.bracketR),e.key;e.computed=!1}return e.key=this.type===w.num||this.type===w.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},_e.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},_e.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ee(t,r.generator)|X|(n?Y:0)),this.expect(w.parenL),r.params=this.parseBindingList(w.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(r,"FunctionExpression")},_e.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(ee(n,!1)|K),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},_e.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==w.braceL,o=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);o&&!s||(a=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!o&&!a&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ae),e.body=this.parseBlock(!1,void 0,a&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},_e.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if("Identifier"!==n[t].type)return!1;return!0},_e.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var o=i[r];this.checkLValInnerPattern(o,ne,t?null:n)}},_e.parseExprList=function(e,t,n,r){for(var i=[],o=!0;!this.eat(e);){if(o)o=!1;else if(this.expect(w.comma),t&&this.afterTrailingComma(e))break;var a=void 0;n&&this.type===w.comma?a=null:this.type===w.ellipsis?(a=this.parseSpread(r),r&&this.type===w.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):a=this.parseMaybeAssign(!1,r),i.push(a)}return i},_e.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&"yield"===r&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===r&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.currentThisScope().flags&Z||"arguments"!==r||this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),!this.inClassStaticBlock||"arguments"!==r&&"await"!==r||this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,n).indexOf("\\")||(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(this.inAsync||"await"!==r||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"))},_e.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),"await"!==t.name||this.awaitIdentPos||(this.awaitIdentPos=t.start)),t},_e.parseIdentNode=function(){var e=this.startNode();return this.type===w.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,"class"!==e.name&&"function"!==e.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop(),this.type=w.name):this.unexpected(),e},_e.parsePrivateIdent=function(){var e=this.startNode();return this.type===w.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(0===this.privateNameStack.length?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},_e.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===w.semi||this.canInsertSemicolon()||this.type!==w.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(w.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},_e.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var Ie=se.prototype;Ie.raise=function(e,t){var n=M(this.input,e);t+=" ("+n.line+":"+n.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},Ie.raiseRecoverable=Ie.raise,Ie.curPosition=function(){if(this.options.locations)return new z(this.curLine,this.pos-this.lineStart)};var Pe=se.prototype,Le=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};Pe.enterScope=function(e){this.scopeStack.push(new Le(e))},Pe.exitScope=function(){this.scopeStack.pop()},Pe.treatFunctionsAsVarInScope=function(e){return e.flags&H||!this.inModule&&e.flags&V},Pe.declareName=function(e,t,n){var r=!1;if(t===re){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&V&&delete this.undefinedExports[e]}else if(t===oe)this.currentScope().lexical.push(e);else if(t===ie){var o=this.currentScope();r=this.treatFunctionsAsVar?o.lexical.indexOf(e)>-1:o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var s=this.scopeStack[a];if(s.lexical.indexOf(e)>-1&&!(s.flags&$&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&V&&delete this.undefinedExports[e],s.flags&Z)break}r&&this.raiseRecoverable(n,"Identifier '"+e+"' has already been declared")},Pe.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},Pe.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},Pe.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Z|Q|J))return t}},Pe.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Z|Q|J)&&!(t.flags&K))return t}};var Ne=function(e,t,n){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new D(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},je=se.prototype;function Re(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}je.startNode=function(){return new Ne(this,this.start,this.startLoc)},je.startNodeAt=function(e,t){return new Ne(this,e,t)},je.finishNode=function(e,t){return Re.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},je.finishNodeAt=function(e,t,n,r){return Re.call(this,e,t,n,r)},je.copyNode=function(e){var t=new Ne(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var Oe="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",ze=Oe+" Extended_Pictographic",De=ze+" EBase EComp EMod EPres ExtPict",Me={9:Oe,10:ze,11:ze,12:De,13:De,14:De},Fe={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},Be="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",We="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Ue=We+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ve=Ue+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",He=Ve+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ge=He+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",qe={9:We,10:Ue,11:Ve,12:He,13:Ge,14:Ge+" Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"},Ke={};function $e(e){var t=Ke[e]={binary:j(Me[e]+" "+Be),binaryOfStrings:j(Fe[e]),nonBinary:{General_Category:j(Be),Script:j(qe[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Xe=0,Ye=[9,10,11,12,13,14];Xe<Ye.length;Xe+=1)$e(Ye[Xe]);var Je=se.prototype,Qe=function(e,t){this.parent=e,this.base=t||this};Qe.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},Qe.prototype.sibling=function(){return new Qe(this.parent,this.base)};var Ze=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Ke[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};function et(e){for(var t in e)return!0;return!1}function tt(e){return 105===e||109===e||115===e}function nt(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function rt(e){return h(e,!0)||36===e||95===e}function it(e){return p(e,!0)||36===e||95===e||8204===e||8205===e}function ot(e){return e>=65&&e<=90||e>=97&&e<=122}function at(e){return e>=0&&e<=1114111}Ze.prototype.reset=function(e,t,n){var r=-1!==n.indexOf("v"),i=-1!==n.indexOf("u");this.start=0|e,this.source=t+"",this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},Ze.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Ze.prototype.at=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=r)return i;var o=n.charCodeAt(e+1);return o>=56320&&o<=57343?(i<<10)+o-56613888:i},Ze.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i,o=n.charCodeAt(e);return!t&&!this.switchU||o<=55295||o>=57344||e+1>=r||(i=n.charCodeAt(e+1))<56320||i>57343?e+1:e+2},Ze.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Ze.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Ze.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Ze.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Ze.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var o=i[r],a=this.at(n,t);if(-1===a||a!==o)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},Je.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,o=0;o<n.length;o++){var a=n.charAt(o);-1===t.indexOf(a)&&this.raise(e.start,"Invalid regular expression flag"),n.indexOf(a,o+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===a&&(r=!0),"v"===a&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,"Invalid regular expression flag")},Je.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&et(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Je.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise("Invalid named capture referenced")}},Je.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Qe(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},Je.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Je.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},Je.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Je.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Je.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Je.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<r&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=n}return!1},Je.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Je.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Je.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var o=n.charAt(i);n.indexOf(o,i+1)>-1&&e.raise("Duplicate regular expression modifiers")}if(r){var a=this.regexp_eatModifiers(e);n||a||58!==e.current()||e.raise("Invalid regular expression modifiers");for(var s=0;s<a.length;s++){var l=a.charAt(s);(a.indexOf(l,s+1)>-1||n.indexOf(l)>-1)&&e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1},Je.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Je.regexp_eatModifiers=function(e){for(var t="",n=0;-1!==(n=e.current())&&tt(n);)t+=R(n),e.advance();return t},Je.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Je.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Je.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!nt(t)&&(e.lastIntValue=t,e.advance(),!0)},Je.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;-1!==(n=e.current())&&!nt(n);)e.advance();return e.pos!==t},Je.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Je.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n)if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise("Duplicate capture group name");else e.raise("Duplicate capture group name");t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Je.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Je.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=R(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=R(e.lastIntValue);return!0}return!1},Je.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),rt(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Je.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),92===r&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),it(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)},Je.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Je.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Je.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Je.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Je.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Je.regexp_eatZero=function(e){return 48===e.current()&&!mt(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Je.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Je.regexp_eatControlLetter=function(e){var t=e.current();return!!ot(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Je.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=1024*(i-55296)+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&at(e.lastIntValue))return!0;r&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Je.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Je.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1};var st=0,lt=1,ct=2;function ut(e){return 100===e||68===e||115===e||83===e||119===e||87===e}function dt(e){return ot(e)||95===e}function ht(e){return dt(e)||mt(e)}function pt(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}function ft(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}function gt(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}function mt(e){return e>=48&&e<=57}function vt(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function yt(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function bt(e){return e>=48&&e<=55}Je.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(ut(t))return e.lastIntValue=-1,e.advance(),lt;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=80===t)||112===t)){var r;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===ct&&e.raise("Invalid property name"),r;e.raise("Invalid property name")}return st},Je.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),lt}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return st},Je.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){P(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(n)||e.raise("Invalid property value")},Je.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?lt:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?ct:void e.raise("Invalid property name")},Je.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";dt(t=e.current());)e.lastStringValue+=R(t),e.advance();return""!==e.lastStringValue},Je.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";ht(t=e.current());)e.lastStringValue+=R(t),e.advance();return""!==e.lastStringValue},Je.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Je.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&n===ct&&e.raise("Negated character class may contain strings"),!0}return!1},Je.regexp_classContents=function(e){return 93===e.current()?lt:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),lt)},Je.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;!e.switchU||-1!==t&&-1!==n||e.raise("Invalid character class"),-1!==t&&-1!==n&&t>n&&e.raise("Range out of order in character class")}}},Je.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(99===n||bt(n))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var r=e.current();return 93!==r&&(e.lastIntValue=r,e.advance(),!0)},Je.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Je.regexp_classSetExpression=function(e){var t,n=lt;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){t===ct&&(n=ct);for(var r=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?t!==ct&&(n=lt):e.raise("Invalid character in character class");if(r!==e.pos)return n;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return n}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return n;t===ct&&(n=ct)}},Je.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return-1!==n&&-1!==r&&n>r&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Je.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?lt:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Je.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===ct&&e.raise("Negated character class may contain strings"),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Je.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise("Invalid escape");e.pos=t}return null},Je.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===ct&&(t=ct);return t},Je.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?lt:ct},Je.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var n=e.current();return!(n<0||n===e.lookahead()&&pt(n)||ft(n)||(e.advance(),e.lastIntValue=n,0))},Je.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!gt(t)&&(e.lastIntValue=t,e.advance(),!0)},Je.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!mt(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Je.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Je.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;mt(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t},Je.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;vt(n=e.current());)e.lastIntValue=16*e.lastIntValue+yt(n),e.advance();return e.pos!==t},Je.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*n+e.lastIntValue:e.lastIntValue=8*t+n}else e.lastIntValue=t;return!0}return!1},Je.regexp_eatOctalDigit=function(e){var t=e.current();return bt(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Je.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!vt(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+yt(i),e.advance()}return!0};var wt=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new D(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},xt=se.prototype;function At(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function St(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}xt.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new wt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},xt.getToken=function(){return this.next(),new wt(this)},"undefined"!=typeof Symbol&&(xt[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===w.eof,value:t}}}}),xt.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(w.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},xt.readToken=function(e){return h(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},xt.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320)return e;var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888},xt.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=k(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},xt.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!S(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},xt.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&_.test(String.fromCharCode(e))))break e;++this.pos}}},xt.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},xt.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(w.ellipsis)):(++this.pos,this.finishToken(w.dot))},xt.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(w.assign,2):this.finishOp(w.slash,1)},xt.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?w.star:w.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++n,r=w.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(w.assign,n+1):this.finishOp(r,n)},xt.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(w.assign,3):this.finishOp(124===e?w.logicalOR:w.logicalAND,2):61===t?this.finishOp(w.assign,2):this.finishOp(124===e?w.bitwiseOR:w.bitwiseAND,1)},xt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(w.assign,2):this.finishOp(w.bitwiseXOR,1)},xt.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!x.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(w.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(w.assign,2):this.finishOp(w.plusMin,1)},xt.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(w.assign,n+1):this.finishOp(w.bitShift,n)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(w.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},xt.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(w.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(w.arrow)):this.finishOp(61===e?w.eq:w.prefix,1)},xt.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(w.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(w.assign,3):this.finishOp(w.coalesce,2)}return this.finishOp(w.question,1)},xt.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,h(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(w.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+R(e)+"'")},xt.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(w.parenL);case 41:return++this.pos,this.finishToken(w.parenR);case 59:return++this.pos,this.finishToken(w.semi);case 44:return++this.pos,this.finishToken(w.comma);case 91:return++this.pos,this.finishToken(w.bracketL);case 93:return++this.pos,this.finishToken(w.bracketR);case 123:return++this.pos,this.finishToken(w.braceL);case 125:return++this.pos,this.finishToken(w.braceR);case 58:return++this.pos,this.finishToken(w.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(w.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(w.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+R(e)+"'")},xt.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},xt.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(x.test(r)&&this.raise(n,"Unterminated regular expression"),e)e=!1;else{if("["===r)t=!0;else if("]"===r&&t)t=!1;else if("/"===r&&!t)break;e="\\"===r}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var o=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(o);var s=this.regexpState||(this.regexpState=new Ze(this));s.reset(n,i,a),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var l=null;try{l=new RegExp(i,a)}catch(e){}return this.finishToken(w.regexp,{pattern:i,flags:a,value:l})},xt.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&void 0===t,i=n&&48===this.input.charCodeAt(this.pos),o=this.pos,a=0,s=0,l=0,c=null==t?1/0:t;l<c;++l,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&95===u)i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===s&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===l&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),s=u;else{if((d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;s=u,a=a*e+d}}return r&&95===s&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===o||null!=t&&this.pos-o!==t?null:a},xt.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return null==n&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(n=St(this.input.slice(t,this.pos)),++this.pos):h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,n)},xt.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var n=this.pos-t>=2&&48===this.input.charCodeAt(t);n&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&110===r){var i=St(this.input.slice(t,this.pos));return++this.pos,h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(w.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),46!==r||n||(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),69!==r&&101!==r||n||(43!==(r=this.input.charCodeAt(++this.pos))&&45!==r||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),h(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o=At(this.input.slice(t,this.pos),n);return this.finishToken(w.num,o)},xt.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},xt.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):8232===r||8233===r?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(S(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(w.string,t)};var kt={};xt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==kt)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},xt.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw kt;this.raise(e,t)},xt.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==w.template&&this.type!==w.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(w.template,e)):36===n?(this.pos+=2,this.finishToken(w.dollarBraceL)):(++this.pos,this.finishToken(w.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(S(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},xt.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(w.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":"\n"===this.input[this.pos+1]&&++this.pos;case"\n":case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,"Unterminated template")},xt.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return R(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var n=this.pos-1;this.invalidStringToken(n,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),"0"===r&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return S(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}},xt.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},xt.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(p(i,r))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(n,this.pos);var o=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var a=this.readCodePoint();(t?h:p)(a,r)||this.invalidStringToken(o,"Invalid Unicode escape"),e+=R(a),n=this.pos}t=!1}return e+this.input.slice(n,this.pos)},xt.readWord=function(){var e=this.readWord1(),t=w.name;return this.keywords.test(e)&&(t=y[e]),this.finishToken(t,e)};var _t="8.15.0";function Ct(e,t){return se.parse(e,t)}function Et(e,t,n){return se.parseExpressionAt(e,t,n)}function Tt(e,t){return se.tokenizer(e,t)}se.acorn={Parser:se,version:_t,defaultOptions:F,Position:z,SourceLocation:D,getLineInfo:M,Node:Ne,TokenType:f,tokTypes:w,keywordTypes:y,TokContext:Ae,tokContexts:Se,isIdentifierChar:p,isIdentifierStart:h,Token:wt,isNewLine:S,lineBreak:x,lineBreakG:A,nonASCIIwhitespace:_},e.Node=Ne,e.Parser=se,e.Position=z,e.SourceLocation=D,e.TokContext=Ae,e.Token=wt,e.TokenType=f,e.defaultOptions=F,e.getLineInfo=M,e.isIdentifierChar=p,e.isIdentifierStart=h,e.isNewLine=S,e.keywordTypes=y,e.lineBreak=x,e.lineBreakG=A,e.nonASCIIwhitespace=_,e.parse=Ct,e.parseExpressionAt=Et,e.tokContexts=Se,e.tokTypes=w,e.tokenizer=Tt,e.version=_t}(t)},8338(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(7461).A},8442(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(8581)},8514(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(5950)},8581(e,t,n){"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},8661(e,t,n){"use strict";e.exports=n(1092)},8711(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(4849).A},8720(e,t,n){"use strict";var r=n(2902),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),g=l(n),m=0;m<a.length;++m){var v=a[m];if(!(o[v]||r&&r[v]||g&&g[v]||s&&s[v])){var y=h(n,v);try{c(t,v,y)}catch(e){}}}}return t}},8756(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock")},8791(e,t,n){"use strict";n.d(t,{A:()=>a,E:()=>o});var r=n(1687),i=n(7997);class o{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new o}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function a(){const e=(0,r.A)(o.create).current;return(0,i.A)(e.disposeEffect),e}},8853(e,t,n){"use strict";n.d(t,{Ay:()=>s,BO:()=>a,Yn:()=>o});var r=n(6175),i=n(2680);function o(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function a(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"==typeof e?e(n):Array.isArray(e)?e[n]||i:o(e,n)||i,t&&(r=t(r,i,e)),r}const s=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:s,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=o(e.theme,s)||{};return(0,i.NI)(e,c,e=>{let i=a(u,l,e);return e===i&&"string"==typeof e&&(i=a(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?i:{[n]:i}})};return c.propTypes={},c.filterProps=[t],c}},8898(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},8915(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},9088(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"}},9286(e,t){var n,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[e],n=function(e){"use strict";var t;if(null===(t=globalThis.chrome)||void 0===t||null===(t=t.runtime)||void 0===t||!t.id)throw new Error("This script should only be loaded in a browser extension.");if(void 0===globalThis.browser||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){const t="The message port closed before a response was received.",n=e=>{const n={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(0===Object.keys(n).length)throw new Error("api-metadata.json has not been included in browser-polyfill");class r extends WeakMap{constructor(e){super(arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}const i=e=>e&&"object"==typeof e&&"function"==typeof e.then,o=(t,n)=>function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.runtime.lastError?t.reject(new Error(e.runtime.lastError.message)):n.singleCallbackArg||i.length<=1&&!1!==n.singleCallbackArg?t.resolve(i[0]):t.resolve(i)},a=e=>1==e?"argument":"arguments",s=(e,t)=>function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];if(i.length<t.minArgs)throw new Error("Expected at least ".concat(t.minArgs," ").concat(a(t.minArgs)," for ").concat(e,"(), got ").concat(i.length));if(i.length>t.maxArgs)throw new Error("Expected at most ".concat(t.maxArgs," ").concat(a(t.maxArgs)," for ").concat(e,"(), got ").concat(i.length));return new Promise((r,a)=>{if(t.fallbackToNoCallback)try{n[e](...i,o({resolve:r,reject:a},t))}catch(o){console.warn("".concat(e," API method doesn't seem to support the callback parameter, ")+"falling back to call it without a callback: ",o),n[e](...i),t.fallbackToNoCallback=!1,t.noCallback=!0,r()}else t.noCallback?(n[e](...i),r()):n[e](...i,o({resolve:r,reject:a},t))})},l=(e,t,n)=>new Proxy(t,{apply:(t,r,i)=>n.call(r,e,...i)});let c=Function.call.bind(Object.prototype.hasOwnProperty);const u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(null),i={has:(t,n)=>n in e||n in r,get(i,o,a){if(o in r)return r[o];if(!(o in e))return;let d=e[o];if("function"==typeof d)if("function"==typeof t[o])d=l(e,e[o],t[o]);else if(c(n,o)){let t=s(o,n[o]);d=l(e,e[o],t)}else d=d.bind(e);else if("object"==typeof d&&null!==d&&(c(t,o)||c(n,o)))d=u(d,t[o],n[o]);else{if(!c(n,"*"))return Object.defineProperty(r,o,{configurable:!0,enumerable:!0,get:()=>e[o],set(t){e[o]=t}}),d;d=u(d,t[o],n["*"])}return r[o]=d,d},set:(t,n,i,o)=>(n in r?r[n]=i:e[n]=i,!0),defineProperty:(e,t,n)=>Reflect.defineProperty(r,t,n),deleteProperty:(e,t)=>Reflect.deleteProperty(r,t)},o=Object.create(e);return new Proxy(o,i)},d=e=>({addListener(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];t.addListener(e.get(n),...i)},hasListener:(t,n)=>t.hasListener(e.get(n)),removeListener(t,n){t.removeListener(e.get(n))}}),h=new r(e=>"function"!=typeof e?e:function(t){const n=u(t,{},{getContent:{minArgs:0,maxArgs:0}});e(n)}),p=new r(e=>"function"!=typeof e?e:function(t,n,r){let o,a,s=!1,l=new Promise(e=>{o=function(t){s=!0,e(t)}});try{a=e(t,n,o)}catch(e){a=Promise.reject(e)}const c=!0!==a&&i(a);if(!0!==a&&!c&&!s)return!1;const u=e=>{e.then(e=>{r(e)},e=>{let t;t=e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred",r({__mozWebExtensionPolyfillReject__:!0,message:t})}).catch(e=>{console.error("Failed to send onMessage rejected reply",e)})};return u(c?a:l),!0}),f=(n,r)=>{let{reject:i,resolve:o}=n;e.runtime.lastError?e.runtime.lastError.message===t?o():i(new Error(e.runtime.lastError.message)):r&&r.__mozWebExtensionPolyfillReject__?i(new Error(r.message)):o(r)},g=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(i.length<t.minArgs)throw new Error("Expected at least ".concat(t.minArgs," ").concat(a(t.minArgs)," for ").concat(e,"(), got ").concat(i.length));if(i.length>t.maxArgs)throw new Error("Expected at most ".concat(t.maxArgs," ").concat(a(t.maxArgs)," for ").concat(e,"(), got ").concat(i.length));return new Promise((e,t)=>{const r=f.bind(null,{resolve:e,reject:t});i.push(r),n.sendMessage(...i)})},m={devtools:{network:{onRequestFinished:d(h)}},runtime:{onMessage:d(p),onMessageExternal:d(p),sendMessage:g.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:g.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},v={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return n.privacy={network:{"*":v},services:{"*":v},websites:{"*":v}},u(e,m,n)};e.exports=n(chrome)}else e.exports=globalThis.browser},void 0===(i="function"==typeof n?n.apply(t,r):n)||(e.exports=i)},9311(e,t,n){"use strict";var r=n(8898);t.A=void 0;var i=r(n(8514)),o=n(5089);t.A=(0,i.default)((0,o.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done")},9669(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},9682(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(8915),i=n(4320);const o=["values","unit","step"];function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,s=(0,r.A)(e,o),l=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>(0,i.A)({},e,{[t.key]:t.val}),{})})(t),c=Object.keys(l);function u(e){const r="number"==typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function d(e){const r="number"==typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-a/100).concat(n,")")}function h(e,r){const i=c.indexOf(r);return"@media (min-width:".concat("number"==typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==i&&"number"==typeof t[c[i]]?t[c[i]]:r)-a/100).concat(n,")")}return(0,i.A)({keys:c,values:l,up:u,down:d,between:h,only:function(e){return c.indexOf(e)+1<c.length?h(e,c[c.indexOf(e)+1]):u(e)},not:function(e){const t=c.indexOf(e);return 0===t?u(c[1]):t===c.length-1?d(c[t]):h(e,c[c.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}},9718(e,t,n){"use strict";n.d(t,{A:()=>R});var r=n(1464),i=n(8853),o=n(7304);const a=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),i=e=>Object.keys(e).reduce((t,n)=>r[n]?(0,o.A)(t,r[n](e)):t,{});return i.propTypes={},i.filterProps=t.reduce((e,t)=>e.concat(t.filterProps),[]),i};var s=n(2680);function l(e){return"number"!=typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,i.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),g=c("borderColor"),m=c("borderTopColor"),v=c("borderRightColor"),y=c("borderBottomColor"),b=c("borderLeftColor"),w=c("outline",l),x=c("outlineColor"),A=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,s.NI)(e,e.borderRadius,n)}return null};A.propTypes={},A.filterProps=["borderRadius"];a(u,d,h,p,f,g,m,v,y,b,A,w,x);const S=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,s.NI)(e,e.gap,n)}return null};S.propTypes={},S.filterProps=["gap"];const k=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.columnGap,n)}return null};k.propTypes={},k.filterProps=["columnGap"];const _=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,s.NI)(e,e.rowGap,n)}return null};_.propTypes={},_.filterProps=["rowGap"];a(S,k,_,(0,i.Ay)({prop:"gridColumn"}),(0,i.Ay)({prop:"gridRow"}),(0,i.Ay)({prop:"gridAutoFlow"}),(0,i.Ay)({prop:"gridAutoColumns"}),(0,i.Ay)({prop:"gridAutoRows"}),(0,i.Ay)({prop:"gridTemplateColumns"}),(0,i.Ay)({prop:"gridTemplateRows"}),(0,i.Ay)({prop:"gridTemplateAreas"}),(0,i.Ay)({prop:"gridArea"}));function C(e,t){return"grey"===t?t:e}a((0,i.Ay)({prop:"color",themeKey:"palette",transform:C}),(0,i.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:C}),(0,i.Ay)({prop:"backgroundColor",themeKey:"palette",transform:C}));function E(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const T=(0,i.Ay)({prop:"width",transform:E}),I=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||s.zu[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(i).concat(e.theme.breakpoints.unit)}:{maxWidth:i}:{maxWidth:E(t)}};return(0,s.NI)(e,e.maxWidth,t)}return null};I.filterProps=["maxWidth"];const P=(0,i.Ay)({prop:"minWidth",transform:E}),L=(0,i.Ay)({prop:"height",transform:E}),N=(0,i.Ay)({prop:"maxHeight",transform:E}),j=(0,i.Ay)({prop:"minHeight",transform:E}),R=((0,i.Ay)({prop:"size",cssProperty:"width",transform:E}),(0,i.Ay)({prop:"size",cssProperty:"height",transform:E}),a(T,I,P,L,N,j,(0,i.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:A},color:{themeKey:"palette",transform:C},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:C},backgroundColor:{themeKey:"palette",transform:C},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:_},columnGap:{style:k},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:E},maxWidth:{style:I},minWidth:{transform:E},height:{transform:E},maxHeight:{transform:E},minHeight:{transform:E},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},9770(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case m:case g:case l:return e;default:return t}}case i:return t}}}function A(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=m,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return A(e)||x(e)===u},t.isConcurrentMode=A,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===h},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===p||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},9868(e,t,n){"use strict";n.d(t,{A:()=>r});const r={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"}},9894(e,t,n){"use strict";n.d(t,{A:()=>r});const r=n(9669).A}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);i.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>a[e]=()=>n[e]);return a.default=()=>n,i.d(o,a),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};i.r(e),i.d(e,{exclude:()=>Xi,extract:()=>Vi,parse:()=>Hi,parseUrl:()=>qi,pick:()=>$i,stringify:()=>Gi,stringifyUrl:()=>Ki});const t="KISS Translator".trim().split(/\s+/).join("-"),n=t.toLowerCase(),r=(t.toUpperCase(),{fabID:"".concat(n,"-fab"),boxID:"".concat(n,"-box"),popupID:"".concat(n,"-popup")}),o="2.0.20".split("."),a="light",s="dark";function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}const p=1e4,f=400,g=10,m=1e4,v="{{from}}",y="{{to}}",b="{{fromLang}}",w="{{toLang}}",x="{{text}}",A="{{tone}}",S="{{title}}",k="{{description}}",_="{{summary}}",C="{{model}}",E="Bing",T="Youdao",I=[E,T],P=new Set(I),L="Baidu",N="Youdao",j=[L,N],R=new Set(j),O="BuiltinAI",z="Google",D="Google2",M="Microsoft",F="AzureAI",B="DeepL",W="DeepLX",U="DeepLFree",V="NiuTrans",H="Baidu",G="Tencent",q="Volcengine",K="OpenAI",$="Gemini",X="Gemini2",Y="Claude",J="CloudflareAI",Q="Ollama",Z="OpenRouter",ee="Custom",te=[O,z,D,M,F,G,q,B,U,W,V,K,$,X,Y,J,Q,Z,ee],ne=[O,z,M,H,G],re=new Set(ne),ie={builtin:new Set(te),machine:new Set([M,U,H,G,q]),ai:new Set([K,$,X,Y,Q,Z,ee]),mulkeys:new Set([F,B,K,$,X,Y,J,Q,Z,V,ee]),batch:new Set([F,D,M,G,B,K,$,X,Y,Q,Z,ee]),context:new Set([K,$,X,Y,Q,Z,ee]),stream:new Set([K,$,X,Y,Q,Z])},oe=[["en","English - English"],["zh-CN","Simplified Chinese - 简体中文"],["zh-TW","Traditional Chinese - 繁體中文"],["ar","Arabic - العربية"],["bg","Bulgarian - Български"],["ca","Catalan - Català"],["hr","Croatian - Hrvatski"],["cs","Czech - Čeština"],["da","Danish - Dansk"],["nl","Dutch - Nederlands"],["fa","Persian - فارسی"],["fi","Finnish - Suomi"],["fr","French - Français"],["de","German - Deutsch"],["el","Greek - Ελληνικά"],["hi","Hindi - हिन्दी"],["hu","Hungarian - Magyar"],["id","Indonesian - Indonesia"],["it","Italian - Italiano"],["ja","Japanese - 日本語"],["ko","Korean - 한국어"],["ms","Malay - Melayu"],["mt","Maltese - Malti"],["nb","Norwegian - Norsk Bokmål"],["pl","Polish - Polski"],["pt","Portuguese - Português"],["ro","Romanian - Română"],["ru","Russian - Русский"],["sk","Slovak - Slovenčina"],["sl","Slovenian - Slovenščina"],["es","Spanish - Español"],["sv","Swedish - Svenska"],["ta","Tamil - தமிழ்"],["te","Telugu - తెలుగు"],["th","Thai - ไทย"],["tr","Turkish - Türkçe"],["uk","Ukrainian - Українська"],["vi","Vietnamese - Tiếng Việt"]],ae=oe.map(e=>{let[t]=e;return t}),se=[["auto","Auto-detect"],...oe],le=new Map(oe),ce=new Map(se.map(e=>{let[t,n]=e;return[t,n.split(" - ")[0]]})),ue=new Map(se.map(e=>{let[t]=e;return[t,t]})),de=new Map(se.map(e=>{let[t]=e;return[t,t.toUpperCase()]})),he={[O]:new Map([...ue,["zh-CN","zh"],["zh-TW","zh"]]),[z]:ue,[D]:ue,[M]:new Map([...ue,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[F]:new Map([...ue,["auto",""],["zh-CN","zh-Hans"],["zh-TW","zh-Hant"]]),[B]:new Map([...de,["auto",""],["zh-CN","ZH"],["zh-TW","ZH"]]),[U]:new Map([...de,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[W]:new Map([...de,["auto","auto"],["zh-CN","ZH"],["zh-TW","ZH"]]),[V]:new Map([...ue,["auto","auto"],["zh-CN","zh"],["zh-TW","cht"]]),[q]:new Map([...ue,["auto","auto"],["zh-CN","zh"],["zh-TW","zh-Hant"]]),[H]:new Map([...ue,["zh-CN","zh"],["zh-TW","cht"],["ar","ara"],["bg","bul"],["ca","cat"],["hr","hrv"],["da","dan"],["fi","fin"],["fr","fra"],["hi","mai"],["ja","jp"],["ko","kor"],["ms","may"],["mt","mlt"],["nb","nor"],["ro","rom"],["ru","ru"],["sl","slo"],["es","spa"],["sv","swe"],["ta","tam"],["te","tel"],["uk","ukr"],["vi","vie"]]),[G]:new Map([["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ar","ar"],["de","de"],["ru","ru"],["fr","fr"],["fi","fil"],["ko","ko"],["ms","ms"],["pt","pt"],["ja","ja"],["th","th"],["tr","tr"],["es","es"],["it","it"],["hi","hi"],["id","id"],["vi","vi"]]),[K]:ce,[$]:ce,[X]:ce,[Y]:ce,[Q]:ce,[Z]:ce,[J]:new Map([...ue,["auto","en"],["zh-CN","zh"],["zh-TW","zh"]]),[ee]:ce},pe={};Object.entries(he).forEach(e=>{let[t,n]=e;pe[t]=(e=>new Map(Array.from(e.entries()).map(e=>{let[t,n]=e;return""===n?["auto","auto"]:"zh"===n||"ZH"===n?[n,"zh-CN"]:[n,t]})))(n)});const fe="You are a professional, authentic machine translation engine.",ge="# Context\nTitle: ".concat(S,"\nDescription: ").concat(k,"\nSummary: ").concat(_,"\nTone: ").concat(A,"\n\n# Task\nTranslate the Source Text below to ").concat(y,".\n1. Use the Context to ensure accuracy.\n2. Adapt the wording to match the specified Tone.\n3. Output ONLY the translated text. No markdown, no explanations.\n\nSource Text: ").concat(x,"\n\nTranslated Text:"),me='Act as a translation API. Output raw XML-like format only. No Markdown fences (xml). No conversational filler.\n\nInput:\n{"targetLanguage":"<lang>","title":"<context>","description":"<context>","summary":"<context>","segments":[{"id":1,"text":"..."}],"glossary":{"sourceTerm":"targetTerm"},"tone":"<formal|casual>"}\n\nOutput Format:\n<root>\n <t id="0" sourceLanguage="<detected_source_lang>">Translated text content...</t>\n <t id="1" sourceLanguage="<detected_source_lang>">Translated text content...</t>\n</root>\n\nRules:\n1. **Strict Format**: Output ONLY the <root> element and its children. Do not include "xml" version declarations or markdown code blocks.\n2. **Structure**: Maintain the exact "id" from the input in the "id" attribute. Detect the source language for the "sourceLanguage" attribute.\n3. **HTML & Whitespace**: Preserve all HTML tags (e.g., <b>, <span>, <br>) and whitespace exactly as they appear in the structure. Only translate the text content inside them.\n4. **Glossary**: Highest priority. Use the glossary value for translation. If the value is "", keep the source term as is.\n5. **Do Not Translate**: Content inside <code>, <pre>, text in backticks ("code"), and placeholders like {1}, {{1}}, [1], [[1]].\n6. **Context**: Use the "title" and "description" fields to understand the context for better translation accuracy, but do not output them.\n7. **Tone**: Apply the specified "tone" (formal/casual).\n\nExample:\nInput:\n{"targetLanguage":"zh-CN","segments":[{"id":0,"text":"Hello <b>World</b>!"}],"glossary":{"World":"世界"},"tone":"formal"}\n\nOutput:\n<root>\n <t id="0" sourceLanguage="en">你好 <b>世界</b>!</t>\n</root>',ve="# Context\nTitle: ".concat(S,"\nDescription: ").concat(k,"\nSummary: ").concat(_,"\nTone: ").concat(A,"\n\n# Task\nConvert the input word-level timestamp JSON into a bilingual VTT file. Target Language: ").concat(y,".\n\n# Rules\n1. Merge words into complete sentences first.\n2. Split long sentences into readable cues (max 42 chars/line, natural pauses).\n3. Translate using the provided Context and Tone. Keep non-speech sounds (e.g., [Music]) as is.\n4. Convert timestamps to standard VTT format (MM:SS.mmm).\n5. Output ONLY the raw VTT content. No markdown, no notes.\n\n# VTT Format Example\nWEBVTT\n\n1000 --\x3e 3500\nHello world!\n你好,世界!\n\n4000 --\x3e 6000\nGood morning.\n早上好。"),ye={apiSlug:"",apiName:"",apiType:"",url:"",key:"",model:"",systemPrompt:me,subtitlePrompt:ve,nobatchPrompt:fe,nobatchUserPrompt:ge,userPrompt:"",tone:"formal",placeholder:"{ }",placetag:"i",customHeader:"",customBody:"",reqHook:"",resHook:"",fetchLimit:10,fetchInterval:100,httpTimeout:3e4,batchInterval:f,batchSize:g,batchLength:m,useBatchFetch:!1,useStream:!1,useContext:!1,contextSize:3,temperature:0,maxTokens:20480,isDisabled:!1,region:"",sortOrder:0,placetagFormat:"compact"},be={[O]:ye,[z]:h(h({},ye),{},{url:"https://translate.googleapis.com/translate_a/single"}),[D]:h(h({},ye),{},{url:"https://translate-pa.googleapis.com/v1/translateHtml",key:"AIzaSyATBXajvzQLTDHEQbcpq0Ihe0vWDHmO520",useBatchFetch:!0,placetag:"a",placetagFormat:"attribute"}),[M]:h(h({},ye),{},{useBatchFetch:!0}),[F]:h(h({},ye),{},{url:"https://api.cognitive.microsofttranslator.com/translate?api-version=3.0",useBatchFetch:!0}),[H]:h({},ye),[G]:h(h({},ye),{},{useBatchFetch:!0}),[q]:h({},ye),[B]:h(h({},ye),{},{url:"https://api-free.deepl.com/v2/translate",useBatchFetch:!0}),[U]:h(h({},ye),{},{fetchLimit:1}),[W]:h(h({},ye),{},{url:"http://localhost:1188/translate"}),[V]:h(h({},ye),{},{url:"https://api.niutrans.com/NiuTransServer/translation",dictNo:"",memoryNo:""}),[K]:h(h({},ye),{},{url:"https://api.openai.com/v1/chat/completions",model:"gpt-4",useBatchFetch:!0}),[$]:h(h({},ye),{},{url:"https://generativelanguage.googleapis.com/v1/models/".concat(C,":generateContent"),model:"gemini-2.5-flash",useBatchFetch:!0}),[X]:h(h({},ye),{},{url:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",model:"gemini-2.0-flash",useBatchFetch:!0}),[Y]:h(h({},ye),{},{url:"https://api.anthropic.com/v1/messages",model:"claude-3-haiku-20240307",useBatchFetch:!0}),[J]:h(h({},ye),{},{url:"https://api.cloudflare.com/client/v4/accounts/{{ACCOUNT_ID}}/ai/run/@cf/meta/m2m100-1.2b"}),[Q]:h(h({},ye),{},{url:"http://localhost:11434/v1/chat/completions",model:"llama3.1",useBatchFetch:!0}),[Z]:h(h({},ye),{},{url:"https://openrouter.ai/api/v1/chat/completions",model:"openai/gpt-4o",useBatchFetch:!0}),[ee]:h(h({},ye),{},{reqHook:'async (args, { url, body, headers, userMsg, method } = {}) => {\n console.log("request hook args:", { args, url, body, headers, userMsg, method });\n // return { url, body, headers, userMsg, method };\n};',resHook:'async ({ res, ...args }) => {\n console.log("reaponse hook args:", { res, args });\n // const translations = [["你好", "zh"]];\n // const modelMsg = "";\n // return { translations, modelMsg };\n};'})},we=te.map(e=>h(h({},be[e]),{},{apiSlug:e,apiName:e,apiType:e})),xe=M,Ae=we.find(e=>e.apiType===xe),Se="style_none",ke="under_line",_e="dot_line",Ce="dash_line",Ee="dash_line_bold",Te="dash_box",Ie="dash_box_bold",Pe="wavy_line",Le="wavy_line_bold",Ne="marker",je="gradient_marker",Re="fuzzy",Oe="highlight",ze="blockquote",De="gradient",Me="blink",Fe="glow",Be="colorful",We=[Se,ke,_e,Ce,Ee,Pe,Le,Te,Ie,Ne,je,Re,Oe,ze,De,Me,Fe,Be],Ue=[{styleSlug:"custom",styleName:"Custom Style",styleCode:"color: #209CEE;"}],Ve="*",He="split_disable",Ge="split_textlength",qe="split_punctuation",Ke=[He,qe,Ge],$e="highlight_disable",Xe="highlight_beforetrans",Ye="highlight_aftertrans",Je=[$e,Xe,Ye],Qe={pattern:"",selector:"",keepSelector:"",terms:"",aiTerms:"",apiSlug:Ve,fromLang:Ve,toLang:Ve,textStyle:Ve,transOpen:Ve,textExtStyle:"",termsStyle:"",highlightStyle:"",selectStyle:"",parentStyle:"",grandStyle:"",injectJs:"",transOnly:Ve,transTag:Ve,transTitle:Ve,transStartHook:"",transEndHook:"",autoScan:Ve,hasRichText:Ve,hasShadowroot:Ve,scanAll:Ve,rootsSelector:"",ignoreSelector:"",splitParagraph:Ve,splitLength:0,highlightWords:Ve},Ze={pattern:"*",selector:"h1, h2, h3, h4, h5, h6, li, p, dd, blockquote, figcaption, label, legend",keepSelector:"code, cite, math, .math, a:has(code)",terms:"",aiTerms:"",apiSlug:M,fromLang:"auto",toLang:"zh-CN",textStyle:Se,transOpen:"false",textExtStyle:"",termsStyle:"font-weight: bold;",highlightStyle:"color: red;",selectStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;",parentStyle:"",grandStyle:"",injectJs:"",injectCss:"",transOnly:"false",transTag:"font",transTitle:"false",transStartHook:"",transEndHook:"",autoScan:"true",hasRichText:"true",hasShadowroot:"false",scanAll:"false",rootsSelector:"body",ignoreSelector:"button, footer, pre, mark, nav",splitParagraph:He,splitLength:100,highlightWords:$e},et=[Ze],tt=(Object.entries({"en.wikipedia.org":{ignoreSelector:".button, code, footer, form, mark, pre, .mwe-math-element, .mw-editsection"},"news.ycombinator.com":{selector:"p, .titleline, .commtext, .hn-item-title, .hn-comment-text, .hn-story-title",keepSelector:"code, img, svg, pre, .sitebit",ignoreSelector:"button, code, footer, form, header, mark, nav, pre, .reply",autoScan:"false"},"twitter.com, https://x.com":{selector:"[data-testid='tweetText'], [data-testid='twitter-article-title'], [data-testid='UserDescription'], .public-DraftStyleDefault-block, span.text-body, div.css-175oi2r.r-3pj75a div.css-175oi2r>span, div.css-175oi2r.r-3pj75a li>span, div.r-1s2bzr4>div.r-16dba41, div.r-16y2uox>div.r-1jeg54m",keepSelector:"img, svg, a, span:has(a), div:has(a)",ignoreSelector:"[data-testid='videoPlayer'], [data-testid^='tweetTextarea']",autoScan:"false",selectStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;"},"www.youtube.com/live_chat":{rootsSelector:"div#items",selector:"span.yt-live-chat-text-message-renderer",autoScan:"false"},"www.youtube.com":{rootsSelector:"ytd-page-manager",ignoreSelector:"aside, button, footer, form, header, pre, mark, nav, #player, #container, .caption-window, .ytp-settings-menu, #kiss-youtube-subtitle-list-container",selectStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;",parentStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;",grandStyle:"-webkit-line-clamp: unset; max-height: none; height: auto;"},"web.telegram.org":{autoScan:"false",selector:".text-content, .embedded-text-wrapper",rootsSelector:".Transition"},"github.com":{autoScan:"false",selector:'h1, h2, h3, h4, h5, h6, .markdown-body li, p, dd, blockquote, figcaption, label, legend, .user-profile-bio>div, [data-testid="results-list"] .search-match, .Subhead-description, [class^="prc-SelectPanel-Subtitle-"], [class^="prc-ActionList-ItemLabel-"], [role="dialog"] .overflow-auto, .h4, .repos-list-description, .discussion-title, [class*="PinnedIssue-module__Link"] span, .js-wiki-sidebar-page-container :is(.Truncate-text, .Link--primary)',ignoreSelector:"button, p.pinned-item-desc+p"}}).map(e=>{let[t,n]=e;return h(h({},n),{},{pattern:t})}),{DEBUG:{value:0,name:"DEBUG",color:"#6495ED"},INFO:{value:1,name:"INFO",color:"#4CAF50"},WARN:{value:2,name:"WARN",color:"#FFC107"},ERROR:{value:3,name:"ERROR",color:"#F44336"},SILENT:{value:4,name:"SILENT"}});const nt=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={level:e.level||tt.INFO,prefix:e.prefix||"KISS-Translator"}}setLevel(e){let t;if("string"==typeof e){if(t=function(e){if("string"!=typeof e||0===e.length)return;const t=e.toUpperCase();return Object.values(tt).find(e=>e.name===t)}(e),!t)return void this.warn('Invalid log level name provided: "'.concat(e,'". Keeping current level.'))}else if("number"==typeof e){if(n=e,t=Object.values(tt).find(e=>e.value===n),!t)return void this.warn("Invalid log level value provided: ".concat(e,". Keeping current level."))}else{if(!e||"number"!=typeof e.value)return void this.warn("Invalid argument passed to setLevel. Must be a LogLevel object, number, or string.");t=e}var n;this.config.level.value!==t.value&&(this.config.level=t,console.log("[".concat(this.config.prefix,"] Log level dynamically set to ").concat(this.config.level.name)))}_log(e){if(e.value<this.config.level.value)return;const t=(new Date).toISOString(),n="[".concat(this.config.prefix,"]"),r="[".concat(e.name,"]"),i="undefined"!=typeof window&&void 0!==window.document;for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(i){this._getConsoleMethod(e)("%c".concat(t," %c").concat(n," %c").concat(r),"color: gray; font-weight: lighter;","color: #7c57e0; font-weight: bold;","color: ".concat(e.color,"; font-weight: bold;"),...a)}else{this._getConsoleMethod(e)(t,n,r,...a)}}_getConsoleMethod(e){switch(e){case tt.ERROR:return console.error;case tt.WARN:return console.warn;case tt.INFO:return console.info;default:return console.log}}debug(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(tt.DEBUG,...t)}info(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(tt.INFO,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(tt.WARN,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._log(tt.ERROR,...t)}},rt=nt.info.bind(nt),it="toggleTranslate",ot="toggleStyle",at="togglePopup",st="openSetting",lt="KISS-Worker",ct="WebDAV",ut={syncType:lt,syncUrl:"",syncUser:"",syncKey:"",syncMeta:{},subRulesSyncAt:0,dataCaches:{}},dt="mobile",ht=["AltLeft","KeyI"],pt={transOpen:!0,apiSlug:M,fromLang:"auto",toLang:"en",triggerShortcut:ht,triggerCount:1,triggerTime:200,transSign:"/",showDot:dt},ft="click",gt="hover",mt="select",vt=["AltLeft","KeyS"],yt={transOpen:!0,apiSlugs:[M],fromLang:"auto",toLang:"zh-CN",toLang2:"en",tranboxShortcut:vt,btnOffsetX:10,btnOffsetY:10,boxOffsetX:0,boxOffsetY:10,hideTranBtn:!1,hideClickAway:!1,simpleStyle:!1,followSelection:!1,autoHeight:!1,triggerMode:ft,enDict:E,enSug:N},bt="mobile_off",wt={enabled:!0,apiSlug:M,segSlug:"-",chunkLength:1e3,preTrans:90,throttleTrans:30,toLang:"zh-CN",isBilingual:!0,skipAd:!1,windowStyle:"padding: 0.5em 1em;\nbackground-color: rgba(0, 0, 0, 0.5);\ncolor: white;\nline-height: 1.3;\ntext-shadow: 1px 1px 2px black;\ndisplay: inline-block",originStyle:"font-size: clamp(1rem, 2cqw, 3rem);",translationStyle:"font-size: clamp(1rem, 2cqw, 3rem);",enhanceMode:bt,showList:!0},xt={useMouseHover:!1,mouseHoverKey:["ControlLeft"]},At={darkMode:"auto",uiLang:"en",minLength:2,maxLength:1e5,newlineLength:20,httpTimeout:p,clearCache:!1,injectRules:!0,fabClickAction:0,contextMenuType:1,subrulesList:[{url:"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json",selected:!0},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json",selected:!1},{url:"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json",selected:!1}],transApis:we,shortcuts:{[it]:["AltLeft","KeyQ"],[ot]:["AltLeft","KeyC"],[at]:["AltLeft","KeyK"],[st]:["AltLeft","KeyO"]},inputRule:pt,tranboxSetting:yt,touchModes:[2],blacklist:["https://fishjar.github.io/kiss-translator/options.html","https://translate.google.com","https://www.deepl.com/translator"].join(",\n"),csplist:[].join(",\n"),orilist:["https://dict.youdao.com"].join(",\n"),skipLangs:[],transInterval:100,langDetector:"-",mouseHoverSetting:xt,preInit:!0,transAllnow:!1,subtitleSetting:wt,logLevel:tt.INFO.value,rootMargin:500,customStyles:Ue},St='["en", "English - English"],\n["zh-CN", "Simplified Chinese - 简体中文"],\n["zh-TW", "Traditional Chinese - 繁體中文"],\n["ar", "Arabic - العربية"],\n["bg", "Bulgarian - Български"],\n["ca", "Catalan - Català"],\n["hr", "Croatian - Hrvatski"],\n["cs", "Czech - Čeština"],\n["da", "Danish - Dansk"],\n["nl", "Dutch - Nederlands"],\n["fi", "Finnish - Suomi"],\n["fr", "French - Français"],\n["de", "German - Deutsch"],\n["el", "Greek - Ελληνικά"],\n["hi", "Hindi - हिन्दी"],\n["hu", "Hungarian - Magyar"],\n["id", "Indonesian - Indonesia"],\n["it", "Italian - Italiano"],\n["ja", "Japanese - 日本語"],\n["ko", "Korean - 한국어"],\n["ms", "Malay - Melayu"],\n["mt", "Maltese - Malti"],\n["nb", "Norwegian - Norsk Bokmål"],\n["pl", "Polish - Polski"],\n["pt", "Portuguese - Português"],\n["ro", "Romanian - Română"],\n["ru", "Russian - Русский"],\n["sk", "Slovak - Slovenčina"],\n["sl", "Slovenian - Slovenščina"],\n["es", "Spanish - Español"],\n["sv", "Swedish - Svenska"],\n["ta", "Tamil - தமிழ்"],\n["te", "Telugu - తెలుగు"],\n["th", "Thai - ไทย"],\n["tr", "Turkish - Türkçe"],\n["uk", "Ukrainian - Українська"],\n["vi", "Vietnamese - Tiếng Việt"],\n',kt='// 请求数据默认格式\n{\n "url": "{{url}}",\n "method": "POST",\n "headers": {\n "Content-type": "application/json",\n "Authorization": "Bearer {{key}}"\n },\n "body": {\n "text": "{{text}}", // 待翻译文字\n "from": "{{from}}", // 文字的语言(可能为空)\n "to": "{{to}}", // 目标语言\n },\n}\n\n\n// 返回数据默认格式\n{\n text: "", // 翻译后的文字\n from: "", // 识别的源语言\n to: "", // 目标语言(可选)\n}\n\n\n// Hook 范例\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n "Content-type": "application/json",\n },\n method: "GET",\n body: null,\n}]\n\n// Response Hook\n// 其中返回数组第一个值表示译文字符串,第二个值为布尔值,表示原文语言与目标语言是否相同\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(" "), to === res.src]\n\n\n// 支持的语言代码如下\n'.concat(St,"\n"),_t='// Default request\n{\n "url": "{{url}}",\n "method": "POST",\n "headers": {\n "Content-type": "application/json",\n "Authorization": "Bearer {{key}}"\n },\n "body": {\n "text": "{{text}}", // Text to be translated\n "from": "{{from}}", // The language of the text (may be empty)\n "to": "{{to}}", // Target language\n },\n}\n\n\n// Default response\n{\n text: "", // translated text\n from: "", // Recognized source language\n to: "", // Target language (optional)\n}\n\n\n/// Hook Example\n// URL\nhttps://translate.googleapis.com/translate_a/single?client=gtx&dj=1&dt=t&ie=UTF-8&q={{text}}&sl=en&tl=zh-CN\n\n// Request Hook\n(text, from, to, url, key) => [url, {\n headers: {\n "Content-type": "application/json",\n },\n method: "GET",\n body: null,\n}]\n\n// Response Hook\n// In the returned array, the first value is the translated string, while the second value is a boolean\n// that indicates whether the source language is the same as the target language.\n(res, text, from, to) => [res.sentences.map((item) => item.trans).join(" "), to === res.src]\n\n\n// The supported language codes are as follows\n'.concat(St,"\n"),Ct="1、第一个参数包含如下字段:'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2、返回值必须是包含以下字段的对象: 'url', 'body', 'headers', 'method'\n3、如返回空值,则hook函数不会产生任何效果。\n\n// 示例\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}",Et="1. The first parameter contains the following fields: 'texts', 'from', 'to', 'url', 'key', 'model', 'systemPrompt', ...\n2. The return value must be an object containing the following fields: 'url', 'body', 'headers', 'method'\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync (args, { url, body, headers, userMsg, method } = {}) => {\n return { url, body, headers, userMsg, method };\n}",Tt="1、第一个参数包含如下字段:'res', ...\n2、返回值必须是包含以下字段的对象: 'translations'\n ('translations' 应为一个二维数组:[[译文, 原文语言]])\n3、如返回空值,则hook函数不会产生任何效果。\n\n// 示例\nasync ({ res, ...args }) => {\n const translations = [[\"你好\", \"en\"]];\n const modelMsg = {}; // 用于AI上下文\n return { translations, modelMsg };\n}",It="1. The first parameter contains the following fields: 'res', ...\n2. The return value must be an object containing the following fields: 'translations'\n ('translations' should be a two-dimensional array: [[translation, source language]]).\n3. If a null value is returned, the hook function will have no effect.\n\n// Example\nasync ({ res, ...args }) => {\n const translations = [[\"你好\", \"en\"]];\n const modelMsg = {}; // For AI context\n return { translations, modelMsg };\n}",Pt={app_name:{zh:"简约翻译",en:"KISS Translator",zh_TW:"簡約翻譯",ja:"KISS Translator",ko:"KISS Translator"},translate:{zh:"翻译",en:"Translate",zh_TW:"翻譯",ja:"翻訳",ko:"번역"},custom_api_help:{zh:kt,en:_t,zh_TW:kt,ja:_t,ko:_t},request_hook_helper:{zh:Ct,en:Et,zh_TW:Ct,ja:Et,ko:Et},response_hook_helper:{zh:Tt,en:It,zh_TW:Tt,ja:It,ko:It},translate_alt:{zh:"翻译",en:"Translate",zh_TW:"翻譯",ja:"翻訳",ko:"번역"},basic_setting:{zh:"基本设置",en:"Basic Setting",zh_TW:"基本設定",ja:"基本設定",ko:"기본 설정"},rules_setting:{zh:"规则设置",en:"Rules Setting",zh_TW:"規則設定",ja:"ルール設定",ko:"규칙 설정"},apis_setting:{zh:"接口设置",en:"Apis Setting",zh_TW:"API設定",ja:"API設定",ko:"API 설정"},sync_setting:{zh:"同步设置",en:"Sync Setting",zh_TW:"同步設定",ja:"同期設定",ko:"동기화 설정"},patch_setting:{zh:"补丁设置",en:"Patch Setting",zh_TW:"修補設定",ja:"パッチ設定",ko:"패치 설정"},patch_setting_help:{zh:"针对一些特殊网站的修正脚本,以便翻译软件得到更好的展示效果。",en:"Corrected scripts for some special websites so that the translation software can get better display results.",zh_TW:"針對某些特殊網站的修正腳本,讓翻譯軟體有更好的顯示效果。",ja:"一部の特殊なウェブサイト用の修正スクリプトで、翻訳ソフトウェアの表示効果を向上させます。",ko:"일부 특수 웹사이트를 위한 수정 스크립트로, 번역 소프트웨어의 표시 효과를 개선합니다."},inject_webfix:{zh:"注入修复补丁",en:"Inject Webfix",zh_TW:"注入修正補丁",ja:"Webfixを注入",ko:"웹 수정 패치 주입"},about:{zh:"关于",en:"About",zh_TW:"關於",ja:"概要",ko:"정보"},about_md:{zh:"README.md",en:"README.en.md",zh_TW:"README.md",ja:"README.ja.md",ko:"README.ko.md"},about_md_local:{zh:"请 [点击这里](".concat("https://github.com/fishjar/kiss-translator",") 查看详情。"),en:"Please [click here](".concat("https://github.com/fishjar/kiss-translator",") for details."),zh_TW:"請 [點這裡](".concat("https://github.com/fishjar/kiss-translator",") 查看詳細內容。"),ja:"詳細は [こちら](".concat("https://github.com/fishjar/kiss-translator",") をクリックしてください。"),ko:"자세한 내용은 [여기](".concat("https://github.com/fishjar/kiss-translator",")를 클릭하세요.")},ui_lang:{zh:"界面语言",en:"Interface Language",zh_TW:"介面語言",ja:"インターフェース言語",ko:"인터페이스 언어"},fetch_limit:{zh:"最大并发请求数量 (1-100)",en:"Maximum Number Of Concurrent Requests (1-100)",zh_TW:"最大同時請求數量 (1-100)",ja:"最大同時リクエスト数 (1-100)",ko:"최대 동시 요청 수 (1-100)"},if_think:{zh:"启用或禁用模型的深度思考能力",en:"Enable or disable the model’s thinking behavior ",zh_TW:"啟用或停用模型的深度思考能力",ja:"モデルの思考行動を有効または無効にする",ko:"모델의 사고 행동 활성화 또는 비활성화"},think:{zh:"启用深度思考",en:"enable thinking",zh_TW:"啟用深度思考",ja:"思考を有効にする",ko:"사고 활성화"},nothink:{zh:"禁用深度思考",en:"disable thinking",zh_TW:"停用深度思考",ja:"思考を無効にする",ko:"사고 비활성화"},think_ignore:{zh:"忽略以下模型的<think>输出,逗号(,)分割,当模型支持思考但ollama不支持时需要填写本参数",en:"Ignore the <think> block for the following models, comma (,) separated",zh_TW:"忽略以下模型的 <think> 輸出,以逗號 (,) 分隔;當模型支援思考但 ollama 不支援時需要填寫此參數",ja:"以下のモデルの<think>出力を無視する (コンマ(,)区切り)。モデルが思考をサポートしているが、ollamaがサポートしていない場合に記入が必要です",ko:"다음 모델의 <think> 블록 무시 (쉼표(,)로 구분), 모델이 사고를 지원하지만 ollama가 지원하지 않는 경우 이 매개변수를 입력해야 합니다"},fetch_interval:{zh:"每次请求间隔时间 (0-5000ms)",en:"Time Between Requests (0-5000ms)",zh_TW:"每次請求間隔時間 (0-5000ms)",ja:"リクエスト間隔 (0-5000ms)",ko:"요청 간 시간 (0-5000ms)"},translate_interval:{zh:"翻译间隔时间 (1-2000ms)",en:"Translation Interval (1-2000ms)",zh_TW:"翻譯間隔時間 (1-2000ms)",ja:"翻訳間隔 (1-2000ms)",ko:"번역 간격 (1-2000ms)"},http_timeout:{zh:"请求超时时间 (100-6000000ms)",en:"Request Timeout Time (100-6000000ms)",zh_TW:"請求逾時時間 (100-60000ms)",ja:"リクエストタイムアウト (100-6000000ms)",ko:"요청 시간 초과 (100-6000000ms)"},custom_header:{zh:"自定义Header参数",en:"Custom Header Params",zh_TW:"自訂 Header 參數",ja:"カスタムヘッダー",ko:"사용자 지정 헤더"},custom_header_help:{zh:'使用JSON格式,例如 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',en:'Use JSON format, for example "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',zh_TW:'使用JSON格式,例如 "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',ja:'JSON形式を使用してください。例: "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"',ko:'JSON 형식을 사용하세요. 예: "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:141.0) Gecko/20100101 Firefox/141.0"'},custom_body:{zh:"自定义Body参数",en:"Custom Body Params",zh_TW:"自訂 Body 參數",ja:"カスタムボディ",ko:"사용자 지정 바디"},custom_body_help:{zh:'使用JSON格式,例如 "top_p": 0.7',en:'Use JSON format, for example "top_p": 0.7',zh_TW:'使用JSON格式,例如 "top_p": 0.7',ja:'JSON形式を使用してください。例: "top_p": 0.7',ko:'JSON 형식을 사용하세요. 예: "top_p": 0.7'},min_translate_length:{zh:"最小翻译字符数 (1-100)",en:"Minimum number Of Translated Characters (1-100)",zh_TW:"最小翻譯字元數 (1-100)",ja:"最小翻訳文字数 (1-100)",ko:"최소 번역 문자 수 (1-100)"},max_translate_length:{zh:"最大翻译字符数 (100-100000)",en:"Maximum number Of Translated Characters (100-100000)",zh_TW:"最大翻譯字元數 (100-100000)",ja:"最大翻訳文字数 (100-100000)",ko:"최대 번역 문자 수 (100-100000)"},num_of_newline_characters:{zh:"换行字符数 (1-1000)",en:"Number of Newline Characters (1-1000)",zh_TW:"換行字元數 (1-1000)",ja:"改行文字数 (1-1000)",ko:"줄바꿈 문자 수 (1-1000)"},translate_service:{zh:"翻译服务",en:"Translate Service",zh_TW:"翻譯服務",ja:"翻訳サービス",ko:"번역 서비스"},translate_service_multiple:{zh:"翻译服务 (支持多选)",en:"Translation service (multiple supported)",zh_TW:"翻譯服務 (支援多選)",ja:"翻訳サービス (複数選択可)",ko:"번역 서비스 (다중 선택 지원)"},translate_timing:{zh:"翻译时机",en:"Translate Timing",zh_TW:"翻譯時機",ja:"翻訳タイミング",ko:"번역 시점"},mk_pagescroll:{zh:"滚动加载翻译(推荐)",en:"Rolling Loading (Suggested)",zh_TW:"滾動載入翻譯(建議)",ja:"スクロール翻訳 (推奨)",ko:"스크롤 번역 (권장)"},mk_pageopen:{zh:"立即全部翻译",en:"Translate all now",zh_TW:"立即全部翻譯",ja:"すぐにすべて翻訳",ko:"즉시 모두 번역"},mk_mouseover:{zh:"鼠标悬停翻译",en:"Mouseover",zh_TW:"滑鼠懸停翻譯",ja:"マウスオーバー翻訳",ko:"마우스오버 번역"},mk_ctrlKey:{zh:"Control + 鼠标悬停",en:"Control + Mouseover",zh_TW:"Control + 滑鼠懸停",ja:"Control + マウスオーバー",ko:"Control + 마우스오버"},mk_shiftKey:{zh:"Shift + 鼠标悬停",en:"Shift + Mouseover",zh_TW:"Shift + 滑鼠懸停",ja:"Shift + マウスオーバー",ko:"Shift + 마우스오버"},mk_altKey:{zh:"Alt + 鼠标悬停",en:"Alt + Mouseover",zh_TW:"Alt + 滑鼠懸停",ja:"Alt + マウスオーバー",ko:"Alt + 마우스오버"},from_lang:{zh:"原文语言",en:"Source Language",zh_TW:"原文語言",ja:"原文の言語",ko:"원본 언어"},to_lang:{zh:"目标语言",en:"Target Language",zh_TW:"目標語言",ja:"翻訳先の言語",ko:"대상 언어"},to_lang2:{zh:"第二目标语言",en:"Target Language 2",zh_TW:"第二目標語言",ja:"第二翻訳先の言語",ko:"두 번째 대상 언어"},to_lang2_helper:{zh:"设定后,与目标语言产生互译效果,但依赖远程语言识别。",en:"After setting, it will produce mutual translation effect with the target language, but it relies on remote language recognition.",zh_TW:"設定後會與目標語言互譯,但依賴遠端語言識別。",ja:"設定後、ターゲット言語との相互翻訳が可能になりますが、リモート言語認識に依存します。",ko:"설정 후, 대상 언어와 상호 번역 효과가 발생하지만, 원격 언어 인식에 의존합니다."},text_style:{zh:"译文样式",en:"Text Style",zh_TW:"譯文樣式",ja:"翻訳テキストスタイル",ko:"번역 텍스트 스타일"},text_style_alt:{zh:"译文样式",en:"Text Style",zh_TW:"譯文樣式",ja:"翻訳テキストスタイル",ko:"번역 텍스트 스타일"},bg_color:{zh:"样式颜色",en:"Style Color",zh_TW:"樣式顏色",ja:"スタイルカラー",ko:"스타일 색상"},remain_unchanged:{zh:"保留不变",en:"Remain Unchanged",zh_TW:"保留不變",ja:"変更しない",ko:"변경하지 않음"},google_api:{zh:"谷歌翻译接口",en:"Google Translate API",zh_TW:"Google 翻譯介面",ja:"Google 翻訳 API",ko:"Google 번역 API"},default_selector:{zh:"默认选择器",en:"Default selector",zh_TW:"預設選擇器",ja:"デフォルトセレクタ",ko:"기본 선택자"},selector_rules:{zh:"选择器规则",en:"Selector Rules",zh_TW:"選擇器規則",ja:"セレクタールール",ko:"선택자 규칙"},save:{zh:"保存",en:"Save",zh_TW:"儲存",ja:"保存",ko:"저장"},edit:{zh:"编辑",en:"Edit",zh_TW:"編輯",ja:"編集",ko:"수정"},cancel:{zh:"取消",en:"Cancel",zh_TW:"取消",ja:"キャンセル",ko:"취소"},delete:{zh:"删除",en:"Delete",zh_TW:"刪除",ja:"削除",ko:"삭제"},reset:{zh:"重置",en:"Reset",zh_TW:"重設",ja:"リセット",ko:"초기화"},add:{zh:"添加",en:"Add",zh_TW:"新增",ja:"追加",ko:"추가"},copy_api:{zh:"复制接口",en:"Copy Interface",zh_TW:"複製介面",ja:"インターフェースをコピー",ko:"인터페이스 복사"},inject_rules:{zh:"注入订阅规则",en:"Inject Subscribe Rules",zh_TW:"注入訂閱規則",ja:"購読ルールを注入",ko:"구독 규칙 주입"},personal_rules:{zh:"个人规则",en:"Rules",zh_TW:"個人規則",ja:"個人ルール",ko:"개인 규칙"},subscribe_rules:{zh:"订阅规则",en:"Subscribe",zh_TW:"訂閱規則",ja:"購読ルール",ko:"구독 규칙"},overwrite_subscribe_rules:{zh:"覆写订阅规则",en:"Overwrite",zh_TW:"覆寫訂閱規則",ja:"購読ルールを上書き",ko:"구독 규칙 덮어쓰기"},subscribe_url:{zh:"订阅地址",en:"Subscribe URL",zh_TW:"訂閱網址",ja:"購読URL",ko:"구독 URL"},rules_warn_1:{zh:'1、规则生效的优先级依次为:个人规则 > 订阅规则 > 全局规则。"全局规则"相当于兜底规则。',en:'1. The priority of rules is: personal rules > subscription rules > global rules. "Global rules" are like a fallback rule.',zh_TW:'1.規則生效的優先順序依序為:個人規則 > 訂閱規則 > 全域規則。 "全域規則"相當於兜底規則。',ja:"1. ルールの優先順位: 個人ルール > 購読ルール > グローバルルール。「グローバルルール」はフォールバックルールのようなものです。",ko:'1. 규칙 우선순위: 개인 규칙 > 구독 규칙 > 전역 규칙. "전역 규칙"은 일종의 폴백(fallback) 규칙입니다.'},rules_warn_2:{zh:"2、“订阅规则”选择注入后才会生效。",en:'2. "Subscription rules" will take effect only after injection is selected.',zh_TW:"2、「訂閱規則」選擇注入後才會生效。",ja:"2. 「購読ルール」は注入を選択した後にのみ有効になります。",ko:'2. "구독 규칙"은 주입을 선택한 후에만 적용됩니다.'},rules_warn_3:{zh:"3、关于规则填写:输入框留空或下拉框选“*”表示采用全局规则。CSS选择器支持 + 号前缀表示在全局规则基础上追加,- 号表示剔除。",en:'3. Regarding filling in the rules: Leave the input box blank or select "*" in the drop-down box to use global rule. CSS selectors support prefixes: "+" means add to the global rules, "-" means exclude.',zh_TW:"3. 規則填寫說明:輸入框留空或下拉選擇「*」表示使用全域規則。CSS 選擇器支援使用前綴:「+」表示在全域規則基礎上追加,「-」表示剔除。",ja:"3. ルールの記入について: 入力ボックスを空白にするか、ドロップダウンで「*」を選択すると、グローバルルールが使用されます。CSS セレクターはプレフィックスに対応しています。「+」はグローバルルールへの追加、「-」は除外を意味します。",ko:'3. 규칙 작성 관련: 입력란을 비워두거나 드롭다운에서 "*"를 선택하면 전역 규칙이 사용됩니다. CSS 선택자는 접두사를 지원합니다. "+"는 전역 규칙에 추가, "-"는 제외를 의미합니다.'},sync_warn:{zh:"涉及隐私数据的同步请谨慎选择第三方同步服务,建议自行搭建 kiss-worker 或 WebDAV 服务。",en:"When synchronizing data that involves privacy, please be cautious about choosing third-party sync services. It is recommended to set up your own sync service using kiss-worker or WebDAV.",zh_TW:"同步涉及隱私資料時,請謹慎選擇第三方同步服務;建議自建 kiss-worker 或 WebDAV 服務。",ja:"プライバシーに関わるデータを同期する場合、サードパーティの同期サービスは慎重に選択してください。kiss-worker や WebDAV サービスを自己ホスティングすることをお勧めします。",ko:"개인정보가 포함된 데이터를 동기화할 경우, 타사 동기화 서비스 선택에 신중을 기하십시오. 자체 kiss-worker 또는 WebDAV 서비스를 구축하는 것을 권장합니다."},sync_warn_2:{zh:"如果服务器存在其他客户端同步的数据,第一次同步将直接覆盖本地配置,后面则根据修改时间,新的覆盖旧的。",en:"If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.",zh_TW:"若伺服器上存在其他用戶端同步的資料,第一次同步會直接覆蓋本機設定;之後則依修改時間,由新的覆蓋舊的。",ja:"サーバーに他のクライアントによって同期されたデータがある場合、最初の同期はローカル設定を直接上書きし、その後は変更時間に応じて新しいものが古いものを上書きします。",ko:"서버에 다른 클라이언트가 동기화한 데이터가 있는 경우, 첫 번째 동기화는 로컬 구성을 직접 덮어쓰며, 이후에는 수정 시간에 따라 새 항목이 기존 항목을 덮어씁니다."},about_sync_api:{zh:"自建kiss-wroker数据同步服务",en:"Self-hosting a Kiss-worker data sync service",zh_TW:"自建 kiss-wroker 資料同步服務",ja:"Kiss-worker データ同期サービスをセルフホストする",ko:"Kiss-worker 데이터 동기화 서비스 자체 호스팅"},about_api:{zh:"1、其中 BuiltinAI 为浏览器内置AI翻译,目前仅 Chrome 138 及以上版本得到支持。",en:"1. BuiltinAI is the browser's built-in AI translation, which is currently only supported by Chrome 138 and above.",zh_TW:"1.其中 BuiltinAI 為瀏覽器內建AI翻譯,目前僅 Chrome 138 以上版本支援。",ja:"1. BuiltinAI はブラウザ内蔵のAI翻訳で、現在 Chrome 138 以降のバージョンでのみサポートされています。",ko:"1. BuiltinAI는 브라우저 내장 AI 번역으로, 현재 Chrome 138 이상 버전에서만 지원됩니다."},about_api_2:{zh:"2、大部分AI接口都与OpenAI兼容,因此选择OpenAI类型即可。“是否聚合发送翻译请求”所对应的 Prompt 并不相同,并且不是所有接口都支持聚合翻译。",en:"2. Most AI interfaces are compatible with OpenAI, so you can simply select the OpenAI type. The prompts corresponding to “Whether to aggregate translation requests” are different, and not all interfaces support aggregated translation.",zh_TW:"2. 大部分的 AI 介面都與 OpenAI 相容,因此選擇 OpenAI 類型即可。「是否聚合發送翻譯請求」所對應的 Prompt 並不相同,並且不是所有介面都支援聚合翻譯。",ja:"2. ほとんどの AI インターフェースは OpenAI と互換性があるため、OpenAI タイプを選択すれば問題ありません。「翻訳リクエストをまとめて送信するかどうか」に対応するプロンプトは異なり、すべてのインターフェースが集約翻訳をサポートしているわけではありません。",ko:"2. 대부분의 AI 인터페이스는 OpenAI와 호환되므로 OpenAI 유형을 선택하면 됩니다. “번역 요청을 집합적으로 보낼지 여부”에 대응하는 프롬프트는 서로 다르며, 모든 인터페이스가 집합 번역을 지원하는 것은 아닙니다."},about_api_3:{zh:"3、理论上,所有翻译接口,都可以通过自定义接口 (Custom) 的形式使用。",en:"3. In theory, all translation interfaces can be used by configuring them as a custom interface.",zh_TW:"3. 理論上,所有翻譯介面都可以透過自訂介面(Custom)的方式來使用。",ja:"3. 理論的には、すべての翻訳インターフェースはカスタム(Custom)インターフェースとして設定することで利用できます。",ko:"3. 이론적으로 모든 번역 인터페이스는 커스텀(Custom) 인터페이스로 설정하여 사용할 수 있습니다."},about_api_proxy:{zh:"查看自建一个翻译接口代理",en:"Check out the self-built translation interface proxy",zh_TW:"查看如何自建翻譯介面 Proxy",ja:"自作の翻訳インターフェースプロキシをチェックする",ko:"자체 구축 번역 인터페이스 프록시 확인하기"},setting_helper:{zh:"新旧配置并不兼容,导出的旧版配置,勿再次导入。",en:"The old and new configurations are not compatible. Do not import the exported old configuration again.",zh_TW:"新舊配置並不相容,匯出的舊版配置,勿再次匯入。",ja:"新旧の設定に互換性はありません。エクスポートした古い設定を再度インポートしないでください。",ko:"이전 구성과 새 구성은 호환되지 않습니다. 내보낸 이전 구성을 다시 가져오지 마십시오."},style_none:{zh:"无",en:"None",zh_TW:"無",ja:"なし",ko:"없음"},under_line:{zh:"下划直线",en:"Underline",zh_TW:"下劃直線",ja:"下線",ko:"밑줄"},dot_line:{zh:"下划点状线",en:"Dotted Underline",zh_TW:"下劃點狀線",ja:"点線の下線",ko:"점선 밑줄"},dash_line:{zh:"下划虚线",en:"Dashed Underline",zh_TW:"下劃虛線",ja:"破線の下線",ko:"파선 밑줄"},dash_box:{zh:"虚线框",en:"Dashed Box",zh_TW:"虛線框",ja:"破線ボックス",ko:"파선 상자"},dash_line_bold:{zh:"下划虚线加粗",en:"Dashed Underline Bold",zh_TW:"下劃虛線",ja:"破線の下線 (太字)",ko:"굵은 파선 밑줄"},dash_box_bold:{zh:"虚线框加粗",en:"Dashed Box Bold",zh_TW:"虛線框加粗",ja:"破線ボックス (太字)",ko:"굵은 파선 상자"},marker:{zh:"马克笔",en:"Marker",zh_TW:"馬克筆",ja:"マーカー",ko:"마커"},gradient_marker:{zh:"渐变马克笔",en:"Gradient Marker",zh_TW:"漸層馬克筆",ja:"グラデーションマーカー",ko:"그라데이션 마커"},wavy_line:{zh:"下划波浪线",en:"Wavy Underline",zh_TW:"下劃波浪線",ja:"波線の下線",ko:"물결 밑줄"},wavy_line_bold:{zh:"下划波浪线加粗",en:"Wavy Underline Bold",zh_TW:"下劃波浪線加粗",ja:"波線の下線 (太字)",ko:"굵은 물결 밑줄"},fuzzy:{zh:"模糊",en:"Fuzzy",zh_TW:"模糊",ja:"ぼかし",ko:"흐림"},highlight:{zh:"高亮",en:"Highlight",zh_TW:"反白標示",ja:"ハイライト",ko:"하이라이트"},blockquote:{zh:"引用",en:"Blockquote",zh_TW:"引用",ja:"引用",ko:"인용"},gradient:{zh:"渐变",en:"Gradient",zh_TW:"漸變",ja:"グラデーション",ko:"그라데이션"},blink:{zh:"闪现",en:"Blink",zh_TW:"閃現",ja:"点滅",ko:"깜박임"},glow:{zh:"发光",en:"Glow",zh_TW:"發光",ja:"発光",ko:"발광"},colorful:{zh:"多彩",en:"Colorful",zh_TW:"多彩",ja:"カラフル",ko:"다채롭게"},setting:{zh:"设置",en:"Setting",zh_TW:"設定",ja:"設定",ko:"설정"},pattern:{zh:"匹配网址",en:"URL pattern",zh_TW:"匹配網址",ja:"URLパターン",ko:"URL 패턴"},pattern_helper:{zh:"1、支持星号(*)通配符。2、多个URL用换行或英文逗号“,”分隔。",en:'1. Supports the asterisk (*) wildcard character. 2. Separate multiple URLs with newlines or English commas ",".',zh_TW:"1. 支援星號 (*) 萬用字元。2. 多個 URL 請以換行或英文逗號「,」分隔。",ja:"1. アスタリスク (*) ワイルドカードをサポートします。 2. 複数のURLは改行または英語のコンマ「,」で区切ります。",ko:'1. 별표(*) 와일드카드 문자를 지원합니다. 2. 여러 URL은 줄바꿈 또는 영어 쉼표 ","로 구분합니다.'},selector_helper:{zh:"1、需要翻译的目标元素。2、开启自动扫描页面后,本设置无效。3、遵循CSS选择器语法。",en:"1. The target element to be translated. 2. This setting is invalid when automatic page scanning is enabled. 3. Follow the CSS selector syntax.",zh_TW:"1、需要翻譯的目標元素。 2.開啟自動掃描頁面後,本設定無效。 3.遵循CSS選擇器語法。",ja:"1. 翻訳対象の要素。 2. ページの自動スキャンを有効にすると、この設定は無効になります。 3. CSSセレクタ構文に従ってください。",ko:"1. 번역할 대상 요소입니다. 2. 자동 페이지 스캔이 활성화되면 이 설정은 무효화됩니다. 3. CSS 선택자 구문을 따릅니다."},translate_switch:{zh:"开启翻译",en:"Translate Switch",zh_TW:"開啟翻譯",ja:"翻訳を有効にする",ko:"번역 켜기"},default_enabled:{zh:"默认开启",en:"Enabled",zh_TW:"預設開啟",ja:"デフォルトで有効",ko:"기본으로 사용"},default_disabled:{zh:"默认关闭",en:"Disabled",zh_TW:"預設關閉",ja:"デフォルトで無効",ko:"기본으로 사용 안함"},selector:{zh:"选择器",en:"Selector",zh_TW:"選擇器",ja:"セレクタ",ko:"선택자"},target_selector:{zh:"目标元素选择器",en:"Target element selector",zh_TW:"目標元素選擇器",ja:"対象要素セレクタ",ko:"대상 요소 선택자"},keep_selector:{zh:"保留元素选择器",en:"Keep unchanged selector",zh_TW:"保留元素選擇器",ja:"保持要素セレクタ",ko:"유지할 요소 선택자"},keep_selector_helper:{zh:"1、目标元素下面需要原样保留的子节点。2、遵循CSS选择器语法。",en:"1. The child nodes under the target element need to remain intact. 2. Follow the CSS selector syntax.",zh_TW:"1. 目標元素下的子節點需要保持原樣。 2. 遵循 CSS 選擇器語法。",ja:"1. 対象要素の下にある、そのまま保持する必要がある子ノード。 2. CSSセレクタ構文に従ってください。",ko:"1. 대상 요소 아래의 자식 노드 중 그대로 유지해야 하는 노드. 2. CSS 선택자 구문을 따릅니다."},root_selector:{zh:"根节点选择器",en:"Root node selector",zh_TW:"根節點選擇器",ja:"ルートノードセレクタ",ko:"루트 노드 선택자"},root_selector_helper:{zh:"1、用于缩小页面翻译范围。2、遵循CSS选择器语法。",en:"1. Used to narrow the translation scope of the page. 2. Follow the CSS selector syntax.",zh_TW:"1.用於縮小頁面翻譯範圍。 2、遵循CSS選擇器語法。",ja:"1. ページの翻訳範囲を絞り込むために使用します。 2. CSSセレクタ構文に従ってください。",ko:"1. 페이지의 번역 범위를 좁히는 데 사용됩니다. 2. CSS 선택자 구문을 따릅니다."},ignore_selector:{zh:"不翻译节点选择器",en:"Ignore node selectors",zh_TW:"不翻譯節點選擇器",ja:"翻訳しないノードセレクタ",ko:"번역 무시 노드 선택자"},ignore_selector_helper:{zh:"1、需要忽略的节点。2、遵循CSS选择器语法。",en:"1. Nodes to be ignored. 2. Follow CSS selector syntax.",zh_TW:"1、需要忽略的節點。 2、遵循CSS選擇器語法。",ja:"1. 無視するノード。 2. CSSセレクタ構文に従ってください。",ko:"1. 무시할 노드. 2. CSS 선택자 구문을 따릅니다."},terms:{zh:"专业术语",en:"Terms",zh_TW:"專業術語",ja:"専門用語",ko:"전문 용어"},terms_helper:{zh:"1、支持正则表达式匹配,无需斜杆,不支持修饰符。2、多条术语用换行或分号“;”隔开。3、术语和译文用英文逗号“,”隔开。4、没有译文视为不翻译术语。",en:'1. Supports regular expression matching, no slash required, and no modifiers are supported. 2. Separate multiple terms with newlines or semicolons ";". 3. Terms and translations are separated by English commas ",". 4. If there is no translation, the term will be deemed not to be translated.',zh_TW:"1. 支援正則表達式比對,無需斜線,且不支援修飾符。2. 多條術語以換行或分號「;」分隔。3. 術語與譯文以英文逗號「,」分隔。4. 無譯文者視為不翻譯該術語。",ja:"1. 正規表現マッチングをサポート (スラッシュ不要、修飾子非対応)。 2. 複数の用語は改行またはセミコロン「;」で区切ります。 3. 用語と翻訳は英語のコンマ「,」で区切ります。 4. 翻訳がない場合は、その用語を翻訳しないものとみなします。",ko:'1. 정규식 일치를 지원하며, 슬래시가 필요 없고 수정자는 지원되지 않습니다. 2. 여러 용어는 줄바꿈 또는 세미콜론 ";"으로 구분합니다. 3. 용어와 번역은 영어 쉼표 ","로 구분합니다. 4. 번역이 없는 경우 해당 용어를 번역하지 않는 것으로 간주합니다.'},ai_terms:{zh:"AI专业术语",en:"AI Terms",zh_TW:"AI專業術語",ja:"AI専門用語",ko:"AI 전문 용어"},ai_terms_helper:{zh:"1、AI智能替换,不支持正则表达式。2、多条术语用换行或分号“;”隔开。3、术语和译文用英文逗号“,”隔开。4、没有译文视为不翻译术语。",en:'1. AI intelligent replacement does not support regular expressions.2. Separate multiple terms with newlines or semicolons ";". 3. Terms and translations are separated by English commas ",". 4. If there is no translation, the term will be deemed not to be translated.',zh_TW:"1.AI智能替換,不支援正規表示式。2. 多條術語以換行或分號「;」分隔。3. 術語與譯文以英文逗號「,」分隔。4. 無譯文者視為不翻譯該術語。",ja:"1. AIによるインテリジェントな置換 (正規表現非対応)。 2. 複数の用語は改行またはセミコロン「;」で区切ります。 3. 用語と翻訳は英語のコンマ「,」で区切ります。 4. 翻訳がない場合は、その用語を翻訳しないものとみなします。",ko:'1. AI 지능형 대체, 정규식을 지원하지 않습니다. 2. 여러 용어는 줄바꿈 또는 세미콜론 ";"으로 구분합니다. 3. 용어와 번역은 영어 쉼표 ","로 구분합니다. 4. 번역이 없는 경우 해당 용어를 번역하지 않는 것으로 간주합니다.'},text_ext_style:{zh:"译文附加样式",en:"Translation additional styles",zh_TW:"譯文附加樣式",ja:"翻訳の追加スタイル",ko:"번역 추가 스타일"},selector_style:{zh:"选择器节点样式",en:"Selector Style",zh_TW:"選擇器節點樣式",ja:"セレクタノードスタイル",ko:"선택자 노드 스타일"},terms_style:{zh:"专业术语样式",en:"Terms Style",zh_TW:"專業術語樣式",ja:"専門用語スタイル",ko:"전문 용어 스타일"},highlight_style:{zh:"词汇高亮样式",en:"Fav Words highlight style",zh_TW:"詞彙高亮樣式",ja:"単語ハイライトスタイル",ko:"단어 하이라이트 스타일"},selector_style_helper:{zh:"开启翻译时注入。",en:"It is injected when translation is turned on.",zh_TW:"在開啟翻譯時注入。",ja:"翻訳が有効なときに注入されます。",ko:"번역이 켜져 있을 때 주입됩니다."},selector_parent_style:{zh:"选择器父节点样式",en:"Parent Selector Style",zh_TW:"選擇器父節點樣式",ja:"親セレクタスタイル",ko:"부모 선택자 스타일"},selector_grand_style:{zh:"选择器祖节点样式",en:"Grand Selector Style",zh_TW:"選擇器祖節點樣式",ja:"祖先セレクタスタイル",ko:"상위 선택자 스타일"},inject_js:{zh:"注入JS",en:"Inject JS",zh_TW:"注入 JS",ja:"JSを注入",ko:"JS 주입"},inject_js_helper:{zh:"预加载时注入,一个页面仅运行一次。内置全局对象 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",en:"Injected during preload, runs only once per page. Built-in global object KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",zh_TW:"預先載入時注入,一個頁面僅運行一次。內建全域物件 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",ja:"プリロード時に注入され、ページごとに1回だけ実行されます。組み込みグローバルオブジェクト KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }",ko:"미리 로드 시 주입되며 페이지당 한 번만 실행됩니다. 내장 전역 객체 KT: {\n apiTranslate,\n apiDectect,\n apiSetting,\n apisMap,\n toLang,\n docInfo,\n glossary,\n }"},inject_css:{zh:"注入CSS",en:"Inject CSS",zh_TW:"注入 CSS",ja:"CSSを注入",ko:"CSS 주입"},inject_css_helper:{zh:"预加载时注入,一个页面仅运行一次。",en:"Injected during preload, runs only once per page.",zh_TW:"預先載入時注入,一個頁面僅運行一次。",ja:"プリロード時に注入され、ページごとに1回だけ実行されます。",ko:"미리 로드 시 주입되며 페이지당 한 번만 실행됩니다."},fixer_function:{zh:"修复函数",en:"Fixer Function",zh_TW:"修復函式",ja:"修正関数",ko:"수정 함수"},fixer_function_helper:{zh:'1、br是将<br>换行替换成<p "kiss-p">。2、bn是将\\n换行替换成<p "kiss-p">。3、brToDiv和bnToDiv是替换成<div class="kiss-p">。',en:'1. br replaces <br> line breaks with <p "kiss-p">. 2. bn replaces \\n newline with <p "kiss-p">. 3. brToDiv and bnToDiv are replaced with <div class="kiss-p">.',zh_TW:'1. br 會將 <br> 換行替換為 <p "kiss-p">。2. bn 會將 \\n 換行替換為 <p "kiss-p">。3. brToDiv 與 bnToDiv 會替換為 <div class="kiss-p">。',ja:'1. br は <br> 改行を <p "kiss-p"> に置き換えます。 2. bn は \\n 改行を <p "kiss-p"> に置き換えます。 3. brToDiv と bnToDiv は <div class="kiss-p"> に置き換えます。',ko:'1. br은 <br> 줄바꿈을 <p "kiss-p">로 대체합니다. 2. bn은 \\n 줄바꿈을 <p "kiss-p">로 대체합니다. 3. brToDiv 및 bnToDiv는 <div class="kiss-p">로 대체됩니다.'},import:{zh:"导入",en:"Import",zh_TW:"匯入",ja:"インポート",ko:"가져오기"},export:{zh:"导出",en:"Export",zh_TW:"匯出",ja:"エクスポート",ko:"내보내기"},export_translation:{zh:"导出释义",en:"Export Translation",zh_TW:"匯出釋義",ja:"訳文のエクスポート",ko:"번역 내보내기"},error_cant_be_blank:{zh:"不能为空",en:"Can not be blank",zh_TW:"不可為空",ja:"空白にすることはできません",ko:"비워둘 수 없습니다"},error_duplicate_values:{zh:"存在重复的值",en:"There are duplicate values",zh_TW:"存在重複的值",ja:"重複する値が存在します",ko:"중복된 값이 있습니다"},error_wrong_file_type:{zh:"错误的文件类型",en:"Wrong file type",zh_TW:"檔案類型錯誤",ja:"不正なファイルタイプです",ko:"잘못된 파일 형식입니다"},error_fetch_url:{zh:"请检查url地址是否正确或稍后再试。",en:"Please check if the url address is correct or try again later.",zh_TW:"請檢查 URL 是否正確或稍後再試。",ja:"URLアドレスが正しいか確認するか、後でもう一度お試しください。",ko:"URL 주소가 올바른지 확인하거나 나중에 다시 시도하십시오."},deepl_api:{zh:"DeepL 接口",en:"DeepL API",zh_TW:"DeepL 介面",ja:"DeepL API",ko:"DeepL API"},deepl_key:{zh:"DeepL 密钥",en:"DeepL Key",zh_TW:"DeepL 金鑰",ja:"DeepL キー",ko:"DeepL 키"},openai_api:{zh:"OpenAI 接口",en:"OpenAI API",zh_TW:"OpenAI 介面",ja:"OpenAI API",ko:"OpenAI API"},openai_key:{zh:"OpenAI 密钥",en:"OpenAI Key",zh_TW:"OpenAI 金鑰",ja:"OpenAI キー",ko:"OpenAI 키"},openai_model:{zh:"OpenAI 模型",en:"OpenAI Model",zh_TW:"OpenAI 模型",ja:"OpenAI モデル",ko:"OpenAI 모델"},openai_prompt:{zh:"OpenAI 提示词",en:"OpenAI Prompt",zh_TW:"OpenAI 提示詞",ja:"OpenAI プロンプト",ko:"OpenAI 프롬프트"},if_clear_cache:{zh:"是否清除缓存(默认缓存7天)",en:"Whether clear cache (Default cache is 7 days)",zh_TW:"是否清除快取(預設快取7天)",ja:"キャッシュをクリアしますか(デフォルトのキャッシュ期間は7日間です)",ko:"캐시를 지우시겠습니까 (기본 캐시 7일)"},clear_cache_never:{zh:"不清除缓存",en:"Never clear cache",zh_TW:"不清除快取",ja:"キャッシュをクリアしない",ko:"캐시 지우지 않음"},clear_cache_restart:{zh:"重启浏览器时清除缓存",en:"Clear cache when restarting browser",zh_TW:"重新啟動瀏覽器時清除快取",ja:"ブラウザ再起動時にキャッシュをクリア",ko:"브라우저 재시작 시 캐시 지우기"},data_sync_type:{zh:"数据同步方式",en:"Data Sync Type",zh_TW:"資料同步方式",ja:"データ同期タイプ",ko:"데이터 동기화 유형"},data_sync_url:{zh:"数据同步接口",en:"Data Sync API",zh_TW:"資料同步介面",ja:"データ同期API",ko:"데이터 동기화 API"},data_sync_user:{zh:"数据同步账户",en:"Data Sync User",zh_TW:"資料同步帳號",ja:"データ同期アカウント",ko:"데이터 동기화 계정"},data_sync_key:{zh:"数据同步密钥",en:"Data Sync Key",zh_TW:"資料同步金鑰",ja:"データ同期キー",ko:"데이터 동기화 키"},sync_now:{zh:"立即同步",en:"Sync Now",zh_TW:"立即同步",ja:"今すぐ同期",ko:"지금 동기화"},sync_success:{zh:"同步成功!",en:"Sync Success",zh_TW:"同步成功!",ja:"同期成功!",ko:"동기화 성공!"},sync_failed:{zh:"同步失败!",en:"Sync Error",zh_TW:"同步失敗!",ja:"同期失敗!",ko:"동기화 실패!"},error_got_some_wrong:{zh:"抱歉,出错了!",en:"Sorry, something went wrong!",zh_TW:"抱歉,發生錯誤!",ja:"申し訳ありません、エラーが発生しました!",ko:"죄송합니다, 오류가 발생했습니다!"},error_sync_setting:{zh:"您的同步类型必须为“KISS-Worker”,且需填写完整",en:'Your sync type must be "KISS-Worker" and must be filled in completely',zh_TW:"您的同步型態必須為「KISS-Worker」,且需填寫完整。",ja:"同期タイプは「KISS-Worker」である必要があり、すべて入力する必要があります。",ko:'동기화 유형은 "KISS-Worker"여야 하며, 모든 항목을 빠짐없이 입력해야 합니다.'},click_test:{zh:"点击测试",en:"Click Test",zh_TW:"點擊測試",ja:"クリックしてテスト",ko:"클릭 테스트"},test_success:{zh:"测试成功",en:"Test success",zh_TW:"測試成功",ja:"テスト成功",ko:"테스트 성공"},test_failed:{zh:"测试失败",en:"Test failed",zh_TW:"測試失敗",ja:"テスト失敗",ko:"테스트 실패"},clear_all_cache_now:{zh:"立即清除全部缓存",en:"Clear all cache now",zh_TW:"立即清除全部快取",ja:"すべてのキャッシュを今すぐクリア",ko:"모든 캐시 지금 지우기"},clear_cache:{zh:"清除缓存",en:"Clear Cache",zh_TW:"清除快取",ja:"キャッシュをクリア",ko:"캐시 지우기"},disable_on_mobile:{zh:"移动端禁用",en:"Disable on Mobile",zh_TW:"行動裝置停用",ja:"モバイルで無効にする",ko:"모바일에서 비활성화"},clear_success:{zh:"清除成功",en:"Clear success",zh_TW:"清除成功",ja:"クリア成功",ko:"지우기 성공"},clear_failed:{zh:"清除失败",en:"Clear failed",zh_TW:"清除失敗",ja:"クリア失敗",ko:"지우기 실패"},share:{zh:"分享",en:"Share",zh_TW:"分享",ja:"共有",ko:"공유"},clear_all:{zh:"清空",en:"Clear All",zh_TW:"清空",ja:"すべてクリア",ko:"모두 지우기"},help:{zh:"求助",en:"Help",zh_TW:"求助",ja:"ヘルプ",ko:"도움말"},restore_default:{zh:"恢复默认",en:"Restore Default",zh_TW:"恢復預設",ja:"デフォルトに戻す",ko:"기본값 복원"},shortcuts_setting:{zh:"快捷键设置",en:"Shortcuts Setting",zh_TW:"快捷鍵設定",ja:"ショートカット設定",ko:"단축키 설정"},toggle_translate_shortcut:{zh:'"开启翻译"快捷键',en:'"Toggle Translate" Shortcut',zh_TW:"「開啟翻譯」快捷鍵",ja:"「翻訳切り替え」ショートカット",ko:'"번역 켜기" 단축키'},toggle_style_shortcut:{zh:'"切换样式"快捷键',en:'"Toggle Style" Shortcut',zh_TW:"「切換樣式」快捷鍵",ja:"「スタイル切り替え」ショートカット",ko:'"스타일 전환" 단축키'},toggle_popup_shortcut:{zh:'"打开弹窗"快捷键',en:'"Open Popup" Shortcut',zh_TW:"「開啟彈窗」快捷鍵",ja:"「ポップアップを開く」ショートカット",ko:'"팝업 열기" 단축키'},open_setting_shortcut:{zh:'"打开设置"快捷键',en:'"Open Setting" Shortcut',zh_TW:"「開啟設定」快捷鍵",ja:"「設定を開く」ショートカット",ko:'"설정 열기" 단축키'},hide_fab_button:{zh:"隐藏悬浮按钮",en:"Hide Fab Button",zh_TW:"隱藏懸浮按鈕",ja:"フローティングボタンを隠す",ko:"플로팅 버튼 숨기기"},fab_click_action:{zh:"单击悬浮按钮动作",en:"Single Click Fab Action",zh_TW:"單擊懸浮按钮動作",ja:"フローティングボタンのクリック動作",ko:"플로팅 버튼 클릭 동작"},fab_click_menu:{zh:"弹出菜单",en:"Popup Menu",zh_TW:"彈出選單",ja:"メニューを開く",ko:"팝업 메뉴"},fab_click_translate:{zh:"直接翻译",en:"Translate",zh_TW:"直接翻譯",ja:"直接翻訳",ko:"바로 번역"},hide_tran_button:{zh:"隐藏翻译按钮",en:"Hide Translate Button",zh_TW:"隱藏翻譯按鈕",ja:"翻訳ボタンを隠す",ko:"번역 버튼 숨기기"},hide_click_away:{zh:"点击外部关闭弹窗",en:"Click outside to close the pop-up window",zh_TW:"點擊外部關閉彈窗",ja:"外部クリックでポップアップを閉じる",ko:"바깥쪽 클릭 시 팝업 닫기"},use_simple_style:{zh:"使用简洁界面",en:"Use a simple interface",zh_TW:"使用簡潔介面",ja:"シンプルUIを使用",ko:"간단한 인터페이스 사용"},show:{zh:"显示",en:"Show",zh_TW:"顯示",ja:"表示",ko:"표시"},hide:{zh:"隐藏",en:"Hide",zh_TW:"隱藏",ja:"非表示",ko:"숨기기"},save_rule:{zh:"保存本站规则",en:"Save this site rule",zh_TW:"保存本站規則",ja:"このサイトのルールを保存",ko:"이 사이트 규칙 저장"},domain:{zh:"网域",en:"Domain",zh_TW:"網域",ja:"ドメイン",ko:"도메인"},global_rule:{zh:"全局规则",en:"Global Rule",zh_TW:"全域規則",ja:"グローバルルール",ko:"전역 규칙"},input_translate:{zh:"输入框翻译",en:"Input Box Translation",zh_TW:"輸入框翻譯",ja:"入力ボックス翻訳",ko:"입력창 번역"},use_input_box_translation:{zh:"启用输入框翻译",en:"Input Box Translation",zh_TW:"啟用輸入框翻譯",ja:"入力ボックス翻訳を有効にする",ko:"입력창 번역 사용"},input_selector:{zh:"输入框选择器",en:"Input Selector",zh_TW:"輸入框選擇器",ja:"入力ボックスセレクタ",ko:"입력창 선택자"},input_selector_helper:{zh:"用于输入框翻译。",en:"Used for input box translation.",zh_TW:"用於輸入框翻譯。",ja:"入力ボックスの翻訳に使用します。",ko:"입력창 번역에 사용됩니다."},trigger_trans_shortcut:{zh:"触发翻译快捷键",en:"Trigger Translation Shortcut Keys",zh_TW:"觸發翻譯快捷鍵",ja:"翻訳ショートカットキー",ko:"번역 실행 단축키"},trigger_trans_shortcut_help:{zh:"默认为单击“AltLeft+KeyI”",en:'Default is "AltLeft+KeyI"',zh_TW:"預設為按下「AltLeft+KeyI」",ja:"デフォルトは「AltLeft+KeyI」です",ko:'기본값 "AltLeft+KeyI"'},shortcut_press_count:{zh:"快捷键连击次数",en:"Shortcut Press Number",zh_TW:"快捷鍵連擊次數",ja:"ショートカットの連続プレス回数",ko:"단축키 연속 입력 횟수"},combo_timeout:{zh:"连击超时时间 (10-1000ms)",en:"Combo Timeout (10-1000ms)",zh_TW:"連擊逾時 (10-1000ms)",ja:"連続プレスタイムアウト (10-1000ms)",ko:"연속 입력 시간 초과 (10-1000ms)"},input_trans_start_sign:{zh:"翻译起始标识",en:"Translation Start Sign",zh_TW:"翻譯起始標記",ja:"翻訳開始記号",ko:"번역 시작 표시"},input_trans_start_sign_help:{zh:"标识后面可以加目标语言代码,如: “/en 你好”、“/zh hello”",en:'The target language code can be added after the sign, such as: "/en 你好", "/zh hello"',zh_TW:"標記後可加上目標語言代碼,例如:「/en 你好」、「/zh hello」",ja:"記号の後に対象言語コードを追加できます。例:「/en 你好」、「/zh hello」",ko:'표시 뒤에 대상 언어 코드를 추가할 수 있습니다. 예: "/en 你好", "/zh hello"'},detect_lang_remote:{zh:"远程语言检测",en:"Remote language detection",zh_TW:"遠端語言偵測",ja:"リモート言語検出",ko:"원격 언어 감지"},detect_lang_remote_help:{zh:"启用后检测准确度增加,但会降低翻译速度,请酌情开启",en:"After enabling, the detection accuracy will increase, but it will reduce the translation speed. Please enable it as appropriate.",zh_TW:"啟用後可提升偵測準確度,但會降低翻譯速度,請視需要開啟。",ja:"有効にすると検出精度が向上しますが、翻訳速度が低下する可能性があります。必要に応じて有効にしてください。",ko:"활성화하면 감지 정확도가 높아지지만 번역 속도가 느려질 수 있습니다. 적절히 활성화하십시오."},detect_lang_service:{zh:"语言检测服务",en:"Language detect service",zh_TW:"語言檢測服務",ja:"言語検出サービス",ko:"언어 감지 서비스"},disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},enable:{zh:"启用",en:"Enable",zh_TW:"啟用",ja:"有効",ko:"활성화"},selection_translate:{zh:"划词翻译",en:"Selection Translation",zh_TW:"劃詞翻譯",ja:"選択翻訳",ko:"선택 번역"},toggle_selection_translate:{zh:"启用划词翻译",en:"Use Selection Translate",zh_TW:"啟用劃詞翻譯",ja:"選択翻訳を有効にする",ko:"선택 번역 사용"},trigger_tranbox_shortcut:{zh:"显示翻译框/翻译选中文字快捷键",en:"Open Translate Popup/Translate Selected Shortcut",zh_TW:"顯示翻譯框/翻譯選中文字快捷鍵",ja:"翻訳ポップアップ表示/選択翻訳ショートカット",ko:"번역창 표시/선택 번역 단축키"},tranbtn_offset_x:{zh:"翻译按钮偏移X(±200)",en:"Translate Button Offset X (±200)",zh_TW:"翻譯按鈕位移 X(±200)",ja:"翻訳ボタンオフセットX (±200)",ko:"번역 버튼 오프셋 X (±200)"},tranbtn_offset_y:{zh:"翻译按钮偏移Y(±200)",en:"Translate Button Offset Y (±200)",zh_TW:"翻譯按鈕位移 Y(±200)",ja:"翻訳ボタンオフセットY (±200)",ko:"번역 버튼 오프셋 Y (±200)"},tranbox_offset_x:{zh:"翻译框偏移X(±200)",en:"Translate Box Offset X (±200)",zh_TW:"翻譯框位移 X(±200)",ja:"翻訳ボックスオフセットX (±200)",ko:"번역창 오프셋 X (±200)"},tranbox_offset_y:{zh:"翻译框偏移Y(±200)",en:"Translate Box Offset Y (±200)",zh_TW:"翻譯框位移 Y(±200)",ja:"翻訳ボックスオフセットY (±200)",ko:"번역창 오프셋 Y (±200)"},translated_text:{zh:"译文",en:"Translated Text",zh_TW:"譯文",ja:"翻訳済みテキスト",ko:"번역된 텍스트"},original_text:{zh:"原文",en:"Original Text",zh_TW:"原文",ja:"原文",ko:"원본 텍스트"},favorite_words:{zh:"收藏词汇",en:"Favorite Words",zh_TW:"收藏詞彙",ja:"お気に入り単語",ko:"즐겨찾는 단어"},touch_setting:{zh:"触屏设置",en:"Touch Setting",zh_TW:"觸控設定",ja:"タッチ設定",ko:"터치 설정"},touch_translate_shortcut:{zh:"触屏翻译快捷方式 (支持多选)",en:"Touch Translate Shortcut (multiple supported)",zh_TW:"觸控翻譯捷徑 (支援多選)",ja:"タッチ翻訳ショートカット (複数選択可)",ko:"터치 번역 단축키 (다중 선택 지원)"},touch_tap_0:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},touch_tap_2:{zh:"双指轻触",en:"Two finger tap",zh_TW:"雙指輕觸",ja:"2本指タップ",ko:"두 손가락 탭"},touch_tap_3:{zh:"三指轻触",en:"Three finger tap",zh_TW:"三指輕觸",ja:"3本指タップ",ko:"세 손가락 탭"},touch_tap_4:{zh:"四指轻触",en:"Four finger tap",zh_TW:"四指輕觸",ja:"4本指タップ",ko:"네 손가락 탭"},touch_tap_5:{zh:"单指双击",en:"Double-click",zh_TW:"單指雙擊",ja:"ダブルクリック",ko:"더블 클릭"},touch_tap_6:{zh:"单指三击",en:"Triple-click",zh_TW:"單指三擊",ja:"トリプルクリック",ko:"트리플 클릭"},touch_tap_7:{zh:"双指双击",en:"Two-finger double-click",zh_TW:"雙指雙擊",ja:"2本指ダブルクリック",ko:"두 손가락 더블 클릭"},translate_blacklist:{zh:"禁用翻译名单",en:"Translate Blacklist",zh_TW:"停用翻譯名單",ja:"翻訳ブラックリスト",ko:"번역 블랙리스트"},disabled_orilist:{zh:"禁用Origin名单",en:"Disabled Origin List",zh_TW:"停用 Origin 名單",ja:"無効化Originリスト",ko:"비활성화된 Origin 목록"},disabled_csplist:{zh:"禁用CSP名单",en:"Disabled CSP List",zh_TW:"停用 CSP 名單",ja:"無効化CSPリスト",ko:"비활성화된 CSP 목록"},disabled_csplist_helper:{zh:"3、通过调整CSP策略,使得某些页面能够注入JS/CSS/Media,请谨慎使用,除非您已知晓相关风险。",en:"3. By adjusting the CSP policy, some pages can inject JS/CSS/Media. Please use it with caution unless you are aware of the related risks.",zh_TW:"3. 透過調整 CSP 政策,使部分頁面可注入 JS/CSS/Media。請謹慎使用,除非您已知悉相關風險。",ja:"3. CSPポリシーを調整することにより、一部のページでJS/CSS/Mediaの注入が可能になります。関連するリスクを承知していない限り、慎重に使用してください。",ko:"3. CSP 정책을 조정하여 일부 페이지에서 JS/CSS/Media를 주입할 수 있습니다. 관련된 위험을 인지하고 있는 경우가 아니라면 주의해서 사용하십시오."},skip_langs:{zh:"不翻译的语言",en:"Disable Languages",zh_TW:"不翻譯的語言",ja:"翻訳しない言語",ko:"번역하지 않을 언어"},skip_langs_helper:{zh:"此功能依赖准确的语言检测,建议启用远程语言检测。",en:"This feature relies on accurate language detection. It is recommended to enable remote language detection.",zh_TW:"此功能仰賴準確的語言偵測,建議啟用遠端語言偵測。",ja:"この機能は正確な言語検出に依存しているため、リモート言語検出を有効にすることをお勧めします。",ko:"이 기능은 정확한 언어 감지에 의존하므로 원격 언어 감지를 활성화하는 것이 좋습니다."},context_menus:{zh:"右键菜单",en:"Context Menus",zh_TW:"右鍵選單",ja:"コンテキストメニュー",ko:"컨텍스트 메뉴"},hide_context_menus:{zh:"隐藏右键菜单",en:"Hide Context Menus",zh_TW:"隱藏右鍵選單",ja:"コンテキストメニューを隠す",ko:"컨텍스트 메뉴 숨기기"},simple_context_menus:{zh:"简单右键菜单",en:"Simple_context_menus Context Menus",zh_TW:"簡易右鍵選單",ja:"シンプルコンテキストメニュー",ko:"간단한 컨텍스트 메뉴"},secondary_context_menus:{zh:"二级右键菜单",en:"Secondary Context Menus",zh_TW:"次級右鍵選單",ja:"サブコンテキストメニュー",ko:"보조 컨텍스트 메뉴"},mulkeys_help:{zh:"支持用换行或英文逗号“,”分隔,轮询调用。",en:'Supports polling calls separated by newlines or English commas ",".',zh_TW:"支援以換行或英文逗號「,」分隔,輪詢呼叫。",ja:"改行または英語のコンマ「,」で区切ってポーリングコールをサポートします。",ko:'줄바꿈 또는 영어 쉼표 ","로 구분된 폴링 호출을 지원합니다.'},translation_element_tag:{zh:"译文元素标签",en:"Translation Element Tag",zh_TW:"譯文元素標籤",ja:"翻訳要素タグ",ko:"번역 요소 태그"},show_only_translations:{zh:"仅显示译文",en:"Show Only Translations",zh_TW:"僅顯示譯文",ja:"翻訳のみ表示",ko:"번역만 보기"},show_only_translations_help:{zh:"非完美实现,某些页面可能有样式等问题。",en:"It is not a perfect implementation and some pages may have style issues.",zh_TW:"此為非完美實作,部分頁面可能出現樣式等問題。",ja:"完全な実装ではなく、一部のページでスタイルの問題が発生する可能性があります。",ko:"완벽한 구현이 아니며 일부 페이지에서 스타일 문제가 발생할 수 있습니다."},translate_page_title:{zh:"是否翻译页面标题",en:"Translate Page Title",zh_TW:"是否翻譯頁面標題",ja:"ページタイトルを翻訳する",ko:"페이지 제목 번역"},more:{zh:"更多",en:"More",zh_TW:"更多",ja:"もっと見る",ko:"더보기"},less:{zh:"更少",en:"Less",zh_TW:"更少",ja:"少なく",ko:"줄이기"},fixer_selector:{zh:"网页修复选择器",en:"Fixer Selector",zh_TW:"網頁修復選擇器",ja:"Web修正セレクタ",ko:"웹페이지 수정 선택자"},reg_niutrans:{zh:"获取小牛翻译密钥【简约翻译专属新用户注册赠送300万字符】",en:"Get NiuTrans APIKey [KISS Translator Exclusive New User Registration Free 3 Million Characters]",zh_TW:"取得小牛翻譯金鑰【簡約翻譯專屬新用戶註冊贈送 300 萬字元】",ja:"NiuTrans APIキーを取得 [KISS翻訳 専用 新規ユーザー登録で300万文字無料]",ko:"NiuTrans API 키 받기 [KISS 번역기 신규 사용자 등록 시 300만 자 무료 제공]"},trigger_mode:{zh:"触发方式",en:"Trigger Mode",zh_TW:"觸發方式",ja:"トリガーモード",ko:"트리거 모드"},trigger_click:{zh:"点击触发",en:"Click Trigger",zh_TW:"點擊觸發",ja:"クリックトリガー",ko:"클릭 트리거"},trigger_hover:{zh:"鼠标悬停触发",en:"Hover Trigger",zh_TW:"滑鼠懸停觸發",ja:"ホバートリガー",ko:"호버 트리거"},trigger_select:{zh:"选中触发",en:"Select Trigger",zh_TW:"選取觸發",ja:"選択トリガー",ko:"선택 트리거"},extend_styles:{zh:"附加样式",en:"Extend Styles",zh_TW:"附加樣式",ja:"拡張スタイル",ko:"확장 스타일"},custom_option:{zh:"自定义选项",en:"Custom Option",zh_TW:"自訂選項",ja:"カスタムオプション",ko:"사용자 지정 옵션"},translate_selected_text:{zh:"翻译选中文字",en:"Translate Selected Text",zh_TW:"翻譯選取文字",ja:"選択したテキストを翻訳",ko:"선택한 텍스트 번역"},toggle_style:{zh:"切换样式",en:"Toggle Style",zh_TW:"切換樣式",ja:"スタイルを切り替え",ko:"스타일 전환"},open_menu:{zh:"打开弹窗菜单",en:"Open Popup Menu",zh_TW:"開啟彈窗選單",ja:"ポップアップメニューを開く",ko:"팝업 메뉴 열기"},open_setting:{zh:"打开设置",en:"Open Setting",zh_TW:"開啟設定",ja:"設定を開く",ko:"설정 열기"},follow_selection:{zh:"翻译框跟随选中文本",en:"Transbox Follow Selection",zh_TW:"翻譯框跟隨選取文字",ja:"翻訳ボックスを選択範囲に追従",ko:"번역 상자가 선택 항목 따라가기"},tranbox_auto_height:{zh:"翻译框自适应高度",en:"Translation box adaptive height",zh_TW:"翻譯框自適應高度",ja:"翻訳ボックスの高さ自動調整",ko:"번역 상자 높이 자동 조절"},translate_start_hook:{zh:"翻译开始钩子函数",en:"Translate Start Hook",zh_TW:"翻譯開始 Hook",ja:"翻訳開始フック",ko:"번역 시작 후크"},translate_start_hook_helper:{zh:"翻译前时运行,入参为: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",en:"Run before translation, input parameters are: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",zh_TW:"翻譯前時運行,入參為: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",ja:"翻訳前に実行、入力パラメータ: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}",ko:"번역 전 실행, 입력 매개변수: {text,\n fromLang,\n toLang,\n apiSetting,\n docInfo,\n glossary,}"},translate_end_hook:{zh:"翻译完成钩子函数",en:"Translate End Hook",zh_TW:"翻譯完成 Hook",ja:"翻訳完了フック",ko:"번역 완료 후크"},translate_end_hook_helper:{zh:"翻译完成时运行,入参为: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",en:"Run when translation is complete, input parameters are: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",zh_TW:"翻譯完成時運行,入參為: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",ja:"翻訳完了時に実行、入力パラメータ: ({hostNode, parentNode, nodes, wrapperNode, innerNode})",ko:"번역 완료 시 실행, 입력 매개변수: ({hostNode, parentNode, nodes, wrapperNode, innerNode})"},translate_remove_hook:{zh:"翻译移除钩子函数",en:"Translate Removed Hook",zh_TW:"翻譯移除 Hook",ja:"翻訳削除フック",ko:"번역 제거 후크"},translate_remove_hook_helper:{zh:"翻译移除时运行,入参为: 翻译节点。",en:"Run when translation is removed, the input parameters are: translation node.",zh_TW:"移除翻譯時執行,入參為:翻譯節點。",ja:"翻訳削除時に実行、入力パラメータ: 翻訳ノード。",ko:"번역 제거 시 실행, 입력 매개변수: 번역 노드."},english_dict:{zh:"英文词典",en:"English Dictionary",zh_TW:"英文字典",ja:"英語辞書",ko:"영어 사전"},english_suggest:{zh:"英文建议",en:"English Suggest",zh_TW:"英文建議",ja:"英語サジェスト",ko:"영어 제안"},api_name:{zh:"接口名称",en:"API Name",zh_TW:"介面名稱",ja:"API名",ko:"API 이름"},sort_order:{zh:"排序权重",en:"Sort Order",zh_TW:"排序權重",ja:"ソート順序",ko:"정렬 순서"},sort_order_help:{zh:"数值越小越靠前",en:"Smaller values appear first",zh_TW:"數值越小越靠前",ja:"小さい値が先に表示されます",ko:"작은 값이 먼저 표시됩니다"},is_disabled:{zh:"是否禁用",en:"Is Disabled",zh_TW:"是否停用",ja:"無効にする",ko:"비활성화 여부"},translate_selected:{zh:"是否启用划词翻译",en:"If translate selected",zh_TW:"是否啟用劃詞翻譯",ja:"選択範囲の翻訳を有効にする",ko:"선택 번역 사용 여부"},use_batch_fetch:{zh:"是否聚合发送翻译请求",en:"Whether to aggregate and send translation requests",zh_TW:"是否聚合發送翻譯請求",ja:"翻訳リクエストをまとめて送信",ko:"번역 요청 일괄 전송 여부"},batch_interval:{zh:"聚合请求等待时间(10-10000)",en:"Aggregation request waiting time (10-10000)",zh_TW:"聚合請求等待時間(10-10000)",ja:"一括リクエストの待機時間(10-10000)",ko:"일괄 요청 대기 시간(10-10000)"},batch_size:{zh:"聚合请求最大段落数(1-100)",en:"Maximum number of paragraphs in an aggregation request (1-100)",zh_TW:"聚合請求最大段落數(1-100)",ja:"一括リクエストの最大段落数(1-100)",ko:"일괄 요청 최대 단락 수(1-100)"},batch_length:{zh:"聚合请求最大文本长度(1000-100000)",en:"Maximum text length for aggregation requests (1000-100000)",zh_TW:"聚合請求最大文字長度(1000-100000)",ja:"一括リクエストの最大テキスト長(1000-100000)",ko:"일괄 요청 최대 텍스트 길이(1000-100000)"},use_stream:{zh:"是否启用流式传输",en:"Whether to enable streaming",zh_TW:"是否啟用串流傳輸",ja:"ストリーミングを有効にする",ko:"스트리밍 활성화 여부"},use_context:{zh:"是否启用智能上下文",en:"Whether to enable AI context",zh_TW:"是否啟用智慧上下文",ja:"AIコンテキストを有効にする",ko:"AI 컨텍스트 활성화 여부"},context_size:{zh:"上下文会话数量(1-20)",en:"Number of context sessions(1-20)",zh_TW:"上下文會話數量(1-20)",ja:"コンテキストセッション数(1-20)",ko:"컨텍스트 세션 수(1-20)"},auto_scan_page:{zh:"自动扫描页面",en:"Auto scan page",zh_TW:"自動掃描頁面",ja:"ページを自動スキャン",ko:"페이지 자동 스캔"},has_rich_text:{zh:"启用富文本翻译",en:"Enable rich text translation",zh_TW:"啟用富文本翻譯",ja:"リッチテキスト翻訳を有効にする",ko:"리치 텍스트 번역 활성화"},has_shadowroot:{zh:"扫描Shadowroot",en:"Scan Shadowroot",zh_TW:"掃描Shadowroot",ja:"Shadowrootをスキャン",ko:"Shadowroot 스캔"},mousehover_translate:{zh:"鼠标悬停翻译",en:"Mouseover Translation",zh_TW:"滑鼠懸停翻譯",ja:"マウスオーバー翻訳",ko:"마우스오버 번역"},use_mousehover_translation:{zh:"启用鼠标悬停翻译",en:"Enable mouseover translation",zh_TW:"啟用滑鼠懸停翻譯",ja:"マウスオーバー翻訳を有効にする",ko:"마우스오버 번역 활성화"},selected_translation_alert:{zh:"划词翻译的开启和关闭请到“规则设置”里面设置。",en:'To turn selected translation on or off, please go to "Rule Settings".',zh_TW:"劃詞翻譯的開啟和關閉請到「規則設定」裡面設定。",ja:"選択翻訳のオン/オフは「ルール設定」で行ってください。",ko:'선택 번역 활성화/비활성화는 "규칙 설정"에서 하십시오.'},mousehover_key_help:{zh:"当快捷键置空时表示鼠标懸停直接翻译",en:"When the shortcut key is empty, it means that the mouse hovers to translate directly",zh_TW:"當快捷鍵置空時表示滑鼠懸停直接翻譯",ja:"ショートカットキーが空の場合、マウスオーバーで直接翻訳します",ko:"단축키가 비어 있으면 마우스오버 시 바로 번역합니다"},autoscan_alt:{zh:"自动扫描",en:"Auto Scan",zh_TW:"自動掃描",ja:"自動スキャン",ko:"자동 스캔"},scan_all_nodes:{zh:"扫描全部节点",en:"Scan All Nodes",zh_TW:"掃描全部節點",ja:"すべてのノードをスキャン",ko:"모든 노드 스캔"},shadowroot_alt:{zh:"ShadowRoot",en:"ShadowRoot",zh_TW:"ShadowRoot",ja:"ShadowRoot",ko:"ShadowRoot"},richtext_alt:{zh:"保留富文本",en:"Rich Text",zh_TW:"保留富文本",ja:"リッチテキスト",ko:"리치 텍스트"},transonly_alt:{zh:"隐藏原文",en:"Hide Original",zh_TW:"隱藏原文",ja:"原文を隠す",ko:"원문 숨기기"},confirm_title:{zh:"确认",en:"Confirm",zh_TW:"確認",ja:"確認",ko:"확인"},confirm_message:{zh:"确定操作吗?",en:"Are you sure you want to proceed?",zh_TW:"確定操作嗎?",ja:"操作を続行しますか?",ko:"계속하시겠습니까?"},confirm_action:{zh:"确定",en:"Confirm",zh_TW:"確定",ja:"確認",ko:"확인"},cancel_action:{zh:"取消",en:"Cancel",zh_TW:"取消",ja:"キャンセル",ko:"취소"},pls_press_shortcut:{zh:"请按下快捷键组合",en:"Please press the shortcut key combination",zh_TW:"請按下快速鍵組合",ja:"ショートカットキーを押してください",ko:"단축키 조합을 누르세요"},load_setting_err:{zh:"数据加载出错,请刷新页面或卸载后重新安装。",en:"Please press the shortcut key combination",zh_TW:"請按下快速鍵組合",ja:"データ読み込みエラー。ページを更新するか、アンインストール後に再インストールしてください。",ko:"데이터 로딩 오류. 페이지를 새로 고치거나 제거 후 다시 설치하세요."},translation_style:{zh:"翻译风格",en:"Translation style",zh_TW:"翻譯風格",ja:"翻訳スタイル",ko:"번역 스타일"},placeholder:{zh:"占位符",en:"Placeholder",zh_TW:"佔位符",ja:"プレースホルダー",ko:"플레이스홀더"},tag_name:{zh:"占位标签名",en:"Placeholder tag name",zh_TW:"佔位標名",ja:"プレースホルダータグ名",ko:"플레이스홀더 태그 이름"},system_prompt_helper_1:{zh:"1. 根据实际情况选择AI支持的聚合格式:",en:"1. Select the aggregation format supported by the AI according to your needs:",zh_TW:"1. 請依實際情況選擇 AI 支援的聚合格式:",ja:"1. 実際の状況に応じて、AI が対応している集約形式を選択してください:",ko:"1. 상황에 맞게 AI에서 지원하는 집계 형식을 선택하세요:"},json_output:{zh:"点击切换 “JSON 格式“",en:'Click to switch to "JSON Format"',zh_TW:"點擊切換「JSON 格式」",ja:"クリックして「JSON 形式」に切り替え",ko:'클릭하여 "JSON 형식"으로 전환'},xml_output:{zh:"点击切换 “XML 格式“",en:'Click to switch to "XML Format"',zh_TW:"點擊切換「XML 格式」",ja:"クリックして「XML 形式」に切り替え",ko:'클릭하여 "XML 형식"으로 전환'},textlines_output:{zh:"点击切换 “多行文本格式“",en:'Click to switch to "Multi-line Text Format"',zh_TW:"點擊切換「多行文字格式」",ja:"クリックして「複数行テキスト形式」に切り替え",ko:'클릭하여 "여러 줄 텍스트 형식"으로 전환'},system_prompt_helper_2:{zh:"2. 在未完全理解默认Prompt的情况下,请勿随意修改,否则可能无法工作。",en:"2. Do not modify the default prompt without fully understanding it, otherwise it may not work.",zh_TW:"2. 在未完全理解預設Prompt的情況下,請勿隨意修改,否則可能無法運作。",ja:"2. デフォルトのプロンプトを完全に理解せずに変更しないでください。動作しなくなる可能性があります。",ko:"2. 기본 프롬프트를 완전히 이해하지 않고 수정하지 마십시오. 작동하지 않을 수 있습니다."},if_pre_init:{zh:"是否预初始化",en:"Whether to pre-initialize",zh_TW:"是否預初始化",ja:"事前初期化するか",ko:"사전 초기화 여부"},export_old:{zh:"导出旧版",en:"Export old version",zh_TW:"匯出舊版",ja:"旧バージョンをエクスポート",ko:"이전 버전 내보내기"},favorite_words_helper:{zh:"导入词汇请使用txt文件,每一行一个单词。",en:"To import vocabulary, please use a txt file with one word per line.",zh_TW:"匯入詞彙請使用txt文件,每一行一個單字。",ja:"単語をインポートするには、1行に1単語ずつ記述したtxtファイルを使用してください。",ko:"단어를 가져오려면 한 줄에 한 단어씩 .txt 파일을 사용하세요."},btn_tip_click_away:{zh:"失焦隐藏/显示",en:"Loss of focus hide/show",zh_TW:"失焦隱藏/顯示",ja:"フォーカスを失った時に非表示/表示",ko:"포커스 잃을 시 숨기기/표시"},btn_tip_follow_selection:{zh:"跟随/固定模式",en:"Follow/Fixed Mode",zh_TW:"跟隨/固定模式",ja:"追従/固定モード",ko:"따라가기/고정 모드"},btn_tip_simple_style:{zh:"迷你/常规模式",en:"Mini/Regular Mode",zh_TW:"迷你/常規模式",ja:"ミニ/通常モード",ko:"미니/일반 모드"},api_placeholder:{zh:"占位符",en:"Placeholder",zh_TW:"佔位符",ja:"プレースホルダー",ko:"플레이스홀더"},api_placetag:{zh:"占位标签",en:"Placeholder tags",zh_TW:"佔位標",ja:"プレースホルダタグ",ko:"플레이스홀더 태그"},placetag_format:{zh:"占位符格式",en:"Placeholder Format",zh_TW:"佔位符格式",ja:"プレースホルダー形式",ko:"자리 표시자 형식"},format_compact:{zh:"简洁格式 <a1>",en:"Compact Format <a1>",zh_TW:"簡潔格式 <a1>",ja:"簡潔形式 <a1>",ko:"간결 형식 <a1>"},format_attribute:{zh:"属性格式 <a i=1>",en:"Attribute Format <a i=1>",zh_TW:"屬性格式 <a i=1>",ja:"属性形式 <a i=1>",ko:"속성 형식 <a i=1>"},detected_lang:{zh:"语言检测",en:"Language detection",zh_TW:"語言偵測",ja:"言語検出",ko:"언어 감지"},detected_result:{zh:"检测结果",en:"Detect result",zh_TW:"檢測結果",ja:"検出結果",ko:"감지 결과"},subtitle_translate:{zh:"字幕翻译",en:"Subtitle Translation",zh_TW:"字幕翻譯",ja:"字幕翻訳",ko:"자막 번역"},toggle_subtitle_translate:{zh:"启用字幕翻译",en:"Enable subtitle translation",zh_TW:"啟用字幕翻譯",ja:"字幕翻訳を有効にする",ko:"자막 번역 활성화"},is_bilingual_view:{zh:"双语显示",en:"Enable bilingual display",zh_TW:"雙語顯示",ja:"バイリンガル表示",ko:"이중 언어 표시"},is_skip_ad:{zh:"快进广告",en:"Skip AD",zh_TW:"快轉廣告",ja:"広告をスキップ",ko:"광고 건너뛰기"},download_subtitles:{zh:"下载字幕",en:"Download subtitles",zh_TW:"下载字幕",ja:"字幕をダウンロード",ko:"자막 다운로드"},background_styles:{zh:"背景样式",en:"DBackground Style",zh_TW:"背景樣式",ja:"背景スタイル",ko:"배경 스타일"},origin_styles:{zh:"原文样式",en:"Original style",zh_TW:"原文樣式",ja:"原文スタイル",ko:"원문 스타일"},translation_styles:{zh:"译文样式",en:"Translation style",zh_TW:"譯文樣式",ja:"翻訳スタイル",ko:"번역문 스타일"},ai_segmentation:{zh:"AI智能断句",en:"AI intelligent punctuation",zh_TW:"AI智慧斷句",ja:"AIによるインテリジェントな文分割",ko:"AI 지능형 문장 분리"},ai_chunk_length:{zh:"AI处理切割长度(200-20000)",en:"AI processing chunk length(200-20000)",zh_TW:"AI处理切割长度(200-20000)",ja:"AI処理のチャンク長(200-20000)",ko:"AI 처리 청크 길이(200-20000)"},subtitle_helper_1:{zh:"1、目前仅支持Youtube桌面网站。",en:"1. Currently only supports Youtube desktop website.",zh_TW:"1.目前僅支援Youtube桌面網站,且僅支援瀏覽器擴充功能。",ja:"1. 現在、Youtubeのデスクトップサイトのみサポートしています。",ko:"1. 현재 Youtube 데스크톱 웹사이트만 지원합니다."},subtitle_helper_2:{zh:"2、插件内置基础的字幕合并、断句算法,可满足大部分情况。",en:"2. The plug-in has built-in basic subtitle merging and sentence segmentation algorithms, which can meet most situations.",zh_TW:"2.插件內建基礎的字幕合併、斷句演算法,可滿足大部分情況。",ja:"2. プラグインには基本的な字幕結合と文分割アルゴリズムが組み込まれており、ほとんどの状況に対応できます。",ko:"2. 플러그인에는 기본적인 자막 병합 및 문장 분리 알고리즘이 내장되어 있어 대부분의 상황에 대응할 수 있습니다."},subtitle_helper_3:{zh:"3、亦可以启用AI智能断句,但需考虑切割长度及AI接口能力,可能处理时间会很长,甚至处理失败,导致无法看到字幕。",en:"3. You can also enable AI intelligent segmentation, but you need to consider the segmentation length and AI interface capabilities. The processing time may be very long or even fail, resulting in the inability to see subtitles.",zh_TW:"3.亦可啟用AI智能斷句,但需考慮切割長度及AI介面能力,可能處理時間會很長,甚至處理失敗,導致無法看到字幕。",ja:"3. AIインテリジェント文分割を有効にすることもできますが、分割長とAIインターフェースの能力を考慮する必要があり、処理時間が長くなったり、失敗して字幕が表示されなくなる可能性があります。",ko:"3. AI 지능형 분리를 활성화할 수도 있지만, 분리 길이와 AI 인터페이스의 능력을 고려해야 하며, 처리 시간이 매우 길거나 실패하여 자막을 볼 수 없게 될 수도 있습니다."},show_subtitle_list:{zh:"显示字幕列表",en:"Show Subtitle List",zh_TW:"顯示字幕列表",ja:"字幕リストを表示",ko:"자막 목록 표시"},default_styles_example:{zh:"默认样式参考:",en:"Default styles reference:",zh_TW:"認樣式參考:",ja:"デフォルトスタイルの例:",ko:"기본 스타일 예시:"},subtitle_load_succeed:{zh:"双语字幕加载成功!",en:"Bilingual subtitles loaded successfully!",zh_TW:"双语字幕加载成功!",ja:"バイリンガル字幕の読み込みに成功しました!",ko:"이중 언어 자막 로딩 성공!"},subtitle_load_failed:{zh:"双语字幕加载失败!",en:"Failed to load bilingual subtitles!",zh_TW:"双语字幕加载失败!",ja:"バイリンガル字幕の読み込みに失敗しました!",ko:"이중 언어 자막 로딩 실패!"},try_get_subtitle_data:{zh:"尝试获取字幕数据,请稍候...",en:"Trying to get subtitle data, please wait...",zh_TW:"尝试获取字幕数据,请稍候...",ja:"字幕データを取得しています。お待ちください...",ko:"자막 데이터를 가져오는 중입니다. 잠시 기다려주세요..."},subtitle_data_processing:{zh:"字幕数据处理中...",en:"Subtitle data processing...",zh_TW:"字幕数据处理中...",ja:"字幕データを処理中...",ko:"자막 데이터 처리 중..."},starting_to_process_subtitle:{zh:"开始处理字幕数据...",en:"Starting to process subtitle data...",zh_TW:"开始处理字幕数据...",ja:"字幕データの処理を開始します...",ko:"자막 데이터 처리를 시작합니다..."},subtitle_data_is_ready:{zh:"字幕数据已准备就绪,请点击KT按钮加载",en:"The subtitle data is ready, please click the KT button to load it",zh_TW:"字幕資料已準備就緒,請點擊KT按鈕加載",ja:"字幕データの準備ができました。KTボタンをクリックして読み込んでください",ko:"자막 데이터가 준비되었습니다. KT 버튼을 클릭하여 로드하세요"},starting_reprocess_events:{zh:"重新处理字幕数据...",en:"Reprocess the subtitle data...",zh_TW:"重新处理字幕数据...",ja:"字幕データを再処理しています...",ko:"자막 데이터를 다시 처리 중..."},waitting_for_subtitle:{zh:"请等待字幕数据",en:"Please wait for the subtitle data.",zh_TW:"请等待字幕数据",ja:"字幕データを待機中",ko:"자막 데이터를 기다려주세요"},ai_processing_pls_wait:{zh:"AI处理中,请稍等...",en:"AI processing in progress, please wait...",zh_TW:"AI处理中,请稍等...",ja:"AI処理中です。お待ちください...",ko:"AI 처리 중입니다. 잠시 기다려주세요..."},processing_subtitles:{zh:"字幕处理中...",en:"Subtitle processing...",zh_TW:"字幕处理中...",ja:"字幕処理中...",ko:"자막 처리 중..."},waiting_subtitles:{zh:"等待字幕中",en:"Waiting for subtitles",zh_TW:"等待字幕中",ja:"字幕待機中",ko:"자막 대기 중"},subtitle_is_not_yet_ready:{zh:"字幕数据尚未准备好",en:"Subtitle is not yet ready.",zh_TW:"字幕数据尚未准备好",ja:"字幕データの準備がまだできていません。",ko:"자막 데이터가 아직 준비되지 않았습니다."},log_level:{zh:"日志级别",en:"Log Level",zh_TW:"日誌等級",ja:"ログレベル",ko:"로그 레벨"},goto_custom_api_example:{zh:"点击查看【自定义接口示例】",en:"Click to view [Custom Interface Example]",zh_TW:"點選查看【自訂介面範例】",ja:"【カスタムインターフェースの例】を見る",ko:"[사용자 지정 인터페이스 예시] 보기"},split_paragraph:{zh:"切分长段落",en:"Split long paragraph",zh_TW:"切分長段落",ja:"長い段落を分割",ko:"긴 단락 나누기"},split_length:{zh:"切分长度 (0-10000)",en:"Segmentation length(0-10000)",zh_TW:"切分長度(0-10000)",ja:"分割長(0-10000)",ko:"분할 길이(0-10000)"},highlight_words:{zh:"高亮收藏词汇",en:"Highlight favorite words",zh_TW:"高亮收藏詞彙",ja:"お気に入り単語をハイライト",ko:"즐겨찾는 단어 하이라이트"},split_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},split_textlength:{zh:"按照长度切分",en:"Split by length",zh_TW:"依長度切分",ja:"長さで分割",ko:"길이로 나누기"},split_punctuation:{zh:"按照句子切分",en:"Split by sentence",zh_TW:"按照句子切分",ja:"文で分割",ko:"문장으로 나누기"},highlight_disable:{zh:"禁用",en:"Disable",zh_TW:"停用",ja:"無効",ko:"비활성화"},highlight_beforetrans:{zh:"翻译前高亮",en:"Highlight before translation",zh_TW:"翻譯前高亮",ja:"翻訳前にハイライト",ko:"번역 전 하이라이트"},highlight_aftertrans:{zh:"翻译后高亮",en:"Highlight after translation",zh_TW:"翻譯後高亮",ja:"翻訳後にハイライト",ko:"번역 후 하이라이트"},pagescroll_root_margin:{zh:"滚动加载提前触发 (0-10000px)",en:"Early triggering of scroll loading (0-10000px)",zh_TW:"滾動載入提前觸發 (0-10000px)",ja:"スクロール読み込みの事前トリガー (0-10000px)",ko:"스크롤 로딩 미리 트리거 (0-10000px)"},styles_setting:{zh:"样式设置",en:"Style Setting",zh_TW:"樣式設定",ja:"スタイル設定",ko:"스타일 설정"},style_name:{zh:"样式名称",en:"Style Name",zh_TW:"樣式名稱",ja:"スタイル名",ko:"스타일 이름"},style_code:{zh:"样式代码",en:"Style Code",zh_TW:"樣式程式碼",ja:"スタイルコード",ko:"스타일 코드"},pre_trans_seconds:{zh:"提前翻译时长 (10-36000s)",en:"Pre translation seconds (10-36000s)",zh_TW:"提前翻译时长 (10-36000s)",ja:"事前翻訳時間 (10-36000s)",ko:"미리 번역 시간 (10-36000s)"},throttle_trans_interval:{zh:"节流翻译间隔 (1-3600s)",en:"Throttling translation interval (1-3600s)",zh_TW:"节流翻译间隔 (1-3600s)",ja:"翻訳間隔のスロットリング (1-3600s)",ko:"번역 간격 조절 (1-3600s)"},show_origin_subtitle:{zh:"显示原字幕",en:"Show original subtitles",zh_TW:"显示原字幕",ja:"原字幕を表示",ko:"원본 자막 표시"},subtitle_same_lang:{zh:"原语言与目标语言相同,字幕不予处理",en:"The source language is the same as the target language, subtitles will not be processed",zh_TW:"原語言與目標語言相同時,字幕不予處理",ja:"原言語と目標言語が同じ場合、字幕は処理されません",ko:"원본 언어와 대상 언어가 동일한 경우, 자막은 처리되지 않습니다"},plain_text_translate:{zh:"纯文本翻译",en:"Plain text translation",zh_TW:"純文字翻譯",ja:"プレーンテキスト翻訳",ko:"순수 텍스트 번역"},is_enable_enhance:{zh:"启用增强功能",en:"Enable Enhancement Features",zh_TW:"啟用增強功能",ja:"強化機能を有効にする",ko:"향상 기능 활성화"},open_separate_window:{zh:"独立窗口打开",en:"Open in Separate Window",zh_TW:"在獨立視窗中開啟",ja:"別ウィンドウで開く",ko:"별도 창에서 열기"},comment_support:{zh:"好评支持",en:"Leave a Positive Review",zh_TW:"好評支持",ja:"高評価で応援",ko:"좋은 평가로 응원"},appreciate_support:{zh:"赞赏支持",en:"Support with a Tip",zh_TW:"贊賞支持",ja:"投げ銭で応援",ko:"후원하기"},toggle_transbox:{zh:"切换翻译窗",en:"Toggle Translation Box",zh_TW:"切換翻譯視窗",ja:"翻訳ウィンドウを切り替え",ko:"번역 창 전환"},copy:{zh:"复制",en:"Copy",zh_TW:"複製",ja:"コピー",ko:"복사"},paste:{zh:"黏贴",en:"Paste",zh_TW:"貼上",ja:"貼り付け",ko:"붙여넣기"},submit:{zh:"提交",en:"Submit",zh_TW:"提交",ja:"送信",ko:"제출"},collect:{zh:"收藏",en:"Save",zh_TW:"收藏",ja:"保存",ko:"저장"},show_translation_dot:{zh:"显示翻译圆点",en:"Show Translation Dot",zh_TW:"顯示翻譯圓點",ja:"翻訳ドットを表示",ko:"번역 점 표시"},show_dot_mobile:{zh:"仅移动端",en:"Mobile Only",zh_TW:"僅移動端",ja:"モバイルのみ",ko:"모바일 전용"},show_dot_always:{zh:"总是显示",en:"Always",zh_TW:"總是顯示",ja:"常に表示",ko:"항상 표시"},show_dot_disable:{zh:"禁用",en:"Disable",zh_TW:"禁用",ja:"無効",ko:"사용 안 함"}},Lt=e=>t=>{var n;return(null===(n=Pt[t])||void 0===n?void 0:n[e])||""},Nt="kiss-rules_v".concat(o[0],".json"),jt="kiss-words.json",Rt=("kiss-rules-share_v".concat(o[0],".json"),"kiss-setting_v".concat(o[0],".json")),Ot="".concat(t,"_msauth"),zt=("".concat(t,"_bdauth"),"".concat(t,"_setting"),"".concat(t,"_rules"),"".concat(t,"_setting_v").concat(o[0])),Dt="".concat(t,"_rules_v").concat(o[0]),Mt="".concat(t,"_words"),Ft="".concat(t,"_sync"),Bt="".concat(t,"_fab"),Wt="".concat(t,"_tranbox"),Ut=("".concat(t,"_separate_window"),"".concat(t,"_rulescache_")),Vt="".concat(t,"_cache"),Ht=604800,Gt="https://".concat(n,"/translate"),qt="https://".concat(n,"/subtitle"),Kt="https://".concat(n,"/detectlang"),$t="https://".concat(n,"/bingdict"),Xt="kiss_fetch",Yt="toggle_translate",Jt="toggle_styles",Qt="open_tranbox",Zt="trans_putrule",en="toggle_transbox",tn="toggle_popup",nn="toggle_mousehover",rn="toggle_input_translation",on="update_icon",an="kiss_translator_inner",sn="kiss_translator",ln="firefox",cn="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",un="userscript",dn=["chrome","edge",ln,"thunderbird"].includes(un);const hn=function(){try{return i(9286)}catch(e){}}(),pn=()=>{const e=globalThis.__KISS_CONTEXT__;return e||"undefined"},fn=()=>"background"===pn(),gn="LanguageDetector"in globalThis&&"Translator"in globalThis;function mn(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)return"";let n=e.replace(/^```[a-z]*\s*\n?/i,"");return t||(n=n.replace(/\n?```$/i,"")),n}const vn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;const r=parseInt(e);return Number.isNaN(r)||r<t?t:r>n?n:r},yn=(e,t)=>0===e.length||e.includes(t)?t:e[0],bn=e=>new Promise(t=>{const n=setTimeout(()=>{clearTimeout(n),t()},e)}),wn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;const r=function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];n&&clearTimeout(n),n=setTimeout(()=>{e(...i),n=null},t)};return r.cancel=()=>{clearTimeout(n),n=null},r},xn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(;n<e.length;){if(e[n]!==t)return!1;n++}return!0},An=(e,t)=>{if(0===e.length||0===t.length)return!1;t="*"+t+"*";let[n,r]=[0,0],[i,o]=[-1,-1];for(;n<e.length&&o<t.length;)if("*"===t[r])r++,[i,o]=[n,r];else if(e[n]===t[r])n++,r++;else{if(!(i+1<e.length))return!1;i++,[n,r]=[i,o]}return t.length===r||xn(t,"*",r)},Sn=e=>Object.prototype.toString.call(e).match(/\[object (.*?)\]/)[1].toLowerCase(),kn=async(e,t)=>{const n=(new TextEncoder).encode(e+t),r=await crypto.subtle.digest({name:"SHA-256"},n);return[...new Uint8Array(r)].map(e=>e.toString(16).padStart(2,"0")).join("")},_n=()=>"kiss-".concat(btoa(Math.random()).slice(3,11)),Cn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(!e)return"";let r=e.length;for(;r>e.length-n&&e[r-1]===t;)r--;return e.slice(0,r)},En=e=>/^[a-zA-Z-]+$/.test(e),Tn=e=>{if(!e||"string"!==Sn(e))return{};try{return"{"!==e.trim()[0]&&(e="{".concat(e,"}")),JSON.parse(e)}catch(e){}return{}},In=e=>{const t=e.match(/({[^]*}|\[[^]*\])/);return t?t[0]:null},Pn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;if("string"!=typeof e)return"";if(e.length<=t)return e;const n=e.slice(0,t);return n.slice(0,n.lastIndexOf(" "))+" …"},Ln=function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=Math.random()*(t-e)+e;return n?Math.floor(r):r};function Nn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-file.txt";const n=function(e){const t="application/octet-stream";return e&&-1!==e.indexOf(".")&&{txt:"text/plain;charset=utf-8",html:"text/html;charset=utf-8",css:"text/css;charset=utf-8",js:"text/javascript;charset=utf-8",json:"application/json;charset=utf-8",xml:"application/xml;charset=utf-8",md:"text/markdown;charset=utf-8",vtt:"text/vtt;charset=utf-8",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",svg:"image/svg+xml",webp:"image/webp",ico:"image/x-icon",mp3:"audio/mpeg",mp4:"video/mp4",webm:"video/webm",wav:"audio/wav",pdf:"application/pdf",zip:"application/zip",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}[e.split(".").pop().toLowerCase()]||t}(t),r=new Blob([e],{type:n}),i=URL.createObjectURL(r),o=document.createElement("a");o.style.display="none",o.href=i,o.download=t||"kiss-file.txt",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(i)}async function jn(e,t){dn?await hn.storage.local.set({[e]:t}):await(window.KISS_GM||GM).setValue(e,t)}async function Rn(e){if(dn){return(await hn.storage.local.get([e]))[e]}return await(window.KISS_GM||GM).getValue(e)}async function On(e){dn?await hn.storage.local.remove([e]):await(window.KISS_GM||GM).deleteValue(e)}async function zn(e,t){await jn(e,JSON.stringify(t))}async function Dn(e,t){await Rn(e)||await zn(e,t)}async function Mn(e){const t=await Rn(e);if(null==t)return null;try{return JSON.parse(t)}catch(t){rt("parse json in storage err: ",e)}return null}async function Fn(e,t){var n;const r=null!==(n=await Mn(e))&&void 0!==n?n:{};await zn(e,h(h({},r),t))}const Bn={get:Rn,set:jn,del:On,setObj:zn,trySetObj:Dn,getObj:Mn,putObj:Fn},Wn=async()=>h(h({},At),await Mn(zt)||{}),Un=async()=>await Mn(Dt)||et,Vn=e=>zn(Dt,e),Hn=async()=>await Mn(Mt)||{},Gn=e=>Mn(Ut+e),qn=async()=>await Mn(Bt)||{},Kn=e=>Fn(Bt,e),$n=wn(e=>Fn(Wt,e),300),Xn=async()=>await Mn(Ft)||ut,Yn=e=>Fn(Ft,e),Jn=wn(async e=>{const{syncMeta:t={}}=await Xn();t[e]=h(h({},t[e]||{}),{},{updateAt:Date.now()}),await Yn({syncMeta:t})},300),Qn=window.self!==window.top;var Zn=i(8915);function er(e,t){if(null==e)return{};var n,r,i=(0,Zn.A)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tr(e,t){this.v=e,this.k=t}function nr(e){return function(){return new rr(e.apply(this,arguments))}}function rr(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof tr;Promise.resolve(s?a.v:a).then(function(n){if(s){var l="return"===t?"return":"next";if(!a.k||n.done)return r(l,n);n=e[l](n).value}i(o.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function ir(e){return new tr(e,0)}function or(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new tr(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function ar(e){var t,n,r,i=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);i--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new sr(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function sr(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return sr=function(e){this.s=e,this.n=e.next},sr.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new sr(e)}rr.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},rr.prototype.next=function(e){return this._invoke("next",e)},rr.prototype.throw=function(e){return this._invoke("throw",e)},rr.prototype.return=function(e){return this._invoke("return",e)};const lr=async()=>{const[e]=await hn.tabs.query({active:!0,lastFocusedWindow:!0});return e},cr=(e,t)=>null==hn?void 0:hn.runtime.sendMessage({action:e,args:t}),ur=async(e,t)=>{const n=await(async()=>(await lr()).id)();return hn.tabs.sendMessage(n,{action:e,args:t})};function dr(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var hr=0;function pr(e){return"__private_"+hr+++"_"+e}var fr=pr("pool"),gr=pr("maxRetry"),mr=pr("retryInterval"),vr=pr("limit"),yr=pr("interval"),br=pr("currentConcurrent"),wr=pr("lastExecutionTime"),xr=pr("schedulerTimer"),Ar=pr("scheduleNext"),Sr=pr("execute");class kr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;Object.defineProperty(this,Sr,{value:Cr}),Object.defineProperty(this,Ar,{value:_r}),Object.defineProperty(this,fr,{writable:!0,value:[]}),Object.defineProperty(this,gr,{writable:!0,value:2}),Object.defineProperty(this,mr,{writable:!0,value:1e3}),Object.defineProperty(this,vr,{writable:!0,value:void 0}),Object.defineProperty(this,yr,{writable:!0,value:void 0}),Object.defineProperty(this,br,{writable:!0,value:0}),Object.defineProperty(this,wr,{writable:!0,value:0}),Object.defineProperty(this,xr,{writable:!0,value:null}),dr(this,yr)[yr]=e,dr(this,vr)[vr]=t,dr(this,mr)[mr]=n}push(e,t){return new Promise((n,r)=>{dr(this,fr)[fr].push({fn:e,args:t,resolve:n,reject:r,retry:0}),dr(this,Ar)[Ar]()})}update(e,t){e>=0&&(dr(this,yr)[yr]=e),t>=1&&(dr(this,vr)[vr]=t),dr(this,Ar)[Ar]()}clear(){for(const e of dr(this,fr)[fr])e.reject("the task pool was cleared");dr(this,fr)[fr].length=0,dr(this,xr)[xr]&&(clearTimeout(dr(this,xr)[xr]),dr(this,xr)[xr]=null)}}function _r(){if(dr(this,xr)[xr])return;if(dr(this,br)[br]>=dr(this,vr)[vr]||0===dr(this,fr)[fr].length)return;const e=Date.now()-dr(this,wr)[wr],t=Math.max(0,dr(this,yr)[yr]-e);dr(this,xr)[xr]=setTimeout(()=>{if(dr(this,xr)[xr]=null,dr(this,br)[br]<dr(this,vr)[vr]&&dr(this,fr)[fr].length>0){const e=dr(this,fr)[fr].shift();e&&(dr(this,wr)[wr]=Date.now(),dr(this,Sr)[Sr](e))}dr(this,fr)[fr].length>0&&dr(this,Ar)[Ar]()},t)}async function Cr(e){dr(this,br)[br]++;const{fn:t,args:n,resolve:r,reject:i,retry:o}=e;try{r(await t(n))}catch(t){rt("task pool",t),o<dr(this,gr)[gr]?setTimeout(()=>{dr(this,fr)[fr].unshift(h(h({},e),{},{retry:o+1})),dr(this,Ar)[Ar]()},dr(this,mr)[mr]):i(t)}finally{dr(this,br)[br]--,dr(this,Ar)[Ar]()}}let Er;const Tr=(e,t)=>(Er?e&&t&&Ir(e,t):Er=new kr(null!=e?e:100,null!=t?t:10),Er),Ir=(e,t)=>{var n;null===(n=Er)||void 0===n||n.update(e,t)},Pr=()=>{var e;null===(e=Er)||void 0===e||e.clear()},Lr=async(e,t)=>{let n=new Request(e,t);if("GET"!==n.method){const e=await n.text(),t=new URL(n.url);t.pathname+=e,n=new Request(t.toString(),{method:"GET"})}return n},Nr=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new Error("Response object does not exist");if(!e.ok){const t={url:e.url,status:e.status,statusText:e.statusText};try{const n=await e.clone().text();try{t.response=JSON.parse(n)}catch(e){t.response=n}}catch(e){t.response="Unable to read error body"}throw new Error(JSON.stringify(t))}const n=e.headers.get("Content-Type")||"";if("blob"===t)return e.blob();if("text"===t)return e.text();if("json"===t)return e.json();if("audio"===t||n.includes("audio")||n.includes("image")||n.includes("video")){return(e=>new Promise(t=>{const n=new FileReader;n.onloadend=()=>t(n.result),n.readAsDataURL(e)}))(await e.blob())}const r=await e.text();if(!r)return null;try{return JSON.parse(r)}catch(e){return r}},jr=(e,t)=>dn&&!fn()?cr("get_httpcache",{input:e,init:t}):(async e=>{let{input:t,init:n,expect:r}=e;try{const e=await Lr(t,n),i=await caches.open(Vt),o=await i.match(e);if(o)return await Nr(o,r)}catch(e){rt("get cache",e)}return null})({input:e,init:t}),Rr=(e,t,n)=>dn&&!fn()?cr("put_httpcache",{input:e,init:t,data:n}):(async e=>{let{input:t,init:n,data:r,maxAge:i=Ht}=e;try{const e=await Lr(t,n),o=await caches.open(Vt),a=new Response(JSON.stringify(r),{status:200,headers:{"Content-Type":"application/json","Cache-Control":"max-age=".concat(i)}});await o.put(e,a)}catch(e){rt("put cache",e)}})({input:e,init:t,data:n});var Or;!function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"}(Or||(Or={}));const zr={[Or.QUOTATION_MARK]:Or.QUOTATION_MARK,[Or.REVERSE_SOLIDUS]:Or.REVERSE_SOLIDUS,[Or.SOLIDUS]:Or.SOLIDUS,[Or.LATIN_SMALL_LETTER_B]:Or.BACKSPACE,[Or.LATIN_SMALL_LETTER_F]:Or.FORM_FEED,[Or.LATIN_SMALL_LETTER_N]:Or.NEWLINE,[Or.LATIN_SMALL_LETTER_R]:Or.CARRIAGE_RETURN,[Or.LATIN_SMALL_LETTER_T]:Or.TAB};class Dr{constructor(){this.decoder=new TextDecoder("utf-8"),this.strings=[],this.byteLength=0}appendChar(e){this.strings.push(String.fromCharCode(e)),this.byteLength+=1}appendBuf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;this.strings.push(this.decoder.decode(e.subarray(t,n))),this.byteLength+=n-t}reset(){this.strings=[],this.byteLength=0}toString(){return this.strings.join("")}}class Mr{constructor(e){this.decoder=new TextDecoder("utf-8"),this.bufferOffset=0,this.string="",this.byteLength=0,this.buffer=new Uint8Array(e)}appendChar(e){this.bufferOffset>=this.buffer.length&&this.flushStringBuffer(),this.buffer[this.bufferOffset++]=e,this.byteLength+=1}appendBuf(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length;const r=n-t;this.bufferOffset+r>this.buffer.length&&this.flushStringBuffer(),this.buffer.set(e.subarray(t,n),this.bufferOffset),this.bufferOffset+=r,this.byteLength+=r}flushStringBuffer(){this.string+=this.decoder.decode(this.buffer.subarray(0,this.bufferOffset)),this.bufferOffset=0}reset(){this.string="",this.bufferOffset=0,this.byteLength=0}toString(){return this.flushStringBuffer(),this.string}}var Fr;!function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"}(Fr||(Fr={}));const Br=Fr;var Wr;function Ur(e){return["START","ENDED","ERROR","TRUE1","TRUE2","TRUE3","FALSE1","FALSE2","FALSE3","FALSE4","NULL1","NULL2","NULL3","STRING_DEFAULT","STRING_AFTER_BACKSLASH","STRING_UNICODE_DIGIT_1","STRING_UNICODE_DIGIT_2","STRING_UNICODE_DIGIT_3","STRING_UNICODE_DIGIT_4","STRING_INCOMPLETE_CHAR","NUMBER_AFTER_INITIAL_MINUS","NUMBER_AFTER_INITIAL_ZERO","NUMBER_AFTER_INITIAL_NON_ZERO","NUMBER_AFTER_FULL_STOP","NUMBER_AFTER_DECIMAL","NUMBER_AFTER_E","NUMBER_AFTER_E_AND_SIGN","NUMBER_AFTER_E_AND_DIGIT","SEPARATOR","BOM_OR_START","BOM"][e]}!function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"}(Wr||(Wr={}));const Vr={stringBufferSize:0,numberBufferSize:0,separator:void 0,emitPartialTokens:!1};class Hr extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Hr.prototype)}}class Gr{constructor(e){this.state=Wr.BOM_OR_START,this.bomIndex=0,this.separatorIndex=0,this.escapedCharsByteLength=0,this.bytes_remaining=0,this.bytes_in_sequence=0,this.char_split_buffer=new Uint8Array(4),this.encoder=new TextEncoder,this.offset=-1,e=Object.assign(Object.assign({},Vr),e),this.emitPartialTokens=!0===e.emitPartialTokens,this.bufferedString=e.stringBufferSize&&e.stringBufferSize>4?new Mr(e.stringBufferSize):new Dr,this.bufferedNumber=e.numberBufferSize&&e.numberBufferSize>0?new Mr(e.numberBufferSize):new Dr,this.separator=e.separator,this.separatorBytes=e.separator?this.encoder.encode(e.separator):void 0}get isEnded(){return this.state===Wr.ENDED}write(e){try{let t;if(e instanceof Uint8Array)t=e;else if("string"==typeof e)t=this.encoder.encode(e);else if(Array.isArray(e))t=Uint8Array.from(e);else{if(!ArrayBuffer.isView(e))throw new TypeError("Unexpected type. The `write` function only accepts Arrays, TypedArrays and Strings.");t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}for(let n=0;n<t.length;n+=1){const r=t[n];switch(this.state){case Wr.BOM_OR_START:if(e instanceof Uint8Array&&239===r){this.bom=[239,187,191],this.bomIndex+=1,this.state=Wr.BOM;continue}if(e instanceof Uint16Array){if(254===r){this.bom=[254,255],this.bomIndex+=1,this.state=Wr.BOM;continue}if(255===r){this.bom=[255,254],this.bomIndex+=1,this.state=Wr.BOM;continue}}if(e instanceof Uint32Array){if(0===r){this.bom=[0,0,254,255],this.bomIndex+=1,this.state=Wr.BOM;continue}if(255===r){this.bom=[255,254,0,0],this.bomIndex+=1,this.state=Wr.BOM;continue}}case Wr.START:if(this.offset+=1,this.separatorBytes&&r===this.separatorBytes[0]){if(1===this.separatorBytes.length){this.state=Wr.START,this.onToken({token:Br.SEPARATOR,value:this.separator,offset:this.offset+this.separatorBytes.length-1});continue}this.state=Wr.SEPARATOR;continue}if(r===Or.SPACE||r===Or.NEWLINE||r===Or.CARRIAGE_RETURN||r===Or.TAB)continue;if(r===Or.LEFT_CURLY_BRACKET){this.onToken({token:Br.LEFT_BRACE,value:"{",offset:this.offset});continue}if(r===Or.RIGHT_CURLY_BRACKET){this.onToken({token:Br.RIGHT_BRACE,value:"}",offset:this.offset});continue}if(r===Or.LEFT_SQUARE_BRACKET){this.onToken({token:Br.LEFT_BRACKET,value:"[",offset:this.offset});continue}if(r===Or.RIGHT_SQUARE_BRACKET){this.onToken({token:Br.RIGHT_BRACKET,value:"]",offset:this.offset});continue}if(r===Or.COLON){this.onToken({token:Br.COLON,value:":",offset:this.offset});continue}if(r===Or.COMMA){this.onToken({token:Br.COMMA,value:",",offset:this.offset});continue}if(r===Or.LATIN_SMALL_LETTER_T){this.state=Wr.TRUE1;continue}if(r===Or.LATIN_SMALL_LETTER_F){this.state=Wr.FALSE1;continue}if(r===Or.LATIN_SMALL_LETTER_N){this.state=Wr.NULL1;continue}if(r===Or.QUOTATION_MARK){this.bufferedString.reset(),this.escapedCharsByteLength=0,this.state=Wr.STRING_DEFAULT;continue}if(r>=Or.DIGIT_ONE&&r<=Or.DIGIT_NINE){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_INITIAL_NON_ZERO;continue}if(r===Or.DIGIT_ZERO){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_INITIAL_ZERO;continue}if(r===Or.HYPHEN_MINUS){this.bufferedNumber.reset(),this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_INITIAL_MINUS;continue}break;case Wr.STRING_DEFAULT:if(r===Or.QUOTATION_MARK){const e=this.bufferedString.toString();this.state=Wr.START,this.onToken({token:Br.STRING,value:e,offset:this.offset}),this.offset+=this.escapedCharsByteLength+this.bufferedString.byteLength+1;continue}if(r===Or.REVERSE_SOLIDUS){this.state=Wr.STRING_AFTER_BACKSLASH;continue}if(r>=128){if(this.bytes_in_sequence=r>=194&&r<=223?2:r<=239?3:4,this.bytes_in_sequence<=t.length-n){this.bufferedString.appendBuf(t,n,n+this.bytes_in_sequence),n+=this.bytes_in_sequence-1;continue}this.bytes_remaining=n+this.bytes_in_sequence-t.length,this.char_split_buffer.set(t.subarray(n)),n=t.length-1,this.state=Wr.STRING_INCOMPLETE_CHAR;continue}if(r>=Or.SPACE){this.bufferedString.appendChar(r);continue}break;case Wr.STRING_INCOMPLETE_CHAR:this.char_split_buffer.set(t.subarray(n,n+this.bytes_remaining),this.bytes_in_sequence-this.bytes_remaining),this.bufferedString.appendBuf(this.char_split_buffer,0,this.bytes_in_sequence),n=this.bytes_remaining-1,this.state=Wr.STRING_DEFAULT;continue;case Wr.STRING_AFTER_BACKSLASH:const i=zr[r];if(i){this.bufferedString.appendChar(i),this.escapedCharsByteLength+=1,this.state=Wr.STRING_DEFAULT;continue}if(r===Or.LATIN_SMALL_LETTER_U){this.unicode="",this.state=Wr.STRING_UNICODE_DIGIT_1;continue}break;case Wr.STRING_UNICODE_DIGIT_1:case Wr.STRING_UNICODE_DIGIT_2:case Wr.STRING_UNICODE_DIGIT_3:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE||r>=Or.LATIN_CAPITAL_LETTER_A&&r<=Or.LATIN_CAPITAL_LETTER_F||r>=Or.LATIN_SMALL_LETTER_A&&r<=Or.LATIN_SMALL_LETTER_F){this.unicode+=String.fromCharCode(r),this.state+=1;continue}break;case Wr.STRING_UNICODE_DIGIT_4:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE||r>=Or.LATIN_CAPITAL_LETTER_A&&r<=Or.LATIN_CAPITAL_LETTER_F||r>=Or.LATIN_SMALL_LETTER_A&&r<=Or.LATIN_SMALL_LETTER_F){const e=parseInt(this.unicode+String.fromCharCode(r),16);let t;if(void 0===this.highSurrogate){if(e>=55296&&e<=56319){this.highSurrogate=e,this.state=Wr.STRING_DEFAULT;continue}t=String.fromCharCode(e)}else t=e>=56320&&e<=57343?String.fromCharCode(this.highSurrogate,e):String.fromCharCode(this.highSurrogate),this.highSurrogate=void 0;const n=this.encoder.encode(t);this.bufferedString.appendBuf(n),this.escapedCharsByteLength+=6-n.byteLength,this.state=Wr.STRING_DEFAULT;continue}break;case Wr.NUMBER_AFTER_INITIAL_MINUS:if(r===Or.DIGIT_ZERO){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_INITIAL_ZERO;continue}if(r>=Or.DIGIT_ONE&&r<=Or.DIGIT_NINE){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_INITIAL_NON_ZERO;continue}break;case Wr.NUMBER_AFTER_INITIAL_ZERO:if(r===Or.FULL_STOP){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_FULL_STOP;continue}if(r===Or.LATIN_SMALL_LETTER_E||r===Or.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_E;continue}n-=1,this.state=Wr.START,this.emitNumber();continue;case Wr.NUMBER_AFTER_INITIAL_NON_ZERO:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE){this.bufferedNumber.appendChar(r);continue}if(r===Or.FULL_STOP){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_FULL_STOP;continue}if(r===Or.LATIN_SMALL_LETTER_E||r===Or.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_E;continue}n-=1,this.state=Wr.START,this.emitNumber();continue;case Wr.NUMBER_AFTER_FULL_STOP:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_DECIMAL;continue}break;case Wr.NUMBER_AFTER_DECIMAL:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE){this.bufferedNumber.appendChar(r);continue}if(r===Or.LATIN_SMALL_LETTER_E||r===Or.LATIN_CAPITAL_LETTER_E){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_E;continue}n-=1,this.state=Wr.START,this.emitNumber();continue;case Wr.NUMBER_AFTER_E:if(r===Or.PLUS_SIGN||r===Or.HYPHEN_MINUS){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_E_AND_SIGN;continue}case Wr.NUMBER_AFTER_E_AND_SIGN:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE){this.bufferedNumber.appendChar(r),this.state=Wr.NUMBER_AFTER_E_AND_DIGIT;continue}break;case Wr.NUMBER_AFTER_E_AND_DIGIT:if(r>=Or.DIGIT_ZERO&&r<=Or.DIGIT_NINE){this.bufferedNumber.appendChar(r);continue}n-=1,this.state=Wr.START,this.emitNumber();continue;case Wr.TRUE1:if(r===Or.LATIN_SMALL_LETTER_R){this.state=Wr.TRUE2;continue}break;case Wr.TRUE2:if(r===Or.LATIN_SMALL_LETTER_U){this.state=Wr.TRUE3;continue}break;case Wr.TRUE3:if(r===Or.LATIN_SMALL_LETTER_E){this.state=Wr.START,this.onToken({token:Br.TRUE,value:!0,offset:this.offset}),this.offset+=3;continue}break;case Wr.FALSE1:if(r===Or.LATIN_SMALL_LETTER_A){this.state=Wr.FALSE2;continue}break;case Wr.FALSE2:if(r===Or.LATIN_SMALL_LETTER_L){this.state=Wr.FALSE3;continue}break;case Wr.FALSE3:if(r===Or.LATIN_SMALL_LETTER_S){this.state=Wr.FALSE4;continue}break;case Wr.FALSE4:if(r===Or.LATIN_SMALL_LETTER_E){this.state=Wr.START,this.onToken({token:Br.FALSE,value:!1,offset:this.offset}),this.offset+=4;continue}break;case Wr.NULL1:if(r===Or.LATIN_SMALL_LETTER_U){this.state=Wr.NULL2;continue}break;case Wr.NULL2:if(r===Or.LATIN_SMALL_LETTER_L){this.state=Wr.NULL3;continue}break;case Wr.NULL3:if(r===Or.LATIN_SMALL_LETTER_L){this.state=Wr.START,this.onToken({token:Br.NULL,value:null,offset:this.offset}),this.offset+=3;continue}break;case Wr.SEPARATOR:if(this.separatorIndex+=1,!this.separatorBytes||r!==this.separatorBytes[this.separatorIndex])break;this.separatorIndex===this.separatorBytes.length-1&&(this.state=Wr.START,this.onToken({token:Br.SEPARATOR,value:this.separator,offset:this.offset+this.separatorIndex}),this.separatorIndex=0);continue;case Wr.BOM:if(r===this.bom[this.bomIndex]){if(this.bomIndex===this.bom.length-1){this.state=Wr.START,this.bom=void 0,this.bomIndex=0;continue}this.bomIndex+=1;continue}break;case Wr.ENDED:if(r===Or.SPACE||r===Or.NEWLINE||r===Or.CARRIAGE_RETURN||r===Or.TAB)continue}throw new Hr('Unexpected "'.concat(String.fromCharCode(r),'" at position "').concat(n,'" in state ').concat(Ur(this.state)))}if(this.emitPartialTokens)switch(this.state){case Wr.TRUE1:case Wr.TRUE2:case Wr.TRUE3:this.onToken({token:Br.TRUE,value:!0,offset:this.offset,partial:!0});break;case Wr.FALSE1:case Wr.FALSE2:case Wr.FALSE3:case Wr.FALSE4:this.onToken({token:Br.FALSE,value:!1,offset:this.offset,partial:!0});break;case Wr.NULL1:case Wr.NULL2:case Wr.NULL3:this.onToken({token:Br.NULL,value:null,offset:this.offset,partial:!0});break;case Wr.STRING_DEFAULT:{const e=this.bufferedString.toString();this.onToken({token:Br.STRING,value:e,offset:this.offset,partial:!0});break}case Wr.NUMBER_AFTER_INITIAL_ZERO:case Wr.NUMBER_AFTER_INITIAL_NON_ZERO:case Wr.NUMBER_AFTER_DECIMAL:case Wr.NUMBER_AFTER_E_AND_DIGIT:try{this.onToken({token:Br.NUMBER,value:this.parseNumber(this.bufferedNumber.toString()),offset:this.offset,partial:!0})}catch(e){}}}catch(e){this.error(e)}}emitNumber(){this.onToken({token:Br.NUMBER,value:this.parseNumber(this.bufferedNumber.toString()),offset:this.offset}),this.offset+=this.bufferedNumber.byteLength-1}parseNumber(e){return Number(e)}error(e){this.state!==Wr.ENDED&&(this.state=Wr.ERROR),this.onError(e)}end(){switch(this.state){case Wr.NUMBER_AFTER_INITIAL_ZERO:case Wr.NUMBER_AFTER_INITIAL_NON_ZERO:case Wr.NUMBER_AFTER_DECIMAL:case Wr.NUMBER_AFTER_E_AND_DIGIT:this.state=Wr.ENDED,this.emitNumber(),this.onEnd();break;case Wr.BOM_OR_START:case Wr.START:case Wr.ERROR:case Wr.SEPARATOR:this.state=Wr.ENDED,this.onEnd();break;default:this.error(new Hr("Tokenizer ended in the middle of a token (state: ".concat(Ur(this.state),"). Either not all the data was received or the data was invalid.")))}}onToken(e){throw new Hr('Can\'t emit tokens before the "onToken" callback has been set up.')}onError(e){throw e}onEnd(){}}var qr,Kr;function $r(e){return["VALUE","KEY","COLON","COMMA","ENDED","ERROR","SEPARATOR"][e]}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"}(qr||(qr={})),function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"}(Kr||(Kr={}));const Xr={paths:void 0,keepStack:!0,separator:void 0,emitPartialValues:!1};class Yr extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Yr.prototype)}}class Jr{constructor(e){this.state=Kr.VALUE,this.mode=void 0,this.key=void 0,this.value=void 0,this.stack=[],(e=Object.assign(Object.assign({},Xr),e)).paths&&(this.paths=e.paths.map(e=>{if(void 0===e||"$*"===e)return;if(!e.startsWith("$"))throw new Yr('Invalid selector "'.concat(e,'". Should start with "$".'));const t=e.split(".").slice(1);if(t.includes(""))throw new Yr('Invalid selector "'.concat(e,'". ".." syntax not supported.'));return t})),this.keepStack=e.keepStack||!1,this.separator=e.separator,e.emitPartialValues||(this.emitPartial=()=>{})}shouldEmit(){return!this.paths||this.paths.some(e=>{var t;if(void 0===e)return!0;if(e.length!==this.stack.length)return!1;for(let t=0;t<e.length-1;t++){const n=e[t],r=this.stack[t+1].key;if("*"!==n&&n!==(null==r?void 0:r.toString()))return!1}const n=e[e.length-1];return"*"===n||n===(null===(t=this.key)||void 0===t?void 0:t.toString())})}push(){this.stack.push({key:this.key,value:this.value,mode:this.mode,emit:this.shouldEmit()})}pop(){const e=this.value;let t;({key:this.key,value:this.value,mode:this.mode,emit:t}=this.stack.pop()),this.state=void 0!==this.mode?Kr.COMMA:Kr.VALUE,this.emit(e,t)}emit(e,t){!this.keepStack&&this.value&&this.stack.every(e=>!e.emit)&&delete this.value[this.key],t&&this.onValue({value:e,key:this.key,parent:this.value,stack:this.stack}),0===this.stack.length&&(this.separator?this.state=Kr.SEPARATOR:void 0===this.separator&&this.end())}emitPartial(e){this.shouldEmit()&&(this.state!==Kr.KEY?this.onValue({value:e,key:this.key,parent:this.value,stack:this.stack,partial:!0}):this.onValue({value:void 0,key:e,parent:this.value,stack:this.stack,partial:!0}))}get isEnded(){return this.state===Kr.ENDED}write(e){let{token:t,value:n,partial:r}=e;try{if(r)return void this.emitPartial(n);if(this.state===Kr.VALUE){if(t===Br.STRING||t===Br.NUMBER||t===Br.TRUE||t===Br.FALSE||t===Br.NULL)return this.mode===qr.OBJECT?(this.value[this.key]=n,this.state=Kr.COMMA):this.mode===qr.ARRAY&&(this.value.push(n),this.state=Kr.COMMA),void this.emit(n,this.shouldEmit());if(t===Br.LEFT_BRACE){if(this.push(),this.mode===qr.OBJECT)this.value=this.value[this.key]={};else if(this.mode===qr.ARRAY){const e={};this.value.push(e),this.value=e}else this.value={};return this.mode=qr.OBJECT,this.state=Kr.KEY,this.key=void 0,void this.emitPartial()}if(t===Br.LEFT_BRACKET){if(this.push(),this.mode===qr.OBJECT)this.value=this.value[this.key]=[];else if(this.mode===qr.ARRAY){const e=[];this.value.push(e),this.value=e}else this.value=[];return this.mode=qr.ARRAY,this.state=Kr.VALUE,this.key=0,void this.emitPartial()}if(this.mode===qr.ARRAY&&t===Br.RIGHT_BRACKET&&0===this.value.length)return void this.pop()}if(this.state===Kr.KEY){if(t===Br.STRING)return this.key=n,this.state=Kr.COLON,void this.emitPartial();if(t===Br.RIGHT_BRACE&&0===Object.keys(this.value).length)return void this.pop()}if(this.state===Kr.COLON&&t===Br.COLON)return void(this.state=Kr.VALUE);if(this.state===Kr.COMMA){if(t===Br.COMMA){if(this.mode===qr.ARRAY)return this.state=Kr.VALUE,void(this.key+=1);if(this.mode===qr.OBJECT)return void(this.state=Kr.KEY)}if(t===Br.RIGHT_BRACE&&this.mode===qr.OBJECT||t===Br.RIGHT_BRACKET&&this.mode===qr.ARRAY)return void this.pop()}if(this.state===Kr.SEPARATOR&&t===Br.SEPARATOR&&n===this.separator)return void(this.state=Kr.VALUE);if(t===Br.SEPARATOR&&this.state!==Kr.SEPARATOR&&Array.from(n).map(e=>e.charCodeAt(0)).every(e=>e===Or.SPACE||e===Or.NEWLINE||e===Or.CARRIAGE_RETURN||e===Or.TAB))return;throw new Yr("Unexpected ".concat(Br[t]," (").concat(JSON.stringify(n),") in state ").concat($r(this.state)))}catch(e){this.error(e)}}error(e){this.state!==Kr.ENDED&&(this.state=Kr.ERROR),this.onError(e)}end(){this.state!==Kr.VALUE&&this.state!==Kr.SEPARATOR||this.stack.length>0?this.error(new Error("Parser ended in mid-parsing (state: ".concat($r(this.state),"). Either not all the data was received or the data was invalid."))):(this.state=Kr.ENDED,this.onEnd())}onValue(e){throw new Yr('Can\'t emit data before the "onValue" callback has been set up.')}onError(e){throw e}onEnd(){}}class Qr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tokenizer=new Gr(e),this.tokenParser=new Jr(e),this.tokenizer.onToken=this.tokenParser.write.bind(this.tokenParser),this.tokenizer.onEnd=()=>{this.tokenParser.isEnded||this.tokenParser.end()},this.tokenParser.onError=this.tokenizer.error.bind(this.tokenizer),this.tokenParser.onEnd=()=>{this.tokenizer.isEnded||this.tokenizer.end()}}get isEnded(){return this.tokenizer.isEnded&&this.tokenParser.isEnded}write(e){this.tokenizer.write(e)}end(){this.tokenizer.end()}set onToken(e){this.tokenizer.onToken=t=>{e(t),this.tokenParser.write(t)}}set onValue(e){this.tokenParser.onValue=e}set onError(e){this.tokenizer.onError=e}set onEnd(e){this.tokenParser.onEnd=()=>{this.tokenizer.isEnded||this.tokenizer.end(),e.call(this.tokenParser)}}}const Zr=()=>{let e="";return function*(t){e+=t;const n=e.split("\n");e=n.pop()||"";for(const e of n){if(!e.startsWith("data: "))continue;const t=e.slice(6);"[DONE]"!==t&&(yield t)}}},ei=()=>{const e=[];let t=null,n=!1,r=null;return{push:n=>{e.push(n),t&&(t(),t=null)},finish:()=>{n=!0,t&&(t(),t=null)},error:e=>{r=e,n=!0,t&&(t(),t=null)},iterate:()=>nr(function*(){const i=e=>{t=e};for(;!n||e.length>0;)e.length>0?yield e.shift():n||(yield ir(new Promise(i)));if(r)throw r})()}};function ti(e,t){var n,r,i,o,a,s,l,c;switch(t){case K:case X:case Z:case Q:return(null===(n=e.choices)||void 0===n||null===(r=n[0])||void 0===r||null===(i=r.delta)||void 0===i?void 0:i.content)||"";case $:return(null===(o=e.candidates)||void 0===o||null===(a=o[0])||void 0===a||null===(s=a.content)||void 0===s||null===(l=s.parts)||void 0===l||null===(c=l[0])||void 0===c?void 0:c.text)||"";case Y:var u;return"content_block_delta"===e.type&&(null===(u=e.delta)||void 0===u?void 0:u.text)||"";default:return""}}function*ni(e,t){if(!e)return;const n=/<(t|item|seg)\s+id="(\d+)"(?:\s+sourceLanguage="([^"]*)")?[^>]*>([\s\S]*?)<\/\1>/gi;let r,i=!1;for(;null!==(r=n.exec(e));){i=!0;const e=parseInt(r[2],10);if(!t.has(e)){t.add(e);const n=r[3]||"",i=[r[4].trim(),n];yield{id:e,translation:i}}}if(i)return;const o=e.endsWith("\n"),a=e.split("\n"),s=o?a:a.slice(0,-1);for(const e of s){const n=e.trim();if(!n)continue;const r=n.match(/^(\d+)\s*\|\s*(.*)/);if(r){const e=parseInt(r[1],10);if(!t.has(e)){t.add(e);const n=[r[2].trim().replace(/<br\s*\/?>/gi,"\n"),""];yield{id:e,translation:n}}}}}function ri(e){const t=e.trim(),n=t.search(/[{[]/),r=t.search(/<(t|item|seg)\s/i),i=t.search(/^\d+\s*\|/m);if(-1===n&&-1===r&&-1===i)return{isJson:!1,detected:!1};const o=[{type:"json",pos:n},{type:"xml",pos:r},{type:"line",pos:i}].filter(e=>-1!==e.pos);if(0===o.length)return{isJson:!1,detected:!1};const a=o.reduce((e,t)=>e.pos<t.pos?e:t);return{isJson:"json"===a.type,detected:!0}}var ii=i(9286),oi=i.n(ii);const ai=["fn","msg"],si=["useCache","usePool","fetchInterval","fetchLimit"],li=["useCache","usePool","fetchInterval","fetchLimit"],ci=async function(e){let{method:t="GET",headers:n,body:r,timeout:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((o,a)=>{GM.xmlHttpRequest({method:t,url:e,headers:n,data:r,timeout:i,onload:e=>{let{response:t,responseHeaders:n,status:r,statusText:i}=e;const a={};n.split("\n").forEach(e=>{const[t,n]=e.split(":").map(e=>e.trim());t&&n&&(a[t]=n)}),o({body:t,headers:a,status:r,statusText:i})},onerror:a,onabort:()=>{a(new Error("GM request onabort."))},ontimeout:()=>{a(new Error("GM request timeout."))}})})},ui=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=null==n?void 0:n.httpTimeout;if(!r)try{r=(await Wn()).httpTimeout}catch(e){rt("getSettingWithDefault",e)}r||(r=p);{Object.assign(t,{timeout:r});const{body:n,headers:i,status:o,statusText:a}=window.KISS_GM?await window.KISS_GM.fetch(e,t):await ci(e,t);return new Response(n,{headers:new Headers(i),status:o,statusText:a})}},di=async e=>{let{input:t,init:n,opts:r}=e;const i=await ui(t,n,r);return Nr(i,r.expect)},hi=e=>{let{fn:t,msg:n=Xt}=e,r=er(e,ai);return dn&&!fn()?cr(n,h({},r)):t(h({},r))},pi=async function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{useCache:r,usePool:i,fetchInterval:o,fetchLimit:a}=n,s=er(n,si);if(null==e||!e.trim())throw new Error("URL is empty");if(r){const n=await jr(e,t);if(n)return n}if(i){return Tr(o,a).push(hi,{fn:di,input:e,init:t,opts:s})}return hi({fn:di,input:e,init:t,opts:s})};function fi(){return fi=nr(function(e){let{method:t="GET",headers:n,body:r,timeout:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(o){const a=ei(),s=Zr(),l=((null===(o=window.KISS_GM)||void 0===o?void 0:o.xmlHttpRequest)||GM.xmlHttpRequest)({method:t,url:e,headers:n,data:r,timeout:i,responseType:"stream",onloadstart:async e=>{let{response:t}=e;try{const e=t.getReader(),n=new TextDecoder;for(;;){const{done:t,value:r}=await e.read();if(t)break;for(const e of s(n.decode(r,{stream:!0})))a.push(e)}}catch(e){return void a.error(e)}a.finish()},onerror:e=>a.error(e),onabort:()=>a.error(new Error("GM stream request aborted")),ontimeout:()=>a.error(new Error("GM stream request timeout"))});try{yield*or(ar(a.iterate()))}finally{var c;null==l||null===(c=l.abort)||void 0===c||c.call(l)}}()}),fi.apply(this,arguments)}function gi(){return gi=nr(function*(e,t,n){const r=ei();let i;try{i=oi().runtime.connect({name:"kiss_stream_fetch"})}catch(e){throw new Error("Failed to connect to background: "+e.message)}i.onMessage.addListener(e=>{switch(e.type){case"delta":r.push(e.data);break;case"done":r.finish();break;case"error":r.error(new Error(e.error))}}),i.onDisconnect.addListener(()=>{const e=oi().runtime.lastError;e&&r.error(new Error(e.message||"Port disconnected"))}),i.postMessage({action:"start",args:{input:e,init:t,opts:n}});try{yield*or(ar(r.iterate()))}finally{i.disconnect()}}),gi.apply(this,arguments)}function mi(e,t,n){return vi.apply(this,arguments)}function vi(){return vi=nr(function*(e,t,n){var r,i;(n=h(h({},n),{},{httpTimeout:(null===(r=n)||void 0===r?void 0:r.httpTimeout)||p}),!dn||fn())?yield*or(ar(function(e){return fi.apply(this,arguments)}(e,h(h({},t),{},{timeout:null===(i=n)||void 0===i?void 0:i.httpTimeout})))):yield*or(ar(function(e,t,n){return gi.apply(this,arguments)}(e,t,n)))}),vi.apply(this,arguments)}function yi(){return yi=nr(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{useCache:r,usePool:i,fetchInterval:o,fetchLimit:a}=n,s=er(n,li);return function*(){if(null==e||!e.trim())throw new Error("URL is empty");if(r){const n=yield ir(jr(e,t));if(n)return void(yield n)}if(i){const n=Tr(o,a),r=ei(),i=n.push(async()=>{try{var n,i=!1,o=!1;try{for(var a,l=ar(mi(e,t,s));i=!(a=await l.next()).done;i=!1){const e=a.value;r.push(e)}}catch(e){o=!0,n=e}finally{try{i&&null!=l.return&&await l.return()}finally{if(o)throw n}}r.finish()}catch(e){r.error(e)}return null});return yield*or(ar(r.iterate())),void(yield ir(i))}yield*or(ar(mi(e,t,s)))}()}),yi.apply(this,arguments)}const bi="xmlHttpRequest",wi="setValue",xi="getValue",Ai="deleteValue",Si="info",ki=e=>{window.APP_INFO={name:"KISS Translator",version:"2.0.20",eventName:e}},_i=async e=>{const{action:t,args:n,pong:r}=e.detail;let i;try{switch(t){case bi:const{input:e,init:r}=n;i=await ci(e,r);break;case wi:const{key:o,val:a}=n;await GM.setValue(o,a),i=a;break;case xi:i=await GM.getValue(n.key);break;case Ai:await GM.deleteValue(n.key),i="ok";break;case Si:i=GM.info;break;default:throw new Error("message action is unavailable: ".concat(t))}window.dispatchEvent(new CustomEvent(r,{detail:{data:i}}))}catch(e){window.dispatchEvent(new CustomEvent(r,{detail:{error:e.message}}))}},Ci="%[a-f0-9]{2}",Ei=new RegExp("("+Ci+")|([^%]+?)","gi"),Ti=new RegExp("("+Ci+")+","gi");function Ii(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;const n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],Ii(n),Ii(r))}function Pi(e){try{return decodeURIComponent(e)}catch(t){let n=e.match(Ei)||[];for(let t=1;t<n.length;t++)n=(e=Ii(n,t).join("")).match(Ei)||[];return e}}function Li(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return decodeURIComponent(e)}catch(t){return function(e){const t={"%FE%FF":"��","%FF%FE":"��"};let n=Ti.exec(e);for(;n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){const r=Pi(n[0]);r!==n[0]&&(t[n[0]]=r)}n=Ti.exec(e)}t["%C2"]="�";const r=Object.keys(t);for(const n of r)e=e.replace(new RegExp(n,"g"),t[n]);return e}(e)}}function Ni(e,t){if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===e||""===t)return[];const n=e.indexOf(t);return-1===n?[]:[e.slice(0,n),e.slice(n+t.length)]}function ji(e,t){const n={};if(Array.isArray(t))for(const r of t){const t=Object.getOwnPropertyDescriptor(e,r);null!=t&&t.enumerable&&Object.defineProperty(n,r,t)}else for(const r of Reflect.ownKeys(e)){const i=Object.getOwnPropertyDescriptor(e,r);if(i.enumerable){t(r,e[r],e)&&Object.defineProperty(n,r,i)}}return n}const Ri=e=>null==e,Oi=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())),zi=Symbol("encodeFragmentIdentifier");function Di(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function Mi(e,t){return t.encode?t.strict?Oi(e):encodeURIComponent(e):e}function Fi(e,t){return t.decode?Li(e):e}function Bi(e){return Array.isArray(e)?e.sort():"object"==typeof e?Bi(Object.keys(e)).sort((e,t)=>Number(e)-Number(t)).map(t=>e[t]):e}function Wi(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function Ui(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function Vi(e){const t=(e=Wi(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function Hi(e,t){Di((t=h({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)]$/.exec(e),e=e.replace(/\[\d*]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[])$/.exec(e),e=e.replace(/\[]$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"colon-list-separator":return(e,n,r)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==r[e]?r[e]=[...r[e],n]:r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"==typeof n&&n.includes(e.arrayFormatSeparator),o="string"==typeof n&&!i&&Fi(n,e).includes(e.arrayFormatSeparator);n=o?Fi(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>Fi(t,e)):null===n?n:Fi(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!i)return void(r[t]=n?Fi(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>Fi(t,e));void 0!==r[t]?r[t]=[...r[t],...o]:r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[...[n[e]].flat(),t]:n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;const e=t.decode?i.replace(/\+/g," "):i;let[o,a]=Ni(e,"=");void 0===o&&(o=e),a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:Fi(a,t),n(Fi(o,t),a,r)}for(const[e,n]of Object.entries(r))if("object"==typeof n&&null!==n)for(const[e,r]of Object.entries(n))n[e]=Ui(r,t);else r[e]=Ui(n,t);return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return e[t]=Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?Bi(n):n,e},Object.create(null))}function Gi(e,t){if(!e)return"";Di((t=h({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&Ri(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Mi(t,e),"[",i,"]"].join("")]:[...n,[Mi(t,e),"[",Mi(i,e),"]=",Mi(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Mi(t,e),"[]"].join("")]:[...n,[Mi(t,e),"[]=",Mi(r,e)].join("")];case"colon-list-separator":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[Mi(t,e),":list="].join("")]:[...n,[Mi(t,e),":list=",Mi(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[Mi(n,e),t,Mi(i,e)].join("")]:[[r,Mi(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,Mi(t,e)]:[...n,[Mi(t,e),"=",Mi(r,e)].join("")]}}(t),i={};for(const[t,r]of Object.entries(e))n(t)||(i[t]=r);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const i=e[n];return void 0===i?"":null===i?Mi(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?Mi(n,t)+"[]":i.reduce(r(n),[]).join("&"):Mi(n,t)+"="+Mi(i,t)}).filter(e=>e.length>0).join("&")}function qi(e,t){var n,r;t=h({decode:!0},t);let[i,o]=Ni(e,"#");return void 0===i&&(i=e),h({url:null!==(n=null===(r=i)||void 0===r||null===(r=r.split("?"))||void 0===r?void 0:r[0])&&void 0!==n?n:"",query:Hi(Vi(e),t)},t&&t.parseFragmentIdentifier&&o?{fragmentIdentifier:Fi(o,t)}:{})}function Ki(e,t){t=h({encode:!0,strict:!0,[zi]:!0},t);const n=Wi(e.url).split("?")[0]||"";let r=Gi(h(h({},Hi(Vi(e.url),{sort:!1})),e.query),t);r&&(r="?".concat(r));let i=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);if(e.fragmentIdentifier){const r=new URL(n);r.hash=e.fragmentIdentifier,i=t[zi]?r.hash:"#".concat(e.fragmentIdentifier)}return"".concat(n).concat(r).concat(i)}function $i(e,t,n){n=h({parseFragmentIdentifier:!0,[zi]:!1},n);const{url:r,query:i,fragmentIdentifier:o}=qi(e,n);return Ki({url:r,query:ji(i,t),fragmentIdentifier:o},n)}function Xi(e,t,n){return $i(e,Array.isArray(t)?e=>!t.includes(e):(e,n)=>!t(e,n),n)}const Yi=e,Ji=e=>{try{return JSON.parse(atob(e.split(".")[1])).exp}catch(e){rt("parseMSToken",e)}return 0},Qi=(()=>{let e=null;const t=async()=>{try{const t=Date.now(),n=await Mn(Ot);if(n){const e=1e3*Ji(n);if(e>t+1e3)return{token:n,expiresAt:e}}const r=await Do();if(!r)throw new Error("Failed to fetch ms token");const i=1e3*Ji(r);return await(e=r,zn(Ot,e)),{token:r,expiresAt:i}}catch(e){throw rt("get msauth failed",e),e}var e};return async()=>{if(e)try{const t=await e;if(t.expiresAt>Date.now()+1e3)return t.token}catch(e){}e=t();return(await e).token}})();let Zi=1e4*Math.round(1e4*Math.random());var eo=i(7029);const to=new(i.n(eo)())({ecmaVer:"latest",sourceType:"script",sandBox:!0}),no=new Map,ro=(e,t)=>{if(no.has(e))return no.get(e);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;const t=[];return{add:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.push(...r.filter(Boolean));const o=t.length-e;o>0&&t.splice(0,o)},getAll:()=>[...t],clear:()=>{t.length=0}}}(t);return no.set(e,n),n};function io(e){const t=e.trim();if(!t.includes(":")&&!t.includes("."))return parseInt(t,10)||0;let n=t,r="0";if(t.includes(".")){const e=t.split(".");n=e[0],r=e[1]}else{const e=t.split(":");e.length>1&&3===e[e.length-1].length&&(r=e.pop(),n=e.join(":"))}const i=n.split(":").map(e=>parseInt(e,10)||0);let o=0,a=0,s=0;3===i.length?[o,a,s]=i:2===i.length?[a,s]=i:1===i.length&&([s]=i);return 1e3*(3600*o+60*a+s)+(parseInt(r.padEnd(3,"0"),10)||0)}function oo(e){const t=Math.floor(e/1e3),n=String(e%1e3).padStart(3,"0"),r=Math.floor(t/60),i=String(t%60).padStart(2,"0"),o=String(Math.floor(r/60)).padStart(2,"0"),a=String(r%60).padStart(2,"0");return"".concat(o,":").concat(a,":").concat(i,".").concat(n)}function ao(e){if(!Array.isArray(e))return"WEBVTT";return["WEBVTT",...e.map((e,t)=>{const n=oo(e.start),r=oo(e.end),i=t+1,o="".concat(n," --\x3e ").concat(r),a=e.text||"",s=e.translation||"";return"".concat(i,"\n").concat(o,"\n").concat(a,"\n").concat(s)})].join("\n\n")}const so=e=>e?e.trim().replace(/\s+/g," "):"",lo=()=>({title:(()=>{try{return Pn(so(document.title))}catch(e){return""}})(),description:(()=>{try{const e=document.querySelector('meta[name="description"]'),t=(null==e?void 0:e.getAttribute("content"))||"";return Pn(so(t))}catch(e){return""}})(),summary:(()=>{let e="";try{var t,n;const o=(null===(t=document)||void 0===t||null===(n=t.location)||void 0===n?void 0:n.href)||"",a="https://www.youtube.com";if(o.startsWith(a)){const t=document.querySelector("#collapsed-title")||document.querySelector("#description-inline-expander");t&&(e=t.textContent)}var r,i;e||(e=(null===(r=document.querySelector('meta[property="og:description"]'))||void 0===r?void 0:r.getAttribute("content"))||""),e||(e=(null===(i=document.querySelector('meta[name="keywords"]'))||void 0===i?void 0:i.getAttribute("content"))||"")}catch(e){}return Pn(so(e))})()}),co=["reqHook"],uo=new Map,ho=new Map,po=function(e){var t;let n=arguments.length>2?arguments[2]:void 0;const r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split(/\n|,/).map(e=>e.trim()).filter(Boolean);if(0===r.length)return"";const i=((null!==(t=n.get(e))&&void 0!==t?t:-1)+1)%r.length;return n.set(e,i),r[i]},fo=function(e){if(!e)return[];if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))return[[e]];let t=mn(e).trim();try{const e=t.search(/(\{|\[)/),n=t.lastIndexOf(t.includes("}")?"}":"]");if(e>-1&&n>-1){const r=t.substring(e,n+1),i=JSON.parse(r),o=Array.isArray(i)?i:i.translations||(i.result?[i.result]:[i]);if(o.length>0&&(void 0!==o[0].text||o[0].translations))return o.map(e=>[String(e.text||""),String(e.sourceLanguage||"")])}}catch(e){}if(/<(t|item|seg)\b/i.test(t))try{const e=new DOMParser,n=e.parseFromString(t,"text/html").querySelectorAll("t, item, seg");if(n.length>0)return Array.from(n).map(e=>[e.innerHTML.trim(),e.getAttribute("sourceLanguage")||""])}catch(e){}return t.split("\n").map(e=>{const t=e.match(/^\d+\s*\|\s*(.*)/);if(t)return[t[1].trim(),""];return[e.replace(/<br\s*\/?>/gi,"\n").trim(),""]})},go=e=>{if(!e)return[];try{const t=function(e){const t=e.replace(/^\uFEFF/,"").trim();if(!t)return[];const n=t.split(/\n\n+/),r=[];for(let e=n[0].toUpperCase().includes("WEBVTT")?1:0;e<n.length;e++){const t=n[e];if(!t.includes("--\x3e"))continue;const a=t.split("\n"),s=a.findIndex(e=>e.includes("--\x3e"));if(-1===s)continue;const[l,c]=a[s].split("--\x3e"),u=a.slice(s+1);if(l&&c&&u.length>0){var i,o;const e=(null===(i=u[0])||void 0===i?void 0:i.trim())||"",t=(null===(o=u[1])||void 0===o?void 0:o.trim())||"";r.push({start:io(l),end:io(c),text:e,translation:t})}}return r}(e);if(Array.isArray(t))return t}catch(e){rt("parse AI Res: subtitle",e)}return[]},mo={[z]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;const a=Yi.stringify({client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:n,tl:r,q:t.join(" ")});i="".concat(i,"?").concat(a);const s={"Content-type":"application/json"};return o&&(s.Authorization="Bearer ".concat(o)),{url:i,headers:s,method:"GET"}},[D]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;return{url:i,body:[[t,n,r],"wt_lib"],headers:{"Content-Type":"application/json+protobuf","X-Goog-API-Key":o}}},[M]:e=>{let{texts:t,from:n,to:r,token:i}=e;const o=Yi.stringify({from:n,to:r,"api-version":"3.0"}),a="https://api-edge.cognitive.microsofttranslator.com/translate?".concat(o),s={"Content-type":"application/json",Authorization:"Bearer ".concat(i)};return{url:a,body:t.map(e=>({Text:e})),headers:s}},[F]:e=>{let{texts:t,from:n,to:r,url:i,key:o,region:a}=e;const s=Yi.stringify({from:n,to:r});i=i.endsWith("&")?"".concat(i).concat(s):"".concat(i,"&").concat(s);const l={"Content-type":"application/json","Ocp-Apim-Subscription-Key":o,"Ocp-Apim-Subscription-Region":a};return{url:i,body:t.map(e=>({Text:e})),headers:l}},[B]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;return{url:i,body:{text:t,target_lang:r,source_lang:n},headers:{"Content-type":"application/json",Authorization:"DeepL-Auth-Key ".concat(o)}}},[U]:e=>{let{texts:t,from:n,to:r}=e;const i=t.join(" "),o=(i.match(/[i]/g)||[]).length+1;let a=Date.now();a+=o-a%o,Zi++;return{url:"https://www2.deepl.com/jsonrpc",body:{jsonrpc:"2.0",method:"LMT_handle_texts",params:{splitting:"newlines",lang:{target_lang:r,source_lang_user_selected:n},commonJobParams:{wasSpoken:!1,transcribe_as:""},id:Zi,timestamp:a,texts:[{text:i,requestAlternatives:3}]}},headers:{"Content-Type":"application/json",Accept:"*/*","x-app-os-name":"iOS","x-app-os-version":"16.3.0","Accept-Language":"en-US,en;q=0.9","Accept-Encoding":"gzip, deflate, br","x-app-device":"iPhone13,2","User-Agent":"DeepL-iOS/2.9.1 iOS 16.3.0 (iPhone13,2)","x-app-build":"510265","x-app-version":"2.9.1"}}},[W]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;const a={text:t.join(" "),target_lang:r,source_lang:n},s={"Content-type":"application/json"};return o&&(s.Authorization="Bearer ".concat(o)),{url:i,body:a,headers:s}},[V]:e=>{let{texts:t,from:n,to:r,url:i,key:o,dictNo:a,memoryNo:s}=e;return{url:i,body:{from:n,to:r,apikey:o,src_text:t.join(" "),dictNo:a,memoryNo:s},headers:{"Content-type":"application/json"}}},[H]:e=>{let{texts:t,from:n,to:r}=e;return{url:"https://fanyi.baidu.com/transapi",body:{from:n,to:r,query:t.join(" "),source:"txt"},headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","User-Agent":cn}}},[G]:e=>{let{texts:t,from:n,to:r}=e;return{url:"https://transmart.qq.com/api/imt",body:{header:{fn:"auto_translation",client_key:"browser-chrome-110.0.0-Mac OS-df4bd4c5-a65d-44b2-a40f-42f34f3535f2-1677486696487"},type:"plain",model_category:"normal",source:{text_list:t,lang:n},target:{lang:r}},headers:{"Content-Type":"application/json","user-agent":cn,referer:"https://transmart.qq.com/zh-CN/index"}}},[q]:e=>{let{texts:t,from:n,to:r}=e;return{url:"https://translate.volcengine.com/crx/translate/v1",body:{source_language:n,target_language:r,text:t.join(" ")},headers:{"Content-type":"application/json"}}},[K]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1}=e;const u={role:"user",content:i};return{url:t,body:{model:o,messages:[{role:"system",content:r},...l,u],temperature:a,max_completion_tokens:s,stream:c},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:u}},[$]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1}=e;t=t.replaceAll(C,o).replaceAll("{{key}}",n),c&&(t=t.replace(":generateContent",":streamGenerateContent"),t+=(t.includes("?")?"&":"?")+"alt=sse");const u={role:"user",parts:[{text:i}]};return{url:t,body:{contents:[{role:"model",parts:[{text:r}]},...l,u],generationConfig:{maxOutputTokens:s,temperature:a},safetySettings:[{category:"HARM_CATEGORY_HARASSMENT",threshold:"BLOCK_NONE"},{category:"HARM_CATEGORY_HATE_SPEECH",threshold:"BLOCK_NONE"},{category:"HARM_CATEGORY_SEXUALLY_EXPLICIT",threshold:"BLOCK_NONE"},{category:"HARM_CATEGORY_DANGEROUS_CONTENT",threshold:"BLOCK_NONE"}]},headers:{"Content-type":"application/json","x-goog-api-key":n},userMsg:u}},[X]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1}=e;const u={role:"user",content:i};return{url:t,body:{model:o,messages:[{role:"system",content:r},...l,u],temperature:a,max_tokens:s,stream:c},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:u}},[Y]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1}=e;const u={role:"user",content:i};return{url:t,body:{model:o,system:r,messages:[...l,u],temperature:a,max_tokens:s,stream:c},headers:{"Content-type":"application/json","anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true","x-api-key":n},userMsg:u}},[J]:e=>{let{texts:t,from:n,to:r,url:i,key:o}=e;return{url:i,body:{text:t.join(" "),source_lang:n,target_lang:r},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(o)}}},[Q]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1}=e;const u={role:"user",content:i},d={model:o,messages:[{role:"system",content:r},...l,u],temperature:a,max_tokens:s,stream:c},h={"Content-type":"application/json"};return n&&(h.Authorization="Bearer ".concat(n)),{url:t,body:d,headers:h,userMsg:u}},[Z]:e=>{let{url:t,key:n,systemPrompt:r,userPrompt:i,model:o,temperature:a,maxTokens:s,hisMsgs:l=[],useStream:c=!1}=e;const u={role:"user",content:i};return{url:t,body:{model:o,messages:[{role:"system",content:r},...l,u],temperature:a,max_tokens:s,stream:c},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(n)},userMsg:u}},[ee]:e=>{let{texts:t,fromLang:n,toLang:r,url:i,key:o,useBatchFetch:a}=e;return{url:i,body:a?{texts:t,from:n,to:r}:{text:t[0],from:n,to:r},headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(o)}}}},vo=e=>{let{url:t="",body:n=null,headers:r={},userMsg:i=null,method:o="POST"}=e;if(!t)throw new Error("genInit: url is empty");const a={method:o,headers:r};if("GET"!==o&&"HEAD"!==o&&n){var s;let e=JSON.stringify(n);const t=null==n||null===(s=n.params)||void 0===s?void 0:s.id;t&&(e=e.replace('method":"',(t+3)%13==0||(t+5)%29==0?'method" : "':'method": "')),Object.assign(a,{body:e})}return[t,a,i]},yo=async e=>{let{reqHook:t}=e,n=er(e,co);const{apiType:r,apiSlug:i,key:o,systemPrompt:a,subtitlePrompt:s,nobatchPrompt:l=fe,nobatchUserPrompt:c=ge,useBatchFetch:u,from:d,to:p,fromLang:f,toLang:g,texts:m,glossary:C,customHeader:E,customBody:T,events:I,tone:P}=n;if(ie.mulkeys.has(r)&&(n.key=po(i,o,uo)),r===W&&(n.url=po(i,n.url,ho)),ie.ai.has(r)){const e=lo();n.systemPrompt=I?(e=>{let{subtitlePrompt:t,tone:n,from:r,to:i,fromLang:o,toLang:a,docInfo:{title:s="",description:l="",summary:c=""}={}}=e;return t.replaceAll(S,s).replaceAll(k,l).replaceAll(_,c).replaceAll(A,n).replaceAll(v,r).replaceAll(y,i).replaceAll(b,o).replaceAll(w,a)})({subtitlePrompt:s,from:d,to:p,fromLang:f,toLang:g,texts:m,docInfo:e,tone:P}):(e=>{let{systemPrompt:t,tone:n,from:r,to:i,fromLang:o,toLang:a,texts:s,docInfo:{title:l="",description:c="",summary:u=""}={}}=e;return t.replaceAll(S,l).replaceAll(k,c).replaceAll(_,u).replaceAll(A,n).replaceAll(v,r).replaceAll(y,i).replaceAll(b,o).replaceAll(w,a).replaceAll(x,s[0])})({systemPrompt:u?a:l,from:d,to:p,fromLang:f,toLang:g,texts:m,docInfo:e,tone:P}),n.userPrompt=I?JSON.stringify(I):(e=>{let{nobatchUserPrompt:t,useBatchFetch:n,tone:r,glossary:i,from:o,to:a,fromLang:s,toLang:l,texts:c,docInfo:{title:u="",description:d="",summary:h=""}={}}=e;if(n){const e={targetLanguage:l,segments:c.map((e,t)=>({id:t,text:e}))};return u&&(e.title=u),d&&(e.description=d),i&&0!==Object.keys(i).length&&(e.glossary=i),r&&(e.tone=r),JSON.stringify(e)}return t.replaceAll(S,u).replaceAll(k,d).replaceAll(_,h).replaceAll(A,r).replaceAll(v,o).replaceAll(y,a).replaceAll(b,s).replaceAll(w,l).replaceAll(x,c[0])})({nobatchUserPrompt:c,useBatchFetch:u,from:d,to:p,fromLang:f,toLang:g,texts:m,docInfo:e,tone:P,glossary:C})}const{url:L="",body:N=null,headers:j={},userMsg:R=null,method:O="POST"}=mo[r](n);if(null!=E&&E.trim()&&Object.assign(j,Tn(E)),null!=T&&T.trim()&&Object.assign(N,Tn(T)),null!=t&&t.trim()&&!I)try{const e={url:L,body:N,headers:j,userMsg:R,method:O};to.run("exports.reqHook = ".concat(t));const r=await to.exports.reqHook(h(h({},n),{},{defaultSystemPrompt:'Act as a translation API. Output a single raw JSON object only. No extra text or fences.\n\nInput:\n{"targetLanguage":"<lang>","title":"<context>","description":"<context>","summary":"<context>","segments":[{"id":1,"text":"..."}],"glossary":{"sourceTerm":"targetTerm"},"tone":"<formal|casual>"}\n\nOutput:\n{"translations":[{"id":1,"text":"...","sourceLanguage":"<detected>"}]}\n\nRules:\n1. Use title/description for context only; do not output them.\n2. Keep id, order, and count of segments.\n3. Preserve whitespace, HTML entities, and all HTML-like tags (e.g., <i1>, <a1>). Translate inner text only.\n4. Highest priority: Follow \'glossary\'. Use value for translation; if value is "", keep the key.\n5. Do not translate: content in <code>, <pre>, text enclosed in backticks, or placeholders like {1}, {{1}}, [1], [[1]].\n6. Apply the specified tone to the translation.\n7. Detect sourceLanguage for each segment.\n8. Return empty or unchanged inputs as is.\n\nExample:\nInput: {"targetLanguage":"zh-CN","segments":[{"id":1,"text":"A <b>React</b> component."}],"glossary":{"component":"组件","React":""}}\nOutput: {"translations":[{"id":1,"text":"一个<b>React</b>组件","sourceLanguage":"en"}]}\n\nFail-safe: On any error, return {"translations":[]}.',defaultSystemPromptXml:me,defaultSystemPromptLines:'Act as a translation API. Output raw text lines in "ID | Text" format. No Markdown. No conversational filler.\n\nInput:\n{"targetLanguage":"<lang>","title":"<context>","description":"<context>","summary":"<context>","segments":[{"id":1,"text":"..."}],"glossary":{"sourceTerm":"targetTerm"},"tone":"<formal|casual>"}\n\nOutput Format:\n<id> | <Translation for Segment>\n<id> | <Translation for Segment>\n...\n\nRules:\n1. **Strict Format**: Output exactly one line per segment using the format: "{id} | {translated_text}".\n2. **ID Mapping**: You MUST copy the exact "id" from the input segment to the output line.\n3. **Newline Handling**: If the translated text contains a newline, replace it with the HTML tag "<br>" to ensure it stays on a single line.\n4. **Separator**: Use the pipe symbol " | " strictly to separate the ID and the text.\n5. **Context**: Use title/description for context only; do not output them.\n6. **HTML/Tags**: Preserve whitespace, HTML entities, and all HTML-like tags (e.g., <i1>, <b>). Translate inner text only.\n7. **Glossary**: Highest priority. Follow \'glossary\'. Use value for translation; if value is "", keep the key.\n8. **Do Not Translate**: content in <code>, <pre>, text enclosed in backticks, or placeholders like {1}, {{1}}, [1].\n9. **Tone**: Apply the specified tone.\n\nExample:\nInput: {"targetLanguage":"zh-CN","segments":[{"id":0,"text":"Hello."},{"id":1,"text":"Line 1\nLine 2"}],"glossary":{}}\nOutput:\n0 | 你好。\n1 | 第一行<br>第二行\n\nFail-safe: On error, return "{id} | {original_text}" line by line.',defaultSubtitlePrompt:ve,defaultNobatchPrompt:fe,defaultNobatchUserPrompt:ge,req:e}),e);if(r&&r.url)return vo(r)}catch(e){throw rt("run req hook",e),new Error("Request hook error: ".concat(e.message))}return vo({url:L,body:N,headers:j,userMsg:R,method:O})};function bo(){return wo.apply(this,arguments)}function wo(){return wo=nr(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{from:t,to:n,fromLang:r,toLang:i,langMap:o,glossary:a,apiSetting:s,usePool:l}=arguments.length>1?arguments[1]:void 0;return function*(){let c=null,u=[];const{apiType:d,apiSlug:p,contextSize:f,useContext:g,fetchInterval:m,fetchLimit:v,httpTimeout:y,useStream:b}=s;g&&ie.context.has(d)&&(c=ro(p,f),u=c.getAll());const w=b&&ie.stream.has(d);let x="";if(d===M&&(x=yield ir(Qi()),!x))throw new Error("got msauth error");const[A,S,k]=yield ir(yo(h({texts:e,from:t,to:n,fromLang:r,toLang:i,langMap:o,glossary:a,hisMsgs:u,token:x,useStream:w},s)));if(w)yield*or(ar(function(e,t,n,r){return xo.apply(this,arguments)}(e,A,S,{apiType:d,history:c,userMsg:k,usePool:l,fetchInterval:m,fetchLimit:v,httpTimeout:y})));else{const a=yield ir(pi(A,S,{useCache:!1,usePool:l,fetchInterval:m,fetchLimit:v,httpTimeout:y}));if(!a)throw new Error("translate got empty response");const u=yield ir((async(e,t)=>{var n,r,i,o,a,s,l,c,u,d,h,p,f,g,m,v,y,b,w,x,A,S,k,_;let{texts:C,from:E,to:T,fromLang:I,toLang:P,langMap:L,resHook:N,history:j,userMsg:R,apiType:O,useBatchFetch:te}=t;if(null!=N&&N.trim())try{to.run("exports.resHook = ".concat(N));const t=await to.exports.resHook({apiType:O,userMsg:R,res:e,texts:C,from:E,to:T,fromLang:I,toLang:P,langMap:L,extractJson:In,parseAIRes:fo});if(t&&Array.isArray(t.translations))return j&&R&&t.modelMsg&&j.add(R,t.modelMsg),t.translations;if(Array.isArray(t))return t}catch(e){throw rt("run res hook",e),new Error("Response hook error: ".concat(e.message))}let ne="";switch(O){case z:return[[null==e||null===(n=e.sentences)||void 0===n?void 0:n.map(e=>e.trans).join(" "),null==e?void 0:e.src]];case D:return null==e||null===(r=e[0])||void 0===r?void 0:r.map((t,n)=>{var r,i;return[null==e||null===(r=e[0])||void 0===r?void 0:r[n],null==e||null===(i=e[1])||void 0===i?void 0:i[n]]});case M:case F:return null==e?void 0:e.map(e=>{var t;return[e.translations.map(e=>e.text).join(" "),null===(t=e.detectedLanguage)||void 0===t?void 0:t.language]});case B:return null==e||null===(i=e.translations)||void 0===i?void 0:i.map(e=>[e.text,e.detected_source_language]);case U:return[[null==e||null===(o=e.result)||void 0===o||null===(a=o.texts)||void 0===a?void 0:a.map(e=>e.text).join(" "),null==e||null===(s=e.result)||void 0===s?void 0:s.lang]];case W:return[[null==e?void 0:e.data,null==e?void 0:e.source_lang]];case V:const t=JSON.parse(e);if(t.error_msg)throw new Error(t.error_msg);return[[t.tgt_text,t.from]];case H:if(1===e.type)return[[Object.keys(JSON.parse(e.result).content[0].mean[0].cont)[0],e.from]];if(2===e.type)return[[e.data.map(e=>e.dst).join(" "),e.from]];break;case G:return null==e||null===(l=e.auto_translation)||void 0===l?void 0:l.map(t=>[t,null==e?void 0:e.src_lang]);case q:return[[null==e?void 0:e.translation,null==e?void 0:e.detected_language]];case K:case X:case Z:return ne=null==e||null===(c=e.choices)||void 0===c||null===(u=c[0])||void 0===u?void 0:u.message,j&&R&&ne&&j.add(R,{role:ne.role,content:ne.content}),fo(null===(d=ne)||void 0===d?void 0:d.content,te);case $:return ne=null==e||null===(h=e.candidates)||void 0===h||null===(p=h[0])||void 0===p?void 0:p.content,j&&R&&ne&&j.add(R,ne),fo(null!==(f=null===(g=ne)||void 0===g||null===(m=g.parts)||void 0===m||null===(v=m[0])||void 0===v?void 0:v.text)&&void 0!==f?f:"",te);case Y:return ne={role:null==e?void 0:e.role,content:null==e||null===(y=e.content)||void 0===y?void 0:y.text},j&&R&&ne&&j.add(R,{role:ne.role,content:ne.content}),fo(null!==(b=null==e||null===(w=e.content)||void 0===w||null===(x=w[0])||void 0===x?void 0:x.text)&&void 0!==b?b:"",te);case J:return[[null==e||null===(A=e.result)||void 0===A?void 0:A.translated_text]];case Q:return ne=null==e||null===(S=e.choices)||void 0===S||null===(k=S[0])||void 0===k?void 0:k.message,j&&R&&ne&&j.add(R,{role:ne.role,content:ne.content}),fo(null===(_=ne)||void 0===_?void 0:_.content,te);case ee:var re,ie;return te?null===(re=null!==(ie=null==e?void 0:e.translations)&&void 0!==ie?ie:e)||void 0===re?void 0:re.map(e=>[e.text,e.src]):[[e.text,e.src||e.from]]}throw new Error("parse translate result: apiType not matched",O)})(a,h({texts:e,from:t,to:n,fromLang:r,toLang:i,langMap:o,history:c,userMsg:k},s)));if(null==u||!u.length)throw new Error("translate got an unexpected result");for(let e=0;e<u.length;e++)yield{id:e,result:u[e]}}}()}),wo.apply(this,arguments)}function xo(){return xo=nr(function(e,t,n,r){let{apiType:i,history:o,userMsg:a,usePool:s,fetchInterval:l,fetchLimit:c,httpTimeout:u}=r;return function*(){const r=new Array(e.length).fill(null);let d="";const h=new Set,p=function(){const e=[],t=new Qr({paths:["$.translations.*","$.*"],keepStack:!1});return t.onValue=t=>{let{value:n}=t;if(n&&"object"==typeof n&&"number"==typeof n.id&&("string"==typeof n.text||"string"==typeof n.translation)){const t=n.id,r=n.text||n.translation||"",i=n.sourceLanguage||n.src||"";e.push({id:t,translation:[r,i]})}},t.onError=()=>{},{*write(n){try{t.write(n)}catch(e){}for(;e.length>0;)yield e.shift()},end(){try{t.end()}catch(e){}}}}();let f=!1,g=!1;try{var m,v=!1,y=!1;try{for(var b,w=ar(function(e,t){return yi.apply(this,arguments)}(t,n,{useCache:!1,usePool:s,fetchInterval:l,fetchLimit:c,httpTimeout:u}));v=!(b=yield ir(w.next())).done;v=!1){const e=b.value;try{const t=ti(JSON.parse(e),i);if(t)if(d+=t,d=mn(d,!0),g)if(f)for(const{id:e,translation:n}of p.write(t))r[e]=n,yield{id:e,result:n};else for(const{id:e,translation:t}of ni(d,h))r[e]=t,yield{id:e,result:t};else{const{isJson:e,detected:t}=ri(d);if(t&&(g=!0,f=e,f))for(const{id:e,translation:t}of p.write(d))r[e]=t,yield{id:e,result:t}}}catch(e){}}}catch(e){y=!0,m=e}finally{try{v&&null!=w.return&&(yield ir(w.return()))}finally{if(y)throw m}}f&&p.end()}catch(e){throw rt("handleTranslateStream error",e),e}const x=r.some(e=>!e);if(x){const t=fo(d,!0);for(let n=0;n<e.length&&n<t.length;n++)r[n]||(r[n]=t[n],yield{id:n,result:r[n]})}o&&a&&(i===$?o.add(a,{role:"model",parts:[{text:d}]}):o.add(a,{role:"assistant",content:d}))}()}),xo.apply(this,arguments)}const Ao=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=await Qi(),n={headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(t)},method:"POST",body:JSON.stringify(e.map(e=>({Text:e})))},r=await pi("https://api-edge.cognitive.microsofttranslator.com/detect?api-version=3.0",n,{useCache:!1});return Array.isArray(r)?r.map(e=>e.language):[]},So=new Map,ko=(e,t,n)=>{if(So.has(e))return So.get(e);const r=function(e){let{batchInterval:t=f,batchSize:n=g,batchLength:r=m}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=[];let o=!1,a=null;const s=async()=>{if(a&&(clearTimeout(a),a=null),0===i.length||o)return;o=!0;let t=[],c=0,u=0;for(const e of i){var d;const t=(null===(d=e.payload)||void 0===d?void 0:d.length)||0;if(u>=n||c+t>r&&u>0)break;c+=t,u++}if(u>0&&(t=i.splice(0,u)),0!==t.length)try{const n=t.map(e=>e.payload),r=t[0].args,i=e(n,r);if(i&&"function"==typeof i[Symbol.asyncIterator]){var h,p=!1,f=!1;try{for(var g,m=ar(i);p=!(g=await m.next()).done;p=!1){const{id:e,result:n}=g.value;{const r=t[e];r&&!r.resolved&&(r.resolved=!0,r.resolve(n))}}}catch(e){f=!0,h=e}finally{try{p&&null!=m.return&&await m.return()}finally{if(f)throw h}}t.forEach((e,t)=>{e.resolved||e.reject(new Error("No response for item at index ".concat(t)))})}else{const e=await i;if(!Array.isArray(e))throw new Error("responses format error");t.forEach((t,n)=>{const r=e[n];r?t.resolve(r):t.reject(new Error("No response for item at index ".concat(n)))})}}catch(e){t.forEach(t=>{t.resolved||t.reject(e)})}finally{o=!1,i.length>0&&(i.length>=n?setTimeout(s,0):l())}else o=!1},l=()=>{!o&&!a&&i.length>0&&(a=setTimeout(s,t))};return{addTask:(e,t)=>new Promise((r,o)=>{const a=e;i.push({payload:a,resolve:r,reject:o,args:t}),i.length>=n?s():l()}),destroy:()=>{a&&(clearTimeout(a),a=null),i.forEach(e=>e.reject(new Error("Queue instance was destroyed."))),i.length=0}}}(t,n);return So.set(e,r),r},_o=()=>{for(const e of So.values())e.destroy()};var Co=pr("translatorMap"),Eo=pr("detectorPromise"),To=pr("defaultProgressHandler"),Io=pr("getDetectorPromise"),Po=pr("createTranslator");function Lo(e,t){rt("Downloading ".concat(e," model: ").concat(t,"%"))}function No(){return dr(this,Eo)[Eo]||(dr(this,Eo)[Eo]=(async()=>{try{if("unavailable"===await LanguageDetector.availability())throw new Error("LanguageDetector unavailable");return await LanguageDetector.create({monitor:e=>this._monitorProgress(e,"detector")})}catch(e){throw dr(this,Eo)[Eo]=null,e}})()),dr(this,Eo)[Eo]}function jo(e,t){const n="".concat(e,"_").concat(t);if(dr(this,Co)[Co].has(n))return dr(this,Co)[Co].get(n);const r=(async()=>{try{if("unavailable"===await Translator.availability({sourceLanguage:e,targetLanguage:t}))throw new Error("Translator ".concat(e,"_").concat(t," unavailable"));const r=await Translator.create({sourceLanguage:e,targetLanguage:t,monitor:e=>this._monitorProgress(e,"translator (".concat(n,")"))});return dr(this,Co)[Co].set(n,r),r}catch(e){throw dr(this,Co)[Co].delete(n),e}})();return dr(this,Co)[Co].set(n,r),r}const Ro=new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Po,{value:jo}),Object.defineProperty(this,Io,{value:No}),Object.defineProperty(this,To,{value:Lo}),Object.defineProperty(this,Co,{writable:!0,value:new Map}),Object.defineProperty(this,Eo,{writable:!0,value:null}),this.onProgress=e.onProgress||dr(this,To)[To]}_monitorProgress(e,t){e.addEventListener("downloadprogress",e=>{const n=e.total>0?Math.round(e.loaded/e.total*100):0;this.onProgress(t,n)})}async detectLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.4;if(!e)return["","Input text cannot be empty."];try{const n=await dr(this,Io)[Io](),r=await n.detect(e);if(!r||0===r.length)return["","No language could be detected."];const{detectedLanguage:i,confidence:o}=r[0];return o<t?["","Confidence of test results (".concat(i," ").concat(o.toFixed(2),") below the set threshold ").concat(t,"。")]:[i,""]}catch(t){return rt("detectLanguage",t,"(".concat(e,")")),["",t.message]}}async translateText(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(!e||!t||"string"!=typeof e)return["",n,"Input text cannot be empty."];try{let r=n;if("auto"===n){const[t,n]=await this.detectLanguage(e);if(n||!t){return["",r,"Automatic detection of source language failed: ".concat(n||"Unable to determine source language.")]}r=t}if(r===t)return["",r,"Same lang"];const i=await dr(this,Po)[Po](r,t);return[await i.translate(e),r,""]}catch(t){return rt("translateText",t,"(".concat(e,")")),t&&t.message&&t.message.includes("Other generic failures occurred")&&(nt.info("Generic failure detected, resetting translator cache."),dr(this,Co)[Co].clear()),["",n,t.message]}}},Oo=e=>Ro.detectLanguage(e.text),zo=e=>Ro.translateText(e.text,e.to,e.from),Do=async()=>pi("https://edge.microsoft.com/translate/auth"),Mo=async e=>{var t;const n={text:e},r="".concat($t,"?").concat(Yi.stringify(n)),i=await jr(r);if(i)return i;const o="https://www.bing.com",a="".concat(o,"/dict/search?q=").concat(e,"&FORM=BDVSP6&cc=cn"),s=await pi(a,{credentials:"include"},{useCache:!1});if(!s)return null;const l=(new DOMParser).parseFromString(s,"text/html"),c=null===(t=l.querySelector("#headword > h1"))||void 0===t?void 0:t.textContent.trim();if(!c)return null;const u=[];l.querySelectorAll("div.qdef > ul > li").forEach(e=>{var t,n,r,i;const o=null===(t=e.querySelector(".pos"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim(),a=null===(r=e.querySelector(".def"))||void 0===r||null===(i=r.textContent)||void 0===i?void 0:i.trim();u.push({pos:o,def:a})});const d=[];l.querySelectorAll("div.hd_div1>.hd_if>.p1-5").forEach(e=>{var t;const n=null===(t=e.textContent)||void 0===t?void 0:t.trim();d.push(n)});const h=[];l.querySelectorAll(".each_seg>.li_pos").forEach(e=>{var t,n;const r=null===(t=e.querySelector(".pos_lin>.pos"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim(),i=[];e.querySelectorAll(".de_seg>.se_lis").forEach(e=>{var t,n;i.push(null===(t=e.querySelector(".de_co"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim())}),h.push({pos:r,lis:i})});const p=[];l.querySelectorAll("#sentenceSeg .se_li").forEach(e=>{var t,n,r,i;const o=null===(t=e.querySelector(".sen_en"))||void 0===t||null===(n=t.textContent)||void 0===n?void 0:n.trim(),a=null===(r=e.querySelector(".sen_cn"))||void 0===r||null===(i=r.textContent)||void 0===i?void 0:i.trim();o&&a&&p.push({eng:o,chs:a})});const f=[],g=l.querySelector("#bigaud_uk"),m=l.querySelector("#bigaud_us");if(g){var v,y,b,w,x;const e=o+(null==g||null===(v=g.dataset)||void 0===v?void 0:v.mp3link),t=null===(y=g.parentElement)||void 0===y?void 0:y.previousElementSibling,n=null==t||null===(b=t.textContent)||void 0===b||null===(w=b.trim())||void 0===w||null===(x=w.match(/\[(.*?)\]/))||void 0===x?void 0:x[1];f.push({key:"英",audio:e,phonetic:n})}if(m){var A,S,k,_,C;const e=o+(null==m||null===(A=m.dataset)||void 0===A?void 0:A.mp3link),t=null===(S=m.parentElement)||void 0===S?void 0:S.previousElementSibling,n=null==t||null===(k=t.textContent)||void 0===k||null===(_=k.trim())||void 0===_||null===(C=_.match(/\[(.*?)\]/))||void 0===C?void 0:C[1];f.push({key:"美",audio:e,phonetic:n})}if(0===f.length){const e=l.querySelector(".hd_pr"),t=l.querySelector(".hd_prUS");if(e){var E;const t=null===(E=e.textContent)||void 0===E?void 0:E.trim(),n=null==t?void 0:t.match(/\[([^\]]+)\]/);n&&f.push({key:"英",phonetic:n[1]})}if(t){var T;const e=null===(T=t.textContent)||void 0===T?void 0:T.trim(),n=null==e?void 0:e.match(/\[([^\]]+)\]/);n&&f.push({key:"美",phonetic:n[1]})}}const I={word:c,trs:u,aus:f,ecs:h,sentences:p,presents:d};return Rr(r,null,I),I},Fo=async e=>{const t="https://fanyi.baidu.com/sug",n={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify({kw:e})},r=await pi(t,n,{useCache:!0});return 0===(null==r?void 0:r.errno)?(await Rr(t,n,r),r.data):[]},Bo=async e=>{var t;const n={num:5,ver:3,doctype:"json",cache:!1,le:"en",q:e},r="https://dict.youdao.com/suggest?".concat(Yi.stringify(n)),i={headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ja;q=0.6","content-type":"application/x-www-form-urlencoded"},method:"GET"},o=await pi(r,i,{useCache:!0});return 200===(null==o||null===(t=o.result)||void 0===t?void 0:t.code)?(await Rr(r,i,o),o.data.entries):[]},Wo=async e=>{let{text:t,from:n,to:r,apiSetting:i}=e;if(!gn)return["",!0];const{fetchInterval:o,fetchLimit:a,httpTimeout:s}=i,l=Tr(o,a),c=await function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Task timed out";const r="function"==typeof e?e():e;return Promise.race([r,new Promise((e,r)=>setTimeout(()=>r(new Error(n)),t))])}(l.push(hi,{fn:zo,msg:"builtinai_translte",text:t,from:n,to:r}),s);if(!c)throw new Error("apiBuiltinAITranslate got null reault");const[u,d,h]=c;if(h)throw new Error("apiBuiltinAITranslate got error",h);return[u,d]},Uo=async e=>{let{text:t,fromLang:n="auto",toLang:r,apiSetting:i=Ae,glossary:o,useCache:a=!0,usePool:s=!0}=e;if(!t)throw new Error("The text cannot be empty.");const{apiType:l,apiSlug:c,useBatchFetch:u}=i,d=he[l]||ue,h=d.get(n),p=d.get(r);if(!p)throw new Error("The target lang: ".concat(r," not support"));const[f,g]="2.0.20".split("."),m={apiSlug:c,text:t,fromLang:n,toLang:r,version:[f,g].join(".")},v="".concat(Gt,"?").concat(Yi.stringify(m));if(a){const e=await jr(v);if(null!=e&&e.trText)return e}let y=[];if(l===O)y=await Wo({text:t,from:h,to:p,apiSetting:i});else if(u&&ie.batch.has(l)){const{apiSlug:e,batchInterval:a,batchSize:c,batchLength:u,useStream:f}=i,g=f&&ie.stream.has(l),m="".concat(e,"_").concat(n,"_").concat(r,"_").concat(g?"stream":"batch"),v=ko(m,bo,{batchInterval:a,batchSize:c,batchLength:u});y=await v.addTask(t,{from:h,to:p,fromLang:n,toLang:r,langMap:d,glossary:o,apiSetting:i,usePool:s})}else{const{value:e}=await bo([t],{from:h,to:p,fromLang:n,toLang:r,langMap:d,glossary:o,apiSetting:i,usePool:s}).next();y=null==e?void 0:e.result}let b="",w="",x="";if(Array.isArray(y)?([b,w=""]=y,w&&(x=pe[l].get(w)||"")):"string"==typeof y&&(b=y),!b)throw new Error("tanslate api got empty trtext");const A="auto"===n&&w===p;return a&&Rr(v,null,{trText:b,isSame:A,srLang:w,srCode:x}),{trText:b,srLang:w,srCode:x,isSame:A}},Vo=async e=>{let{videoId:t,chunkSign:n,fromLang:r="auto",toLang:i,events:o=[],apiSetting:a}=e;const s={apiSlug:a.apiSlug,videoId:t,chunkSign:n,fromLang:r,toLang:i},l="".concat(qt,"?").concat(Yi.stringify(s)),c=await jr(l);if(c)return c;const u=await(async e=>{var t,n,r,i,o,a,s,l,c,u,d,p,f;let{events:g,from:m,to:v,apiSetting:y}=e;const{apiType:b,fetchInterval:w,fetchLimit:x,httpTimeout:A}=y,[S,k]=await yo(h(h({},y),{},{events:g,from:m,to:v})),_=await pi(S,k,{useCache:!1,usePool:!0,fetchInterval:w,fetchLimit:x,httpTimeout:A});if(!_)return rt("subtitle got empty response"),[];switch(b){case K:case X:case Z:case Q:return go(null!==(t=null==_||null===(n=_.choices)||void 0===n||null===(r=n[0])||void 0===r||null===(i=r.message)||void 0===i?void 0:i.content)&&void 0!==t?t:"");case $:return go(null!==(o=null==_||null===(a=_.candidates)||void 0===a||null===(s=a[0])||void 0===s||null===(l=s.content)||void 0===l||null===(c=l.parts)||void 0===c||null===(u=c[0])||void 0===u?void 0:u.text)&&void 0!==o?o:"");case Y:return go(null!==(d=null==_||null===(p=_.content)||void 0===p||null===(f=p[0])||void 0===f?void 0:f.text)&&void 0!==d?d:"");case ee:return _}return[]})({events:o,from:r,to:i,apiSetting:a});return null!=u&&u.length?(Rr(l,null,u),u):[]},Ho=async e=>{const{dataCaches:t={}}=await Xn();t[e]=Date.now(),await Yn({dataCaches:t})},Go=async e=>{const t=await(e=>pi(e))(e),n=kc(t).filter(e=>{let{pattern:t}=e;return!xn(t,Ve)});return n.length>0&&await((e,t)=>zn(Ut+e,t))(e,n),n},qo=async e=>{let{subrulesList:t}=e;try{const{subRulesSyncAt:e}=await Xn(),n=Date.now();n-e>864e5&&(await(async e=>{for(const t of e)try{await Go(t.url),await Ho(t.url)}catch(e){rt("sync subrule error: ".concat(t.url),e)}})(t),await Yn({subRulesSyncAt:n}))}catch(e){rt("try sync all subrules",e)}};function Ko(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $o(e,t,n){Ko(e,t),t.set(e,n)}function Xo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function Yo(e,t){return e.get(Xo(e,t))}function Jo(e,t,n){return e.set(Xo(e,t),n),n}var Qo,Zo={2:e=>{function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,a,s,l=n.indexOf(e),c=n.indexOf(t,l+1),u=l;if(l>=0&&c>0){for(r=[],o=n.length;u>=0&&!s;)u==l?(r.push(u),l=n.indexOf(e,u+1)):1==r.length?s=[r.pop(),c]:((i=r.pop())<o&&(o=i,a=c),c=n.indexOf(t,u+1)),u=l<c&&l>=0?l:c;r.length&&(s=[o,a])}return s}e.exports=t,t.range=r},101:function(e,t,n){var r;e=n.nmd(e),function(){var o=(e&&e.exports,"object"==typeof i.g&&i.g);o.global!==o&&o.window;var a=function(e){this.message=e};(a.prototype=new Error).name="InvalidCharacterError";var s=function(e){throw new a(e)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=/[\t\n\f\r ]/g,u={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,i,o=e.length%3,a="",c=-1,u=e.length-o;++c<u;)t=e.charCodeAt(c)<<16,n=e.charCodeAt(++c)<<8,r=e.charCodeAt(++c),a+=l.charAt((i=t+n+r)>>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==o?(t=e.charCodeAt(c)<<8,n=e.charCodeAt(++c),a+=l.charAt((i=t+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(c),a+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),a},decode:function(e){var t=(e=String(e).replace(c,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a<t;)r=l.indexOf(e.charAt(a)),n=i%4?64*n+r:r,i++%4&&(o+=String.fromCharCode(255&n>>(-2*i&6)));return o},version:"1.0.0"};void 0===(r=function(){return u}.call(t,n,t,e))||(e.exports=r)}()},172:(e,t)=>{t.d=function(e){if(!e)return 0;for(var t=(e=e.toString()).length,n=e.length;n--;){var r=e.charCodeAt(n);56320<=r&&r<=57343&&n--,127<r&&r<=2047?t++:2047<r&&r<=65535&&(t+=2)}return t}},526:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},298:e=>{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++)8*r+6*o<=8*e.length?n.push(t.charAt(i>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r<e.length;i=++r%4)0!=i&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}},e.exports=n},635:(e,t,n)=>{const r=n(31),i=n(338),o=n(221);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:o}},118:e=>{e.exports=function(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const n of e){if("string"==typeof n&&t===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}}:()=>!1}},705:(e,t)=>{const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){return!(null==i.exec(e))},t.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=r},31:(e,t,n)=>{const r=n(705),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function a(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const r=e.substr(n,t-n);if(t>5&&"xml"===r)return f("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function s(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let l=!1,c=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=a(e,i),i.err)return i}else{if("<"!==e[i]){if(o(e[i]))continue;return f("InvalidChar","char '"+e[i]+"' is not expected.",m(e,i))}{let g=i;if(i++,"!"===e[i]){i=s(e,i);continue}{let v=!1;"/"===e[i]&&(v=!0,i++);let y="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)y+=e[i];if(y=y.trim(),"/"===y[y.length-1]&&(y=y.substring(0,y.length-1),i--),d=y,!r.isName(d)){let t;return t=0===y.trim().length?"Invalid space after '<'.":"Tag '"+y+"' is an invalid name.",f("InvalidTag",t,m(e,i))}const b=u(e,i);if(!1===b)return f("InvalidAttr","Attributes for '"+y+"' have open quote.",m(e,i));let w=b.value;if(i=b.index,"/"===w[w.length-1]){const n=i-w.length;w=w.substring(0,w.length-1);const r=h(w,t);if(!0!==r)return f(r.err.code,r.err.msg,m(e,n+r.err.line));l=!0}else if(v){if(!b.tagClosed)return f("InvalidTag","Closing tag '"+y+"' doesn't have proper closing.",m(e,i));if(w.trim().length>0)return f("InvalidTag","Closing tag '"+y+"' can't have attributes or invalid starting.",m(e,g));if(0===n.length)return f("InvalidTag","Closing tag '"+y+"' has not been opened.",m(e,g));{const t=n.pop();if(y!==t.tagName){let n=m(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+y+"'.",m(e,g))}0==n.length&&(c=!0)}}else{const r=h(w,t);if(!0!==r)return f(r.err.code,r.err.msg,m(e,i-w.length+r.err.line));if(!0===c)return f("InvalidXml","Multiple possible root nodes found.",m(e,i));-1!==t.unpairedTags.indexOf(y)||n.push({tagName:y,tagStartPos:g}),l=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=s(e,i);continue}if("?"!==e[i+1])break;if(i=a(e,++i),i.err)return i}else if("&"===e[i]){const t=p(e,i);if(-1==t)return f("InvalidChar","char '&' is not expected.",m(e,i));i=t}else if(!0===c&&!o(e[i]))return f("InvalidXml","Extra text at the end",m(e,i));"<"===e[i]&&i--}}}var d;return l?1==n.length?f("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",m(e,n[0].tagStartPos)):!(n.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const l='"',c="'";function u(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===l||e[t]===c)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function h(e,t){const n=r.getAllMatches(e,d),i={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return f("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",v(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return f("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",v(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",v(n[e]));const r=n[e][2];if(!g(r))return f("InvalidAttr","Attribute '"+r+"' is an invalid name.",v(n[e]));if(i.hasOwnProperty(r))return f("InvalidAttr","Attribute '"+r+"' is repeated.",v(n[e]));i[r]=1}return!0}function p(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function f(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function g(e){return r.isName(e)}function m(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function v(e){return e.startIndex+e[1].length}},221:(e,t,n)=>{const r=n(87),i=n(118),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(e){this.options=Object.assign({},o,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=s,this.options.format?(this.indentate=l,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,n,r){const i=this.j2x(e,n+1,r.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function l(e){return this.options.indentBy.repeat(e)}function c(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}a.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},a.prototype.j2x=function(e,t,n){let r="",i="";const o=n.join(".");for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(i+="");else if(null===e[a])this.isAttribute(a)?i+="":"?"===a[0]?i+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)i+=this.buildTextValNode(e[a],a,"",t);else if("object"!=typeof e[a]){const n=this.isAttribute(a);if(n&&!this.ignoreAttributesFn(n,o))r+=this.buildAttrPairStr(n,""+e[a]);else if(!n)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[a],a,"",t)}else if(Array.isArray(e[a])){const r=e[a].length;let o="",s="";for(let l=0;l<r;l++){const r=e[a][l];if(void 0===r);else if(null===r)"?"===a[0]?i+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof r)if(this.options.oneListGroup){const e=this.j2x(r,t+1,n.concat(a));o+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(r,a,t,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(a,r);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(r,a,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,s,t)),i+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const t=Object.keys(e[a]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[a][t[i]])}else i+=this.processTextOrObjNode(e[a],a,t,n);return{attrStr:r,val:i}},a.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},a.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+"\x3c!--".concat(e,"--\x3e")+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+"<"+t+n+o+">"+e+i}},a.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":"></".concat(e),t},a.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+"<![CDATA[".concat(e,"]]>")+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+"\x3c!--".concat(e,"--\x3e")+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},a.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},e.exports=a},87:e=>{function t(e,a,s,l){let c="",u=!1;for(let d=0;d<e.length;d++){const h=e[d],p=n(h);if(void 0===p)continue;let f="";if(f=0===s.length?p:"".concat(s,".").concat(p),p===a.textNodeName){let e=h[p];i(f,a)||(e=a.tagValueProcessor(p,e),e=o(e,a)),u&&(c+=l),c+=e,u=!1;continue}if(p===a.cdataPropName){u&&(c+=l),c+="<![CDATA[".concat(h[p][0][a.textNodeName],"]]>"),u=!1;continue}if(p===a.commentPropName){c+=l+"\x3c!--".concat(h[p][0][a.textNodeName],"--\x3e"),u=!0;continue}if("?"===p[0]){const e=r(h[":@"],a),t="?xml"===p?"":l;let n=h[p][0][a.textNodeName];n=0!==n.length?" "+n:"",c+=t+"<".concat(p).concat(n).concat(e,"?>"),u=!0;continue}let g=l;""!==g&&(g+=a.indentBy);const m=l+"<".concat(p).concat(r(h[":@"],a)),v=t(h[p],a,f,g);-1!==a.unpairedTags.indexOf(p)?a.suppressUnpairedNode?c+=m+">":c+=m+"/>":v&&0!==v.length||!a.suppressEmptyNode?v&&v.endsWith(">")?c+=m+">".concat(v).concat(l,"</").concat(p,">"):(c+=m+">",v&&""!==l&&(v.includes("/>")||v.includes("</"))?c+=l+a.indentBy+v+l:c+=v,c+="</".concat(p,">")):c+=m+"/>",u=!0}return c}function n(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(e.hasOwnProperty(r)&&":@"!==r)return r}}function r(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=o(i,t),!0===i&&t.suppressBooleanAttributes?n+=" ".concat(r.substr(t.attributeNamePrefix.length)):n+=" ".concat(r.substr(t.attributeNamePrefix.length),'="').concat(i,'"')}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function o(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}e.exports=function(e,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),t(e,n,"",r)}},193:(e,t,n)=>{const r=n(705);function i(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function o(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function l(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function u(e){if(r.isName(e))return e;throw new Error("Invalid entity name ".concat(e))}e.exports=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,d=!1,h=!1,p="";for(;t<e.length;t++)if("<"!==e[t]||h)if(">"===e[t]){if(h?"-"===e[t-1]&&"-"===e[t-2]&&(h=!1,r--):r--,0===r)break}else"["===e[t]?d=!0:p+=e[t];else{if(d&&a(e,t)){let r,o;t+=7,[r,o,t]=i(e,t+1),-1===o.indexOf("&")&&(n[u(r)]={regx:RegExp("&".concat(r,";"),"g"),val:o})}else if(d&&s(e,t))t+=8;else if(d&&l(e,t))t+=8;else if(d&&c(e,t))t+=9;else{if(!o)throw new Error("Invalid DOCTYPE");h=!0}r++,p=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},63:(e,t)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},299:(e,t,n)=>{const r=n(705),i=n(365),o=n(193),a=n(494),s=n(118);function l(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function c(e,t,n,r,i,o,a){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?x(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const d=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function h(e,t,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,d),i=n.length,o={};for(let e=0;e<i;e++){const r=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(r,t))continue;let i=n[e][4],a=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(r,i,t);o[a]=null==e?i:typeof e!=typeof i||e!==i?e:x(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new i("!xml");let n=t,r="",a="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){const t=y(e,">",s,"Closing Tag is not closed.");let i=e.substring(s+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,a));const o=a.substring(a.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error("Unpaired tag can not be used as closing tag: </".concat(i,">"));let l=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(l=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=a.lastIndexOf("."),a=a.substring(0,l),n=this.tagsNodeStack.pop(),r="",s=t}else if("?"===e[s+1]){let t=b(e,s,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,a),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,a,t.tagName)),this.addChild(n,e,a)}s=t.closeIndex+1}else if("!--"===e.substr(s+1,3)){const t=y(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(s+4,t-2);r=this.saveTextToParentTag(r,n,a),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=t}else if("!D"===e.substr(s+1,2)){const t=o(e,s);this.docTypeEntities=t.entities,s=t.i}else if("!["===e.substr(s+1,2)){const t=y(e,"]]>",s,"CDATA is not closed.")-2,i=e.substring(s+9,t);r=this.saveTextToParentTag(r,n,a);let o=this.parseTextData(i,n.tagname,a,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,o),s=t+2}else{let o=b(e,s,this.options.removeNSPrefix),l=o.tagName;const c=o.rawTagName;let u=o.tagExp,d=o.attrExpPresent,h=o.closeIndex;this.options.transformTagName&&(l=this.options.transformTagName(l)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,a,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),l!==t.tagname&&(a+=a?"."+l:l),this.isItStopNode(this.options.stopNodes,a,l)){let t="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===l[l.length-1]?(l=l.substr(0,l.length-1),a=a.substr(0,a.length-1),u=l):u=u.substr(0,u.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(l))s=o.closeIndex;else{const n=this.readStopNodeData(e,c,h+1);if(!n)throw new Error("Unexpected end of ".concat(c));s=n.i,t=n.tagContent}const r=new i(l);l!==u&&d&&(r[":@"]=this.buildAttributesMap(u,a,l)),t&&(t=this.parseTextData(t,l,a,!0,d,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,a)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===l[l.length-1]?(l=l.substr(0,l.length-1),a=a.substr(0,a.length-1),u=l):u=u.substr(0,u.length-1),this.options.transformTagName&&(l=this.options.transformTagName(l));const e=new i(l);l!==u&&d&&(e[":@"]=this.buildAttributesMap(u,a,l)),this.addChild(n,e,a),a=a.substr(0,a.lastIndexOf("."))}else{const e=new i(l);this.tagsNodeStack.push(n),l!==u&&d&&(e[":@"]=this.buildAttributesMap(u,a,l)),this.addChild(n,e,a),n=e}r="",s=h}}else r+=e[s];return t.child};function f(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const g=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function v(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function y(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function b(e,t,n){const r=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:">",i="";for(let o=t;o<e.length;o++){let t=e[o];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:i,index:o};if(e[o+1]===r[1])return{data:i,index:o}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:">");if(!r)return;let i=r.data;const o=r.index,a=i.search(/\s/);let s=i,l=!0;-1!==a&&(s=i.substring(0,a),i=i.substring(a+1).trimStart());const c=s;if(n){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1),l=s!==r.data.substr(e+1))}return{tagName:s,tagExp:i,closeIndex:o,attrExpPresent:l,rawTagName:c}}function w(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=y(e,">",n,"".concat(t," is not closed"));if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=y(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=y(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=y(e,"]]>",n,"StopNode is not closed.")-2;else{const r=b(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function x(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&a(e,n)}return r.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=l,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=h,this.isItStopNode=v,this.replaceEntitiesValue=g,this.readStopNodeData=w,this.saveTextToParentTag=m,this.addChild=f,this.ignoreAttributesFn=s(this.options.ignoreAttributes)}}},338:(e,t,n)=>{const{buildOptions:r}=n(63),i=n(299),{prettify:o}=n(728),a=n(31);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=a.validate(e,t);if(!0!==n)throw Error("".concat(n.err.msg,":").concat(n.err.line,":").concat(n.err.col))}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:o(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},728:(e,t)=>{function n(e,t,a){let s;const l={};for(let c=0;c<e.length;c++){const u=e[c],d=r(u);let h="";if(h=void 0===a?d:a+"."+d,d===t.textNodeName)void 0===s?s=u[d]:s+=""+u[d];else{if(void 0===d)continue;if(u[d]){let e=n(u[d],t,h);const r=o(e,t);u[":@"]?i(e,u[":@"],h,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==l[d]&&l.hasOwnProperty(d)?(Array.isArray(l[d])||(l[d]=[l[d]]),l[d].push(e)):t.isArray(d,h,r)?l[d]=[e]:l[d]=e}}}return"string"==typeof s?s.length>0&&(l[t.textNodeName]=s):void 0!==s&&(l[t.textNodeName]=s),l}function r(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function i(e,t,n,r){if(t){const i=Object.keys(t),o=i.length;for(let a=0;a<o;a++){const o=i[a];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function o(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return 0===r||!(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}t.prettify=function(e,t){return n(e,t)}},365:e=>{e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},135:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},542:(e,t,n)=>{!function(){var t=n(298),r=n(526).utf8,i=n(135),o=n(526).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?o.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,d=-1732584194,h=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[l>>>5]|=128<<l%32,s[14+(l+64>>>9<<4)]=l;var f=a._ff,g=a._gg,m=a._hh,v=a._ii;for(p=0;p<s.length;p+=16){var y=c,b=u,w=d,x=h;c=f(c,u,d,h,s[p+0],7,-680876936),h=f(h,c,u,d,s[p+1],12,-389564586),d=f(d,h,c,u,s[p+2],17,606105819),u=f(u,d,h,c,s[p+3],22,-1044525330),c=f(c,u,d,h,s[p+4],7,-176418897),h=f(h,c,u,d,s[p+5],12,1200080426),d=f(d,h,c,u,s[p+6],17,-1473231341),u=f(u,d,h,c,s[p+7],22,-45705983),c=f(c,u,d,h,s[p+8],7,1770035416),h=f(h,c,u,d,s[p+9],12,-1958414417),d=f(d,h,c,u,s[p+10],17,-42063),u=f(u,d,h,c,s[p+11],22,-1990404162),c=f(c,u,d,h,s[p+12],7,1804603682),h=f(h,c,u,d,s[p+13],12,-40341101),d=f(d,h,c,u,s[p+14],17,-1502002290),c=g(c,u=f(u,d,h,c,s[p+15],22,1236535329),d,h,s[p+1],5,-165796510),h=g(h,c,u,d,s[p+6],9,-1069501632),d=g(d,h,c,u,s[p+11],14,643717713),u=g(u,d,h,c,s[p+0],20,-373897302),c=g(c,u,d,h,s[p+5],5,-701558691),h=g(h,c,u,d,s[p+10],9,38016083),d=g(d,h,c,u,s[p+15],14,-660478335),u=g(u,d,h,c,s[p+4],20,-405537848),c=g(c,u,d,h,s[p+9],5,568446438),h=g(h,c,u,d,s[p+14],9,-1019803690),d=g(d,h,c,u,s[p+3],14,-187363961),u=g(u,d,h,c,s[p+8],20,1163531501),c=g(c,u,d,h,s[p+13],5,-1444681467),h=g(h,c,u,d,s[p+2],9,-51403784),d=g(d,h,c,u,s[p+7],14,1735328473),c=m(c,u=g(u,d,h,c,s[p+12],20,-1926607734),d,h,s[p+5],4,-378558),h=m(h,c,u,d,s[p+8],11,-2022574463),d=m(d,h,c,u,s[p+11],16,1839030562),u=m(u,d,h,c,s[p+14],23,-35309556),c=m(c,u,d,h,s[p+1],4,-1530992060),h=m(h,c,u,d,s[p+4],11,1272893353),d=m(d,h,c,u,s[p+7],16,-155497632),u=m(u,d,h,c,s[p+10],23,-1094730640),c=m(c,u,d,h,s[p+13],4,681279174),h=m(h,c,u,d,s[p+0],11,-358537222),d=m(d,h,c,u,s[p+3],16,-722521979),u=m(u,d,h,c,s[p+6],23,76029189),c=m(c,u,d,h,s[p+9],4,-640364487),h=m(h,c,u,d,s[p+12],11,-421815835),d=m(d,h,c,u,s[p+15],16,530742520),c=v(c,u=m(u,d,h,c,s[p+2],23,-995338651),d,h,s[p+0],6,-198630844),h=v(h,c,u,d,s[p+7],10,1126891415),d=v(d,h,c,u,s[p+14],15,-1416354905),u=v(u,d,h,c,s[p+5],21,-57434055),c=v(c,u,d,h,s[p+12],6,1700485571),h=v(h,c,u,d,s[p+3],10,-1894986606),d=v(d,h,c,u,s[p+10],15,-1051523),u=v(u,d,h,c,s[p+1],21,-2054922799),c=v(c,u,d,h,s[p+8],6,1873313359),h=v(h,c,u,d,s[p+15],10,-30611744),d=v(d,h,c,u,s[p+6],15,-1560198380),u=v(u,d,h,c,s[p+13],21,1309151649),c=v(c,u,d,h,s[p+4],6,-145523070),h=v(h,c,u,d,s[p+11],10,-1120210379),d=v(d,h,c,u,s[p+2],15,718787259),u=v(u,d,h,c,s[p+9],21,-343485551),c=c+y>>>0,u=u+b>>>0,d=d+w>>>0,h=h+x>>>0}return t.endian([c,u,d,h])};a._ff=function(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._gg=function(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._hh=function(e,t,n,r,i,o,a){var s=e+(t^n^r)+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._ii=function(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+(i>>>0)+a;return(s<<o|s>>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(null==e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?o.bytesToString(r):t.bytesToHex(r)}}()},285:(e,t,n)=>{var r=n(2);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),m(function(e){return e.split("\\\\").join(i).split("\\{").join(o).split("\\}").join(a).split("\\,").join(s).split("\\.").join(l)}(e),!0).map(u)):[]};var i="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",s="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join("\\").split(o).join("{").split(a).join("}").split(s).join(",").split(l).join(".")}function d(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,o=n.body,a=n.post,s=i.split(",");s[s.length-1]+="{"+o+"}";var l=d(a);return a.length&&(s[s.length-1]+=l.shift(),s.push.apply(s,l)),t.push.apply(t,s),t}function h(e){return"{"+e+"}"}function p(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function g(e,t){return e>=t}function m(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var o=i.pre,s=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var l=0;l<s.length;l++){var u=o+"{"+i.body+"}"+s[l];n.push(u)}else{var v,y,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),x=b||w,A=i.body.indexOf(",")>=0;if(!x&&!A)return i.post.match(/,.*\}/)?m(e=i.pre+"{"+i.body+a+i.post):[e];if(x)v=i.body.split(/\.\./);else if(1===(v=d(i.body)).length&&1===(v=m(v[0],!1).map(h)).length)return s.map(function(e){return i.pre+v[0]+e});if(x){var S=c(v[0]),k=c(v[1]),_=Math.max(v[0].length,v[1].length),C=3==v.length?Math.abs(c(v[2])):1,E=f;k<S&&(C*=-1,E=g);var T=v.some(p);y=[];for(var I=S;E(I,k);I+=C){var P;if(w)"\\"===(P=String.fromCharCode(I))&&(P="");else if(P=String(I),T){var L=_-P.length;if(L>0){var N=new Array(L+1).join("0");P=I<0?"-"+N+P.slice(1):N+P}}y.push(P)}}else{y=[];for(var j=0;j<v.length;j++)y.push.apply(y,m(v[j],!1))}for(j=0;j<y.length;j++)for(l=0;l<s.length;l++)u=o+y[j]+s[l],(!t||x||u)&&n.push(u)}return n}},829:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var t="function"==typeof Map?new Map:void 0;return n=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,a)}function a(){return r(e,arguments,o(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),i(a,e)},n(e)}function r(e,t,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&i(o,n.prototype),o},r.apply(null,arguments)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var a=function(e){function n(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=function(e,n){return!n||"object"!==t(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}(this,o(n).call(this,e))).name="ObjectPrototypeMutationError",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e),n}(n(Error));function s(e,n){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=n.split("."),o=i.length,a=function(t){var n=i[t];if(!e)return{v:void 0};if("+"===n){if(Array.isArray(e))return{v:e.map(function(n,o){var a=i.slice(t+1);return a.length>0?s(n,a.join("."),r):r(e,o,i,t)})};var o=i.slice(0,t).join(".");throw new Error("Object at wildcard (".concat(o,") is not an array"))}e=r(e,n,i,t)},l=0;l<o;l++){var c=a(l);if("object"===t(c))return c.v}return e}function l(e,t){return e.length===t+1}e.exports={set:function(e,n,r){if("object"!=t(e)||null===e)return e;if(void 0===n)return e;if("number"==typeof n)return e[n]=r,e[n];try{return s(e,n,function(e,t,n,i){if(e===Reflect.getPrototypeOf({}))throw new a("Attempting to mutate Object.prototype");if(!e[t]){var o=Number.isInteger(Number(n[i+1])),s="+"===n[i+1];e[t]=o||s?[]:{}}return l(n,i)&&(e[t]=r),e[t]})}catch(t){if(t instanceof a)throw t;return e}},get:function(e,n){if("object"!=t(e)||null===e)return e;if(void 0===n)return e;if("number"==typeof n)return e[n];try{return s(e,n,function(e,t){return e[t]})}catch(t){return e}},has:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"!=t(e)||null===e)return!1;if(void 0===n)return!1;if("number"==typeof n)return n in e;try{var i=!1;return s(e,n,function(e,t,n,o){if(!l(n,o))return e&&e[t];i=r.own?e.hasOwnProperty(t):t in e}),i}catch(e){return!1}},hasOwn:function(e,t,n){return this.has(e,t,n||{own:!0})},isIn:function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("object"!=t(e)||null===e)return!1;if(void 0===n)return!1;try{var o=!1,a=!1;return s(e,n,function(e,n,i,s){return o=o||e===r||!!e&&e[n]===r,a=l(i,s)&&"object"===t(e)&&n in e,e&&e[n]}),i.validPath?o&&a:o}catch(e){return!1}},ObjectPrototypeMutationError:a}},47:(e,t,n)=>{var r=n(410),i=function(e){return"string"==typeof e};function o(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];i&&"."!==i&&(".."===i?n.length&&".."!==n[n.length-1]?n.pop():t&&n.push(".."):n.push(i))}return n}var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s={};function l(e){return a.exec(e).slice(1)}s.resolve=function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(!i(r))throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+(e=o(e.split("/"),!t).join("/"))||"."},s.normalize=function(e){var t=s.isAbsolute(e),n="/"===e.substr(-1);return(e=o(e.split("/"),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},s.isAbsolute=function(e){return"/"===e.charAt(0)},s.join=function(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];if(!i(n))throw new TypeError("Arguments to path.join must be strings");n&&(e+=e?"/"+n:n)}return s.normalize(e)},s.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n+1)}e=s.resolve(e).substr(1),t=s.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,l=0;l<o;l++)if(r[l]!==i[l]){a=l;break}var c=[];for(l=a;l<r.length;l++)c.push("..");return(c=c.concat(i.slice(a))).join("/")},s._makeLong=function(e){return e},s.dirname=function(e){var t=l(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},s.basename=function(e,t){var n=l(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},s.extname=function(e){return l(e)[3]},s.format=function(e){if(!r.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!i(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+s.sep:"")+(e.base||"")},s.parse=function(e){if(!i(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=l(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},s.sep="/",s.delimiter=":",e.exports=s},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,a=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var o=r(t[1]),a=r(t[2]);null===o||null===a||o in i||(i[o]=a)}return i}},670:e=>{e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},494:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let o=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return e;if(i.hex&&t.test(o))return Number.parseInt(o,16);{const t=n.exec(o);if(t){const n=t[1],r=t[2];let s=(a=t[3])&&-1!==a.indexOf(".")?("."===(a=a.replace(/0+$/,""))?a="0":"."===a[0]?a="0"+a:"."===a[a.length-1]&&(a=a.substr(0,a.length-1)),a):a;const l=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==o[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==o[1])return e;{const t=Number(o),a=""+t;return-1!==a.search(/[eE]/)||l?i.eNotation?t:e:-1!==o.indexOf(".")?"0"===a&&""===s||a===s||n&&a==="-"+s?t:e:r?s===a||n+s===a?t:e:o===a||o===n+a?t:e}}return e}var a}},737:(e,t,n)=>{var r=n(670),o=n(647),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,l=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,d=/^[a-zA-Z]:/;function h(e){return(e||"").toString().replace(a,"")}var p=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],f={hash:1,query:1};function g(e){var t,n=("undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{}).location||{},r={},o=typeof(e=e||n);if("blob:"===e.protocol)r=new y(unescape(e.pathname),{});else if("string"===o)for(t in r=new y(e,{}),f)delete r[t];else if("object"===o){for(t in e)t in f||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=l.test(e.href))}return r}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function v(e,t){e=(e=h(e)).replace(s,""),t=t||{};var n,r=u.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],l=0;return o?a?(n=r[2]+r[3]+r[4],l=r[2].length+r[3].length):(n=r[2]+r[4],l=r[2].length):a?(n=r[3]+r[4],l=r[3].length):n=r[4],"file:"===i?l>=2&&(n=n.slice(2)):m(i)?n=r[4]:i?o&&(n=n.slice(2)):l>=2&&m(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||m(i),slashesCount:l,rest:n}}function y(e,t,n){if(e=(e=h(e)).replace(s,""),!(this instanceof y))return new y(e,t,n);var i,a,l,c,u,f,b=p.slice(),w=typeof t,x=this,A=0;for("object"!==w&&"string"!==w&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),i=!(a=v(e||"",t=g(t))).protocol&&!a.slashes,x.slashes=a.slashes||i&&t.slashes,x.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||d.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!m(x.protocol)))&&(b[3]=[/(.*)/,"pathname"]);A<b.length;A++)"function"!=typeof(c=b[A])?(l=c[0],f=c[1],l!=l?x[f]=e:"string"==typeof l?~(u="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(x[f]=e.slice(0,u),e=e.slice(u+c[2])):(x[f]=e.slice(u),e=e.slice(0,u))):(u=l.exec(e))&&(x[f]=u[1],e=e.slice(0,u.index)),x[f]=x[f]||i&&c[3]&&t[f]||"",c[4]&&(x[f]=x[f].toLowerCase())):e=c(e,x);n&&(x.query=n(x.query)),i&&t.slashes&&"/"!==x.pathname.charAt(0)&&(""!==x.pathname||""!==t.pathname)&&(x.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(x.pathname,t.pathname)),"/"!==x.pathname.charAt(0)&&m(x.protocol)&&(x.pathname="/"+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=""),x.username=x.password="",x.auth&&(~(u=x.auth.indexOf(":"))?(x.username=x.auth.slice(0,u),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(u+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.auth=x.password?x.username+":"+x.password:x.username),x.origin="file:"!==x.protocol&&m(x.protocol)&&x.host?x.protocol+"//"+x.host:"null",x.href=x.toString()}y.prototype={set:function(e,t,n){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,r(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,c.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!n;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<p.length;l++){var u=p[l];u[4]&&(i[u[1]]=i[u[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&m(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,n=this,r=n.host,i=n.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(n.protocol&&n.slashes||m(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&m(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||c.test(n.hostname)&&!n.port)&&(r+=":"),a+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(a+=n.hash),a}},y.extractProtocol=v,y.location=g,y.trimLeft=h,y.qs=o,e.exports=y},410:()=>{},388:()=>{},805:()=>{},345:()=>{},800:()=>{}},ea={};function ta(e){var t=ea[e];if(void 0!==t)return t.exports;var n=ea[e]={id:e,loaded:!1,exports:{}};return Zo[e].call(n.exports,n,n.exports,ta),n.loaded=!0,n.exports}ta.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return ta.d(t,{a:t}),t},ta.d=(e,t)=>{for(var n in t)ta.o(t,n)&&!ta.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},ta.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ta.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var na={};ta.d(na,{hT:()=>Ia,O4:()=>Pa,Kd:()=>Ea,YK:()=>Ta,UU:()=>gc,Gu:()=>Da,ky:()=>yl,h4:()=>ml,ch:()=>vl,hq:()=>ll,i5:()=>bl});var ra=ta(737),ia=ta.n(ra);function oa(e){if(!aa(e))throw new Error("Parameter was not an error")}function aa(e){return!!e&&"object"==typeof e&&"[object Error]"===(t=e,Object.prototype.toString.call(t))||e instanceof Error;var t}class sa extends Error{constructor(e,t){const n=[...arguments],{options:r,shortMessage:i}=function(e){let t,n="";if(0===e.length)t={};else if(aa(e[0]))t={cause:e[0]},n=e.slice(1).join(" ")||"";else if(e[0]&&"object"==typeof e[0])t=Object.assign({},e[0]),n=e.slice(1).join(" ")||"";else{if("string"!=typeof e[0])throw new Error("Invalid arguments passed to Layerr");t={},n=n=e.join(" ")||""}return{options:t,shortMessage:n}}(n);let o=i;if(r.cause&&(o="".concat(o,": ").concat(r.cause.message)),super(o),this.message=o,r.name&&"string"==typeof r.name?this.name=r.name:this.name="Layerr",r.cause&&Object.defineProperty(this,"_cause",{value:r.cause}),Object.defineProperty(this,"_info",{value:{}}),r.info&&"object"==typeof r.info&&Object.assign(this._info,r.info),Error.captureStackTrace){const e=r.constructorOpt||this.constructor;Error.captureStackTrace(this,e)}}static cause(e){return oa(e),e._cause&&aa(e._cause)?e._cause:null}static fullStack(e){var t;oa(e);const n=sa.cause(e);return n?"".concat(e.stack,"\ncaused by: ").concat(sa.fullStack(n)):null!==(t=e.stack)&&void 0!==t?t:""}static info(e){oa(e);const t={},n=sa.cause(e);return n&&Object.assign(t,sa.info(n)),e._info&&Object.assign(t,e._info),t}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e="".concat(e,": ").concat(this.message)),e}}var la=ta(47),ca=ta.n(la);const ua="__PATH_SEPARATOR_POSIX__",da="__PATH_SEPARATOR_WINDOWS__";function ha(e){try{const t=e.replace(/\//g,ua).replace(/\\\\/g,da);return encodeURIComponent(t).split(da).join("\\\\").split(ua).join("/")}catch(e){throw new sa(e,"Failed encoding path")}}function pa(e){return e.startsWith("/")?e:"/"+e}function fa(e){let t=e;return"/"!==t[0]&&(t="/"+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function ga(e){let t=new(ia())(e).pathname;return t.length<=0&&(t="/"),fa(t)}function ma(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return function(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var n=e.shift();e[0]=n+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<e.length;r++){var i=e[r];if("string"!=typeof i)throw new TypeError("Url must be a string. Received "+i);""!==i&&(r>0&&(i=i.replace(/^[\/]+/,"")),i=r<e.length-1?i.replace(/[\/]+$/,""):i.replace(/[\/]+$/,"/"),t.push(i))}var o=t.join("/"),a=(o=o.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}(t.reduce((e,t,n)=>((0===n||"/"!==t||"/"===t&&"/"!==e[e.length-1])&&e.push(t),e),[]))}var va=ta(542),ya=ta.n(va);function ba(e,t){const n=e.url.replace("//",""),r=-1==n.indexOf("/")?"/":n.slice(n.indexOf("/")),i=e.method?e.method.toUpperCase():"GET",o=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&"auth",a="00000000".concat(t.nc).slice(-8),s=function(e,t,n,r,i,o,a){const s=a||ya()("".concat(t,":").concat(n,":").concat(r));return e&&"md5-sess"===e.toLowerCase()?ya()("".concat(s,":").concat(i,":").concat(o)):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),l=ya()("".concat(i,":").concat(r)),c=o?ya()("".concat(s,":").concat(t.nonce,":").concat(a,":").concat(t.cnonce,":").concat(o,":").concat(l)):ya()("".concat(s,":").concat(t.nonce,":").concat(l)),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:o,response:c,nc:a,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(const e in u)u[e]&&("qop"===e||"nc"===e||"algorithm"===e?d.push("".concat(e,"=").concat(u[e])):d.push("".concat(e,'="').concat(u[e],'"')));return"Digest ".concat(d.join(", "))}function wa(e){return"digest"===(e.headers&&e.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()}var xa=ta(101),Aa=ta.n(xa);function Sa(e){return Aa().decode(e)}function ka(e,t){var n;return"Basic ".concat((n="".concat(e,":").concat(t),Aa().encode(n)))}const _a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof window?window:globalThis,Ca=_a.fetch.bind(_a),Ea=(_a.Headers,_a.Request),Ta=_a.Response;let Ia=function(e){return e.Auto="auto",e.Digest="digest",e.None="none",e.Password="password",e.Token="token",e}({}),Pa=function(e){return e.DataTypeNoLength="data-type-no-length",e.InvalidAuthType="invalid-auth-type",e.InvalidOutputFormat="invalid-output-format",e.LinkUnsupportedAuthType="link-unsupported-auth",e.InvalidUpdateRange="invalid-update-range",e.NotSupported="not-supported",e}({});function La(e,t,n,r,i){switch(e.authType){case Ia.Auto:t&&n&&(e.headers.Authorization=ka(t,n));break;case Ia.Digest:e.digest=function(e,t,n){return{username:e,password:t,ha1:n,nc:0,algorithm:"md5",hasDigestAuth:!1}}(t,n,i);break;case Ia.None:break;case Ia.Password:e.headers.Authorization=ka(t,n);break;case Ia.Token:e.headers.Authorization="".concat((o=r).token_type," ").concat(o.access_token);break;default:throw new sa({info:{code:Pa.InvalidAuthType}},"Invalid auth type: ".concat(e.authType))}var o}ta(345),ta(800);const Na="@@HOTPATCHER",ja=()=>{};function Ra(e){return{original:e,methods:[e],final:!1}}class Oa{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Na}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e||e.__type__!==Na)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach(n=>{this.configuration.registry.hasOwnProperty(n)?t&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])}),e._configuration=this.configuration,this}execute(e){const t=this.get(e)||ja;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t(...r)}get(e){const t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error("Failed handling method request: No method provided for override: ".concat(e));default:throw new Error("Failed handling request which resulted in an empty method: Invalid empty-action specified: ".concat(this.getEmptyAction))}return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("Failed creating sequence: No functions provided");return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=n;const o=this;for(;t.length>0;)i=[t.shift().apply(o,i)];return i[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{chain:r=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error("Failed patching '".concat(e,"': Method marked as being final"));if("function"!=typeof t)throw new Error("Failed patching '".concat(e,"': Provided method is not a function"));if(r)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=Ra(t);else if(this.isPatched(e)){const{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(Ra(t),{original:n})}else this.configuration.registry[e]=Ra(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return this.execute(e,...r)}plugin(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach(t=>{this.patch(e,t,{chain:!0})}),this}restore(e){if(!this.isPatched(e))throw new Error("Failed restoring method: No method present for key: ".concat(e));if("function"!=typeof this.configuration.registry[e].original)throw new Error("Failed restoring method: Original method not found or of invalid type for key: ".concat(e));return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error("Failed marking '".concat(e,"' as final: No method found for key"));return this.configuration.registry[e].final=!0,this}}let za=null;function Da(){return za||(za=new Oa),za}function Ma(e){return function(e){if("object"!=typeof e||null===e||"[object Object]"!=Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Fa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=null,i=[...t];for(;i.length>0;){const e=i.shift();r=r?Ba(r,e):Ma(e)}return r}function Ba(e,t){const n=Ma(e);return Object.keys(t).forEach(e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:"object"==typeof t[e]&&t[e]?n[e]="object"==typeof n[e]&&n[e]?Ba(n[e],t[e]):Ma(t[e]):n[e]=t[e]:n[e]=t[e]}),n}function Wa(e){const t={};for(const n of e.keys())t[n]=e.get(n);return t}function Ua(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};const r={};return t.reduce((e,t)=>(Object.keys(t).forEach(n=>{const i=n.toLowerCase();r.hasOwnProperty(i)?e[r[i]]=t[n]:(r[i]=n,e[n]=t[n])}),e),{})}ta(805);const Va="function"==typeof ArrayBuffer,{toString:Ha}=Object.prototype;function Ga(e){return Va&&(e instanceof ArrayBuffer||"[object ArrayBuffer]"===Ha.call(e))}function qa(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Ka(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function $a(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Xa=Ka(function(e){const t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Fa(e,{headers:{Authorization:ba(e,t)}})),$a(Za(e),function(n){let r=!1;return i=function(e){return r?e:n},(o=function(){if(401==n.status)return t.hasDigestAuth=function(e,t){if(!wa(e))return!1;const n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const r=e.headers&&e.headers.get("www-authenticate")||"",i=n.exec(r);if(!i)break;t[i[1]]=i[2]||i[3]}return t.nc+=1,t.cnonce=function(){let e="";for(let t=0;t<32;++t)e="".concat(e).concat("abcdef0123456789"[Math.floor(16*Math.random())]);return e}(),!0}(n,t),function(){if(t.hasDigestAuth)return $a(Za(e=Fa(e,{headers:{Authorization:ba(e,t)}})),function(e){return 401==e.status?t.hasDigestAuth=!1:t.nc++,r=!0,e})}();t.nc++}())&&o.then?o.then(i):i(o);var i,o})}),Ya=Ka(function(e,t){return $a(Za(e),function(n){return n.ok?(t.authType=Ia.Password,n):401==n.status&&wa(n)?(t.authType=Ia.Digest,La(t,t.username,t.password,void 0,void 0),e._digest=t.digest,Xa(e)):n})}),Ja=Ka(function(e,t){return t.authType===Ia.Auto?Ya(e,t):e._digest?Xa(e):Za(e)});function Qa(e,t,n){const r=Ma(e);return r.headers=Ua(t.headers,r.headers||{},n.headers||{}),void 0!==n.data&&(r.data=n.data),n.signal&&(r.signal=n.signal),t.httpAgent&&(r.httpAgent=t.httpAgent),t.httpsAgent&&(r.httpsAgent=t.httpsAgent),t.digest&&(r._digest=t.digest),"boolean"==typeof t.withCredentials&&(r.withCredentials=t.withCredentials),r}function Za(e){const t=Da();return t.patchInline("request",e=>t.patchInline("fetch",Ca,e.url,function(e){let t={};const n={method:e.method};if(e.headers&&(t=Ua(t,e.headers)),void 0!==e.data){const[r,i]=function(e){if("string"==typeof e)return[e,{}];if(qa(e))return[e,{}];if(Ga(e))return[e,{}];if(e&&"object"==typeof e)return[JSON.stringify(e),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof e)}(e.data);n.body=r,t=Ua(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials="include"),n.headers=t,n}(e)),e)}var es=ta(285);const ts=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},ns={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rs=e=>e.replace(/[[\]\\-]/g,"\\$&"),is=e=>e.join(""),os=(e,t)=>{const n=t;if("["!==e.charAt(n))throw new Error("not in a brace expression");const r=[],i=[];let o=n+1,a=!1,s=!1,l=!1,c=!1,u=n,d="";e:for(;o<e.length;){const t=e.charAt(o);if("!"!==t&&"^"!==t||o!==n+1){if("]"===t&&a&&!l){u=o+1;break}if(a=!0,"\\"!==t||l){if("["===t&&!l)for(const[t,[a,l,c]]of Object.entries(ns))if(e.startsWith(t,o)){if(d)return["$.",!1,e.length-n,!0];o+=t.length,c?i.push(a):r.push(a),s=s||l;continue e}l=!1,d?(t>d?r.push(rs(d)+"-"+rs(t)):t===d&&r.push(rs(t)),d="",o++):e.startsWith("-]",o+1)?(r.push(rs(t+"-")),o+=2):e.startsWith("-",o+1)?(d=t,o+=2):(r.push(rs(t)),o++)}else l=!0,o++}else c=!0,o++}if(u<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(0===i.length&&1===r.length&&/^\\?.$/.test(r[0])&&!c)return[(h=2===r[0].length?r[0].slice(-1):r[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1];var h;const p="["+(c?"^":"")+is(r)+"]",f="["+(c?"":"^")+is(i)+"]";return[r.length&&i.length?"("+p+"|"+f+")":r.length?p:f,s,u-n,!0]},as=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},ss=new Set(["!","?","+","*","@"]),ls=e=>ss.has(e),cs="(?!\\.)",us=new Set(["[","."]),ds=new Set(["..","."]),hs=new Set("().*{}+?[]^$\\!"),ps="[^/]",fs=ps+"*?",gs=ps+"+?";var ms=new WeakMap,vs=new WeakMap,ys=new WeakMap,bs=new WeakMap,ws=new WeakMap,xs=new WeakMap,As=new WeakMap,Ss=new WeakMap,ks=new WeakMap,_s=new WeakMap,Cs=new WeakMap,Es=new WeakSet;class Ts{constructor(e,t){!function(e,t){Ko(e,t),t.add(e)}(this,Es),u(this,"type",void 0),$o(this,ms,void 0),$o(this,vs,void 0),$o(this,ys,!1),$o(this,bs,[]),$o(this,ws,void 0),$o(this,xs,void 0),$o(this,As,void 0),$o(this,Ss,!1),$o(this,ks,void 0),$o(this,_s,void 0),$o(this,Cs,!1);let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.type=e,e&&Jo(vs,this,!0),Jo(ws,this,t),Jo(ms,this,Yo(ws,this)?Yo(ms,Yo(ws,this)):this),Jo(ks,this,Yo(ms,this)===this?n:Yo(ks,Yo(ms,this))),Jo(As,this,Yo(ms,this)===this?[]:Yo(As,Yo(ms,this))),"!"!==e||Yo(Ss,Yo(ms,this))||Yo(As,this).push(this),Jo(xs,this,Yo(ws,this)?Yo(bs,Yo(ws,this)).length:0)}get hasMagic(){if(void 0!==Yo(vs,this))return Yo(vs,this);for(const e of Yo(bs,this))if("string"!=typeof e&&(e.type||e.hasMagic))return Jo(vs,this,!0);return Yo(vs,this)}toString(){return void 0!==Yo(_s,this)?Yo(_s,this):this.type?Jo(_s,this,this.type+"("+Yo(bs,this).map(e=>String(e)).join("|")+")"):Jo(_s,this,Yo(bs,this).map(e=>String(e)).join(""))}push(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const e of t)if(""!==e){if("string"!=typeof e&&!(e instanceof Ts&&Yo(ws,e)===this))throw new Error("invalid part: "+e);Yo(bs,this).push(e)}}toJSON(){var e;const t=null===this.type?Yo(bs,this).slice().map(e=>"string"==typeof e?e:e.toJSON()):[this.type,...Yo(bs,this).map(e=>e.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===Yo(ms,this)||Yo(Ss,Yo(ms,this))&&"!"===(null===(e=Yo(ws,this))||void 0===e?void 0:e.type))&&t.push({}),t}isStart(){var e;if(Yo(ms,this)===this)return!0;if(null===(e=Yo(ws,this))||void 0===e||!e.isStart())return!1;if(0===Yo(xs,this))return!0;const t=Yo(ws,this);for(let e=0;e<Yo(xs,this);e++){const n=Yo(bs,t)[e];if(!(n instanceof Ts&&"!"===n.type))return!1}return!0}isEnd(){var e,t,n;if(Yo(ms,this)===this)return!0;if("!"===(null===(e=Yo(ws,this))||void 0===e?void 0:e.type))return!0;if(null===(t=Yo(ws,this))||void 0===t||!t.isEnd())return!1;if(!this.type)return null===(n=Yo(ws,this))||void 0===n?void 0:n.isEnd();const r=Yo(ws,this)?Yo(bs,Yo(ws,this)).length:0;return Yo(xs,this)===r-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new Ts(this.type,e);for(const e of Yo(bs,this))t.copyIn(e);return t}static fromGlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Ts(null,void 0,t);return Ps.call(Ts,e,n,0,t),n}toMMPattern(){if(this!==Yo(ms,this))return Yo(ms,this).toMMPattern();const e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||Yo(vs,this)||Yo(ks,this).nocase&&!Yo(ks,this).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const o=(Yo(ks,this).nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp("^".concat(t,"$"),o),{_src:t,_glob:e})}get options(){return Yo(ks,this)}toRegExpSource(e){const t=null!=e?e:!!Yo(ks,this).dot;if(Yo(ms,this)===this&&Xo(Es,this,Is).call(this),!this.type){var n;const r=this.isStart()&&this.isEnd(),i=Yo(bs,this).map(t=>{const[n,i,o,a]="string"==typeof t?Ns.call(Ts,t,Yo(vs,this),r):t.toRegExpSource(e);return Jo(vs,this,Yo(vs,this)||o),Jo(ys,this,Yo(ys,this)||a),n}).join("");let o="";if(this.isStart()&&"string"==typeof Yo(bs,this)[0]&&(1!==Yo(bs,this).length||!ds.has(Yo(bs,this)[0]))){const n=us,r=t&&n.has(i.charAt(0))||i.startsWith("\\.")&&n.has(i.charAt(2))||i.startsWith("\\.\\.")&&n.has(i.charAt(4)),a=!t&&!e&&n.has(i.charAt(0));o=r?"(?!(?:^|/)\\.\\.?(?:$|/))":a?cs:""}let a="";return this.isEnd()&&Yo(Ss,Yo(ms,this))&&"!"===(null===(n=Yo(ws,this))||void 0===n?void 0:n.type)&&(a="(?:$|\\/)"),[o+i+a,as(i),Jo(vs,this,!!Yo(vs,this)),Yo(ys,this)]}const r="*"===this.type||"+"===this.type,i="!"===this.type?"(?:(?!(?:":"(?:";let o=Xo(Es,this,Ls).call(this,t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return Jo(bs,this,[e]),this.type=null,Jo(vs,this,void 0),[e,as(this.toString()),!1,!1]}let a=!r||e||t?"":Xo(Es,this,Ls).call(this,!0);a===o&&(a=""),a&&(o="(?:".concat(o,")(?:").concat(a,")*?"));let s="";return s="!"===this.type&&Yo(Cs,this)?(this.isStart()&&!t?cs:"")+gs:i+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":cs)+fs+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&a?")":"*"===this.type&&a?")?":")".concat(this.type)),[s,as(o),Jo(vs,this,!!Yo(vs,this)),Yo(ys,this)]}}function Is(){if(this!==Yo(ms,this))throw new Error("should only call on root");if(Yo(Ss,this))return this;let e;for(this.toString(),Jo(Ss,this,!0);e=Yo(As,this).pop();){if("!"!==e.type)continue;let t=e,n=Yo(ws,t);for(;n;){for(let r=Yo(xs,t)+1;!n.type&&r<Yo(bs,n).length;r++)for(const t of Yo(bs,e)){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(Yo(bs,n)[r])}t=n,n=Yo(ws,t)}}return this}function Ps(e,t,n,r){let i=!1,o=!1,a=-1,s=!1;if(null===t.type){let l=n,c="";for(;l<e.length;){const n=e.charAt(l++);if(i||"\\"===n)i=!i,c+=n;else if(o)l===a+1?"^"!==n&&"!"!==n||(s=!0):"]"!==n||l===a+2&&s||(o=!1),c+=n;else if("["!==n)if(r.noext||!ls(n)||"("!==e.charAt(l))c+=n;else{t.push(c),c="";const i=new Qo(n,t);l=Ps.call(Qo,e,i,l,r),t.push(i)}else o=!0,a=l,s=!1,c+=n}return t.push(c),l}let l=n+1,c=new Qo(null,t);const u=[];let d="";for(;l<e.length;){const n=e.charAt(l++);if(i||"\\"===n)i=!i,d+=n;else if(o)l===a+1?"^"!==n&&"!"!==n||(s=!0):"]"!==n||l===a+2&&s||(o=!1),d+=n;else if("["!==n)if(ls(n)&&"("===e.charAt(l)){c.push(d),d="";const t=new Qo(n,c);c.push(t),l=Ps.call(Qo,e,t,l,r)}else if("|"!==n){if(")"===n)return""===d&&0===Yo(bs,t).length&&Jo(Cs,t,!0),c.push(d),d="",t.push(...u,c),l;d+=n}else c.push(d),d="",u.push(c),c=new Qo(null,t);else o=!0,a=l,s=!1,d+=n}return t.type=null,Jo(vs,t,void 0),Jo(bs,t,[e.substring(n-1)]),l}function Ls(e){return Yo(bs,this).map(t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[n,r,i,o]=t.toRegExpSource(e);return Jo(ys,this,Yo(ys,this)||o),n}).filter(e=>!(this.isStart()&&this.isEnd()&&!e)).join("|")}function Ns(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i="",o=!1;for(let a=0;a<e.length;a++){const s=e.charAt(a);if(r)r=!1,i+=(hs.has(s)?"\\":"")+s;else if("\\"!==s){if("["===s){const[n,r,s,l]=os(e,a);if(s){i+=n,o=o||r,a+=s-1,t=t||l;continue}}"*"!==s?"?"!==s?i+=s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=ps,t=!0):(i+=n&&"*"===e?gs:fs,t=!0)}else a===e.length-1?i+="\\\\":r=!0}return[i,as(e),!!t,o]}Qo=Ts;const js=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return ts(t),!(!n.nocomment&&"#"===t.charAt(0))&&new ol(t,n).match(e)},Rs=/^\*+([^+@!?\*\[\(]*)$/,Os=e=>t=>!t.startsWith(".")&&t.endsWith(e),zs=e=>t=>t.endsWith(e),Ds=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Ms=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Fs=/^\*+\.\*+$/,Bs=e=>!e.startsWith(".")&&e.includes("."),Ws=e=>"."!==e&&".."!==e&&e.includes("."),Us=/^\.\*+$/,Vs=e=>"."!==e&&".."!==e&&e.startsWith("."),Hs=/^\*+$/,Gs=e=>0!==e.length&&!e.startsWith("."),qs=e=>0!==e.length&&"."!==e&&".."!==e,Ks=/^\?+([^+@!?\*\[\(]*)?$/,$s=e=>{let[t,n=""]=e;const r=Qs([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},Xs=e=>{let[t,n=""]=e;const r=Zs([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},Ys=e=>{let[t,n=""]=e;const r=Zs([t]);return n?e=>r(e)&&e.endsWith(n):r},Js=e=>{let[t,n=""]=e;const r=Qs([t]);return n?e=>r(e)&&e.endsWith(n):r},Qs=e=>{let[t]=e;const n=t.length;return e=>e.length===n&&!e.startsWith(".")},Zs=e=>{let[t]=e;const n=t.length;return e=>e.length===n&&"."!==e&&".."!==e},el="object"==typeof process&&process?{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_CLIENT:"userscript",REACT_APP_NAME:"KISS Translator",REACT_APP_NAME_CN:"简约翻译",REACT_APP_VERSION:"2.0.20",REACT_APP_HOMEPAGE:"https://github.com/fishjar/kiss-translator",REACT_APP_OPTIONSPAGE:"https://fishjar.github.io/kiss-translator/options.html",REACT_APP_OPTIONSPAGE_DEV:"http://localhost:3000/options.html",REACT_APP_LOGOURL:"https://fishjar.github.io/kiss-translator/images/logo192.png",REACT_APP_RULESURL:"https://fishjar.github.io/kiss-rules/kiss-rules_v2.json",REACT_APP_RULESURL_ON:"https://fishjar.github.io/kiss-rules/kiss-rules-on_v2.json",REACT_APP_RULESURL_OFF:"https://fishjar.github.io/kiss-rules/kiss-rules-off_v2.json",REACT_APP_USERSCRIPT_DOWNLOADURL:"https://fishjar.github.io/kiss-translator/kiss-translator.user.js",REACT_APP_USERSCRIPT_IOS_DOWNLOADURL:"https://fishjar.github.io/kiss-translator/kiss-translator-ios-safari.user.js"}.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";js.sep="win32"===el?"\\":"/";const tl=Symbol("globstar **");js.GLOBSTAR=tl,js.filter=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>js(n,e,t)};const nl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign({},e,t)};js.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return js;const t=js;return Object.assign(function(n,r){return t(n,r,nl(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))},{Minimatch:class extends t.Minimatch{constructor(t){super(t,nl(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}static defaults(n){return t.defaults(nl(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n){super(t,n,nl(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.AST.fromGlob(n,nl(e,r))}},unescape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.unescape(n,nl(e,r))},escape:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.escape(n,nl(e,r))},filter:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filter(n,nl(e,r))},defaults:n=>t.defaults(nl(e,n)),makeRe:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.makeRe(n,nl(e,r))},braceExpand:function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.braceExpand(n,nl(e,r))},match:function(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.match(n,r,nl(e,i))},sep:t.sep,GLOBSTAR:tl})};const rl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ts(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:es(e)};js.braceExpand=rl,js.makeRe=function(e){return new ol(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).makeRe()},js.match=function(e,t){const n=new ol(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e};const il=/[?*]|[+@!]\(.*?\)|\[|\]/;class ol{constructor(e){u(this,"options",void 0),u(this,"set",void 0),u(this,"pattern",void 0),u(this,"windowsPathsNoEscape",void 0),u(this,"nonegate",void 0),u(this,"negate",void 0),u(this,"comment",void 0),u(this,"empty",void 0),u(this,"preserveMultipleSlashes",void 0),u(this,"partial",void 0),u(this,"globSet",void 0),u(this,"globParts",void 0),u(this,"nocase",void 0),u(this,"isWindows",void 0),u(this,"platform",void 0),u(this,"windowsNoMagicRoot",void 0),u(this,"regexp",void 0);let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ts(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||el,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&il.test(e[2])||il.test(e[3])),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)"**"===e[t][n]&&(e[t][n]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let n=t;for(;"**"===e[n+1];)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{const n=e[e.length-1];return"**"===t&&"**"===n?e:".."===t&&n&&".."!==n&&"."!==n&&"**"!==n?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){const r=e[n];1===n&&""===r&&""===e[0]||"."!==r&&""!==r||(t=!0,e.splice(n,1),n--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let n=0;for(;-1!==(n=e.indexOf("..",n+1));){const r=e[n-1];r&&"."!==r&&".."!==r&&"**"!==r&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;-1!==(r=n.indexOf("**",r+1));){let i=r;for(;"**"===n[i+1];)i++;i>r&&n.splice(r+1,i-r);let o=n[r+1];const a=n[r+2],s=n[r+3];if(".."!==o)continue;if(!a||"."===a||".."===a||!s||"."===s||".."===s)continue;t=!0,n.splice(r,1);const l=n.slice(0);l[r]="**",e.push(l),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){const r=n[e];1===e&&""===r&&""===n[0]||"."!==r&&""!==r||(t=!0,n.splice(e,1),e--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(t=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const e=n[i-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===i&&"**"===n[i+1]?["."]:[];n.splice(i-1,2,...e),0===n.length&&n.push(""),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){const r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=0,i=0,o=[],a="";for(;r<e.length&&i<t.length;)if(e[r]===t[i])o.push("b"===a?t[i]:e[r]),r++,i++;else if(n&&"**"===e[r]&&t[i]===e[r+1])o.push(e[r]),r++;else if(n&&"**"===t[i]&&e[r]===t[i+1])o.push(t[i]),i++;else if("*"!==e[r]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i]){if("*"!==t[i]||!e[r]||!this.options.dot&&e[r].startsWith(".")||"**"===e[r])return!1;if("a"===a)return!1;a="b",o.push(t[i]),r++,i++}else{if("b"===a)return!1;a="a",o.push(e[r]),r++,i++}return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,n=0;for(let r=0;r<e.length&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.options;if(this.isWindows){const n="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=!n&&""===e[0]&&""===e[1]&&"?"===e[2]&&/^[a-z]:$/i.test(e[3]),i="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),o=r?3:n?0:void 0,a=!i&&""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])?3:i?0:void 0;if("number"==typeof o&&"number"==typeof a){const[n,r]=[e[o],t[a]];n.toLowerCase()===r.toLowerCase()&&(t[a]=n,a>o?t=t.slice(a):o>a&&(e=e.slice(o)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,a=0,s=e.length,l=t.length;o<s&&a<l;o++,a++){this.debug("matchOne loop");var c=t[a],u=e[o];if(this.debug(t,c,u),!1===c)return!1;if(c===tl){this.debug("GLOBSTAR",[t,c,u]);var d=o,h=a+1;if(h===l){for(this.debug("** at the end");o<s;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;d<s;){var p=e[d];if(this.debug("\nglobstar while",e,d,t,h,p),this.matchOne(e.slice(d),t.slice(h),n))return this.debug("globstar found match!",d,s,p),!0;if("."===p||".."===p||!r.dot&&"."===p.charAt(0)){this.debug("dot detected!",e,d,t,h);break}this.debug("globstar swallow a segment, and continue"),d++}return!(!n||(this.debug("\n>>> no match, partial?",e,d,t,h),d!==s))}let i;if("string"==typeof c?(i=u===c,this.debug("string match",c,u,i)):(i=c.test(u),this.debug("pattern match",c,u,i)),!i)return!1}if(o===s&&a===l)return!0;if(o===s)return n;if(a===l)return o===s-1&&""===e[o];throw new Error("wtf?")}braceExpand(){return rl(this.pattern,this.options)}parse(e){ts(e);const t=this.options;if("**"===e)return tl;if(""===e)return"";let n,r=null;(n=e.match(Hs))?r=t.dot?qs:Gs:(n=e.match(Rs))?r=(t.nocase?t.dot?Ms:Ds:t.dot?zs:Os)(n[1]):(n=e.match(Ks))?r=(t.nocase?t.dot?Xs:$s:t.dot?Ys:Js)(n):(n=e.match(Fs))?r=t.dot?Ws:Bs:(n=e.match(Us))&&(r=Vs);const i=Ts.fromGlob(e,this.options).toMMPattern();return r&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,n=t.noglobstar?"[^/]*?":t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=new Set(t.nocase?["i"]:[]);let i=e.map(e=>{const t=e.map(e=>{if(e instanceof RegExp)for(const t of e.flags.split(""))r.add(t);return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e===tl?tl:e._src});return t.forEach((e,r)=>{const i=t[r+1],o=t[r-1];e===tl&&o!==tl&&(void 0===o?void 0!==i&&i!==tl?t[r+1]="(?:\\/|"+n+"\\/)?"+i:t[r]=n:void 0===i?t[r-1]=o+"(?:\\/|"+n+")?":i!==tl&&(t[r-1]=o+"(?:\\/|\\/"+n+"\\/)"+i,t[r+1]=tl))}),t.filter(e=>e!==tl).join("/")}).join("|");const[o,a]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+a+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...r].join(""))}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const r=this.slashSplit(e);this.debug(this.pattern,"split",r);const i=this.set;this.debug(this.pattern,"set",i);let o=r[r.length-1];if(!o)for(let e=r.length-2;!o&&e>=0;e--)o=r[e];for(let e=0;e<i.length;e++){const a=i[e];let s=r;if(n.matchBase&&1===a.length&&(s=[o]),this.matchOne(s,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return js.defaults(e).Minimatch}}function al(e){const t=new Error("".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"","Invalid response: ").concat(e.status," ").concat(e.statusText));return t.status=e.status,t.response=e,t}function sl(e,t){const{status:n}=t;if(401===n&&e.digest)return t;if(n>=400)throw al(t);return t}function ll(e,t){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?{data:t,headers:e.headers?Wa(e.headers):{},status:e.status,statusText:e.statusText}:t}js.AST=Ts,js.Minimatch=ol,js.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},js.unescape=as;const cl=(ul=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Qa({url:ma(e.remoteURL,ha(t)),method:"COPY",headers:{Destination:ma(e.remoteURL,ha(n)),Overwrite:!1===r.overwrite?"F":"T",Depth:r.shallow?"0":"infinity"}},e,r);return a=function(t){sl(e,t)},(o=Ja(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(ul.apply(this,e))}catch(e){return Promise.reject(e)}});var ul,dl=ta(635),hl=ta(829),pl=ta.n(hl),fl=function(e){return e.Array="array",e.Object="object",e.Original="original",e}(fl||{});function gl(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fl.Original;const r=pl().get(e,t);return"array"===n&&!1===Array.isArray(r)?[r]:"object"===n&&Array.isArray(r)?r[0]:r}function ml(e){return new Promise(t=>{t(function(e){const{multistatus:t}=e;if(""===t)return{multistatus:{response:[]}};if(!t)throw new Error("Invalid response: No root multistatus found");const n={multistatus:Array.isArray(t)?t[0]:t};return pl().set(n,"multistatus.response",gl(n,"multistatus.response",fl.Array)),pl().set(n,"multistatus.response",pl().get(n,"multistatus.response").map(e=>function(e){const t=Object.assign({},e);return t.status?pl().set(t,"status",gl(t,"status",fl.Object)):(pl().set(t,"propstat",gl(t,"propstat",fl.Object)),pl().set(t,"propstat.prop",gl(t,"propstat.prop",fl.Object))),t}(e))),n}(new dl.XMLParser({allowBooleanAttributes:!0,attributeNamePrefix:"",textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor:(e,t,n)=>"true"===t||"false"===t?"true"===t:t,tagValueProcessor(e,t,n){if(!n.endsWith("propstat.prop.displayname"))return t}}).parse(e)))})}function vl(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{getlastmodified:r=null,getcontentlength:i="0",resourcetype:o=null,getcontenttype:a=null,getetag:s=null}=e,l=o&&"object"==typeof o&&void 0!==o.collection?"directory":"file",c={filename:t,basename:ca().basename(t),lastmod:r,size:parseInt(i,10),type:l,etag:"string"==typeof s?s.replace(/"/g,""):null};return"file"===l&&(c.mime=a&&"string"==typeof a?a.split(";")[0]:""),n&&(void 0!==e.displayname&&(e.displayname=String(e.displayname)),c.props=e),c}function yl(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=null;try{e.multistatus.response[0].propstat&&(r=e.multistatus.response[0])}catch(e){}if(!r)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:o}}=r,[a,s,l]=o.split(" ",3),c=parseInt(s,10);if(c>=400){const e=new Error("Invalid response: ".concat(c," ").concat(l));throw e.status=c,e}return vl(i,fa(t),n)}function bl(e){switch(String(e)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(e),10)}}function wl(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const xl=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=Qa({url:ma(e.remoteURL,ha(t)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,n);return wl(Ja(i,e),function(n){return sl(e,n),wl(n.text(),function(e){return wl(ml(e),function(e){const i=yl(e,t,r);return ll(n,i,r)})})})});function Al(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Sl=kl(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(e){if(!e||"/"===e)return[];let t=e;const n=[];do{n.push(t),t=ca().dirname(t)}while(t&&"/"!==t);return n}(fa(t));r.sort((e,t)=>e.length>t.length?1:t.length>e.length?-1:0);let i=!1;return function(e,t){if("function"==typeof e[El]){var n,r,i,o=e[El]();function c(e){try{for(;!(n=o.next()).done;)if((e=t(n.value))&&e.then){if(!Pl(e))return void e.then(c,i||(i=Tl.bind(null,r=new Il,2)));e=e.v}r?Tl(r,1,e):r=e}catch(e){Tl(r||(r=new Il),2,e)}}if(c(),o.return){var a=function(e){try{n.done||o.return()}catch(e){}return e};if(r&&r.then)return r.then(a,function(e){throw a(e)});a()}return r}if(!("length"in e))throw new TypeError("Object is not iterable");for(var s=[],l=0;l<e.length;l++)s.push(e[l]);return function(e,t,n){var r,i,o=-1;return function a(s){try{for(;++o<e.length&&(!n||!n());)if((s=t(o))&&s.then){if(!Pl(s))return void s.then(a,i||(i=Tl.bind(null,r=new Il,2)));s=s.v}r?Tl(r,1,s):r=s}catch(e){Tl(r||(r=new Il),2,e)}}(),r}(s,function(e){return t(s[e])},function(){return!1})}(r,function(r){return o=function(){return function(n,i){try{var o=Al(xl(e,r),function(e){if("directory"!==e.type)throw new Error("Path includes a file: ".concat(t))})}catch(e){return i(e)}return o&&o.then?o.then(void 0,i):o}(0,function(t){const o=t;return function(){if(404===o.status)return i=!0,Cl(Ll(e,r,h(h({},n),{},{recursive:!1})));throw t}()})},(a=function(){if(i)return Cl(Ll(e,r,h(h({},n),{},{recursive:!1})))}())&&a.then?a.then(o):o();var o,a})});function kl(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function _l(){}function Cl(e,t){if(!t)return e&&e.then?e.then(_l):Promise.resolve()}const El="undefined"!=typeof Symbol?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function Tl(e,t,n){if(!e.s){if(n instanceof Il){if(!n.s)return void(n.o=Tl.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Tl.bind(null,e,t),Tl.bind(null,e,2));e.s=t,e.v=n;const r=e.o;r&&r(e)}}const Il=function(){function e(){}return e.prototype.then=function(t,n){const r=new e,i=this.s;if(i){const e=1&i?t:n;if(e){try{Tl(r,1,e(this.v))}catch(e){Tl(r,2,e)}return r}return this}return this.o=function(e){try{const i=e.v;1&e.s?Tl(r,1,t?t(i):i):n?Tl(r,1,n(i)):Tl(r,2,i)}catch(e){Tl(r,2,e)}},r},e}();function Pl(e){return e instanceof Il&&1&e.s}const Ll=kl(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!0===n.recursive)return Sl(e,t,n);const r=Qa({url:ma(e.remoteURL,(i=ha(t),i.endsWith("/")?i:i+"/")),method:"MKCOL"},e,n);var i;return Al(Ja(r,e),function(t){sl(e,t)})});var Nl=ta(388),jl=ta.n(Nl);const Rl=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};if("object"==typeof n.range&&"number"==typeof n.range.start){let e="bytes=".concat(n.range.start,"-");"number"==typeof n.range.end&&(e="".concat(e).concat(n.range.end)),r.Range=e}const i=Qa({url:ma(e.remoteURL,ha(t)),method:"GET",headers:r},e,n);return a=function(t){if(sl(e,t),r.Range&&206!==t.status){const e=new Error("Invalid response code for partial request: ".concat(t.status));throw e.status=t.status,e}return n.callback&&setTimeout(()=>{n.callback(t)},0),t.body},(o=Ja(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a}),Ol=()=>{},zl=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t,n){n.url||(n.url=ma(e.remoteURL,ha(t)));const r=Qa(n,e,{});return o=function(t){return sl(e,t),t},(i=Ja(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),Dl=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qa({url:ma(e.remoteURL,ha(t)),method:"DELETE"},e,n);return o=function(t){sl(e,t)},(i=Ja(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o}),Ml=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r,i){try{var o=(a=xl(e,t,n),s=function(){return!0},a&&a.then||(a=Promise.resolve(a)),s?a.then(s):a)}catch(e){return i(e)}var a,s;return o&&o.then?o.then(void 0,i):o}(0,function(e){if(404===e.status)return!1;throw e})});function Fl(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Bl=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qa({url:ma(e.remoteURL,ha(t),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:n.deep?"infinity":"1"}},e,n);return Fl(Ja(r,e),function(r){return sl(e,r),Fl(r.text(),function(i){if(!i)throw new Error("Failed parsing directory contents: Empty response");return Fl(ml(i),function(i){const o=pa(t);let a=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=ca().join(t,"/"),{multistatus:{response:a}}=e,s=a.map(e=>{const t=function(e){try{return e.replace(/^https?:\/\/[^\/]+/,"")}catch(e){throw new sa(e,"Failed normalising HREF")}}(e.href),{propstat:{prop:n}}=e;return vl(n,"/"===o?decodeURIComponent(fa(t)):fa(ca().relative(decodeURIComponent(o),decodeURIComponent(t))),r)});return i?s:s.filter(e=>e.basename&&("file"===e.type||e.filename!==n.replace(/\/$/,"")))}(i,pa(e.remoteBasePath||e.remotePath),o,n.details,n.includeSelf);return n.glob&&(a=function(e,t){return e.filter(e=>js(e.filename,t,{matchBase:!0}))}(a,n.glob)),ll(r,a,n.details)})})})});function Wl(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const Ul=Wl(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qa({url:ma(e.remoteURL,ha(t)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[ql]},e,n);return Vl(Ja(r,e),function(t){return sl(e,t),Vl(t.text(),function(e){return ll(t,e,n.details)})})});function Vl(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const Hl=Wl(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qa({url:ma(e.remoteURL,ha(t)),method:"GET"},e,n);return Vl(Ja(r,e),function(t){let r;return sl(e,t),function(e,t){var n=e();return n&&n.then?n.then(t):t()}(function(){return Vl(t.arrayBuffer(),function(e){r=e})},function(){return ll(t,r,n.details)})})}),Gl=Wl(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{format:r="binary"}=n;if("binary"!==r&&"text"!==r)throw new sa({info:{code:Pa.InvalidOutputFormat}},"Invalid output format: ".concat(r));return"text"===r?Ul(e,t,n):Hl(e,t,n)}),ql=e=>e;function Kl(e){return new dl.XMLBuilder({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build($l({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},"d"))}function $l(e,t){const n=h({},e);for(const e in n)n.hasOwnProperty(e)&&(n[e]&&"object"==typeof n[e]&&-1===e.indexOf(":")?(n["".concat(t,":").concat(e)]=$l(n[e],t),delete n[e]):!1===/^@_/.test(e)&&(n["".concat(t,":").concat(e)]=n[e],delete n[e]));return n}function Xl(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Yl(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const Jl=Yl(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Qa({url:ma(e.remoteURL,ha(t)),method:"UNLOCK",headers:{"Lock-Token":n}},e,r);return Xl(Ja(i,e),function(t){if(sl(e,t),204!==t.status&&200!==t.status)throw al(t)})}),Ql=Yl(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{refreshToken:r,timeout:i=Zl}=n,o={Accept:"text/plain,application/xml",Timeout:i};r&&(o.If=r);const a=Qa({url:ma(e.remoteURL,ha(t)),method:"LOCK",headers:o,data:Kl(e.contactHref)},e,n);return Xl(Ja(a,e),function(t){return sl(e,t),Xl(t.text(),function(e){const n=(o=e,new dl.XMLParser({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(o)),r=pl().get(n,"prop.lockdiscovery.activelock.locktoken.href"),i=pl().get(n,"prop.lockdiscovery.activelock.timeout");var o;if(!r)throw al(t,"No lock token received: ");return{token:r,serverTimeout:i}})})}),Zl="Infinite, Second-4100000000";function ec(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const tc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t.path||"/",r=Qa({url:ma(e.remoteURL,n),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},e,t);return ec(Ja(r,e),function(n){return sl(e,n),ec(n.text(),function(e){return ec(ml(e),function(e){const r=function(e){try{const[t]=e.multistatus.response,{propstat:{prop:{"quota-used-bytes":n,"quota-available-bytes":r}}}=t;return void 0!==n&&void 0!==r?{used:parseInt(String(n),10),available:bl(r)}:null}catch(e){}return null}(e);return ll(n,r,t.details)})})})});function nc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const rc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{details:r=!1}=n,i=Qa({url:ma(e.remoteURL,ha(t)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":e.headers["Content-Type"]||"application/xml; charset=utf-8"}},e,n);return nc(Ja(i,e),function(n){return sl(e,n),nc(n.text(),function(e){return nc(ml(e),function(e){const i=function(e,t,n){const r={truncated:!1,results:[]};return r.truncated=e.multistatus.response.some(e=>{var n,r;return"507"===(null===(n=(e.status||(null===(r=e.propstat)||void 0===r?void 0:r.status)).split(" ",3))||void 0===n?void 0:n[1])&&e.href.replace(/\/$/,"").endsWith(ha(t).replace(/\/$/,""))}),e.multistatus.response.forEach(e=>{if(void 0===e.propstat)return;const t=e.href.split("/").map(decodeURIComponent).join("/");r.results.push(vl(e.propstat.prop,t,n))}),r}(e,t,r);return ll(n,i,r)})})})}),ic=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Qa({url:ma(e.remoteURL,ha(t)),method:"MOVE",headers:{Destination:ma(e.remoteURL,ha(n)),Overwrite:!1===r.overwrite?"F":"T"}},e,r);return a=function(t){sl(e,t)},(o=Ja(i,e))&&o.then||(o=Promise.resolve(o)),a?o.then(a):o;var o,a});var oc=ta(172);const ac=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{contentLength:i=!0,overwrite:o=!0}=r,a={"Content-Type":"application/octet-stream"};!1===i||(a["Content-Length"]="".concat("number"==typeof i?i:function(e){if(Ga(e))return e.byteLength;if(qa(e))return e.length;if("string"==typeof e)return(0,oc.d)(e);throw new sa({info:{code:Pa.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}(n))),o||(a["If-None-Match"]="*");const s=Qa({url:ma(e.remoteURL,ha(t)),method:"PUT",headers:a,data:n},e,r);return c=function(t){try{sl(e,t)}catch(e){const t=e;if(412!==t.status||o)throw t;return!1}return!0},(l=Ja(s,e))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c}),sc=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qa({url:ma(e.remoteURL,ha(t)),method:"OPTIONS"},e,n);return o=function(t){var n,r;try{sl(e,t)}catch(e){throw e}return{compliance:(null!==(n=t.headers.get("DAV"))&&void 0!==n?n:"").split(",").map(e=>e.trim()),server:null!==(r=t.headers.get("Server"))&&void 0!==r?r:""}},(i=Ja(r,e))&&i.then||(i=Promise.resolve(i)),o?i.then(o):i;var i,o});function lc(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}const cc=hc(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new sa({info:{code:Pa.InvalidUpdateRange}},"Invalid update range ".concat(n," for partial update"));const a={"Content-Type":"application/octet-stream","Content-Length":""+(r-n+1),"Content-Range":"bytes ".concat(n,"-").concat(r,"/*")},s=Qa({url:ma(e.remoteURL,ha(t)),method:"PUT",headers:a,data:i},e,o);return lc(Ja(s,e),function(t){sl(e,t)})});function uc(e,t){var n=e();return n&&n.then?n.then(t):t(n)}const dc=hc(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(n>r||n<0)throw new sa({info:{code:Pa.InvalidUpdateRange}},"Invalid update range ".concat(n," for partial update"));const a={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(r-n+1),"X-Update-Range":"bytes=".concat(n,"-").concat(r)},s=Qa({url:ma(e.remoteURL,ha(t)),method:"PATCH",headers:a,data:i},e,o);return lc(Ja(s,e),function(t){sl(e,t)})});function hc(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}const pc=hc(function(e,t,n,r,i){let o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return lc(sc(e,t,o),function(a){let s=!1;return uc(function(){if(a.compliance.includes("sabredav-partialupdate"))return lc(dc(e,t,n,r,i,o),function(e){return s=!0,e})},function(l){let c=!1;return s?l:uc(function(){if(a.server.includes("Apache")&&a.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return lc(cc(e,t,n,r,i,o),function(e){return c=!0,e})},function(e){if(c)return e;throw new sa({info:{code:Pa.NotSupported}},"Not supported")})})})}),fc="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function gc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{authType:n=null,remoteBasePath:r,contactHref:i=fc,ha1:o,headers:a={},httpAgent:s,httpsAgent:l,password:c,token:u,username:d,withCredentials:h}=t;let p=n;p||(p=d||c?Ia.Password:Ia.None);const f={authType:p,remoteBasePath:r,contactHref:i,ha1:o,headers:Object.assign({},a),httpAgent:s,httpsAgent:l,password:c,remotePath:ga(e),remoteURL:e,token:u,username:d,withCredentials:h};return La(f,d,c,u,o),{copyFile:(e,t,n)=>cl(f,e,t,n),createDirectory:(e,t)=>Ll(f,e,t),createReadStream:(e,t)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new(0,jl().PassThrough);return Rl(e,t,n).then(e=>{e.pipe(r)}).catch(e=>{r.emit("error",e)}),r}(f,e,t),createWriteStream:(e,t,n)=>function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ol;const i=new(0,jl().PassThrough),o={};!1===n.overwrite&&(o["If-None-Match"]="*");const a=Qa({url:ma(e.remoteURL,ha(t)),method:"PUT",headers:o,data:i,maxRedirects:0},e,n);return Ja(a,e).then(t=>sl(e,t)).then(e=>{setTimeout(()=>{r(e)},0)}).catch(e=>{i.emit("error",e)}),i}(f,e,t,n),customRequest:(e,t)=>zl(f,e,t),deleteFile:(e,t)=>Dl(f,e,t),exists:(e,t)=>Ml(f,e,t),getDirectoryContents:(e,t)=>Bl(f,e,t),getFileContents:(e,t)=>Gl(f,e,t),getFileDownloadLink:e=>function(e,t){let n=ma(e.remoteURL,ha(t));const r=/^https:/i.test(n)?"https":"http";switch(e.authType){case Ia.None:break;case Ia.Password:{const t=Sa(e.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,"".concat(r,"://").concat(t,"@"));break}default:throw new sa({info:{code:Pa.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(e.authType))}return n}(f,e),getFileUploadLink:e=>function(e,t){let n="".concat(ma(e.remoteURL,ha(t)),"?Content-Type=application/octet-stream");const r=/^https:/i.test(n)?"https":"http";switch(e.authType){case Ia.None:break;case Ia.Password:{const t=Sa(e.headers.Authorization.replace(/^Basic /i,"").trim());n=n.replace(/^https?:\/\//,"".concat(r,"://").concat(t,"@"));break}default:throw new sa({info:{code:Pa.LinkUnsupportedAuthType}},"Unsupported auth type for file link: ".concat(e.authType))}return n}(f,e),getHeaders:()=>Object.assign({},f.headers),getQuota:e=>tc(f,e),lock:(e,t)=>Ql(f,e,t),moveFile:(e,t,n)=>ic(f,e,t,n),putFileContents:(e,t,n)=>ac(f,e,t,n),partialUpdateFileContents:(e,t,n,r,i)=>pc(f,e,t,n,r,i),getDAVCompliance:e=>sc(f,e),search:(e,t)=>rc(f,e,t),setHeaders:e=>{f.headers=Object.assign({},e)},stat:(e,t)=>xl(f,e,t),unlock:(e,t,n)=>Jl(f,e,t,n)}}var mc=na.UU;(0,na.Gu)().patch("request",e=>ui(e.url,{method:e.method,headers:e.headers,body:e.data}));const vc=async(e,t)=>{let{syncUrl:n,syncKey:r}=t;return n=Cn(n,"/"),await(async(e,t,n)=>pi(e,{headers:{"Content-type":"application/json",Authorization:"Bearer ".concat(await kn(t,"KISS-Translator-SYNC"))},method:"POST",body:JSON.stringify(n)}))("".concat(n,"/sync"),r,e)},yc=async(e,t)=>{const{syncType:r,syncUrl:i,syncUser:o,syncKey:a,syncMeta:s={}}=await Xn();if(!i||!a||r===ct&&!o)return;let{updateAt:l=0,syncAt:c=0}=s[e]||{};0===c&&(l=0);const u={key:e,value:JSON.stringify(t),updateAt:l},d={syncUrl:i,syncUser:o,syncKey:a},h=r===ct?await(async(e,t)=>{let{syncUrl:r,syncUser:i,syncKey:o}=t;const a=mc(r,{username:i,password:o}),s="/".concat(n),l="/".concat(n,"/").concat(e.key);if(!1===await a.exists(s)&&await a.createDirectory(s),await a.exists(l)){const t=await a.getFileContents(l,{format:"text"}),n=JSON.parse(t);if(n.updateAt>=e.updateAt)return n}return await a.putFileContents(l,JSON.stringify(e,null,2)),e})(u,d):await vc(u,d);if(!h)throw new Error("sync data got err",e);const p=JSON.parse(h.value),f=h.updateAt>l;return s[e]={updateAt:h.updateAt,syncAt:Date.now()},await Yn({syncMeta:s}),{value:p,isNew:f}},bc=async()=>{const e=await Un(),t=await yc(Nt,e);null!=t&&t.isNew&&await Vn(t.value)},wc=async()=>{try{await bc()}catch(e){rt("sync user rules",e.message)}};const xc=(e,t)=>e.find(e=>e.pattern!==Ve&&e.pattern.split(/\n|,/).some(e=>An(t,e.trim()))),Ac=(e,t)=>{if(!t)return h({},e);if(!e)return h({},t);const n=h({},e);return["selector","keepSelector","rootsSelector","ignoreSelector"].forEach(r=>{n[r]=function(e,t){if(!t||!t.trim())return e;const n=e.split(",").map(e=>e.trim()).filter(Boolean),r=t.split(",").map(e=>e.trim()).filter(Boolean),i=r.some(e=>e.startsWith("+")||e.startsWith("-"));if(!i)return[...new Set(r)].join(", ");let o=new Set(n),a="add";return r.forEach(e=>{let t=e;e.startsWith("+")?(a="add",t=e.slice(1).trim()):e.startsWith("-")&&(a="remove",t=e.slice(1).trim()),t&&("remove"===a?o.delete(t):o.add(t))}),[...o].join(", ")}(e[r]||"",t[r]||"")}),["terms","aiTerms","termsStyle","highlightStyle","textExtStyle","selectStyle","parentStyle","grandStyle","injectJs","injectCss","transStartHook","transEndHook"].forEach(e=>{var r;null!==(r=t[e])&&void 0!==r&&r.trim()&&(n[e]=t[e])}),["apiSlug","fromLang","toLang","transOpen","transOnly","autoScan","hasRichText","hasShadowroot","scanAll","transTag","transTitle","splitParagraph","highlightWords","textStyle"].forEach(e=>{t[e]&&t[e]!==Ve&&(n[e]=t[e])}),["splitLength"].forEach(e=>{t[e]&&(n[e]=t[e])}),t.pattern&&(n.pattern=t.pattern),n},Sc=async(e,t)=>{let{injectRules:n,subrulesList:r}=t;const i=await Un(),o=h(h({},Ze),i.find(e=>e.pattern===Ve)||{}),a=xc(i,e);let s=null;if(n)try{const t=r.find(e=>e.selected);if(null!=t&&t.url){const n=await(async e=>{let t=await Gn(e);return t&&0!==t.length||(t=await Go(e),await Ho(e)),t||[]})(t.url);s=xc(n,e)}}catch(e){rt("load injectRules",e)}if(!a&&!s)return o;let l=h({},o);return l=Ac(l,s),l=Ac(l,a),l},kc=e=>{if("string"===Sn(e)&&(e=JSON.parse(e)),"array"!==Sn(e))throw new Error("data error");const t=se.map(e=>e[0]),n=oe.map(e=>e[0]),r=new Set;return e=e.filter(e=>"object"===Sn(e)).filter(e=>{let{pattern:t}=e;return"string"===Sn(t)&&!r.has(t.trim())&&(r.add(t.trim()),!0)}).map(e=>{let{pattern:r,selector:i,keepSelector:o,rootsSelector:a,ignoreSelector:s,terms:l,aiTerms:c,termsStyle:u,highlightStyle:d,textExtStyle:h,selectStyle:p,parentStyle:f,grandStyle:g,injectJs:m,injectCss:v,apiSlug:y,fromLang:b,toLang:w,textStyle:x,transOpen:A,transOnly:S,autoScan:k,hasRichText:_,hasShadowroot:C,scanAll:E,transTag:T,transTitle:I,transStartHook:P,transEndHook:L,splitParagraph:N,splitLength:j,highlightWords:R}=e;return{pattern:r.trim(),selector:"string"===Sn(i)?i:"",keepSelector:"string"===Sn(o)?o:"",rootsSelector:"string"===Sn(a)?a:"",ignoreSelector:"string"===Sn(s)?s:"",terms:"string"===Sn(l)?l:"",aiTerms:"string"===Sn(c)?c:"",termsStyle:"string"===Sn(u)?u:"",highlightStyle:"string"===Sn(d)?d:"",textExtStyle:"string"===Sn(h)?h:"",selectStyle:"string"===Sn(p)?p:"",parentStyle:"string"===Sn(f)?f:"",grandStyle:"string"===Sn(g)?g:"",injectJs:"string"===Sn(m)?m:"",injectCss:"string"===Sn(v)?v:"",apiSlug:"string"===Sn(y)&&""!==y.trim()?y.trim():Ve,fromLang:yn([Ve,...t],b),toLang:yn([Ve,...n],w),textStyle:"string"===Sn(x)&&""!==x.trim()?x.trim():Ve,transOpen:yn([Ve,"true","false"],A),transOnly:yn([Ve,"true","false"],S),autoScan:yn([Ve,"true","false"],k),hasRichText:yn([Ve,"true","false"],_),hasShadowroot:yn([Ve,"true","false"],C),scanAll:yn([Ve,"true","false"],E),transTag:yn([Ve,"span","font"],T),transTitle:yn([Ve,"true","false"],I),transStartHook:"string"===Sn(P)?P:"",transEndHook:"string"===Sn(L)?L:"",splitParagraph:yn([Ve,...Ke],N),splitLength:Number.isInteger(j)?j:0,highlightWords:yn([Ve,...Je],R)}}),e},_c=(()=>{const e="kiss-translator-policy";let t=null;if(globalThis.trustedTypes&&globalThis.trustedTypes.createPolicy)try{t=globalThis.trustedTypes.createPolicy(e,{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch(n){n.message.includes("already exists")?t=globalThis.trustedTypes.policies.get(e):nt.info("cont create Trusted Types",n)}return{createHTML:e=>t?t.createHTML(e):e,createScript:e=>t?t.createScript(e):e,createScriptURL:e=>t?t.createScriptURL(e):e,isEnabled:()=>null!==t}})(),Cc=(()=>{try{if("undefined"==typeof navigator)return!1;const e=navigator.userAgent,t=/Android/i.test(e),n=/iPhone|iPad|iPod/i.test(e),r=/Macintosh/i.test(e)&&navigator.maxTouchPoints>1;return t||n||r}catch(e){return!1}})();var Ec=pr("videoEl"),Tc=pr("formattedSubtitles"),Ic=pr("captionWindowEl"),Pc=pr("paperEl"),Lc=pr("currentSubtitleIndex"),Nc=pr("setting"),jc=pr("isAdPlaying"),Rc=pr("throttledTriggerTranslations"),Oc=pr("tooltipEl"),zc=pr("hoverTimeout"),Dc=pr("wasPlayingBeforeHover"),Mc=pr("hoverTarget"),Fc=pr("createCaptionWindow"),Bc=pr("handleWordHover"),Wc=pr("handleWordHoverOut"),Uc=pr("handleWordMouseMove"),Vc=pr("attachSpanListeners"),Hc=pr("showWordTooltip"),Gc=pr("hideWordTooltip"),qc=pr("enableDragging"),Kc=pr("attachEventListeners"),$c=pr("removeEventListeners"),Xc=pr("findSubtitleIndexForTime"),Yc=pr("updateCaptionDisplay"),Jc=pr("wrapWordsWithSpans"),Qc=pr("triggerTranslations"),Zc=pr("translateAndStore"),eu=pr("getCurrentSubtitleStartTime");class tu{constructor(e){var t,n;let{videoEl:r,formattedSubtitles:i,setting:o}=e;Object.defineProperty(this,eu,{value:vu}),Object.defineProperty(this,Zc,{value:mu}),Object.defineProperty(this,Qc,{value:gu}),Object.defineProperty(this,Jc,{value:fu}),Object.defineProperty(this,Yc,{value:pu}),Object.defineProperty(this,Xc,{value:hu}),Object.defineProperty(this,$c,{value:du}),Object.defineProperty(this,Kc,{value:uu}),Object.defineProperty(this,qc,{value:cu}),Object.defineProperty(this,Gc,{value:lu}),Object.defineProperty(this,Hc,{value:su}),Object.defineProperty(this,Vc,{value:au}),Object.defineProperty(this,Uc,{value:ou}),Object.defineProperty(this,Wc,{value:iu}),Object.defineProperty(this,Bc,{value:ru}),Object.defineProperty(this,Fc,{value:nu}),Object.defineProperty(this,Ec,{writable:!0,value:void 0}),Object.defineProperty(this,Tc,{writable:!0,value:[]}),Object.defineProperty(this,Ic,{writable:!0,value:null}),Object.defineProperty(this,Pc,{writable:!0,value:null}),Object.defineProperty(this,Lc,{writable:!0,value:-1}),Object.defineProperty(this,Nc,{writable:!0,value:{}}),Object.defineProperty(this,jc,{writable:!0,value:!1}),Object.defineProperty(this,Rc,{writable:!0,value:void 0}),Object.defineProperty(this,Oc,{writable:!0,value:null}),Object.defineProperty(this,zc,{writable:!0,value:null}),Object.defineProperty(this,Dc,{writable:!0,value:!1}),Object.defineProperty(this,Mc,{writable:!0,value:null}),dr(this,Nc)[Nc]=o,dr(this,Ec)[Ec]=r,dr(this,Tc)[Tc]=i,this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onSeek=this.onSeek.bind(this),dr(this,Rc)[Rc]=function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{leading:!0,trailing:!0},i=null,o=null,a=null,s=0;function l(){s=!1===r.leading?0:Date.now(),i=null,n=e.apply(a,o),i||(a=o=null)}const c=function(){const c=Date.now();s||!1!==r.leading||(s=c);const u=t-(c-s);for(var d=arguments.length,h=new Array(d),p=0;p<d;p++)h[p]=arguments[p];return o=h,a=this,u<=0||u>t?(i&&(clearTimeout(i),i=null),s=c,n=e.apply(a,o),i||(a=o=null)):i||!1===r.trailing||(i=setTimeout(l,u)),n};return c.cancel=()=>{clearTimeout(i),s=0,i=null,a=o=null},c}(dr(this,Qc)[Qc].bind(this),1e3*(null!==(t=o.throttleTrans)&&void 0!==t?t:30));const a=null!==(n=dr(this,Nc)[Nc].enhanceMode)&&void 0!==n?n:"mobile_off";("on"===a||"mobile_off"===a&&!Cc)&&(()=>{if(document.getElementById("kiss-word-hover-styles"))return;const e=document.createElement("style");e.id="kiss-word-hover-styles",e.textContent="\n .kiss-word-hover {\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #4fc3f7;\n text-decoration-thickness: 2px;\n }\n \n .kiss-word-tooltip {\n position: fixed;\n background: rgba(0, 0, 0, 0.9);\n color: white;\n border-radius: 6px;\n padding: 12px;\n font-size: 14px;\n z-index: 2147483647;\n max-width: 300px;\n word-wrap: break-word;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n backdrop-filter: blur(4px);\n border: 1px solid rgba(255, 255, 255, 0.1);\n font-family: Arial, sans-serif;\n }\n \n .kiss-word-tooltip-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 8px;\n font-weight: bold;\n font-size: 16px;\n color: #4fc3f7;\n }\n \n .kiss-word-tooltip-close {\n background: none;\n border: none;\n color: #aaa;\n cursor: pointer;\n font-size: 18px;\n padding: 0;\n margin-left: 10px;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .kiss-word-tooltip-close:hover {\n color: white;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 50%;\n }\n \n .kiss-word-loading {\n color: #bbb;\n font-style: italic;\n }\n \n .kiss-word-definition {\n margin: 4px 0;\n }\n \n .kiss-word-pos {\n color: #4fc3f7;\n font-weight: bold;\n }\n \n .kiss-word-phonetic {\n color: #bbb;\n font-style: italic;\n margin-right: 10px;\n }\n \n .kiss-word-example {\n margin-top: 10px;\n padding-top: 8px;\n border-top: 1px solid #444;\n }\n \n .kiss-word-example-title {\n font-weight: bold;\n margin-bottom: 5px;\n }\n \n .kiss-word-example-sentence {\n margin-bottom: 3px;\n }\n \n .kiss-word-example-translation {\n color: #bbb;\n font-style: italic;\n }\n ",document.head.appendChild(e)})()}start(){0!==dr(this,Tc)[Tc].length?(nt.info("Bilingual Subtitle Manager: Starting..."),dr(this,Fc)[Fc](),dr(this,Kc)[Kc](),this.onTimeUpdate()):nt.warn("Bilingual Subtitles: No subtitles to display.")}destroy(){var e,t,n,r;nt.info("Bilingual Subtitle Manager: Destroying..."),dr(this,$c)[$c](),null===(e=dr(this,Rc)[Rc])||void 0===e||e.cancel(),null===(t=dr(this,Ic)[Ic])||void 0===t||null===(n=t.parentElement)||void 0===n||null===(r=n.parentElement)||void 0===r||r.remove(),dr(this,Tc)[Tc]=[],dr(this,Oc)[Oc]&&(dr(this,Oc)[Oc].remove(),dr(this,Oc)[Oc]=null),dr(this,zc)[zc]&&(clearTimeout(dr(this,zc)[zc]),dr(this,zc)[zc]=null)}setIsAdPlaying(e){dr(this,jc)[jc]=e,this.onTimeUpdate()}onTimeUpdate(){const e=1e3*dr(this,Ec)[Ec].currentTime,t=dr(this,Xc)[Xc](e);if(t!==dr(this,Lc)[Lc]){dr(this,Lc)[Lc]=t;const e=-1!==t?dr(this,Tc)[Tc][t]:null;dr(this,Yc)[Yc](e)}dr(this,Rc)[Rc](e)}onSeek(){dr(this,Lc)[Lc]=-1,dr(this,Rc)[Rc].cancel(),this.onTimeUpdate()}appendSubtitles(e){e&&0!==e.length&&(nt.info("Bilingual Subtitle Manager: Appending ".concat(e.length," new subtitles...")),dr(this,Lc)[Lc]=-1,this.onTimeUpdate(),this.onSubtitleUpdate&&this.onSubtitleUpdate(dr(this,Tc)[Tc]))}updateSetting(e){dr(this,Nc)[Nc]=h(h({},dr(this,Nc)[Nc]),e)}}function nu(){var e,t;const n=document.createElement("div");n.className="kiss-caption-container notranslate",Object.assign(n.style,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",pointerEvents:"none"});const r=document.createElement("div");r.className="kiss-caption-paper",Object.assign(r.style,{position:"absolute",width:"80%",left:"50%",bottom:"10%",transform:"translateX(-50%)",textAlign:"center",containerType:"inline-size",zIndex:"2147483647",pointerEvents:"auto",display:"none"}),dr(this,Pc)[Pc]=r,dr(this,Ic)[Ic]=document.createElement("div"),dr(this,Ic)[Ic].className="kiss-caption-window",dr(this,Ic)[Ic].style.cssText=dr(this,Nc)[Nc].windowStyle,dr(this,Ic)[Ic].style.pointerEvents="auto",dr(this,Ic)[Ic].style.cursor="grab",dr(this,Ic)[Ic].style.opacity="1",dr(this,Pc)[Pc].appendChild(dr(this,Ic)[Ic]),n.appendChild(dr(this,Pc)[Pc]);const i=null===(e=dr(this,Ec)[Ec].parentElement)||void 0===e?void 0:e.parentElement;if(!i)return void nt.warn("could not find videoContainer");i.style.position="relative",i.appendChild(n);const o=null!==(t=dr(this,Nc)[Nc].enhanceMode)&&void 0!==t?t:"mobile_off",a="on"===o||"mobile_off"===o&&!Cc;dr(this,qc)[qc](dr(this,Pc)[Pc],n,dr(this,Ic)[Ic]),a&&(dr(this,Ic)[Ic].addEventListener("pointerenter",e=>{e.target===dr(this,Ic)[Ic]&&(dr(this,Dc)[Dc]=dr(this,Ec)[Ec]&&!dr(this,Ec)[Ec].paused,dr(this,Ec)[Ec]&&!dr(this,Ec)[Ec].paused&&dr(this,Ec)[Ec].pause())}),dr(this,Ic)[Ic].addEventListener("pointerleave",e=>{e.target===dr(this,Ic)[Ic]&&(dr(this,Dc)[Dc]&&dr(this,Ec)[Ec]&&dr(this,Ec)[Ec].paused&&dr(this,Ec)[Ec].play(),dr(this,Dc)[Dc]=!1,dr(this,Mc)[Mc]=null)}))}function ru(e){const t=e.target;t.classList.contains("kiss-subtitle-word")&&(dr(this,zc)[zc]&&(clearTimeout(dr(this,zc)[zc]),dr(this,zc)[zc]=null),t.classList.add("kiss-word-hover"),dr(this,zc)[zc]=setTimeout(()=>{dr(this,Hc)[Hc](t.dataset.word,e.clientX,e.clientY)},300))}function iu(e){const t=e.target;t.classList.contains("kiss-subtitle-word")&&(t.classList.remove("kiss-word-hover"),dr(this,zc)[zc]&&(clearTimeout(dr(this,zc)[zc]),dr(this,zc)[zc]=null),dr(this,zc)[zc]=setTimeout(()=>{dr(this,Gc)[Gc]()},100))}function ou(e){}function au(){if(!dr(this,Ic)[Ic])return;dr(this,Ic)[Ic].querySelectorAll(".kiss-subtitle-word").forEach(e=>{if(e.dataset.kissListenerAttached)return;e.addEventListener("pointerenter",e=>dr(this,Bc)[Bc](e)),e.addEventListener("pointerleave",e=>dr(this,Wc)[Wc](e)),e.dataset.kissListenerAttached="1"})}async function su(e,t,n){var r;dr(this,Oc)[Oc]&&dr(this,Oc)[Oc].remove(),dr(this,Oc)[Oc]=document.createElement("div"),dr(this,Oc)[Oc].className="kiss-word-tooltip",dr(this,Oc)[Oc].innerHTML=_c.createHTML('<div class="kiss-word-loading">Looking up...</div>');const i=null===(r=dr(this,Ec)[Ec].parentElement)||void 0===r?void 0:r.parentElement;if(i){const e=i.getBoundingClientRect(),t=300,n=400,r=e.right-t-45,o=e.top+20,a=window.innerWidth-t-10;dr(this,Oc)[Oc].style.left=Math.min(a,Math.max(10,r))+"px",dr(this,Oc)[Oc].style.top=Math.max(10,o)+"px",dr(this,Oc)[Oc].style.maxWidth=t+"px",dr(this,Oc)[Oc].style.maxHeight=n+"px",dr(this,Oc)[Oc].style.overflow="auto"}document.body.appendChild(dr(this,Oc)[Oc]);try{const t=await Mo(e);let n="";if(t&&t.aus){const e=t.aus.find(e=>"美"===e.key);e&&e.phonetic?n=e.phonetic:t.aus.length>0&&t.aus[0].phonetic&&(n=t.aus[0].phonetic)}let r="";t&&t.trs&&(r=t.trs.slice(0,3).map(e=>"".concat(e.pos?e.pos+" ":"").concat(e.def)).join("; "));let i=[];t&&t.sentences&&(i=t.sentences.slice(0,2).map(e=>({eng:e.eng,chs:e.chs})));const o=dr(this,eu)[eu](),a=new CustomEvent("kiss-add-word",{detail:{word:e,phonetic:n,definition:r,examples:i,timestamp:o}});if(document.dispatchEvent(a),t&&(t.trs||t.aus||t.sentences)){let n='<div class="kiss-word-tooltip-header">\n <span>'.concat(e,'</span>\n <button class="kiss-word-tooltip-close" onclick="this.closest(\'.kiss-word-tooltip\').remove()">×</button>\n </div>');t.aus&&t.aus.length>0&&(n+="<div>",t.aus.forEach(e=>{e.phonetic&&(n+='<span class="kiss-word-phonetic">'.concat(e.phonetic,"</span>"))}),n+="</div>"),t.trs&&t.trs.slice(0,3).forEach(e=>{n+='<div class="kiss-word-definition">'.concat(e.pos?'<span class="kiss-word-pos">'+e.pos+"</span> ":"").concat(e.def,"</div>")}),t.sentences&&t.sentences.length>0&&(n+='<div class="kiss-word-example">\n <div class="kiss-word-example-title">例句</div>',t.sentences.slice(0,2).forEach(e=>{n+='<div class="kiss-word-example-sentence">'.concat(e.eng,'</div>\n <div class="kiss-word-example-translation">').concat(e.chs,"</div>")}),n+="</div>"),dr(this,Oc)[Oc]&&(dr(this,Oc)[Oc].innerHTML=_c.createHTML(n))}else dr(this,Oc)[Oc]&&(dr(this,Oc)[Oc].innerHTML=_c.createHTML('<div class="kiss-word-tooltip-header">\n <span>'.concat(e,'</span>\n <button class="kiss-word-tooltip-close" onclick="this.closest(\'.kiss-word-tooltip\').remove()">×</button>\n </div>\n <div class="kiss-word-definition">No definition found</div>')))}catch(t){nt.info("Dictionary lookup failed for word:",e,t);const n=dr(this,eu)[eu](),r=new CustomEvent("kiss-add-word",{detail:{word:e,phonetic:"",definition:"",examples:[],timestamp:n}});document.dispatchEvent(r),dr(this,Oc)[Oc]&&(dr(this,Oc)[Oc].innerHTML=_c.createHTML('<div class="kiss-word-tooltip-header">\n <span>'.concat(e,'</span>\n <button class="kiss-word-tooltip-close" onclick="this.closest(\'.kiss-word-tooltip\').remove()">×</button>\n </div>\n <div class="kiss-word-definition">Failed to load definition</div>')))}}function lu(){dr(this,Oc)[Oc]&&(dr(this,Oc)[Oc].remove(),dr(this,Oc)[Oc]=null)}function cu(e,t,n){let r,i,o,a=!1;const s=s=>{"mousedown"===s.type&&0!==s.button||(s.preventDefault(),a=!0,n.style.cursor="grabbing",r="touchstart"===s.type?s.touches[0].clientY:s.clientY,i=t.getBoundingClientRect().bottom-e.getBoundingClientRect().bottom,o=e.offsetHeight,document.addEventListener("mousemove",l,{capture:!0}),document.addEventListener("touchmove",l,{capture:!0,passive:!1}),document.addEventListener("mouseup",c,{capture:!0}),document.addEventListener("touchend",c,{capture:!0}))},l=n=>{if(!a)return;n.preventDefault();const s="touchmove"===n.type?n.touches[0].clientY:n.clientY;let l=i-(s-r);const c=t.clientHeight;l=Math.max(0,l),l=Math.min(c-o,l),o>c&&(l=Math.max(0,l)),e.style.bottom="".concat(l,"px")},c=t=>{if(!a)return;t.preventDefault(),a=!1,n.style.cursor="grab",document.removeEventListener("mousemove",l,{capture:!0}),document.removeEventListener("touchmove",l,{capture:!0}),document.removeEventListener("mouseup",c,{capture:!0}),document.removeEventListener("touchend",c,{capture:!0});const r=e.style.bottom;setTimeout(()=>{e.style.bottom=r},50)};n.addEventListener("mousedown",s),n.addEventListener("touchstart",s,{passive:!1})}function uu(){dr(this,Ec)[Ec].addEventListener("timeupdate",this.onTimeUpdate),dr(this,Ec)[Ec].addEventListener("seeked",this.onSeek)}function du(){dr(this,Ec)[Ec].removeEventListener("timeupdate",this.onTimeUpdate),dr(this,Ec)[Ec].removeEventListener("seeked",this.onSeek)}function hu(e){return dr(this,Tc)[Tc].findIndex(t=>e>=t.start&&e<=t.end)}function pu(e){if(dr(this,Pc)[Pc]&&dr(this,Ic)[Ic])if(dr(this,jc)[jc])dr(this,Pc)[Pc].style.display="none";else if(e){var t;const n=document.createElement("p");n.style.cssText=dr(this,Nc)[Nc].originStyle;const r=null!==(t=dr(this,Nc)[Nc].enhanceMode)&&void 0!==t?t:"mobile_off",i="on"===r||"mobile_off"===r&&!Cc;i?n.innerHTML=_c.createHTML(dr(this,Jc)[Jc](e.text)):n.textContent=Pn(e.text);const o=document.createElement("p");o.style.cssText=dr(this,Nc)[Nc].translationStyle,i?o.innerHTML=_c.createHTML(dr(this,Jc)[Jc](e.translation||"...")):o.textContent=Pn(e.translation)||"...",dr(this,Nc)[Nc].isBilingual?dr(this,Ic)[Ic].replaceChildren(n,o):dr(this,Ic)[Ic].replaceChildren(o),i&&dr(this,Vc)[Vc](),dr(this,Pc)[Pc].style.display="block"}else dr(this,Pc)[Pc].style.display="none"}function fu(e){return e.replace(/\b([a-zA-Z]+(?:'[a-zA-Z]+)?)\b/g,'<span class="kiss-subtitle-word" data-word="$1">$1</span>')}function gu(e){const{preTrans:t=90}=dr(this,Nc)[Nc],n=1e3*t;for(const t of dr(this,Tc)[Tc]){const r=t.start<=e&&t.end>=e,i=t.start>e&&t.start<=e+n,o=!t.translation&&!t.isTranslating;(r||i)&&o&&dr(this,Zc)[Zc](t)}}async function mu(e){e.isTranslating=!0;try{const{fromLang:t,toLang:n,apiSetting:r}=dr(this,Nc)[Nc],{trText:i}=await Uo({text:e.text,fromLang:t,toLang:n,apiSetting:r});e.translation=i}catch(t){nt.info("Translation failed for:",e.text,t),e.translation="[Translation failed]"}finally{e.isTranslating=!1;const t=dr(this,Xc)[Xc](1e3*dr(this,Ec)[Ec].currentTime);dr(this,Tc)[Tc][t]===e&&dr(this,Yc)[Yc](e),this.onSubtitleUpdate&&this.onSubtitleUpdate(dr(this,Tc)[Tc])}}function vu(){const e=1e3*dr(this,Ec)[Ec].currentTime,t=dr(this,Tc)[Tc].find(t=>e>=t.start&&e<=t.end);return t?t.start:e}class yu{constructor(e){this.videoEl=e,this.bilingualSubtitles=[],this.vocabulary=[],this.container=null,this.subtitleListEl=null,this.vocabularyListEl=null,this.subtitleScrollContainer=null,this._cachedSubtitleItems=[],this.loopAutoScroll=null,this.activeTab="subtitles",this._lastActiveIndex=-1,this.handleWordAdded=this.handleWordAdded.bind(this),document.addEventListener("kiss-add-word",this.handleWordAdded),window.addEventListener("message",e=>{e.data&&"KISS_TRANSLATOR_JUMP_TO_TIME"===e.data.type&&this.jumpToTime(e.data.time)})}initialize(e){this.bilingualSubtitles=e||[],this.bilingualSubtitles.length>0&&(this.createSubtitleList(),this.setupEventListeners())}setBilingualSubtitles(e){this.bilingualSubtitles=e||[],this.subtitleListEl?this.updateBilingualSubtitles():this.bilingualSubtitles.length>0&&(this.createSubtitleList(),this.setupEventListeners())}destroy(){this.turnOffAutoSub(),document.removeEventListener("kiss-add-word",this.handleWordAdded),this.container&&(this.container.remove(),this.container=null),this.subtitleListEl=null,this.vocabularyListEl=null,this.bilingualSubtitles=[],this._cachedSubtitleItems=[],this.vocabulary=[]}jumpToTime(e){this.videoEl&&Number.isFinite(e)&&(this.videoEl.currentTime=e/1e3,this.videoEl.paused&&this.videoEl.play())}handleWordAdded(e){e.detail&&e.detail.word&&this.addWord(e.detail.word,e.detail.phonetic||"",e.detail.definition||"",e.detail.examples||[],e.detail.timestamp||null)}addWord(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(!e)return;const o=this.vocabulary.findIndex(t=>t.word===e);if(-1!==o){const e=this.vocabulary[o];t&&(e.phonetic=t),n&&(e.definition=n),r.length>0&&(e.examples=r),i&&(e.timestamp=i)}else this.vocabulary.push({word:e,phonetic:t,definition:n,examples:r,timestamp:i});this._renderVocabulary()}downloadSubtitles(){if(this.bilingualSubtitles&&0!==this.bilingualSubtitles.length)try{const e=this._getYouTubeVideoId()||"video";Nn(ao(this.bilingualSubtitles),"kiss-subtitles-".concat(e,"_").concat(Date.now(),".vtt"))}catch(e){nt.error("Youtube Provider: download subtitles error:",e)}else nt.info("Youtube Provider: No subtitles to download")}createSubtitleList(){if(!this.videoEl)return;this._ensureContainer(),0===this.container.children.length&&this._renderTabsAndStructure();const e=this.subtitleListEl.querySelector("ul");e.replaceChildren(),this._cachedSubtitleItems=[];const t=document.createDocumentFragment();this.bilingualSubtitles.forEach((e,n)=>{const r=this._createSubtitleListItem(e,n);this._cachedSubtitleItems.push(r),t.appendChild(r)}),e.appendChild(t),this._renderVocabulary()}_ensureContainer(){if(this.container=document.getElementById("kiss-youtube-subtitle-list-container"),!this.container){this.container=document.createElement("div"),this.container.id="kiss-youtube-subtitle-list-container",this.container.className="notranslate",Object.assign(this.container.style,{height:"calc(100vh - 220px)",maxHeight:"none",zIndex:"999",background:"var(--kt-bg, rgba(255, 255, 255, 0.9))",backdropFilter:"blur(10px)",top:"60px",right:"0",fontSize:"14px",padding:"0",border:"var(--kt-border, 1px solid rgba(0, 0, 0, 0.1))",borderRadius:"8px",minWidth:"320px",maxWidth:"400px",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",display:"flex",flexDirection:"column",marginBottom:"12px"});const e=document.getElementById("secondary-inner");e&&e.prepend(this.container),(async()=>{try{const e=await Wn(),t=null==e?void 0:e.darkMode,n="function"==typeof window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,r="dark"===t||"auto"===t&&n?{"--kt-bg":"rgba(18,18,18,0.85)","--kt-border":"1px solid rgba(255, 255, 255, 0.06)","--kt-text":"#e6e6e6","--kt-subtext":"#bdbdbd","--kt-primary":"#90caf9","--kt-time-bg":"rgba(144,202,249,0.08)","--kt-divider":"rgba(255,255,255,0.06)","--kt-item-hover-bg":"rgba(255,255,255,0.02)","--kt-active-bg":"rgba(144,202,249,0.12)","--kt-btn-bg":"linear-gradient(180deg,#0f0f0f,#1b1b1b)","--kt-btn-color":"#e6e6e6","--kt-btn-border":"1px solid rgba(255,255,255,0.04)","--kt-btn-hover-bg":"linear-gradient(180deg,#141414,#262626)"}:{"--kt-bg":"rgba(255, 255, 255, 0.9)","--kt-border":"1px solid rgba(0, 0, 0, 0.1)","--kt-text":"#333","--kt-subtext":"#666","--kt-primary":"#1e88e5","--kt-time-bg":"rgba(30, 136, 229, 0.1)","--kt-divider":"rgba(240,240,240,0.6)","--kt-item-hover-bg":"rgba(30, 136, 229, 0.05)","--kt-active-bg":"rgba(30, 136, 229, 0.1)","--kt-btn-bg":"var(--kt-primary)","--kt-btn-color":"white","--kt-btn-border":"none","--kt-btn-hover-bg":"rgba(30,136,229,0.85)"};Object.keys(r).forEach(e=>this.container.style.setProperty(e,r[e]))}catch(e){nt.info("failed to apply subtitle list theme vars",e)}})()}}_renderTabsAndStructure(){const e=document.createElement("div");e.style.cssText="display: flex; border-bottom: 1px solid var(--kt-divider); padding: 0 16px; flex-shrink: 0;";const t=document.createElement("button");t.textContent="双语字幕";const n=document.createElement("button");n.textContent="生词本";const r=(e,t)=>{e.style.cssText="padding: 12px 16px; cursor: pointer; border: none; background: transparent; font-size: 15px; font-weight: ".concat(t?"600":"500","; color: ").concat(t?"var(--kt-primary)":"var(--kt-text)","; border-bottom: 2px solid ").concat(t?"var(--kt-primary)":"transparent","; margin-bottom: -1px; outline: none;")},i=document.createElement("button");i.innerHTML="×",i.title="Close",i.style.cssText="\n margin-left: auto; \n background: transparent; \n border: none; \n color: var(--kt-subtext); \n font-size: 22px; \n line-height: 1;\n cursor: pointer; \n padding: 0 8px;\n display: flex;\n align-items: center;\n transition: color 0.2s;\n ",i.addEventListener("click",()=>{this.destroy()}),i.addEventListener("mouseenter",()=>i.style.color="var(--kt-text)"),i.addEventListener("mouseleave",()=>i.style.color="var(--kt-subtext)");const o=document.createElement("div");o.style.cssText="overflow: hidden; flex-grow: 1; display: flex; flex-direction: column; height: calc(100% - 40px);",this.subtitleListEl=document.createElement("div"),this.subtitleListEl.id="kiss-youtube-subtitle-list",this.subtitleListEl.style.cssText="display: flex; flex-direction: column; height: 100%; overflow: hidden;";const a=document.createElement("div");a.style.cssText="padding: 10px 16px; border-bottom: 1px solid var(--kt-divider); display: flex; justify-content: center; flex-shrink: 0;";const s=document.createElement("button");s.textContent="下载字幕 (VTT)",s.style.cssText="padding: 6px 12px; background: var(--kt-btn-bg); color: var(--kt-btn-color); border: var(--kt-btn-border); border-radius: 4px; cursor: pointer; font-size: 12px; transition: background 220ms ease, color 200ms ease, transform 160ms ease;",s.addEventListener("mouseenter",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-hover-bg");e&&(s.style.background=e),s.style.transform="translateY(-1px)"}catch(e){}}),s.addEventListener("mouseleave",()=>{try{const e=getComputedStyle(this.container).getPropertyValue("--kt-btn-bg");e&&(s.style.background=e),s.style.transform="translateY(0)"}catch(e){}}),s.addEventListener("click",this.downloadSubtitles.bind(this)),a.appendChild(s),this.subtitleListEl.appendChild(a),this.subtitleScrollContainer=document.createElement("div"),this.subtitleScrollContainer.style.cssText="overflow-y: auto; flex: 1; padding: 0 16px; position: relative;";const l=document.createElement("ul");l.style.cssText="list-style-type: none; padding: 16px 0; margin: 0;",this.subtitleScrollContainer.appendChild(l),this.subtitleListEl.appendChild(this.subtitleScrollContainer),this.vocabularyListEl=document.createElement("div"),this.vocabularyListEl.id="kiss-youtube-vocabulary-list",this.vocabularyListEl.style.cssText="display: none; flex-direction: column; height: 100%; overflow: hidden;",t.addEventListener("click",()=>{this.activeTab="subtitles",r(t,!0),r(n,!1),this.subtitleListEl.style.display="flex",this.vocabularyListEl.style.display="none"}),n.addEventListener("click",()=>{this.activeTab="vocabulary",r(t,!1),r(n,!0),this.subtitleListEl.style.display="none",this.vocabularyListEl.style.display="flex",this._renderVocabulary()}),r(t,!0),r(n,!1),e.append(t,n,i),o.append(this.subtitleListEl,this.vocabularyListEl),this.container.append(e,o)}_createSubtitleListItem(e,t){const n=document.createElement("li");n.id="kiss-youtube-item-".concat(t),n.className="kiss-youtube-item",n.dataset.time=e.start,n.style.cssText="cursor: pointer; padding: 12px 16px; border-bottom: 1px solid var(--kt-divider); transition: all 0.2s ease; border-radius: 6px; margin-bottom: 4px; display: flex; align-items: flex-start;";const r=document.createElement("span");r.textContent="".concat(this.millisToMinutesAndSeconds(e.start)," "),r.style.cssText="color: var(--kt-primary); font-weight: 600; margin-right: 10px; font-size: 12px; background: var(--kt-time-bg); padding: 2px 6px; border-radius: 4px; flex-shrink: 0; line-height: 20px;";const i=document.createElement("div");i.style.cssText="flex-grow: 1;";const o=document.createElement("div");o.className="kiss-youtube-original",o.textContent=e.text||"",o.style.cssText="color: var(--kt-text); font-size: 14px; line-height: 1.4; margin-bottom: 4px;";const a=document.createElement("div");return a.className="kiss-youtube-translation",a.textContent=e.translation||"",a.style.display=e.translation?"block":"none",a.style.cssText="color: var(--kt-subtext); font-size: 13px; line-height: 1.4; font-style: italic; min-height: 18px;",n.addEventListener("click",()=>this.jumpToTime(e.start)),n.addEventListener("mouseenter",()=>{n.classList.contains("active-subtitle")||(n.style.backgroundColor="var(--kt-item-hover-bg)")}),n.addEventListener("mouseleave",()=>{n.classList.contains("active-subtitle")||(n.style.backgroundColor="transparent")}),i.appendChild(o),i.appendChild(a),n.appendChild(r),n.appendChild(i),n}updateBilingualSubtitles(){if(this.subtitleListEl){if(this.bilingualSubtitles.length!==this._cachedSubtitleItems.length){const e=this.subtitleListEl.querySelector("ul");if(e){e.replaceChildren(),this._cachedSubtitleItems=[];const t=document.createDocumentFragment();this.bilingualSubtitles.forEach((e,n)=>{const r=this._createSubtitleListItem(e,n);this._cachedSubtitleItems.push(r),t.appendChild(r)}),e.appendChild(t)}return}for(let e=0;e<this.bilingualSubtitles.length;e++){const t=this.bilingualSubtitles[e],n=this._cachedSubtitleItems[e];if(n&&t){n.dataset.time=t.start;const e=n.firstElementChild;e&&(e.textContent="".concat(this.millisToMinutesAndSeconds(t.start)," "));const r=n.querySelector(".kiss-youtube-original");r&&(r.textContent=t.text||"");const i=n.querySelector(".kiss-youtube-translation");i&&(i.textContent=t.translation||"",i.style.display=t.translation?"block":"none")}}}}_renderVocabulary(){if(!this.vocabularyListEl)return;this.vocabularyListEl.replaceChildren();const e=this._createExportContainer(),t=this._createVocabListContainer();this.vocabularyListEl.appendChild(e),this.vocabularyListEl.appendChild(t)}_createExportContainer(){const e=document.createElement("div");if(e.style.cssText="padding: 10px 16px; border-bottom: 1px solid var(--kt-divider); display: flex; justify-content: center; flex-shrink: 0; gap: 8px;",this.vocabulary.length>0){const t=(e,t)=>{const n=document.createElement("button");return n.textContent=e,n.style.cssText="padding: 6px 12px; background: var(--kt-primary); color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px;",t&&n.addEventListener("click",t.bind(this)),n};e.appendChild(t("导出JSON",this.exportVocabularyAsJson)),e.appendChild(t("导出CSV",this.exportVocabularyAsCsv)),e.appendChild(t("导出TXT",this.exportVocabularyAsTxt)),e.appendChild(t("导出MD",this.exportVocabularyAsMd))}else{const t=document.createElement("span");t.textContent="暂无生词,在字幕中添加",t.style.color="var(--kt-subtext)",t.style.fontSize="12px",e.appendChild(t)}return e}_createVocabListContainer(){const e=document.createElement("div");e.style.cssText="overflow-y: auto; overflow-x: hidden; flex: 1; padding: 0 16px; min-height: 0;";const t=document.createElement("div");return t.style.cssText="display: flex; flex-direction: column; gap: 16px; padding: 16px 0; width: 100%;",this.vocabulary.forEach(e=>{const n=this._createVocabItemElement(e);t.appendChild(n)}),e.appendChild(t),e}_createVocabItemElement(e){const t=document.createElement("div");t.style.cssText="border-bottom: 1px solid var(--kt-divider); word-wrap: break-word; word-break: break-word;";const n=document.createElement("div");n.style.cssText="display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap;";const r=document.createElement("div");if(r.textContent=e.word,r.style.cssText="color: var(--kt-text); font-weight: bold; font-size: 16px;",n.appendChild(r),e.phonetic){const t=document.createElement("div"),r=e.phonetic;t.textContent="[".concat(r,"]"),t.style.cssText="color: var(--kt-subtext); font-style: italic; font-size: 14px;",n.appendChild(t)}if(e.timestamp){const t=document.createElement("button");t.textContent="".concat(this.millisToMinutesAndSeconds(e.timestamp)),t.style.cssText="color: var(--kt-primary); background: none; border: none; padding: 0 4px; font-size: 14px; cursor: pointer;",t.addEventListener("click",()=>this.jumpToTime(e.timestamp)),n.appendChild(t)}if(t.appendChild(n),e.definition){const n=document.createElement("div");n.textContent=e.definition,n.style.cssText="color: var(--kt-text); margin: 8px 0; font-size: 14px; line-height: 1.4;",t.appendChild(n)}if(e.examples&&e.examples.length>0){const n=document.createElement("div");n.style.cssText="color: var(--kt-subtext); font-size: 13px; line-height: 1.4;",e.examples.forEach(e=>{const t=document.createElement("div");t.style.marginBottom="8px";const r=document.createElement("div");if(r.textContent=e.eng,t.appendChild(r),e.chs){const n=document.createElement("div");n.textContent=e.chs,n.style.cssText="color: var(--kt-subtext); font-style: italic;",t.appendChild(n)}n.appendChild(t)}),t.appendChild(n)}return t}exportVocabularyAsJson(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=this.vocabulary.map(e=>{const t=h({},e);if(e.phonetic){const n=e.phonetic;t.phonetic=n?"[".concat(n,"]"):""}return t}),n={videoInfo:{title:this._getYouTubeVideoTitle(),url:e?"https://www.youtube.com/watch?v=".concat(e):"",exportTime:(new Date).toISOString()},vocabulary:t};this._downloadFile(JSON.stringify(n,null,2),"application/json","json")}exportVocabularyAsCsv(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=this.vocabulary.map(t=>{var n,r;const i=t.phonetic,o=i?"[".concat(i,"]"):"",a=null===(n=t.examples)||void 0===n?void 0:n[0],s=null===(r=t.examples)||void 0===r?void 0:r[1];let l="";return t.timestamp&&e&&(l="https://www.youtube.com/watch?v=".concat(e,"&t=").concat(Math.floor(t.timestamp/1e3),"s")),[t.word,o,t.definition,(null==a?void 0:a.eng)||"",(null==a?void 0:a.chs)||"",(null==s?void 0:s.eng)||"",(null==s?void 0:s.chs)||"",l].map(e=>e?'"'.concat(e.toString().replace(/"/g,'""'),'"'):'""').join(",")}),n=['"'.concat(this._getYouTubeVideoTitle(),'",,,,,,,'),'"'.concat(e?"https://www.youtube.com/watch?v=".concat(e):"生词本",'",,,,,,,'),",,,,,,,,","Word,Phonetic,Definition,Example1,Translation1,Example2,Translation2,Video Link",...t].join("\n");this._downloadFile("\ufeff"+n,"text/csv;charset=utf-8;","csv")}exportVocabularyAsTxt(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=[];t.push("生词本导出文件"),t.push("视频标题: ".concat(this._getYouTubeVideoTitle())),e&&t.push("视频链接: https://www.youtube.com/watch?v=".concat(e)),t.push("导出时间: ".concat((new Date).toLocaleString("zh-CN"))),t.push(""),this.vocabulary.forEach((n,r)=>{t.push("".concat(r+1,". ").concat(n.word));const i=n.phonetic;i&&t.push(" 音标: [".concat(i,"]")),n.definition&&t.push(" 释义: ".concat(n.definition)),n.examples&&n.examples.length>0&&(t.push(" 例句:"),n.examples.slice(0,2).forEach((e,n)=>{t.push(" ".concat(n+1,". ").concat(e.eng)),e.chs&&t.push(" ".concat(e.chs))})),n.timestamp&&e&&t.push(" 视频链接: https://www.youtube.com/watch?v=".concat(e,"&t=").concat(Math.floor(n.timestamp/1e3),"s")),t.push("")}),this._downloadFile(t.join("\n"),"text/plain;charset=utf-8;","txt")}exportVocabularyAsMd(){if(0===this.vocabulary.length)return;const e=this._getYouTubeVideoId(),t=e?"https://www.youtube.com/watch?v=".concat(e):"",n=[];n.push("# 生词本导出文件"),n.push("**视频标题:** ".concat(this._getYouTubeVideoTitle())),t&&n.push("**视频链接:** [".concat(t,"](").concat(t,")")),n.push("**导出时间:** ".concat((new Date).toLocaleString("zh-CN"))),n.push(""),this.vocabulary.forEach((t,r)=>{n.push("".concat(r+1,". **").concat(t.word,"**"));const i=t.phonetic;if(i&&n.push(" *音标 Phonetic:* [".concat(i,"]")),t.definition&&n.push(" *释义 Definition:* ".concat(t.definition)),t.examples&&t.examples.length>0&&(n.push(" *例句 Examples:*"),t.examples.slice(0,2).forEach((e,t)=>{n.push(" ".concat(t+1,". ").concat(e.eng)),e.chs&&n.push(" ".concat(e.chs))})),t.timestamp&&e){const r="https://www.youtube.com/watch?v=".concat(e,"&t=").concat(Math.floor(t.timestamp/1e3),"s");n.push(" *视频链接 Video Link:* [跳转到视频时间点](".concat(r,")"))}n.push("")}),this._downloadFile(n.join("\n"),"text/markdown;charset=utf-8;","md")}setupEventListeners(){this.container&&this.videoEl&&(this.container.addEventListener("mouseenter",()=>this.turnOffAutoSub()),this.container.addEventListener("mouseleave",()=>this.turnOnAutoSub()),this.videoEl.addEventListener("ended",()=>this.turnOffAutoSub()),this.videoEl.addEventListener("pause",()=>this.turnOffAutoSub()),this.videoEl.addEventListener("play",()=>this.turnOnAutoSub()))}turnOnAutoSub(){this.turnOffAutoSub(),this.videoEl.paused||(this.loopAutoScroll=setInterval(()=>{if(!this.videoEl||"subtitles"!==this.activeTab||0===this.bilingualSubtitles.length)return;const e=1e3*this.videoEl.currentTime;let t=this._binarySearchSubtitle(e);if(this.subtitleListEl&&-1!==t&&this._cachedSubtitleItems[t]){if(-1!==this._lastActiveIndex&&this._cachedSubtitleItems[this._lastActiveIndex]){const e=this._cachedSubtitleItems[this._lastActiveIndex];e.style.fontWeight="normal",e.style.backgroundColor="transparent",e.classList.remove("active-subtitle")}const e=this._cachedSubtitleItems[t];e.style.fontWeight="600",e.style.backgroundColor="var(--kt-active-bg)",e.classList.add("active-subtitle"),this._lastActiveIndex=t;const n=this.subtitleScrollContainer;if(n){const t=e.offsetTop,r=n.clientHeight,i=e.clientHeight;n.scrollTo({top:t-r/2+i/2,behavior:"smooth"})}}},200))}_binarySearchSubtitle(e){let t=0,n=this.bilingualSubtitles.length-1,r=-1;for(;t<=n;){const i=Math.floor((t+n)/2),o=this.bilingualSubtitles[i];if(e>=o.start&&e<=o.end)return i;e<o.start?n=i-1:(t=i+1,r=i)}return r}turnOffAutoSub(){this.loopAutoScroll&&(clearInterval(this.loopAutoScroll),this.loopAutoScroll=null)}_downloadFile(e,t,n){Nn(new Blob([e],{type:t}),"kiss-vocabulary-".concat((new Date).toISOString().slice(0,10),".").concat(n))}millisToMinutesAndSeconds(e){if(!Number.isFinite(e))return"0:00";const t=Math.floor(e/6e4),n=(e%6e4/1e3).toFixed(0);return t+":"+(n<10?"0":"")+n}_getYouTubeVideoId(){try{return new URLSearchParams(window.location.search).get("v")}catch(e){return null}}_getYouTubeVideoTitle(){try{const e=document.querySelector("h1 yt-formatted-string");return e?e.textContent:"YouTube Video"}catch(e){return"YouTube Video"}}}function bu(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const e in t)n.setAttribute(e,t[e]);return n}function wu(){const e=bu("svg",{viewBox:"-20 0 100 100",style:"display: inline-block; width: 1em; height: 1em; vertical-align: middle;"});return[{cx:"6",begin:"0.1",values:"0 15 ; 0 -15; 0 15"},{cx:"30",begin:"0.2",values:"0 10 ; 0 -10; 0 10"},{cx:"54",begin:"0.3",values:"0 5 ; 0 -5; 0 5"}].forEach(t=>{const n=bu("circle",{fill:"#209CEE",stroke:"none",cx:t.cx,cy:"50",r:"6"}),r=bu("animateTransform",{attributeName:"transform",dur:"1s",type:"translate",values:t.values,repeatCount:"indefinite",begin:t.begin});n.appendChild(r),e.appendChild(n)}),e}function xu(){let{width:e="24",height:t="24",viewBox:n="-5 -5 40 40",isSelected:r=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=bu("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:t,viewBox:n,version:"1.1"}),o="#209CEE",a="#E9F5FD",s=r?o:a,l=bu("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:r?a:o,transform:"translate(0,0)"}),c=bu("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:s,transform:"translate(4,5)"});return i.appendChild(l),i.appendChild(c),i}var Au=i(8661),Su=i(6811),ku=i(457),_u=i(5449),Cu=i(5089),Eu=pr("hostElement"),Tu=pr("reactRoot"),Iu=pr("isVisible"),Pu=pr("isProcessing"),Lu=pr("mount");class Nu{constructor(e){let{id:t,className:n="",reactComponent:r,props:i={},rootElement:o=document.body}=e;if(Object.defineProperty(this,Lu,{value:ju}),Object.defineProperty(this,Eu,{writable:!0,value:null}),Object.defineProperty(this,Tu,{writable:!0,value:null}),Object.defineProperty(this,Iu,{writable:!0,value:!1}),Object.defineProperty(this,Pu,{writable:!0,value:!1}),!t||!r)throw new Error("ID and a React Component must be provided.");this._id=t,this._className=n,this._ReactComponent=r,this._props=i,this._rootElement=o}get isVisible(){return dr(this,Iu)[Iu]}show(e){if(!dr(this,Iu)[Iu]&&!dr(this,Pu)[Pu]){if(!dr(this,Eu)[Eu]){dr(this,Pu)[Pu]=!0;try{dr(this,Lu)[Lu](e||this._props)}catch(e){return nt.warn('Failed to mount component with id "'.concat(this._id,'":'),e),void(dr(this,Pu)[Pu]=!1)}finally{dr(this,Pu)[Pu]=!1}}dr(this,Eu)[Eu].style.display="",dr(this,Iu)[Iu]=!0}}hide(){dr(this,Iu)[Iu]&&dr(this,Eu)[Eu]&&(dr(this,Eu)[Eu].style.display="none",dr(this,Iu)[Iu]=!1)}destroy(){dr(this,Eu)[Eu]&&(dr(this,Pu)[Pu]=!0,dr(this,Tu)[Tu]&&dr(this,Tu)[Tu].unmount(),dr(this,Eu)[Eu].remove(),dr(this,Eu)[Eu]=null,dr(this,Tu)[Tu]=null,dr(this,Iu)[Iu]=!1,dr(this,Pu)[Pu]=!1,nt.info('Component with id "'.concat(this._id,'" has been destroyed.')))}toggle(e){dr(this,Iu)[Iu]?this.hide():this.show(e||this._props)}updateProps(e){if(dr(this,Tu)[Tu]&&dr(this,Eu)[Eu]){const t=this._ReactComponent,n=(0,_u.A)({key:this._id,prepend:!0});dr(this,Tu)[Tu].render((0,Cu.jsx)(Au.StrictMode,{children:(0,Cu.jsx)(ku.C,{value:n,children:(0,Cu.jsx)(t,h({},e))})}))}}}function ju(e){const t=document.createElement("div");t.id=this._id,this._className&&(t.className=this._className),this._rootElement.appendChild(t),dr(this,Eu)[Eu]=t;const n=(0,_u.A)({key:this._id,prepend:!0}),r=h(h({},e),{},{onClose:this.hide.bind(this)}),i=this._ReactComponent;dr(this,Tu)[Tu]=Su.createRoot(t),dr(this,Tu)[Tu].render((0,Cu.jsx)(Au.StrictMode,{children:(0,Cu.jsx)(ku.C,{value:n,children:(0,Cu.jsx)(i,h({},r))})}))}function Ru(e){let{children:t}=e;return(0,Cu.jsx)("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})}function Ou(e){let{children:t,onClick:n,disabled:r=!1}=e;const[i,o]=(0,Au.useState)(!1);return(0,Cu.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0px 8px",opacity:i?1:.8,background:"rgba(255, 255, 255, ".concat(i?.1:0,")"),cursor:r?"default":"pointer",transition:"background 0.2s, opacity 0.2s",borderRadius:5},onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:n,children:t})}function zu(e){let{label:t,name:n,value:r,onChange:i,disabled:o}=e;const a=(0,Au.useCallback)(()=>{o||i({name:n,value:!r})},[o,i,n,r]);return(0,Cu.jsxs)(Ou,{onClick:a,disabled:o,children:[(0,Cu.jsx)(Ru,{children:t}),(0,Cu.jsx)("div",{style:{width:40,height:24,borderRadius:12,background:r?"rgba(32,156,238,.8)":"rgba(255,255,255,.3)",position:"relative"},children:(0,Cu.jsx)("div",{style:{width:20,height:20,borderRadius:10,position:"absolute",left:2,top:2,background:"rgba(255,255,255,.9)",transform:"translateX(".concat(r?16:0,"px)")}})})]})}function Du(e){let{label:t,name:n,value:r,options:i,onChange:o,disabled:a}=e;const[s,l]=(0,Au.useState)(!1),c=(0,Au.useMemo)(()=>i.find(e=>e.value===r)||i[0],[i,r]),u=(0,Au.useCallback)(()=>{a||l(e=>!e)},[a]),d=(0,Au.useCallback)(e=>{o({name:n,value:e}),l(!1)},[o,n]);return(0,Cu.jsxs)("div",{style:{position:"relative"},children:[(0,Cu.jsxs)(Ou,{onClick:u,disabled:a,children:[(0,Cu.jsx)(Ru,{children:t}),(0,Cu.jsx)("div",{style:{fontSize:12,opacity:.8,maxWidth:130,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(null==c?void 0:c.label)||""})]}),s&&(0,Cu.jsx)("div",{style:{position:"absolute",right:0,top:"100%",background:"rgba(0,0,0,.8)",borderRadius:5,minWidth:250,maxHeight:200,overflow:"auto",zIndex:1e3,marginTop:4},children:i.map(e=>(0,Cu.jsx)("div",{onClick:()=>d(e.value),style:{padding:"8px 12px",cursor:"pointer",background:e.value===r?"rgba(32,156,238,.3)":"transparent",opacity:e.value===r?1:.8,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(255,255,255,.1)"},onMouseLeave:t=>{t.currentTarget.style.background=e.value===r?"rgba(32,156,238,.3)":"transparent"},children:e.label},e.value))})]})}function Mu(e){let{label:t,onClick:n,disabled:r}=e;const i=(0,Au.useCallback)(()=>{r||n()},[r,n]);return(0,Cu.jsx)(Ou,{onClick:i,disabled:r,children:(0,Cu.jsx)(Ru,{children:t})})}function Fu(e){let{i18n:t,formData:n,progressed:r=0,updateSetting:i,downloadSubtitle:o,transApis:a}=e;const s=(0,Au.useCallback)(e=>{let{name:t,value:n}=e;i({name:t,value:n})},[i]),l=(0,Au.useMemo)(()=>(a||[]).filter(e=>!e.isDisabled),[a]),c=(0,Au.useMemo)(()=>l.filter(e=>ie.ai.has(e.apiType)),[l]),u=(0,Au.useMemo)(()=>{const e=[{value:"-",label:t("disable")||"禁用"}];return c.forEach(t=>{e.push({value:t.apiSlug,label:t.apiName})}),e},[c,t]),d=(0,Au.useMemo)(()=>t(0===r?"waiting_subtitles":100===r?"download_subtitles":"processing_subtitles"),[r,t]),{segSlug:h,skipAd:p,isBilingual:f,showOrigin:g}=n;return(0,Cu.jsxs)("div",{style:{position:"absolute",left:0,bottom:100,background:"rgba(0,0,0,.6)",width:250,lineHeight:"40px",fontSize:16,padding:8,borderRadius:5},children:[(0,Cu.jsx)(Du,{onChange:s,name:"segSlug",value:h||"-",options:u,label:t("ai_segmentation"),disabled:u.length<=1}),(0,Cu.jsx)(zu,{onChange:s,name:"isBilingual",value:f,label:t("is_bilingual_view")}),(0,Cu.jsx)(zu,{onChange:s,name:"showOrigin",value:g,label:t("show_origin_subtitle")}),(0,Cu.jsx)(zu,{onChange:s,name:"skipAd",value:p,label:t("is_skip_ad")}),(0,Cu.jsx)(Mu,{label:"".concat(d," [").concat(r,"%] "),onClick:o,disabled:100!==r})]})}const Bu="#ytp-caption-window-container";var Wu=pr("setting"),Uu=pr("subtitles"),Vu=pr("events"),Hu=pr("flatEvents"),Gu=pr("progressedNum"),qu=pr("fromLang"),Ku=pr("processingId"),$u=pr("managerInstance"),Xu=pr("toggleButton"),Yu=pr("isMenuShow"),Ju=pr("notificationEl"),Qu=pr("notificationTimeout"),Zu=pr("i18n"),ed=pr("menuManager"),td=pr("subtitleListManager"),nd=pr("videoId"),rd=pr("videoEl"),id=pr("progressed"),od=pr("moAds"),ad=pr("waitForElement"),sd=pr("toggleShowOrigin"),ld=pr("getMenuProps"),cd=pr("updateMenuProps"),ud=pr("injectToggleButton"),dd=pr("isSameLang"),hd=pr("findCaptionTrack"),pd=pr("getCaptionTracks"),fd=pr("getSubtitleEvents"),gd=pr("aiSegment"),md=pr("getFromLang"),vd=pr("handleInterceptedRequest"),yd=pr("processEvents"),bd=pr("reProcessEvents"),wd=pr("eventsToSubtitles"),xd=pr("startManager"),Ad=pr("destroyManager"),Sd=pr("hideYtCaption"),kd=pr("showYtCaption"),_d=pr("formatSubtitles"),Cd=pr("isQualityPoor"),Ed=pr("processSubtitles"),Td=pr("genFlatEvents"),Id=pr("splitEventsIntoChunks"),Pd=pr("processRemainingChunksAsync"),Ld=pr("createNotificationElement"),Nd=pr("showNotification");class jd{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Nd,{value:dh}),Object.defineProperty(this,Ld,{value:uh}),Object.defineProperty(this,Pd,{value:ch}),Object.defineProperty(this,Id,{value:lh}),Object.defineProperty(this,Td,{value:sh}),Object.defineProperty(this,Ed,{value:ah}),Object.defineProperty(this,Cd,{value:oh}),Object.defineProperty(this,_d,{value:ih}),Object.defineProperty(this,kd,{value:rh}),Object.defineProperty(this,Sd,{value:nh}),Object.defineProperty(this,Ad,{value:th}),Object.defineProperty(this,xd,{value:eh}),Object.defineProperty(this,wd,{value:Zd}),Object.defineProperty(this,bd,{value:Qd}),Object.defineProperty(this,yd,{value:Jd}),Object.defineProperty(this,vd,{value:Yd}),Object.defineProperty(this,md,{value:Xd}),Object.defineProperty(this,gd,{value:$d}),Object.defineProperty(this,fd,{value:Kd}),Object.defineProperty(this,pd,{value:qd}),Object.defineProperty(this,hd,{value:Gd}),Object.defineProperty(this,dd,{value:Hd}),Object.defineProperty(this,ud,{value:Vd}),Object.defineProperty(this,cd,{value:Ud}),Object.defineProperty(this,ld,{value:Wd}),Object.defineProperty(this,sd,{value:Bd}),Object.defineProperty(this,ad,{value:Fd}),Object.defineProperty(this,od,{value:Md}),Object.defineProperty(this,id,{get:Dd,set:zd}),Object.defineProperty(this,rd,{get:Od,set:void 0}),Object.defineProperty(this,nd,{get:Rd,set:void 0}),Object.defineProperty(this,Wu,{writable:!0,value:{}}),Object.defineProperty(this,Uu,{writable:!0,value:[]}),Object.defineProperty(this,Vu,{writable:!0,value:[]}),Object.defineProperty(this,Hu,{writable:!0,value:[]}),Object.defineProperty(this,Gu,{writable:!0,value:0}),Object.defineProperty(this,qu,{writable:!0,value:"auto"}),Object.defineProperty(this,Ku,{writable:!0,value:null}),Object.defineProperty(this,$u,{writable:!0,value:null}),Object.defineProperty(this,Xu,{writable:!0,value:null}),Object.defineProperty(this,Yu,{writable:!0,value:!1}),Object.defineProperty(this,Ju,{writable:!0,value:null}),Object.defineProperty(this,Qu,{writable:!0,value:null}),Object.defineProperty(this,Zu,{writable:!0,value:()=>""}),Object.defineProperty(this,ed,{writable:!0,value:null}),Object.defineProperty(this,td,{writable:!0,value:null}),dr(this,Wu)[Wu]=h(h({},e),{},{showOrigin:!1}),dr(this,Zu)[Zu]=Lt(e.uiLang||"zh")}initialize(){window.addEventListener("message",e=>{var t;if("KISS_XHR_DATA_YOUTUBE"===(null===(t=e.data)||void 0===t?void 0:t.type)){const{url:t,response:n}=e.data;t&&n&&dr(this,vd)[vd](t,n)}}),window.addEventListener("yt-navigate-finish",()=>{nt.debug("Youtube Provider: yt-navigate-finish",dr(this,nd)[nd]),dr(this,Ad)[Ad](),dr(this,Uu)[Uu]=[],dr(this,Vu)[Vu]=[],dr(this,Hu)[Hu]=[],dr(this,id)[id]=0,dr(this,qu)[qu]="auto",dr(this,cd)[cd]()}),dr(this,ad)[ad](".ytp-right-controls",e=>{const t=e.querySelector("button.ytp-subtitles-button");t&&t.addEventListener("click",()=>{"true"===t.getAttribute("aria-pressed")?dr(this,xd)[xd]():dr(this,Ad)[Ad]()}),dr(this,ud)[ud](e)}),dr(this,ad)[ad](".video-ads",e=>{dr(this,od)[od](e)})}updateSetting(e){let{name:t,value:n}=e;var r;dr(this,Wu)[Wu][t]!==n&&(nt.debug("Youtube Provider: update setting",t,n),dr(this,Wu)[Wu][t]=n,dr(this,cd)[cd](),"isBilingual"===t?null===(r=dr(this,$u)[$u])||void 0===r||r.updateSetting({[t]:n}):"segSlug"===t?dr(this,bd)[bd]():"showOrigin"===t&&dr(this,sd)[sd]())}downloadSubtitle(){if(dr(this,Uu)[Uu].length&&100===dr(this,id)[id])try{Nn(ao(dr(this,Uu)[Uu]),"kiss-subtitles-".concat(dr(this,nd)[nd],"_").concat(Date.now(),".vtt"))}catch(e){nt.info("Youtube Provider: download subtitles:",e)}else nt.debug("Youtube Provider: The subtitle is not yet ready.")}}function Rd(){return new URL(document.location.href).searchParams.get("v")}function Od(){return document.querySelector("#container video")}function zd(e){dr(this,Gu)[Gu]=e,dr(this,cd)[cd]()}function Dd(){return dr(this,Gu)[Gu]}function Md(e){const t=".ytp-ad-player-overlay-layout",n=".ytp-skip-ad-button, .ytp-ad-skip-button, .ytp-ad-skip-button-modern";new MutationObserver(e=>{const{skipAd:r=!1}=dr(this,Wu)[Wu];for(const i of e)if("childList"===i.type){const e=dr(this,rd)[rd];i.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE&&(i.matches(t)?(nt.debug("Youtube Provider: AD start playing!",i),e&&r&&(e.playbackRate=16,e.currentTime=e.duration),dr(this,$u)[$u]&&dr(this,$u)[$u].setIsAdPlaying(!0)):i.matches(n)&&r&&(nt.debug("Youtube Provider: AD skip button!",i),i.click()),r)){const e=null==i?void 0:i.querySelector(n);e&&(nt.debug("Youtube Provider: AD skip button!!",e),e.click())}}),i.removedNodes.forEach(n=>{n.nodeType===Node.ELEMENT_NODE&&n.matches(t)&&(nt.debug("Youtube Provider: Ad ends!"),dr(this,Wu)[Wu].showOrigin||dr(this,Sd)[Sd](),e&&r&&(e.playbackRate=1),dr(this,$u)[$u]&&dr(this,$u)[$u].setIsAdPlaying(!1))})}}).observe(e,{childList:!0,subtree:!0})}function Fd(e,t){const n=document.querySelector(e);if(n)return void t(n);new MutationObserver((n,r)=>{const i=document.querySelector(e);i&&(r.disconnect(),t(i))}).observe(document.body,{childList:!0,subtree:!0})}function Bd(){dr(this,Wu)[Wu].showOrigin?dr(this,Ad)[Ad]():dr(this,xd)[xd]()}function Wd(){const{transApis:e,segSlug:t,skipAd:n,isBilingual:r,showOrigin:i}=dr(this,Wu)[Wu];return{i18n:dr(this,Zu)[Zu],updateSetting:this.updateSetting.bind(this),downloadSubtitle:this.downloadSubtitle.bind(this),transApis:e,progressed:dr(this,Gu)[Gu],formData:{segSlug:t,skipAd:n,isBilingual:r,showOrigin:i}}}function Ud(){dr(this,ed)[ed]&&dr(this,Yu)[Yu]&&dr(this,ed)[ed].updateProps(dr(this,ld)[ld]())}function Vd(e){const n=document.createElement("div");n.className="notranslate kiss-subtitle-controls",Object.assign(n.style,{height:"100%",position:"relative"});const r=document.createElement("button");r.className="ytp-button kiss-subtitle-button",r.title=t,r.appendChild(xu()),n.appendChild(r),dr(this,ed)[ed]=new Nu({id:"kiss-subtitle-menus",className:"notranslate",reactComponent:Fu,rootElement:n,props:dr(this,ld)[ld]()}),r.onclick=()=>{var e,t;dr(this,Yu)[Yu]?(dr(this,Yu)[Yu]=!1,null===(e=dr(this,Xu)[Xu])||void 0===e||e.replaceChildren(xu()),dr(this,ed)[ed].hide()):(dr(this,Yu)[Yu]=!0,null===(t=dr(this,Xu)[Xu])||void 0===t||t.replaceChildren(xu({isSelected:!0})),dr(this,ed)[ed].show(),dr(this,cd)[cd]())},dr(this,Xu)[Xu]=r,null==e||e.prepend(n)}function Hd(e,t){return e.slice(0,2)===t.slice(0,2)}function Gd(e,t){if(nt.debug("Youtube Provider: find caption track",{captionTracks:e,lang:t}),null==e||!e.length)return null;let n=e.find(e=>e.languageCode===t);if(!n){const t=e.find(e=>"asr"===e.kind);t&&(n=e.find(e=>"asr"!==e.kind&&dr(this,dd)[dd](e.languageCode,t.languageCode)),n||(n=t))}return n||(n=e.pop()),n}async function qd(e){try{var t,n;const r="https://www.youtube.com/watch?v=".concat(e),i=await fetch(r).then(e=>e.text()),o=i.match(/ytInitialPlayerResponse\s*=\s*(\{[^]*?\});/);if(!o)return[];return null===(t=JSON.parse(o[1]).captions)||void 0===t||null===(n=t.playerCaptionsTracklistRenderer)||void 0===n?void 0:n.captionTracks}catch(e){nt.info("Youtube Provider: get captionTracks",e)}}async function Kd(e,t,n){if(!t.searchParams.get("tlang")&&t.searchParams.get("kind")===e.searchParams.get("kind")&&dr(this,dd)[dd](t.searchParams.get("lang"),e.searchParams.get("lang")))try{const e=JSON.parse(n);return null==e?void 0:e.events}catch(e){return nt.info("Youtube Provider: parse responseText",e),null}try{t.searchParams.delete("tlang"),t.searchParams.set("lang",e.searchParams.get("lang")),t.searchParams.set("fmt","json3"),e.searchParams.get("kind")?t.searchParams.set("kind",e.searchParams.get("kind")):t.searchParams.delete("kind");const n=await fetch(t.href);if(null!=n&&n.ok){const e=await n.json();return null==e?void 0:e.events}return nt.info("Youtube Provider: Failed to fetch subtitles: ".concat(n.status)),null}catch(e){return nt.info("Youtube Provider: fetching subtitles error",e),null}}async function $d(e){let{videoId:t,fromLang:n,toLang:r,chunkEvents:i,segApiSetting:o}=e;try{const e=i.filter(e=>e.text),a="".concat(e[0].start," --\x3e ").concat(e[e.length-1].end);nt.debug("Youtube Provider: aiSegment events",{videoId:t,chunkSign:a,fromLang:n,toLang:r,events:e});const s=await Vo({videoId:t,chunkSign:a,fromLang:n,toLang:r,events:e,apiSetting:o});if(nt.debug("Youtube Provider: aiSegment subtitles",s),Array.isArray(s))return s}catch(e){nt.info("Youtube Provider: ai segmentation",e)}return[]}function Xd(e){return"zh"===e?"zh-CN":ue.get(e)||ue.get(e.slice(0,2))||pe[M].get(e)||pe[M].get(e.slice(0,2))||"auto"}async function Yd(e,t){const n=dr(this,nd)[nd];if(!n)return void nt.debug("Youtube Provider: videoId not found.");const r=new URL(e);if(n!==r.searchParams.get("v"))return void nt.debug("Youtube Provider: skip other timedtext:",n);const i=r.searchParams.get("lang"),o=dr(this,md)[md](i);if(dr(this,Hu)[Hu].length){if(dr(this,dd)[dd](i,dr(this,qu)[qu]))return void nt.debug("Youtube Provider: video was processed:",n);dr(this,Ad)[Ad]()}if(n!==dr(this,Ku)[Ku]){dr(this,Ku)[Ku]=n;try{dr(this,Nd)[Nd](dr(this,Zu)[Zu]("starting_to_process_subtitle"));const{toLang:e}=dr(this,Wu)[Wu],a=await dr(this,pd)[pd](n),s=dr(this,hd)[hd](a,i);if(!s)return void nt.debug("Youtube Provider: CaptionTrack not found:",n);const l=new URL(s.baseUrl),c=await dr(this,fd)[fd](l,r,t);if(null==c||!c.length)return void nt.debug("Youtube Provider: events not got:",n);if(nt.debug("Youtube Provider: lang: ".concat(i,", fromLang: ").concat(o,", toLang: ").concat(e)),dr(this,dd)[dd](o,e))return nt.debug("Youtube Provider: skip same lang",o,e),void dr(this,Nd)[Nd](dr(this,Zu)[Zu]("subtitle_same_lang"));const u=dr(this,Td)[Td](c);if(null==u||!u.length)return void nt.debug("Youtube Provider: flatEvents not got:",n);dr(this,Vu)[Vu]=c,dr(this,Hu)[Hu]=u,dr(this,qu)[qu]=o,dr(this,yd)[yd]({videoId:n,flatEvents:u,fromLang:o})}catch(e){nt.warn("Youtube Provider: handle subtitle",e),dr(this,Nd)[Nd](dr(this,Zu)[Zu]("subtitle_load_failed"))}finally{dr(this,Ku)[Ku]=null}}else nt.debug("Youtube Provider: video is processing:",n)}async function Jd(e){let{videoId:t,flatEvents:n,fromLang:r}=e;try{const[e,i]=await dr(this,wd)[wd]({videoId:t,flatEvents:n,fromLang:r});if(null==e||!e.length)return void nt.debug("Youtube Provider: events to subtitles got empty",t);if(t!==dr(this,nd)[nd])return void nt.debug("Youtube Provider: videoId changed!",t,dr(this,nd)[nd]);dr(this,Uu)[Uu]=e,dr(this,id)[id]=i,dr(this,xd)[xd]()}catch(e){nt.info("Youtube Provider: process events",e),dr(this,Nd)[Nd](dr(this,Zu)[Zu]("subtitle_load_failed"))}}function Qd(){dr(this,id)[id]=0,dr(this,Uu)[Uu]=[];const e=dr(this,nd)[nd],t=dr(this,Hu)[Hu],n=dr(this,qu)[qu];e&&t.length&&(dr(this,Nd)[Nd](dr(this,Zu)[Zu]("starting_reprocess_events")),dr(this,Ad)[Ad](),dr(this,yd)[yd]({videoId:e,flatEvents:t,fromLang:n}))}async function Zd(e){let{videoId:t,flatEvents:n,fromLang:r}=e;const{segSlug:i,transApis:o,chunkLength:a,toLang:s}=dr(this,Wu)[Wu],l=()=>[dr(this,_d)[_d](n,r),100],c=null==o?void 0:o.find(e=>e.apiSlug===i);if(i&&"-"!==i&&c){nt.info("Youtube Provider: Starting AI ..."),dr(this,Nd)[Nd](dr(this,Zu)[Zu]("ai_processing_pls_wait"));const e=dr(this,Id)[Id](n,a);if(0===e.length)return l();const i=e[0],o=await dr(this,gd)[gd]({videoId:t,chunkEvents:i,fromLang:r,toLang:s,segApiSetting:c});if(null==o||!o.length)return l();if(e.length>1){const n=e.slice(1);dr(this,Pd)[Pd]({chunks:n,videoId:t,fromLang:r,toLang:s,segApiSetting:c});return[o,Math.floor(100/e.length)]}return[o,100]}return l()}function eh(){var e,t;if(dr(this,$u)[$u])return;if(dr(this,Wu)[Wu].showOrigin)return;if(!dr(this,Uu)[Uu].length)return void dr(this,Nd)[Nd](dr(this,Zu)[Zu]("waitting_for_subtitle"));const n=dr(this,rd)[rd];if(!n)return void nt.warn("Youtube Provider: No video element found");nt.info("Youtube Provider: Starting manager..."),dr(this,$u)[$u]=new tu({videoEl:n,formattedSubtitles:dr(this,Uu)[Uu],setting:h(h({},dr(this,Wu)[Wu]),{},{fromLang:dr(this,qu)[qu]})});const r=null!==(e=dr(this,Wu)[Wu].enhanceMode)&&void 0!==e?e:"mobile_off",i="on"===r||r===bt&&!Cc,o=null===(t=dr(this,Wu)[Wu].showList)||void 0===t||t;if(i&&o&&!dr(this,td)[td]){dr(this,td)[td]=new yu(n),dr(this,td)[td].initialize(dr(this,Uu)[Uu]),dr(this,$u)[$u].onSubtitleUpdate=e=>{dr(this,td)[td].setBilingualSubtitles(e)};const e=dr(this,Uu)[Uu].map(e=>({start:e.start,end:e.end,text:e.text,translation:e.translation||""}));dr(this,td)[td].setBilingualSubtitles(e),dr(this,td)[td].turnOnAutoSub()}dr(this,$u)[$u].start(),dr(this,Nd)[Nd](dr(this,Zu)[Zu]("subtitle_load_succeed")),dr(this,Sd)[Sd]()}function th(){dr(this,kd)[kd](),dr(this,$u)[$u]&&(nt.info("Youtube Provider: Destroying manager..."),dr(this,$u)[$u].destroy(),dr(this,$u)[$u]=null,dr(this,td)[td]&&(dr(this,td)[td].destroy(),dr(this,td)[td]=null))}function nh(){const e=document.querySelector(Bu);e&&(e.style.display="none")}function rh(){const e=document.querySelector(Bu);e&&(e.style.display="block")}function ih(e,t){if(null==e||!e.length)return[];if(["zh","ja","ko","th","lo","km","my"].some(e=>null==t?void 0:t.startsWith(e))){const t=[];if(dr(this,Cd)[Cd](e,5,.5))return e;let n=null;const r=30;for(const i of e)i.text?(n?(n.text+=i.text,n.end=i.end):n={text:i.text,start:i.start,end:i.end},n.text.length>=r&&(t.push(n),n=null)):n&&(t.push(n),n=null);return n&&t.push(n),t}let n=dr(this,Ed)[Ed]({flatEvents:e});const r=dr(this,Cd)[Cd](n);return nt.debug("Youtube Provider: isQualityPoor",{isPoor:r,subtitles:n}),r&&(n=dr(this,Ed)[Ed]({flatEvents:e,usePause:!0})),n}function oh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.2;if(0===e.length)return!1;return e.filter(e=>e.text.length>t).length/e.length>n}function ah(){let{flatEvents:e,usePause:t=!1,timeout:n=1e3,maxWords:r=15}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i={1:new Set(["actually","also","although","and","anyway","as","basically","because","but","eventually","frankly","honestly","hopefully","however","if","instead","it's","just","let's","like","literally","maybe","meanwhile","nevertheless","nonetheless","now","okay","or","otherwise","perhaps","personally","probably","right","since","so","suddenly","that's","then","there's","therefore","though","thus","unless","until","well","while"]),2:new Set(["after all","at first","at least","even if","even though","for example","for instance","i believe","i guess","i mean","i suppose","i think","in fact","in the end","of course","then again","to be fair","you know","you see"]),3:new Set(["as a result","by the way","in other words","in that case","in this case","to be clear","to be honest"])},o=[];let a=[],s=0;const l=()=>{a.length>0&&o.push({text:a.map(e=>e.text).join(" ").trim(),start:a[0].start,end:a[a.length-1].end}),a=[],s=0};return e.forEach(e=>{if(!e.text)return;const o=a[a.length-1];if(o){const c=/[.?!…\])]$/.test(o.text),u=/[,]$/.test(o.text),d=e.start-o.end>n,h=(t||u)&&s>=r,p=/^[[(♪]/.test(e.text),f=t&&i[1].has(e.text.toLowerCase().split(" ")[0])&&a.length>1;(c||d||h||p||f)&&l()}a.push(e),s+=e.text.split(/\s+/).length}),l(),o}function sh(){const e=[];let t=null;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(n=>{let{segs:r=[],tStartMs:i=0,dDurationMs:o=0}=n;r.forEach((n,a)=>{let{utf8:s="",tOffsetMs:l=0}=n;const c=s.trim().replace(/\s+/g," "),u=i+l;t&&((!t.end||t.end>u)&&(t.end=u),e.push(t),t=null),t={text:c,start:u},a===r.length-1&&(t.end=i+o)})}),e.push(t),e}function lh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(!e||0===e.length)return[];const n=[];let r=[],i=0;const o=t+500;for(let a=0;a<e.length;a++){const s=e[a];r.push(s),i+=s.text.length;if(a===e.length-1)continue;let l=!1;if(i>=o)l=!0;else if(i>=t){const t=/[.?!…\])]$/.test(s.text),n=e[a+1].start-s.end;(t||n>1e3)&&(l=!0)}l&&(n.push(r),r=[],i=0)}return r.length>0&&n.push(r),n}async function ch(e){let{chunks:t,videoId:n,fromLang:r,toLang:i,segApiSetting:o}=e;nt.info("Youtube Provider: Starting for ".concat(t.length," chunks."));for(let e=0;e<t.length;e++){var a,s;const l=t[e],c=e+2;nt.debug("Youtube Provider: Processing subtitle chunk ".concat(c,"/").concat(t.length+1,": ").concat(null===(a=l[0])||void 0===a?void 0:a.start," --\x3e ").concat(null===(s=l[l.length-1])||void 0===s?void 0:s.start));let u=[];try{const e=await dr(this,gd)[gd]({videoId:n,chunkEvents:l,fromLang:r,toLang:i,segApiSetting:o});(null==e?void 0:e.length)>0?u=e:(nt.debug("Youtube Provider: AI segmentation for chunk ".concat(c," returned no data.")),u=dr(this,_d)[_d](l,r))}catch(e){u=dr(this,_d)[_d](l,r)}if(n!==dr(this,nd)[nd]){nt.info("Youtube Provider: videoId changed!!",n,dr(this,nd)[nd]);break}if(u.length>0){const e=Math.floor(100*c/(t.length+1));dr(this,Uu)[Uu].push(...u),dr(this,Uu)[Uu].sort((e,t)=>e.start-t.start),dr(this,id)[id]=e,nt.debug("Youtube Provider: Appending ".concat(u.length," subtitles from chunk ").concat(c," (").concat(dr(this,id)[id],"%).")),dr(this,$u)[$u]&&dr(this,$u)[$u].appendSubtitles(u)}else nt.debug("Youtube Provider: Chunk ".concat(c," no subtitles."));await bn(Ln(500,1e3))}nt.info("Youtube Provider: All subtitle chunks processed.")}function uh(){var e;const t=document.createElement("div");t.className="kiss-notification",Object.assign(t.style,{position:"absolute",top:"40%",left:"50%",transform:"translateX(-50%)",background:"rgba(0,0,0,0.7)",color:"red",padding:"0.5em 1em",borderRadius:"4px",zIndex:"2147483647",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none",fontSize:"2em",width:"50%",textAlign:"center"});const n=dr(this,rd)[rd],r=null==n||null===(e=n.parentElement)||void 0===e?void 0:e.parentElement;r&&(r.appendChild(t),dr(this,Ju)[Ju]=t)}function dh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3;dr(this,Ju)[Ju]||dr(this,Ld)[Ld](),dr(this,Ju)[Ju].textContent=e,dr(this,Ju)[Ju].style.opacity="1",clearTimeout(dr(this,Qu)[Qu]),dr(this,Qu)[Qu]=setTimeout(()=>{dr(this,Ju)[Ju].style.opacity="0"},t)}const hh=(()=>{let e=!1;return async t=>{if(e)return;e=!0,nt.info("Bilingual Subtitle Extension: Initializing...");new jd(t).initialize()}})(),ph=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-inline-js";if(document.getElementById(t))return;const n=document.createElement("script");n.setAttribute("data-source","kiss-inject injectInlineJs"),n.type="text/javascript",n.id=t,n.textContent=_c.createScript(e),(document.head||document.documentElement).appendChild(n)},fh="injector-subtitle.js",gh="injector-shadowroot.js",mh={[fh]:()=>{try{const e=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=n[1];return"string"==typeof i&&i.includes("timedtext")&&this.addEventListener("load",function(){window.postMessage({type:"KISS_XHR_DATA_YOUTUBE",url:this.responseURL,response:this.responseText},window.location.origin)}),e.apply(this,n)}}catch(e){console.log("XMLHttpRequestInjector",e)}},[gh]:()=>{try{const e=Element.prototype.attachShadow;Element.prototype.attachShadow=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const i=e.apply(this,n);return window.postMessage({type:"KISS_SHADOW_ROOT_CREATED"},"*"),i}}catch(e){console.log("shadowRootInjector",e)}}};function vh(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-inject-js";const n=mh[e];if(n)if(dn){!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"kiss-translator-external-js";if(document.getElementById(t))return;const n=document.createElement("script");n.setAttribute("data-source","kiss-inject injectExternalJs"),n.type="text/javascript",n.id=t,n.src=_c.createScriptURL(e),(document.head||document.documentElement).appendChild(n)}(hn.runtime.getURL(e),t)}else ph("(".concat(n,")()"),t)}const yh=[{pattern:"https://www.youtube.com",start:hh}];function bh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var wh=i(3385),xh=i(696);function Ah(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function Sh(e,t,n){var r=[],i=(0,xh.Rk)(e,r,n);return r.length<2?n:i+t(r)}var kh,_h,Ch,Eh,Th=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var o=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))o=e(i);else for(var a in o="",i)i[a]&&a&&(o&&(o+=" "),o+=a);break;default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},Ih=function(e){var t=(0,_u.A)(e);t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,wh.J)(n,t.registered,void 0);return(0,xh.sk)(t,i,!1),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Sh(t.registered,n,Th(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,wh.J)(n,t.registered);Ah(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=(0,wh.J)(n,t.registered),o="animation-"+i.name;return Ah(t,{name:i.name,styles:"@keyframes "+o+"{"+i.styles+"}"}),o},hydrate:function(e){e.forEach(function(e){t.inserted[e]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:xh.Rk.bind(null,t.registered),merge:Sh.bind(null,t.registered,n)}}({key:"css"}),Ph=(Ih.flush,Ih.hydrate,Ih.cx,Ih.merge,Ih.getRegisteredStyles,Ih.injectGlobal,Ih.keyframes),Lh=Ih.css;Ih.sheet,Ih.cache;const Nh=Ph(kh||(kh=bh(["\n to {\n background-position: 200% center;\n }\n"]))),jh=Ph(_h||(_h=bh(["\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0;\n }\n"]))),Rh=Ph(Ch||(Ch=bh(["\n from {\n text-shadow: 0 0 10px #fff, \n 0 0 20px #fff, \n 0 0 30px #0073e6, \n 0 0 40px #0073e6;\n }\n to {\n text-shadow: 0 0 20px #fff, \n 0 0 30px #ff4da6, \n 0 0 40px #ff4da6, \n 0 0 50px #ff4da6;\n }\n"]))),Oh=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return"\n text-decoration-line: underline;\n text-decoration-style: ".concat(e,";\n text-decoration-color: ").concat(t,";\n text-decoration-thickness: ").concat(n,"px;\n text-underline-offset: 0.3em;\n -webkit-text-decoration-line: underline;\n -webkit-text-decoration-style: ").concat(e,";\n -webkit-text-decoration-color: ").concat(t,";\n -webkit-text-decoration-thickness: 1px;\n -webkit-text-underline-offset: 0.3em;\n\n opacity: 0.8;\n -webkit-opacity: 0.8;\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n")},zh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#209CEE";return{[Se]:"",[ke]:Oh("solid",e),[_e]:Oh("dotted",e),[Ce]:Oh("dashed",e),[Ee]:Oh("dashed",e,2),[Pe]:Oh("wavy",e),[Le]:Oh("wavy",e,2),[Te]:"\n border: 1px dashed ".concat(e,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),[Ie]:"\n border: 2px dashed ".concat(e,";\n display: block;\n padding: 0.2em 0.3em;\n box-sizing: border-box;\n "),[Ne]:"\n background: linear-gradient(to top, ".concat(e," 50%, transparent 50%);\n "),[je]:"\n background: linear-gradient(to top, transparent, ".concat(e," 20%, transparent 60%);\n "),[Re]:"\n filter: blur(0.2em);\n -webkit-filter: blur(0.2em);\n &:hover {\n filter: none;\n -webkit-filter: none;\n }\n ",[Oe]:"\n color: #fff;\n background-color: ".concat(e,";\n "),[ze]:"\n opacity: 0.8;\n -webkit-opacity: 0.8;\n display: block;\n padding: 0.25em 0.5em;\n border-left: 0.25em solid ".concat(e,";\n background: rgb(32, 156, 238, 0.2);\n &:hover {\n opacity: 1;\n -webkit-opacity: 1;\n }\n "),[De]:"\n background-image: linear-gradient(\n 90deg,\n #3b82f6,\n #9333ea,\n #ec4899,\n #3b82f6\n );\n background-size: 200% auto;\n color: transparent;\n -webkit-background-clip: text;\n background-clip: text;\n animation: ".concat(Nh," 4s linear infinite;\n "),[Me]:"\n animation: ".concat(jh," 1s infinite;\n "),[Fe]:"\n animation: ".concat(Rh," 2s ease-in-out infinite alternate;\n "),[Be]:"\n color: #333;\n background: linear-gradient(\n 45deg,\n LightGreen 20%,\n LightPink 20% 40%,\n LightSalmon 40% 60%,\n LightSeaGreen 60% 80%,\n LightSkyBlue 80%\n );\n &:hover {\n color: #111;\n };\n "}},Dh=zh(),Mh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(0===e.length)return()=>{};const r=new Set(e);let i=!1;return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;const r=new Set,i=t=>{t.code&&(r.has(t.code)||(r.add(t.code),e(new Set(r),t)))},o=e=>{e.code&&(t(new Set(r),e),r.delete(e.code))},a=()=>{r.clear()};return n.addEventListener("keydown",i,!0),n.addEventListener("keyup",o,!0),window.addEventListener("blur",a),()=>{n.removeEventListener("keydown",i,!0),n.removeEventListener("keyup",o,!0),window.removeEventListener("blur",a),r.clear()}}((e,t)=>{r.has(t.code)||(i=!0)},(e,n)=>{((e,t)=>{const n=new Set([...e,...t]);return n.size===e.size&&n.size===t.size})(r,e)&&!i&&t(),1===e.size&&(i=!1)},n)},Fh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window;const n=((e,t,n)=>{let r=0,i=null;return()=>{i&&clearTimeout(i),i=setTimeout(()=>{r=0},n),r++,r===t&&(r=0,clearTimeout(i),e())}})(arguments.length>1?arguments[1]:void 0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,arguments.length>3&&void 0!==arguments[3]?arguments[3]:500);return Mh(e,n,t)},Bh={[z]:async e=>{const t={client:"gtx",dt:"t",dj:1,ie:"UTF-8",sl:"auto",tl:"zh-CN",q:e},n="https://translate.googleapis.com/translate_a/single?".concat(Yi.stringify(t)),r={headers:{"Content-type":"application/json"}},i=await pi(n,r,{useCache:!0});return null!=i&&i.src?(await Rr(n,r,i),i.src):""},[M]:async e=>{const t={text:e,detector:M},n="".concat(Kt,"?").concat(Yi.stringify(t)),r=await jr(n);if(r)return r;const i="".concat(Kt,"_").concat(M),o=ko(i,Ao,{batchInterval:200,batchSize:20,batchLength:1e5}),a=await o.addTask(e);return a?(Rr(n,null,a),a):""},[H]:async e=>{const t="https://fanyi.baidu.com/langdetect",n={headers:{"Content-type":"application/json"},method:"POST",body:JSON.stringify({query:e})},r=await pi(t,n,{useCache:!0});return 0===(null==r?void 0:r.error)?(await Rr(t,n,r),r.lan):""},[G]:async e=>{const t="https://transmart.qq.com/api/imt",n={headers:{"Content-type":"application/json","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",referer:"https://transmart.qq.com/zh-CN/index"},method:"POST",body:JSON.stringify({header:{fn:"text_analysis",client_key:"browser-chrome-110.0.0-Mac OS-df4bd4c5-a65d-44b2-a40f-42f34f3535f2-1677486696487"},text:e})},r=await pi(t,n,{useCache:!0});return null!=r&&r.language?(await Rr(t,n,r),r.language):""},[O]:async e=>{if(!gn)return"";const[t,n]=await hi({fn:Oo,msg:"builtinai_detect",text:e});return n?"":t}},Wh=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-",n="";if(re.has(t))try{const r=await Bh[t](e);r&&(n=pe[t].get(r)||"")}catch(e){rt("detect lang remote",e)}if(!n)try{var r,i,o;const t=await(null==hn||null===(r=hn.i18n)||void 0===r?void 0:r.detectLanguage(e)),a=null==t||null===(i=t.languages)||void 0===i||null===(o=i[0])||void 0===o?void 0:o.language;t.isReliable&&a&&le.has(a)?n=a:null!=a&&a.startsWith("zh")&&(n="zh-CN")}catch(e){rt("detect lang local",e)}return n};var Uh,Vh=pr("setting"),Hh=pr("rule"),Gh=pr("isInitialized"),qh=pr("isJsInjected"),Kh=pr("isShadowRootJsInjected"),$h=pr("mouseHoverEnabled"),Xh=pr("enabled"),Yh=pr("runId"),Jh=pr("termValues"),Qh=pr("combinedTermsRegex"),Zh=pr("combinedSkipsRegex"),ep=pr("placeholderCache"),tp=pr("translationTagName"),np=pr("eventName"),rp=pr("docInfo"),ip=pr("glossary"),op=pr("textClass"),ap=pr("textSheet"),sp=pr("apisMap"),lp=pr("favWords"),cp=pr("observedNodes"),up=pr("translationNodes"),dp=pr("viewNodes"),hp=pr("processedNodes"),pp=pr("rootNodes"),fp=pr("skipMoNodes"),gp=pr("removeKeydownHandler"),mp=pr("hoveredNode"),vp=pr("boundMouseMoveHandler"),yp=pr("boundKeyDownHandler"),bp=pr("windowMessageHandler"),wp=pr("debouncedFindShadowRoot"),xp=pr("io"),Ap=pr("mo"),Sp=pr("dmm"),kp=pr("rescanQueue"),_p=pr("isQueueProcessing"),Cp=pr("ignoreSelector"),Ep=pr("apiSetting"),Tp=pr("placeholderConfig"),Ip=pr("run"),Pp=pr("init"),Lp=pr("handleWindowMessage"),Np=pr("attachShadowRootListener"),jp=pr("removeShadowRootListener"),Rp=pr("findAndObserveShadowRoot"),Op=pr("createTextStyles"),zp=pr("injectSheet"),Dp=pr("parseTerms"),Mp=pr("parseAITerms"),Fp=pr("getDocDescription"),Bp=pr("createIntersectionObserver"),Wp=pr("createMutationObserver"),Up=pr("createDebounceMouseMover"),Vp=pr("handleMouseMove"),Hp=pr("handleKeyDown"),Gp=pr("toggleTargetNode"),qp=pr("getShadowRoot"),Kp=pr("findAllShadowRoots"),$p=pr("findChangeContainer"),Xp=pr("queueForRescan"),Yp=pr("rescanContainer"),Jp=pr("reIO"),Qp=pr("reIOViewNodes"),Zp=pr("startObserveShadowRoot"),ef=pr("startObserveRoot"),tf=pr("startObserveNode"),nf=pr("queryNode"),rf=pr("scanNode"),of=pr("processNode"),af=pr("highlightTextNode"),sf=pr("highlightWordsDeeply"),lf=pr("splitTextNodesBySentence"),cf=pr("removeHighlights"),uf=pr("removeBrTags"),df=pr("shouldBreak"),hf=pr("isInvalidText"),pf=pr("translateNodeGroup"),ff=pr("serializeForTranslation"),gf=pr("restoreFromTranslation"),mf=pr("translateFetch"),vf=pr("findTranslationWrappers"),yf=pr("cleanupAllNodes"),bf=pr("cleanupAllTranslations"),wf=pr("cleanupDirectTranslations"),xf=pr("removeTranslationElement"),Af=pr("restoreOriginal"),Sf=pr("removeNodes"),kf=pr("toggleTranslationOnly"),_f=pr("updateStyle"),Cf=pr("refreshNode"),Ef=pr("performSyncNode"),Tf=pr("resetOptions"),If=pr("enableMouseHover"),Pf=pr("disableMouseHover"),Lf=pr("initInjector"),Nf=pr("removeInjector"),jf=pr("translateTitle");class Rf{static isElement(e){return e instanceof Element}static isElementOrFragment(e){return e instanceof Element||e instanceof DocumentFragment}static isBlockNode(e){var t,n,r,i,o;if(!Rf.isElementOrFragment(e))return!1;if(null!==(t=e.attributes)&&void 0!==t&&null!==(n=t.display)&&void 0!==n&&null!==(r=n.value)&&void 0!==r&&r.includes("inline"))return!1;if(Rf.TAGS.INLINE.has(null===(i=e.nodeName)||void 0===i?void 0:i.toUpperCase()))return!1;if(Rf.TAGS.BLOCK.has(null===(o=e.nodeName)||void 0===o?void 0:o.toUpperCase()))return!0;if(Rf.displayCache.has(e))return Rf.displayCache.get(e);const a=!window.getComputedStyle(e).display.startsWith("inline");return Rf.displayCache.set(e,a),a}static hasBlockNode(e){if(!Rf.isElementOrFragment(e))return!1;for(const t of e.childNodes)if(Rf.isBlockNode(t))return!0;return!1}static hasTextNode(e){if(!Rf.isElementOrFragment(e))return!1;for(const t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&/\S/.test(t.nodeValue))return!0;return!1}static escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}constructor(e){let{rule:t={},setting:r={},favWords:i=[]}=e;Object.defineProperty(this,jf,{value:Wg}),Object.defineProperty(this,Nf,{value:Bg}),Object.defineProperty(this,Lf,{value:Fg}),Object.defineProperty(this,Pf,{value:Mg}),Object.defineProperty(this,If,{value:Dg}),Object.defineProperty(this,Tf,{value:zg}),Object.defineProperty(this,Ef,{value:Og}),Object.defineProperty(this,Cf,{value:Rg}),Object.defineProperty(this,_f,{value:jg}),Object.defineProperty(this,kf,{value:Ng}),Object.defineProperty(this,Sf,{value:Lg}),Object.defineProperty(this,Af,{value:Pg}),Object.defineProperty(this,xf,{value:Ig}),Object.defineProperty(this,wf,{value:Tg}),Object.defineProperty(this,bf,{value:Eg}),Object.defineProperty(this,yf,{value:Cg}),Object.defineProperty(this,vf,{value:_g}),Object.defineProperty(this,mf,{value:kg}),Object.defineProperty(this,gf,{value:Sg}),Object.defineProperty(this,ff,{value:Ag}),Object.defineProperty(this,pf,{value:xg}),Object.defineProperty(this,hf,{value:wg}),Object.defineProperty(this,df,{value:bg}),Object.defineProperty(this,uf,{value:yg}),Object.defineProperty(this,cf,{value:vg}),Object.defineProperty(this,lf,{value:mg}),Object.defineProperty(this,sf,{value:gg}),Object.defineProperty(this,af,{value:fg}),Object.defineProperty(this,of,{value:pg}),Object.defineProperty(this,rf,{value:hg}),Object.defineProperty(this,nf,{value:dg}),Object.defineProperty(this,tf,{value:ug}),Object.defineProperty(this,ef,{value:cg}),Object.defineProperty(this,Zp,{value:lg}),Object.defineProperty(this,Qp,{value:sg}),Object.defineProperty(this,Jp,{value:ag}),Object.defineProperty(this,Yp,{value:og}),Object.defineProperty(this,Xp,{value:ig}),Object.defineProperty(this,$p,{value:rg}),Object.defineProperty(this,Kp,{value:ng}),Object.defineProperty(this,qp,{value:tg}),Object.defineProperty(this,Gp,{value:eg}),Object.defineProperty(this,Hp,{value:Zf}),Object.defineProperty(this,Vp,{value:Qf}),Object.defineProperty(this,Up,{value:Jf}),Object.defineProperty(this,Wp,{value:Yf}),Object.defineProperty(this,Bp,{value:Xf}),Object.defineProperty(this,Fp,{value:$f}),Object.defineProperty(this,Mp,{value:Kf}),Object.defineProperty(this,Dp,{value:qf}),Object.defineProperty(this,zp,{value:Gf}),Object.defineProperty(this,Op,{value:Hf}),Object.defineProperty(this,Rp,{value:Vf}),Object.defineProperty(this,jp,{value:Uf}),Object.defineProperty(this,Np,{value:Wf}),Object.defineProperty(this,Lp,{value:Bf}),Object.defineProperty(this,Pp,{value:Ff}),Object.defineProperty(this,Ip,{value:Mf}),Object.defineProperty(this,Tp,{get:Df,set:void 0}),Object.defineProperty(this,Ep,{get:zf,set:void 0}),Object.defineProperty(this,Cp,{get:Of,set:void 0}),Object.defineProperty(this,Vh,{writable:!0,value:void 0}),Object.defineProperty(this,Hh,{writable:!0,value:void 0}),Object.defineProperty(this,Gh,{writable:!0,value:!1}),Object.defineProperty(this,qh,{writable:!0,value:!1}),Object.defineProperty(this,Kh,{writable:!0,value:!1}),Object.defineProperty(this,$h,{writable:!0,value:!1}),Object.defineProperty(this,Xh,{writable:!0,value:!1}),Object.defineProperty(this,Yh,{writable:!0,value:0}),Object.defineProperty(this,Jh,{writable:!0,value:[]}),Object.defineProperty(this,Qh,{writable:!0,value:void 0}),Object.defineProperty(this,Zh,{writable:!0,value:void 0}),Object.defineProperty(this,ep,{writable:!0,value:null}),Object.defineProperty(this,tp,{writable:!0,value:n}),Object.defineProperty(this,np,{writable:!0,value:""}),Object.defineProperty(this,rp,{writable:!0,value:{}}),Object.defineProperty(this,ip,{writable:!0,value:{}}),Object.defineProperty(this,op,{writable:!0,value:{}}),Object.defineProperty(this,ap,{writable:!0,value:""}),Object.defineProperty(this,sp,{writable:!0,value:new Map}),Object.defineProperty(this,lp,{writable:!0,value:[]}),Object.defineProperty(this,cp,{writable:!0,value:new WeakSet}),Object.defineProperty(this,up,{writable:!0,value:new WeakMap}),Object.defineProperty(this,dp,{writable:!0,value:new Set}),Object.defineProperty(this,hp,{writable:!0,value:new WeakMap}),Object.defineProperty(this,pp,{writable:!0,value:new Set}),Object.defineProperty(this,fp,{writable:!0,value:new WeakSet}),Object.defineProperty(this,gp,{writable:!0,value:void 0}),Object.defineProperty(this,mp,{writable:!0,value:null}),Object.defineProperty(this,vp,{writable:!0,value:void 0}),Object.defineProperty(this,yp,{writable:!0,value:void 0}),Object.defineProperty(this,bp,{writable:!0,value:null}),Object.defineProperty(this,wp,{writable:!0,value:null}),Object.defineProperty(this,xp,{writable:!0,value:void 0}),Object.defineProperty(this,Ap,{writable:!0,value:void 0}),Object.defineProperty(this,Sp,{writable:!0,value:void 0}),Object.defineProperty(this,kp,{writable:!0,value:new Set}),Object.defineProperty(this,_p,{writable:!0,value:!1}),dr(this,Vh)[Vh]=h(h({},Rf.DEFAULT_OPTIONS),r),dr(this,Hh)[Hh]=h(h(h({},Rf.DEFAULT_RULE),t),{},{isPlainText:!1}),dr(this,lp)[lp]=i,dr(this,sp)[sp]=new Map(dr(this,Vh)[Vh].transApis.map(e=>[e.apiSlug,e])),dr(this,np)[np]=_n(),dr(this,Zh)[Zh]=new RegExp(Rf.BUILTIN_SKIP_PATTERNS.map(e=>"(".concat(e.source,")")).join("|")),dr(this,Dp)[Dp](dr(this,Hh)[Hh].terms),dr(this,Mp)[Mp](dr(this,Hh)[Hh].aiTerms),dr(this,Op)[Op](),dr(this,vp)[vp]=dr(this,Vp)[Vp].bind(this),dr(this,yp)[yp]=dr(this,Hp)[Hp].bind(this),dr(this,xp)[xp]=dr(this,Bp)[Bp](),dr(this,Ap)[Ap]=dr(this,Wp)[Wp](),dr(this,Sp)[Sp]=dr(this,Up)[Up](),dr(this,bp)[bp]=dr(this,Lp)[Lp].bind(this),dr(this,wp)[wp]=wn(dr(this,Rp)[Rp].bind(this),300),dr(this,Vh)[Vh].mouseHoverSetting.useMouseHover&&dr(this,If)[If](),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>dr(this,Ip)[Ip]()):dr(this,Ip)[Ip]()}toggleHoverNode(){dr(this,Hp)[Hp]()}toggleMouseHover(){dr(this,$h)[$h]?dr(this,Pf)[Pf]():dr(this,If)[If]()}enable(){dr(this,Xh)[Xh]||(dr(this,Xh)[Xh]=!0,dr(this,Hh)[Hh].transOpen="true",dr(this,Yh)[Yh]++,dr(this,Gh)[Gh]?dr(this,Vh)[Vh].transAllnow?this.rescan():dr(this,Qp)[Qp]():dr(this,Pp)[Pp](),"true"===dr(this,Hh)[Hh].transTitle&&dr(this,jf)[jf](),dn&&cr(on,!0))}disable(){dr(this,Xh)[Xh]&&(dr(this,Xh)[Xh]=!1,dr(this,Hh)[Hh].transOpen="false",dr(this,Yh)[Yh]++,dr(this,yf)[yf](),Pr(),_o(),"true"===dr(this,Hh)[Hh].transTitle&&dr(this,rp)[rp].title&&(document.title=dr(this,rp)[rp].title),dn&&cr(on,!1))}rescan(){dr(this,Gh)[Gh]&&(dr(this,Yh)[Yh]++,dr(this,yf)[yf](),dr(this,Tf)[Tf](),Pr(),_o(),dr(this,Pp)[Pp]())}toggle(){dr(this,Xh)[Xh]?this.disable():this.enable()}toggleStyle(){const e=dr(this,Hh)[Hh].textStyle===Re?Se:Re;this.updateRule({textStyle:e})}toggleTransbox(){dr(this,Vh)[Vh].tranboxSetting.transOpen=!dr(this,Vh)[Vh].tranboxSetting.transOpen}toggleInputTranslate(){dr(this,Vh)[Vh].inputRule.transOpen=!dr(this,Vh)[Vh].inputRule.transOpen}stop(){this.disable(),dr(this,Tf)[Tf](),dr(this,Pf)[Pf](),dr(this,Nf)[Nf](),dr(this,Gh)[Gh]=!1}updateRule(e){let t=!1,n=!1;for(const r in e)Object.prototype.hasOwnProperty.call(dr(this,Hh)[Hh],r)&&dr(this,Hh)[Hh][r]!==e[r]&&(dr(this,Hh)[Hh][r]=e[r],"autoScan"===r||"hasShadowroot"===r||"scanAll"===r||"isPlainText"===r?n=!0:t=!0);dr(this,ep)[ep]=null,n||dr(this,Xh)[Xh]&&dr(this,Vh)[Vh].transAllnow?this.rescan():t&&dr(this,Qp)[Qp]()}get setting(){return h({},dr(this,Vh)[Vh])}get rule(){return h({},dr(this,Hh)[Hh])}get eventName(){return dr(this,np)[np]}}function Of(){var e;if("true"===dr(this,Hh)[Hh].scanAll||dr(this,Hh)[Hh].isPlainText)return Uh.KISS_IGNORE_SELECTOR;const t=[Uh.KISS_IGNORE_SELECTOR];"false"!==dr(this,Hh)[Hh].autoScan&&t.push(Uh.BUILTIN_IGNORE_SELECTOR);const n=null===(e=dr(this,Hh)[Hh].ignoreSelector)||void 0===e?void 0:e.trim();return n&&t.push(n),t.join(", ")}function zf(){return dr(this,sp)[sp].get(dr(this,Hh)[Hh].apiSlug)||Ae}function Df(){if(dr(this,ep)[ep])return dr(this,ep)[ep];const[e,t]=dr(this,Ep)[Ep].placeholder.split(" ");let n=dr(this,Ep)[Ep].placetag;Array.isArray(n)&&(n=n[0]||"i"),"string"!=typeof n&&(n="i");const r=dr(this,Ep)[Ep].placetagFormat||"compact";let i,o;"attribute"===r?(i=new RegExp("<".concat(n,"\\s+i=(\\d+)>"),"gi"),o=new RegExp("<\\/".concat(n,">"),"gi")):(i=new RegExp("<".concat(n,"(\\d+)>"),"gi"),o=new RegExp("<\\/".concat(n,"(\\d+)>"),"gi"));const a=Uh.escapeRegex(e),s=Uh.escapeRegex(t),l="".concat(a,"\\d+").concat(s),c={startDelimiter:e,endDelimiter:t,tagName:n,format:r,safeTag:"span",openRegex:i,closeRegex:o,placeholderRegex:new RegExp(l,"g")};return dr(this,ep)[ep]=c,c}function Mf(){"true"===dr(this,Hh)[Hh].transOpen?this.enable():dr(this,Vh)[Vh].preInit&&dr(this,Pp)[Pp]()}function Ff(){dr(this,Gh)[Gh]=!0,dr(this,Lf)[Lf](),dr(this,Hh)[Hh].isPlainText&&document.querySelectorAll("pre").forEach(e=>{var t;return e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(/(?:\r\n|\r|\n)/g,"<br />")}),document.querySelectorAll(dr(this,Hh)[Hh].rootsSelector||"body").forEach(e=>{dr(this,ef)[ef](e)}),"true"!==dr(this,Hh)[Hh].scanAll&&"true"!==dr(this,Hh)[Hh].hasShadowroot||(dr(this,Np)[Np](),dr(this,Rp)[Rp]())}function Bf(e){var t;"KISS_SHADOW_ROOT_CREATED"===(null===(t=e.data)||void 0===t?void 0:t.type)&&dr(this,wp)[wp]()}function Wf(){if(!dr(this,Kh)[Kh]){vh(gh,"kiss-translator-inject-shadowroot-js"),dr(this,Kh)[Kh]=!0}window.addEventListener("message",dr(this,bp)[bp])}function Uf(){window.removeEventListener("message",dr(this,bp)[bp])}function Vf(){try{dr(this,Kp)[Kp]().forEach(e=>{dr(this,Zp)[Zp](e)})}catch(e){rt("findAllShadowRoots",e)}}function Hf(){const[e,t]=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=zh();e.forEach(e=>{t[e.styleSlug]=e.styleCode});const n={};let r="";return Object.entries(t).forEach(e=>{let[t,r]=e;n[t]=Lh(Eh||(Eh=bh(["\n ","\n "])),r)}),Object.entries(t).forEach(e=>{let[t,i]=e;r+="\n .".concat(n[t]," {\n ").concat(i,"\n }\n ")}),[n,r]}(dr(this,Vh)[Vh].customStyles),n=new CSSStyleSheet;n.replaceSync(t),dr(this,op)[op]=e,dr(this,ap)[ap]=n}function Gf(e){e.adoptedStyleSheets.includes(dr(this,ap)[ap])||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,dr(this,ap)[ap]])}function qf(e){if(dr(this,Jh)[Jh]=[],dr(this,Qh)[Qh]=null,!e||"string"!=typeof e)return;const t=[],n=e.split(/\n|;/);for(const e of n){const n=e.trim();if(!n)continue;let r=n.lastIndexOf(",");-1===r&&(r=n.length);const i=n.substring(0,r).trim(),o=n.substring(r+1).trim();if(i)try{new RegExp(i),t.push("(".concat(i,")")),dr(this,Jh)[Jh].push(o)}catch(e){rt('Invalid RegExp for term: "'.concat(i,'"'),e)}}t.length>0&&(dr(this,Qh)[Qh]=new RegExp(t.join("|"),"g"))}function Kf(e){if(e&&"string"==typeof e)try{dr(this,ip)[ip]=Object.fromEntries(e.split(/\n|;/).map(e=>{const[t="",n=""]=e.split(",").map(e=>e.trim());return[t,n]}).filter(e=>{let[t]=e;return t}))}catch(e){rt("parse aiterms",e)}}function $f(){try{const e=document.querySelector('meta[name="description"]'),t=(null==e?void 0:e.getAttribute("content"))||"";return Pn(t)}catch(e){rt("get description",e)}return""}function Xf(){const{transInterval:e,rootMargin:t=500}=dr(this,Vh)[Vh],n=new Set,r=wn(()=>{n.forEach(e=>dr(this,Ef)[Ef](e)),n.clear()},e);return new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(dr(this,dp)[dp].add(e.target),n.add(e.target),r()):dr(this,dp)[dp].delete(e.target)})},{threshold:.01,rootMargin:"".concat(t,"px 0px ").concat(t,"px 0px")})}function Yf(){return new MutationObserver(e=>{for(const r of e){var t,n;if(!dr(this,fp)[fp].has(r.target)&&(null===(t=r.nextSibling)||void 0===t||null===(n=t.tagName)||void 0===n?void 0:n.toLowerCase())!==dr(this,tp)[tp])if("characterData"===r.type)r.oldValue===r.target.nodeValue||dr(this,Zh)[Zh].test(r.target.nodeValue)||dr(this,Xp)[Xp](r.target.parentElement);else if("childList"===r.type){let e=new Set,t=!1;r.addedNodes.forEach(n=>{var r;dr(this,fp)[fp].has(n)||(null===(r=n.nodeName)||void 0===r?void 0:r.toLowerCase())===dr(this,tp)[tp]||(n.nodeType===Node.TEXT_NODE?t=!0:Uh.isElementOrFragment(n)&&e.add(n))}),t?dr(this,Xp)[Xp](r.target):e.forEach(e=>dr(this,Xp)[Xp](e))}}})}function Jf(){return wn(e=>{const t=e;let n=null;for(;e&&e!==document.body;){if(dr(this,cp)[cp].has(e)){n=e;break}e=e.parentElement}dr(this,mp)[mp]=n||t;const{mouseHoverKey:r}=dr(this,Vh)[Vh].mouseHoverSetting;0!==r.length||dr(this,Gh)[Gh]||dr(this,Pp)[Pp](),0===r.length&&n&&dr(this,Gp)[Gp](n)},100)}function Qf(e){let t=e.composedPath()[0];dr(this,Sp)[Sp](t)}function Zf(){dr(this,Gh)[Gh]||dr(this,Pp)[Pp]();let e=dr(this,mp)[mp];e&&dr(this,cp)[cp].has(e)&&dr(this,Gp)[Gp](e)}function eg(e){dr(this,hp)[hp].has(e)?dr(this,wf)[wf](e):dr(this,of)[of](e)}function tg(e){var t,n;return e.openOrClosedShadowRoot?e.openOrClosedShadowRoot:"undefined"!=typeof globalThis&&null!==(t=globalThis.chrome)&&void 0!==t&&null!==(n=t.dom)&&void 0!==n&&n.openOrClosedShadowRoot?globalThis.chrome.dom.openOrClosedShadowRoot(e):e.shadowRoot}function ng(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;try{const n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;n.nextNode();){const e=n.currentNode,r=dr(this,qp)[qp](e);r&&(t.add(r),dr(this,Kp)[Kp](r,t))}}catch(e){rt("无法访问某个 shadowRoot",e)}return t}function rg(e){var t;if(!Uh.isElementOrFragment(e)||null!==(t=e.closest)&&void 0!==t&&t.call(e,dr(this,Cp)[Cp]))return null;let n=e;for(;n&&n!==document.body;){if(Uh.isBlockNode(n)||dr(this,cp)[cp].has(n))for(const e of dr(this,pp)[pp])if(e.contains(n))return n;n=n.parentElement}return null}function ig(e){dr(this,kp)[kp].add(e),dr(this,_p)[_p]||(dr(this,_p)[_p]=!0,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200;window.requestIdleCallback?requestIdleCallback(e,{timeout:t}):setTimeout(e,t)}(()=>{dr(this,kp)[kp].forEach(e=>dr(this,Yp)[Yp](e)),dr(this,kp)[kp].clear(),dr(this,_p)[_p]=!1},100))}function og(e){const t=dr(this,$p)[$p](e);t&&(dr(this,bf)[bf](t),dr(this,rf)[rf](t))}function ag(e){dr(this,xp)[xp].unobserve(e),dr(this,xp)[xp].observe(e)}function sg(){dr(this,dp)[dp].forEach(e=>dr(this,Jp)[Jp](e))}function lg(e){e.host.matches("#".concat(r.fabID,", #").concat(r.boxID))||(dr(this,ef)[ef](e),dr(this,zp)[zp](e))}function cg(e){dr(this,pp)[pp].has(e)||(dr(this,pp)[pp].add(e),dr(this,Ap)[Ap].observe(e,{childList:!0,subtree:!0,characterData:!0,characterDataOldValue:!0}),dr(this,rf)[rf](e))}function ug(e){if(Uh.isElement(e))return dr(this,Hh)[Hh].highlightWords===Xe&&dr(this,sf)[sf](e),!dr(this,cp)[cp].has(e)&&dr(this,Xh)[Xh]&&dr(this,Vh)[Vh].transAllnow?(dr(this,cp)[cp].add(e),void dr(this,of)[of](e)):dr(this,cp)[cp].has(e)?void(!dr(this,hp)[hp].has(e)&&dr(this,dp)[dp].has(e)&&dr(this,Jp)[Jp](e)):(dr(this,cp)[cp].add(e),void dr(this,xp)[xp].observe(e))}function dg(e){var t;null!==(t=e.matches)&&void 0!==t&&t.call(e,dr(this,Hh)[Hh].selector)&&dr(this,tf)[tf](e),e.querySelectorAll(dr(this,Hh)[Hh].selector).forEach(e=>{var t;null!==(t=e.closest)&&void 0!==t&&t.call(e,dr(this,Cp)[Cp])||dr(this,tf)[tf](e)})}function hg(e){var t;if(!Uh.isElementOrFragment(e)||null!==(t=e.matches)&&void 0!==t&&t.call(e,dr(this,Cp)[Cp]))return;if("false"===dr(this,Hh)[Hh].autoScan)return void dr(this,nf)[nf](e);const n=Uh.hasTextNode(e);if(!n&&1===e.children.length)return void dr(this,rf)[rf](e.children[0]);const r=Uh.hasBlockNode(e);if(!n&&r||dr(this,tf)[tf](e),r)for(const t of e.children){const e=Uh.isBlockNode(t);n&&!e||dr(this,rf)[rf](t)}}async function pg(e){if(dr(this,hp)[hp].has(e)||!Uh.isElementOrFragment(e))return;if(dr(this,hp)[hp].set(e,h({},dr(this,Hh)[Hh])),dr(this,hf)[hf](e.textContent))return;let t="";const{fromLang:n="auto",toLang:r,splitParagraph:i=He,splitLength:o=100}=dr(this,Hh)[Hh],{langDetector:a,skipLangs:s=[]}=dr(this,Vh)[Vh];if("auto"===n){var l;const n=null===(l=dr(this,Ep)[Ep])||void 0===l?void 0:l.apiType,i=(n?he[n]:null).get("auto");if(t=await Wh(e.textContent,a)||i,t&&(r.slice(0,2)===t.slice(0,2)||s.includes(t)))return}i!==He&&dr(this,lf)[lf](e,i,o);let c=[];[...e.childNodes].forEach(n=>{const r=dr(this,df)[df](n),i=n.nodeType===Node.ELEMENT_NODE||n.nodeType===Node.TEXT_NODE;!r&&i?c.push(n):r&&c.length&&(dr(this,pf)[pf](c,e,t),c=[])}),c.length&&dr(this,pf)[pf](c,e,t)}function fg(e,t){var n;if("b"===(null===(n=e.parentNode)||void 0===n?void 0:n.nodeName.toLowerCase()))return;if(!t.test(e.textContent))return;t.lastIndex=0;const r=e.textContent.split(t),i=[];r.forEach((e,t)=>{if(e)if(t%2==1){const t=document.createElement("b");t.className=Uh.KISS_CLASS.highlight,t.style.cssText=dr(this,Hh)[Hh].highlightStyle||"",t.textContent=e,dr(this,fp)[fp].add(t),i.push(t)}else{const t=document.createTextNode(e);dr(this,fp)[fp].add(t),i.push(t)}}),i.length>0&&e.replaceWith(...i)}function gg(e){if(!e||0===dr(this,lp)[lp].length)return;const t=dr(this,lp)[lp].map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),n=new RegExp("\\b(".concat(t.join("|"),")\\b"),"gi");if(e.nodeType===Node.ELEMENT_NODE){const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),r=[];let i;for(;i=t.nextNode();)r.push(i);r.forEach(e=>{dr(this,af)[af](e,n)})}else e.nodeType===Node.TEXT_NODE&&dr(this,af)[af](e,n)}function mg(e,t,n){const r=/[。!?]+|[.?!]+(?=\s+|$)/g;[...e.childNodes].forEach(e=>{if(e.nodeType!==Node.TEXT_NODE||""===e.textContent.trim())return;const t=e.textContent,n=[];let i,o=0;for(;null!==(i=r.exec(t));){let e=i.index+i[0].length;for(;e<t.length&&/\s/.test(t[e]);)e++;n.push(t.substring(o,e)),o=e,r.lastIndex=e}o<t.length&&n.push(t.substring(o));const a=n.filter(e=>e.trim().length>0);if(a.length<=1)return;const s=a.map(e=>{const t=document.createTextNode(e);return dr(this,fp)[fp].add(t),t});e.replaceWith(...s)});const i=/(?:[。!??!]+|(?<!\d)\.)\s*$/;let o=0;[...e.childNodes].forEach(e=>{var r,a;o+=e.textContent.length;if(i.test(e.textContent)&&"BR"!==(null===(r=e.nextSibling)||void 0===r||null===(a=r.nodeName)||void 0===a?void 0:a.toUpperCase())&&(t===qe||t===Ge&&o>=n)){o=0;const t=document.createElement("br");t.className=Uh.KISS_CLASS.br,dr(this,fp)[fp].add(t),e.after(t)}})}function vg(e){if(!e)return;e.querySelectorAll(".".concat(Uh.KISS_CLASS.highlight)).forEach(e=>{const t=document.createTextNode(e.textContent);e.replaceWith(t)}),e.normalize()}function yg(e){e&&(e.querySelectorAll(".".concat(Uh.KISS_CLASS.br)).forEach(e=>e.remove()),e.normalize())}function bg(e){var t,n,r;return!!Uh.isElementOrFragment(e)&&(!e.matches(dr(this,Hh)[Hh].keepSelector)&&(!!(Uh.TAGS.BREAK_LINE.has(null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase())||null!==(n=e.matches)&&void 0!==n&&n.call(e,dr(this,Cp)[Cp])||(null===(r=e.nodeName)||void 0===r?void 0:r.toLowerCase())===dr(this,tp)[tp])||(!(!dr(this,Hh)[Hh].autoScan||!Uh.isBlockNode(e))||!(dr(this,Hh)[Hh].autoScan||!e.matches(dr(this,Hh)[Hh].selector)&&!e.querySelector(dr(this,Hh)[Hh].selector)))))}function wg(e){if("string"!=typeof e)return!0;const t=e.trim();return t.length<dr(this,Vh)[Vh].minLength||t.length>dr(this,Vh)[Vh].maxLength||(1===t.length&&!t.match(/[a-zA-Z]/)||(!(isNaN(parseFloat(t))||!isFinite(t))||!!dr(this,Zh)[Zh].test(t)))}async function xg(e,t,n){const{transTag:r,textStyle:i,transEndHook:o,transOnly:a,termsStyle:s,textExtStyle:l,selectStyle:c,parentStyle:u,grandStyle:d,toLang:h,highlightWords:p}=dr(this,Hh)[Hh],{newlineLength:f}=dr(this,Vh)[Vh],g=t.parentElement,m="true"===a;try{const[a,v]=dr(this,ff)[ff](e,s);if(dr(this,hf)[hf](a))return;const y=document.createElement(dr(this,tp)[tp]);if(y.className="".concat(Uh.KISS_CLASS.warpper," notranslate"),a.length>f){const e=document.createElement("br");e.hidden=m,y.appendChild(e)}const b=document.createElement(r);b.className="".concat(Uh.KISS_CLASS.inner," ").concat(dr(this,op)[op][i]||""),null!=l&&l.trim()&&(b.style.cssText=l),b.appendChild(wu()),y.appendChild(b),e[e.length-1].after(y);const w=dr(this,Yh)[Yh],{trText:x,isSame:A}=await dr(this,mf)[mf](a,n);if(dr(this,Yh)[Yh]!==w)throw new Error("Request terminated");if(!x||A)return void y.remove();const S=dr(this,gf)[gf](x,v),k=_c.createHTML(S);if(b.innerHTML=k,dr(this,up)[up].set(y,{nodes:e,isHide:m}),m&&dr(this,Sf)[Sf](e),c&&t.style&&(t.style.cssText+=c),u&&g&&g.style&&(g.style.cssText+=u),d&&g&&g.parentElement&&(g.parentElement.style.cssText+=d),p===Ye&&e.forEach(e=>dr(this,sf)[sf](e)),null!=o&&o.trim())try{to.run("exports.transEndHook = ".concat(o)),to.exports.transEndHook({hostNode:t,parentNode:g,nodes:e,wrapperNode:y,innerNode:b},{text:a,fromLang:n||dr(this,Hh)[Hh].fromLang,toLang:h})}catch(e){rt("transEndHook",e)}}catch(e){rt("translate group error: ",e.message),dr(this,wf)[wf](t)}}function Ag(e,t){var n=this;let r=0,i=0;const o=new Map,{startDelimiter:a,endDelimiter:s}=dr(this,Tp)[Tp],l=e=>{r++;const t="".concat(a).concat(r).concat(s);return o.set(t,e),t},c=e=>{if(e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.TEXT_NODE)return"";if(e.nodeType===Node.TEXT_NODE){let r=e.textContent;return dr(this,Qh)[Qh]&&(dr(this,Qh)[Qh].lastIndex=0,r=r.replace(dr(this,Qh)[Qh],function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];const o=r.slice(1,-2).findIndex(e=>void 0!==e),a=r[0],s=dr(n,Jh)[Jh][o];return l('<i class="'.concat(Uh.KISS_CLASS.term,'" style="').concat(t,'">').concat(s||a,"</i>"))})),function(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}(r)}if(e.nodeType===Node.ELEMENT_NODE){var r,a,s;if("true"===dr(this,Hh)[Hh].hasRichText&&Uh.TAGS.REPLACE.has(e.tagName)||e.matches(dr(this,Hh)[Hh].keepSelector)||!e.textContent.trim())return"IMG"!==(null===(a=e.tagName)||void 0===a?void 0:a.toUpperCase())&&"SVG"!==(null===(s=e.tagName)||void 0===s?void 0:s.toUpperCase())||(e.style.width="".concat(e.offsetWidth,"px"),e.style.height="".concat(e.offsetHeight,"px")),l(e.outerHTML);let t="";if(e.childNodes.forEach(e=>{t+=c(e)}),"true"===dr(this,Hh)[Hh].hasRichText&&Uh.TAGS.WARP.has(null===(r=e.tagName)||void 0===r?void 0:r.toUpperCase())){i++;const{tagName:n,format:r}=dr(this,Tp)[Tp];let a,s;return o.set("TAG_".concat(i),{openTag:u(e),closeTag:"</".concat(e.localName,">")}),"attribute"===r?(a="<".concat(n," i=").concat(i,">"),s="</".concat(n,">")):(a="<".concat(n).concat(i,">"),s="</".concat(n).concat(i,">")),"".concat(a).concat(t).concat(s)}return t}return""};function u(e){const t=e=>e.replace(/"/g,""");let n="<".concat(e.tagName.toLowerCase());for(const r of e.attributes)n+=" ".concat(r.name,'="').concat(t(r.value),'"');return n+=">",n}return[e.map(c).join("").trim(),o]}function Sg(e,t){if(!t.size)return e;if(!e)return"";const{safeTag:n,openRegex:r,closeRegex:i}=dr(this,Tp)[Tp],o="data-kiss-restore";let a=e,s=e;try{a=a.replace(r,"<".concat(n," ").concat(o,'="$1">')),a=a.replace(i,"</".concat(n,">"));const e=(new DOMParser).parseFromString(a,"text/html"),l="".concat(n,"[").concat(o,"]");Array.from(e.querySelectorAll(l)).reverse().forEach(e=>{const n=e.getAttribute(o);if(n){const r=t.get("TAG_".concat(n));r&&(e.outerHTML="".concat(r.openTag).concat(e.innerHTML).concat(r.closeTag))}}),s=e.body.innerHTML}catch(e){rt("DOMParser restore failed, fallback to raw",e)}return s=s.replace(dr(this,Tp)[Tp].placeholderRegex,e=>t.get(e)||e),s}function kg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const{toLang:n,transStartHook:r}=dr(this,Hh)[Hh],i=t||dr(this,Hh)[Hh].fromLang,o=h({},dr(this,Ep)[Ep]),a=h({},dr(this,ip)[ip]),s=dr(this,sp)[sp],l={text:e,fromLang:i,toLang:n,apiSetting:o,glossary:a};if(null!=r&&r.trim())try{to.run("exports.transStartHook = ".concat(r));const e=to.exports.transStartHook(h(h({},l),{},{apisMap:s}));e&&Object.assign(l,e)}catch(e){rt("transStartHook",e)}return Uo(l)}function _g(e){return e.querySelectorAll(":scope > .".concat(Uh.KISS_CLASS.warpper))}function Cg(){dr(this,pp)[pp].forEach(e=>dr(this,bf)[bf](e))}function Eg(e){e.querySelectorAll(".".concat(Uh.KISS_CLASS.warpper)).forEach(e=>dr(this,xf)[xf](e))}function Tg(e){dr(this,vf)[vf](e).forEach(e=>{dr(this,xf)[xf](e)})}function Ig(e){const t=e.parentElement;dr(this,hp)[hp].delete(t);const{nodes:n,isHide:r}=dr(this,up)[up].get(e)||{};r&&dr(this,Af)[Af](e,n),dr(this,up)[up].delete(e),e.remove(),dr(this,Hh)[Hh].highlightWords===Ye&&dr(this,cf)[cf](t),dr(this,uf)[uf](t)}function Pg(e,t){if(t){const n=document.createDocumentFragment();t.forEach(e=>n.appendChild(e));const r=e.parentElement;null==r||r.insertBefore(n,e)}}function Lg(e){if(e){const t=document.createDocumentFragment();e.forEach(e=>t.appendChild(e))}}function Ng(e,t){dr(this,vf)[vf](e).forEach(e=>{const n=e.querySelector(":scope > br"),{nodes:r}=dr(this,up)[up].get(e)||{};"true"===t?(n&&(n.hidden=!0),dr(this,Sf)[Sf](r),dr(this,up)[up].set(e,{nodes:r,isHide:!0})):(n&&(n.hidden=!1),dr(this,Af)[Af](e,r),dr(this,up)[up].set(e,{nodes:r,isHide:!1}))})}function jg(e,t,n){dr(this,vf)[vf](e).forEach(e=>{const r=e.querySelector(":scope > .".concat(Uh.KISS_CLASS.inner));r.classList.remove(dr(this,op)[op][t]),r.classList.add(dr(this,op)[op][n])})}function Rg(e){dr(this,wf)[wf](e),dr(this,of)[of](e)}function Og(e){const t=dr(this,hp)[hp].get(e);if(!t)return void(dr(this,Xh)[Xh]&&dr(this,of)[of](e));const{apiSlug:n,fromLang:r,toLang:i,hasRichText:o,textStyle:a,transOnly:s}=dr(this,Hh)[Hh];if(t.apiSlug!==n||t.fromLang!==r||t.toLang!==i||t.hasRichText!==o)return Object.assign(t,{apiSlug:n,fromLang:r,toLang:i,hasRichText:o,textStyle:a,transOnly:s}),void dr(this,Cf)[Cf](e);if(t.textStyle!==a){const n=t.textStyle;t.textStyle=a,dr(this,_f)[_f](e,n,a)}t.transOnly!==s&&(t.transOnly=s,dr(this,kf)[kf](e,s))}function zg(){dr(this,jp)[jp](),dr(this,xp)[xp].disconnect(),dr(this,Ap)[Ap].disconnect(),dr(this,dp)[dp].clear(),dr(this,pp)[pp].clear(),dr(this,cp)[cp]=new WeakSet,dr(this,up)[up]=new WeakMap,dr(this,hp)[hp]=new WeakMap}function Dg(){if(dr(this,$h)[$h])return;dr(this,$h)[$h]=!0,dr(this,Vh)[Vh].mouseHoverSetting.useMouseHover=!0,document.addEventListener("mousemove",dr(this,vp)[vp]);const{mouseHoverKey:e}=dr(this,Vh)[Vh].mouseHoverSetting;0!==e.length&&(dr(this,gp)[gp]=Mh(e,dr(this,yp)[yp]))}function Mg(){var e,t;dr(this,$h)[$h]&&(dr(this,$h)[$h]=!1,dr(this,Vh)[Vh].mouseHoverSetting.useMouseHover=!1,document.removeEventListener("mousemove",dr(this,vp)[vp]),null===(e=(t=dr(this,gp))[gp])||void 0===e||e.call(t))}function Fg(){if(!dr(this,qh)[qh]){dr(this,qh)[qh]=!0;try{const{injectJs:e,injectCss:t,toLang:n}=dr(this,Hh)[Hh];if(dn?t&&cr("inject_css",t):t&&(e=>{var t;const n=document.createElement("style");n.setAttribute("data-source","kiss-inject injectInternalCss"),n.textContent=e,null===(t=document.head)||void 0===t||t.appendChild(n)})(t),null!=e&&e.trim()){const t=h({},dr(this,Ep)[Ep]),r=h({},dr(this,ip)[ip]),i=dr(this,sp)[sp],o=Wh;to.import({KT:{apiTranslate:Uo,apiDectect:o,apiSetting:t,apisMap:i,toLang:n,glossary:r}}),to.run(e)}}catch(e){rt("inject js",e)}}}function Bg(){var e;null===(e=document.querySelectorAll('[data-source^="kiss-inject"]'))||void 0===e||e.forEach(e=>e.remove())}async function Wg(){const e=lo();if(null!=e&&e.title)try{const t=await Wh(e.title),{trText:n}=await dr(this,mf)[mf](e.title,t);dr(this,rp)[rp].title=document.title,document.title=n||e.title}catch(e){rt("tanslate title",e)}}function Ug(){let e=document.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Vg(e){var t;if(!e)return!1;const n=null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase();return"INPUT"===n||"TEXTAREA"===n||!(!e.isContentEditable&&"true"!==e.getAttribute("contenteditable"))}function Hg(e){var t;const n=null===(t=e.nodeName)||void 0===t?void 0:t.toUpperCase();return"INPUT"===n||"TEXTAREA"===n?e.value||"":e.innerText||e.textContent||""}async function Gg(e,t){e.focus(),await bn(10);const n=e.isContentEditable||"true"===e.getAttribute("contenteditable");if((()=>{if("function"!=typeof e.select)try{document.execCommand("selectAll",!1,null)}catch(t){const n=window.getSelection();n.removeAllRanges();const r=document.createRange();r.selectNodeContents(e),n.addRange(r)}else e.select()})(),await bn(50),n)try{nt.debug("Rich Editor detected: Priority Strategy (Clipboard Paste)");const n=new DataTransfer;n.setData("text/plain",t);const r=new ClipboardEvent("paste",{clipboardData:n,bubbles:!0,cancelable:!0,composed:!0,view:window});if(e.dispatchEvent(r),await bn(100),qg(e,t))return!0}catch(e){nt.debug("Strategy Paste failed",e)}try{if(document.execCommand("insertText",!1,t)&&(await bn(20),qg(e,t)))return!0}catch(e){nt.debug("Strategy 1 (insertText) failed",e)}if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)try{return function(e,t){var n,r;const i=null===(n=Object.getOwnPropertyDescriptor(e,"value"))||void 0===n?void 0:n.set,o=Object.getPrototypeOf(e),a=null===(r=Object.getOwnPropertyDescriptor(o,"value"))||void 0===r?void 0:r.set;a&&i!==a?a.call(e,t):e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0}))}(e,t),!0}catch(e){nt.debug("Strategy 2 (Input Value) failed",e)}return!1}function qg(e,t){return Hg(e).includes(t.trim())}Uh=Rf,Rf.displayCache=new WeakMap,Rf.TAGS={BREAK_LINE:new Set(["BR","WBR"]),BLOCK:new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CANVAS","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","NOSCRIPT","OL","P","PRE","SECTION","TABLE","TFOOT","UL","VIDEO"]),INLINE:new Set(["ABBR","ACRONYM","B","BDO","BIG","BR","BUTTON","CITE","CODE","DFN","DEL","FONT","EM","I","IMG","INPUT","INS","KBD","LABEL","MAP","MARK","OBJECT","OUTPUT","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","STRONG","SUB","SUP","TEXTAREA","TIME","TT","U","VAR"]),REPLACE:new Set(["ABBR","CODE","DFN","IMG","KBD","OUTPUT","RP","RT","SAMP","SUB","SUP","SVG","TIME","VAR"]),WARP:new Set(["A","B","BDO","BDI","BIG","CITE","DEL","EM","FONT","I","INS","MARK","Q","RUBY","S","SMALL","SPAN","STRONG","U"])},Rf.KISS_CLASS={warpper:"".concat(n,"-wrapper"),inner:"".concat(n,"-inner"),term:"".concat(n,"-term"),br:"".concat(n,"-br"),highlight:"".concat(n,"-highlight")},Rf.BUILTIN_SKIP_PATTERNS=[/^(?:(?:https?|ftp|file):\/\/|www\.)[^\s/$.?#].[^\s]*$/i,/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,/^(?:[a-zA-Z]:\\|\/|\\)(?:[\w\-. ]+\/|[\w\-. ]+\\)*[\w\-. ]*\.?[\w\-. ]*$/,/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,/^[$\u00A2-\u00A5\u20A0-\u20CF]?\s?-?\d{1,3}(?:[.,]\d{3})*(?:[.,]\d+)?\s?(?:px|%|em|rem|pt|vw|vh|deg|s|ms)?$/,/^v?\d+(\.\d+){1,3}$/,/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})?)?$/,/^({{[^}]+}}|\${[^}]+}|__\w+__|%\w+)$/,/^(?:\.|#)[\w-]+$|^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,/^@[\w.-]+$/,/^&\w+;$/,/^\[\d+\]$/,/^\d{1,2}:\d{2}(:\d{2})?$/,/^[^\s\\/:]+?\.[a-zA-Z0-9]{2,5}$/],Rf.DEFAULT_OPTIONS=At,Rf.DEFAULT_RULE=Ze,Rf.KISS_IGNORE_SELECTOR=".".concat(Uh.KISS_CLASS.warpper,", .kiss-caption-container, .kiss-subtitle-controls, #kiss-youtube-subtitle-list-container,\n #").concat(r.fabID,", .").concat(r.fabID,"_warpper,\n #").concat(r.boxID,", .").concat(r.boxID,"_warpper,\n #").concat(r.popupID,", .").concat(r.popupID,"_warpper"),Rf.BUILTIN_IGNORE_SELECTOR="address, area, audio, br, canvas, \n data, datalist, embed, head, iframe, input, noscript, map, \n object, option, param, picture, progress, \n select, script, style, track, textarea, template, \n video, wbr, .notranslate, [contenteditable='true'], [translate='no']";var Kg=pr("config"),$g=pr("unregisterShortcut"),Xg=pr("isEnabled"),Yg=pr("triggerShortcut"),Jg=pr("activeInput"),Qg=pr("floatBtn"),Zg=pr("resizeObserver"),em=pr("blurTimer"),tm=pr("boundFocusIn"),nm=pr("boundFocusOut"),rm=pr("boundUpdatePos");class im{constructor(){let{inputRule:e=pt,transApis:t=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Kg,{writable:!0,value:void 0}),Object.defineProperty(this,$g,{writable:!0,value:null}),Object.defineProperty(this,Xg,{writable:!0,value:!1}),Object.defineProperty(this,Yg,{writable:!0,value:void 0}),Object.defineProperty(this,Jg,{writable:!0,value:null}),Object.defineProperty(this,Qg,{writable:!0,value:null}),Object.defineProperty(this,Zg,{writable:!0,value:null}),Object.defineProperty(this,em,{writable:!0,value:null}),Object.defineProperty(this,tm,{writable:!0,value:void 0}),Object.defineProperty(this,nm,{writable:!0,value:void 0}),Object.defineProperty(this,rm,{writable:!0,value:void 0}),dr(this,Kg)[Kg]={inputRule:e,transApis:t};const{triggerShortcut:n}=dr(this,Kg)[Kg].inputRule;dr(this,Yg)[Yg]=n&&n.length>0?n:ht,dr(this,tm)[tm]=this.handleFocusIn.bind(this),dr(this,nm)[nm]=this.handleFocusOut.bind(this),dr(this,rm)[rm]=this.updateBtnPosition.bind(this),dr(this,Kg)[Kg].inputRule.transOpen&&this.enable()}enable(){if(dr(this,Xg)[Xg])return;const{triggerCount:e,triggerTime:t}=dr(this,Kg)[Kg].inputRule;dr(this,$g)[$g]=Fh(dr(this,Yg)[Yg],this.handleTranslate.bind(this),e,t),document.addEventListener("focusin",dr(this,tm)[tm]),document.addEventListener("focusout",dr(this,nm)[nm]),window.addEventListener("scroll",dr(this,rm)[rm],!0),window.addEventListener("resize",dr(this,rm)[rm]),window.visualViewport&&(window.visualViewport.addEventListener("resize",dr(this,rm)[rm]),window.visualViewport.addEventListener("scroll",dr(this,rm)[rm])),dr(this,Xg)[Xg]=!0;Vg(Ug())&&this.handleFocusIn(),nt.info("Input Translator enabled.")}disable(){dr(this,Xg)[Xg]&&(dr(this,$g)[$g]&&(dr(this,$g)[$g](),dr(this,$g)[$g]=null),document.removeEventListener("focusin",dr(this,tm)[tm]),document.removeEventListener("focusout",dr(this,nm)[nm]),window.removeEventListener("scroll",dr(this,rm)[rm],!0),window.removeEventListener("resize",dr(this,rm)[rm]),window.visualViewport&&(window.visualViewport.removeEventListener("resize",dr(this,rm)[rm]),window.visualViewport.removeEventListener("scroll",dr(this,rm)[rm])),this.removeFloatButton(),dr(this,Zg)[Zg]&&(dr(this,Zg)[Zg].disconnect(),dr(this,Zg)[Zg]=null),dr(this,Jg)[Jg]=null,dr(this,Xg)[Xg]=!1,nt.info("Input Translator disabled."))}toggle(){dr(this,Xg)[Xg]?this.disable():this.enable()}handleFocusIn(){dr(this,em)[em]&&(clearTimeout(dr(this,em)[em]),dr(this,em)[em]=null);const e=Ug();Vg(e)&&(dr(this,Jg)[Jg]=e,dr(this,Zg)[Zg]&&dr(this,Zg)[Zg].disconnect(),dr(this,Zg)[Zg]=new ResizeObserver(()=>this.updateBtnPosition()),dr(this,Zg)[Zg].observe(e),this.showFloatButton(e))}handleFocusOut(){dr(this,em)[em]=setTimeout(()=>{var e;const t=Ug();t===dr(this,Jg)[Jg]||null!==(e=dr(this,Qg)[Qg])&&void 0!==e&&e.contains(t)||(this.hideFloatButton(),dr(this,Jg)[Jg]=null,dr(this,Zg)[Zg]&&(dr(this,Zg)[Zg].disconnect(),dr(this,Zg)[Zg]=null))},150)}showFloatButton(e){if(!dr(this,Xg)[Xg])return;const t=dr(this,Kg)[Kg].inputRule.showDot||dt;if("-"!==t){if(t===dt){if(!(Cc||navigator.maxTouchPoints>0))return}dr(this,Jg)[Jg]=e,dr(this,Qg)[Qg]||this.createFloatButtonDOM(),dr(this,Qg)[Qg].style.display="flex",this.updateBtnPosition()}}createFloatButtonDOM(){dr(this,Qg)[Qg]=document.createElement("div");const e=Cc||navigator.maxTouchPoints>0?"36px":"30px";dr(this,Qg)[Qg].style.cssText="\n position: fixed;\n width: ".concat(e,"; height: ").concat(e,";\n background: #209CEE;\n border-radius: 50%;\n z-index: 2147483647;\n cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n box-shadow: 0 2px 5px rgba(0,0,0,0.2);\n transition: opacity 0.2s;\n font-size: 13px; color: white;\n user-select: none; -webkit-user-select: none;\n "),dr(this,Qg)[Qg].innerText="译";const t=e=>{e.preventDefault(),e.stopPropagation()};dr(this,Qg)[Qg].addEventListener("mousedown",t),dr(this,Qg)[Qg].addEventListener("touchstart",t,{passive:!1});const n=e=>{e.preventDefault(),e.stopPropagation(),dr(this,Jg)[Jg]&&dr(this,Jg)[Jg].focus(),this.handleTranslate({isBtnTrigger:!0})};dr(this,Qg)[Qg].addEventListener("click",n),dr(this,Qg)[Qg].addEventListener("touchend",n),document.body.appendChild(dr(this,Qg)[Qg])}hideFloatButton(){dr(this,Qg)[Qg]&&(dr(this,Qg)[Qg].style.display="none")}removeFloatButton(){dr(this,Qg)[Qg]&&(dr(this,Qg)[Qg].remove(),dr(this,Qg)[Qg]=null)}updateBtnPosition(){if(!dr(this,Jg)[Jg]||!dr(this,Jg)[Jg].isConnected||!dr(this,Qg)[Qg]||"none"===dr(this,Qg)[Qg].style.display)return void(dr(this,Qg)[Qg]&&this.hideFloatButton());const e=dr(this,Jg)[Jg].getBoundingClientRect(),t=Cc||navigator.maxTouchPoints>0?36:30;let n=e.bottom-t-5,r=e.right-t-5;e.height<60&&(n=e.top-t-2),r=Math.max(0,Math.min(r,window.innerWidth-t-2)),n=Math.max(0,Math.min(n,window.innerHeight-t-2)),dr(this,Qg)[Qg].style.top="".concat(n,"px"),dr(this,Qg)[Qg].style.left="".concat(r,"px")}async handleTranslate(){let{isBtnTrigger:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};nt.debug("handle input translate");const t=Ug();if(!t||!Vg(t))return void nt.debug("Active node is not editable");const{apiSlug:n,transSign:r,triggerCount:i}=dr(this,Kg)[Kg].inputRule;let{fromLang:o,toLang:a}=dr(this,Kg)[Kg].inputRule,s=Hg(t);if(e||1!==dr(this,Yg)[Yg].length||1!==dr(this,Yg)[Yg][0].length||(s=Cn(s,dr(this,Yg)[Yg][0],i)),!s.trim())return;let l=s;if(r){const e=((e,t)=>{switch(t){case"//":return e.match(/\/\/([\w-]+)\s+([^]+)/);case"\\":return e.match(/\\([\w-]+)\s+([^]+)/);case"\\\\":return e.match(/\\\\([\w-]+)\s+([^]+)/);case">":return e.match(/>([\w-]+)\s+([^]+)/);case">>":return e.match(/>>([\w-]+)\s+([^]+)/)}return e.match(/\/([\w-]+)\s+([^]+)/)})(l,r);if(e){let t=e[1];const n={zh:"zh-CN",cn:"zh-CN",tw:"zh-TW",hk:"zh-TW",jp:"ja",kr:"ko"};n[t.toLowerCase()]&&(t=n[t.toLowerCase()]),t&&ae.includes(t)&&(a=t),l=e[2]}}const c=dr(this,Kg)[Kg].transApis.find(e=>e.apiSlug===n)||Ae,u="kiss-loading-"+_n();try{!function(e,t){const n=e.getBoundingClientRect();0===n.width||n.height;const r=document.createElement("div");r.id=t,r.appendChild(wu()),r.style.cssText="\n position: fixed;\n left: ".concat(n.left,"px;\n top: ").concat(n.top,"px;\n min-width: 20px;\n width: ").concat(n.width||100,"px;\n height: ").concat(n.height||30,"px;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 2147483647;\n pointer-events: none;\n background: transparent;\n "),document.body.appendChild(r)}(t,u),this.hideFloatButton();const{trText:e,isSame:n}=await Uo({text:l,fromLang:o,toLang:a,apiSetting:c}),r=(null==e?void 0:e.trim())||"";if(!r||n)return;await Gg(t,r)||nt.warn("Text replacement failed after all strategies.")}catch(e){nt.error("Translate input error:",e)}finally{!function(e){const t=document.getElementById(e);t&&t.remove()}(u),dr(this,Jg)[Jg]===t&&this.showFloatButton(t)}}updateConfig(e){let{inputRule:t,transApis:n}=e;const r=dr(this,Xg)[Xg];r&&this.disable(),t&&(dr(this,Kg)[Kg].inputRule=t),n&&(dr(this,Kg)[Kg].transApis=n);const{triggerShortcut:i}=dr(this,Kg)[Kg].inputRule;dr(this,Yg)[Yg]=i&&i.length>0?i:ht,r&&this.enable()}}function om(e){let{onTrigger:t,btnEvent:n,position:r,btnOffsetX:i,btnOffsetY:o}=e;const a=vn(r.x+i,0,window.innerWidth-32),s=vn(r.y+o,0,window.innerHeight-32);return(0,Cu.jsx)("div",{className:"KT-tranbtn",style:{cursor:"pointer",position:"fixed",left:a,top:s,zIndex:2147483647},[n]:t,children:(0,Cu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:Cc?"32":"20",height:Cc?"32":"20",viewBox:"0 0 32 32",version:"1.1",children:[(0,Cu.jsx)("path",{d:"M0 0 C10.56 0 21.12 0 32 0 C32 10.56 32 21.12 32 32 C21.44 32 10.88 32 0 32 C0 21.44 0 10.88 0 0 Z ",fill:"#209CEE",transform:"translate(0,0)"}),(0,Cu.jsx)("path",{d:"M0 0 C0.66 0 1.32 0 2 0 C2 2.97 2 5.94 2 9 C2.969375 8.2575 3.93875 7.515 4.9375 6.75 C5.48277344 6.33234375 6.02804688 5.9146875 6.58984375 5.484375 C8.39053593 3.83283924 8.39053593 3.83283924 9 0 C13.95 0 18.9 0 24 0 C24 0.99 24 1.98 24 3 C22.68 3 21.36 3 20 3 C20 9.27 20 15.54 20 22 C19.01 22 18.02 22 17 22 C17 15.73 17 9.46 17 3 C15.35 3 13.7 3 12 3 C11.731875 3.598125 11.46375 4.19625 11.1875 4.8125 C10.01506533 6.97224808 8.80630718 8.35790256 7 10 C8.01790655 12.27071461 8.77442829 13.80784632 10.6875 15.4375 C11.120625 15.953125 11.55375 16.46875 12 17 C11.6875 19.6875 11.6875 19.6875 11 22 C10.34 22 9.68 22 9 22 C8.773125 21.236875 8.54625 20.47375 8.3125 19.6875 C6.73268318 16.45263699 5.16717283 15.58358642 2 14 C2 16.64 2 19.28 2 22 C1.34 22 0.68 22 0 22 C0 14.74 0 7.48 0 0 Z ",fill:"#E9F5FD",transform:"translate(4,5)"})]})})}var am=i(4320),sm=i(5553),lm=i(1163),cm=i(727),um=i(7562),dm=i(171),hm=i(1683);const pm=function(e){return"string"==typeof e};const fm=function(e,t,n){return void 0===e||pm(e)?t:(0,am.A)({},t,{ownerState:(0,am.A)({},t.ownerState,n)})};const gm=function(e,t,n){return"function"==typeof e?e(t,n):e};const mm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n};const vm=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t};const ym=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=(0,sm.A)(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=(0,am.A)({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=(0,am.A)({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=mm((0,am.A)({},i,r)),s=vm(r),l=vm(i),c=t(a),u=(0,sm.A)(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=(0,am.A)({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),h=(0,am.A)({},c,n,l,s);return u.length>0&&(h.className=u),Object.keys(d).length>0&&(h.style=d),{props:h,internalRef:c.ref}},bm=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],wm=["component","slots","slotProps"],xm=["component"];function Am(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,getSlotOwnerState:a,internalForwardedProps:s}=t,l=(0,Zn.A)(t,bm),{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0}}=o,h=(0,Zn.A)(o,wm),p=u[e]||r,f=gm(d[e],i),g=ym((0,am.A)({className:n},l,{externalForwardedProps:"root"===e?h:void 0,externalSlotProps:f})),{props:{component:m},internalRef:v}=g,y=(0,Zn.A)(g.props,xm),b=(0,hm.A)(v,null==f?void 0:f.ref,t.ref),w=a?a(y):{},x=(0,am.A)({},i,w),A="root"===e?m||c:m,S=fm(p,(0,am.A)({},"root"===e&&!c&&!u[e]&&s,"root"!==e&&!u[e]&&s,y,A&&{as:A},{ref:b}),x);return Object.keys(w).forEach(e=>{delete S[e]}),[p,S]}var Sm=i(32);const km=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var _m=i(5421),Cm=i(4089);function Em(e){return(0,Cm.Ay)("MuiPaper",e)}(0,_m.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const Tm=["className","component","elevation","square","variant"],Im=(0,um.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})(e=>{let{theme:t,ownerState:n}=e;var r;return(0,am.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,am.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,cm.X4)("#fff",km(n.elevation)),", ").concat((0,cm.X4)("#fff",km(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))}),Pm=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=(0,Zn.A)(n,Tm),c=(0,am.A)({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,lm.A)(o,Em,i)})(c);return(0,Cu.jsx)(Im,(0,am.A)({as:i,ownerState:c,className:(0,sm.A)(u.root,r),ref:t},l))});function Lm(e){return(0,Cm.Ay)("MuiAlert",e)}const Nm=(0,_m.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var jm=i(3598),Rm=i(3948),Om=i(73);function zm(e,t){return zm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zm(e,t)}function Dm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zm(e,t)}const Mm=Au.createContext(null);function Fm(e,t){var n=Object.create(null);return e&&Au.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,Au.isValidElement)(e)?t(e):e}(e)}),n}function Bm(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Wm(e,t,n){var r=Fm(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if((0,Au.isValidElement)(a)){var s=o in t,l=o in r,c=t[o],u=(0,Au.isValidElement)(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&(0,Au.isValidElement)(c)&&(i[o]=(0,Au.cloneElement)(a,{onExited:n.bind(null,a),in:c.props.in,exit:Bm(a,"exit",e),enter:Bm(a,"enter",e)})):i[o]=(0,Au.cloneElement)(a,{in:!1}):i[o]=(0,Au.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:Bm(a,"exit",e),enter:Bm(a,"enter",e)})}}),i}var Um=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Vm=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}Dm(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,Fm(n.children,function(e){return(0,Au.cloneElement)(e,{onExited:r.bind(null,e),in:!0,appear:Bm(e,"appear",n),enter:Bm(e,"enter",n),exit:Bm(e,"exit",n)})})):Wm(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Fm(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=(0,am.A)({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=(0,Zn.A)(e,["component","childFactory"]),i=this.state.contextValue,o=Um(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?Au.createElement(Mm.Provider,{value:i},o):Au.createElement(Mm.Provider,{value:i},Au.createElement(t,r,o))},t}(Au.Component);Vm.propTypes={},Vm.defaultProps={component:"div",childFactory:function(e){return e}};const Hm=Vm;var Gm=i(1834),qm=i(8791);const Km=function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=Au.useState(!1),h=(0,sm.A)(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+o,left:-a/2+i},f=(0,sm.A)(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),Au.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}},[l,s,c]),(0,Cu.jsx)("span",{className:h,style:p,children:(0,Cu.jsx)("span",{className:f})})};const $m=(0,_m.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var Xm,Ym,Jm,Qm;const Zm=["center","classes","className"];let ev,tv,nv,rv;const iv=(0,Gm.i7)(ev||(ev=Xm||(Xm=bh(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),ov=(0,Gm.i7)(tv||(tv=Ym||(Ym=bh(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),av=(0,Gm.i7)(nv||(nv=Jm||(Jm=bh(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),sv=(0,um.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),lv=(0,um.Ay)(Km,{name:"MuiTouchRipple",slot:"Ripple"})(rv||(rv=Qm||(Qm=bh(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),$m.rippleVisible,iv,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},$m.ripplePulsate,e=>{let{theme:t}=e;return t.transitions.duration.shorter},$m.child,$m.childLeaving,ov,550,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut},$m.childPulsate,av,e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),cv=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=(0,Zn.A)(n,Zm),[s,l]=Au.useState([]),c=Au.useRef(0),u=Au.useRef(null);Au.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=Au.useRef(!1),h=(0,qm.A)(),p=Au.useRef(null),f=Au.useRef(null),g=Au.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,(0,Cu.jsx)(lv,{classes:{ripple:(0,sm.A)(i.ripple,$m.ripple),rippleVisible:(0,sm.A)(i.rippleVisible,$m.rippleVisible),ripplePulsate:(0,sm.A)(i.ripplePulsate,$m.ripplePulsate),child:(0,sm.A)(i.child,$m.child),childLeaving:(0,sm.A)(i.childLeaving,$m.childLeaving),childPulsate:(0,sm.A)(i.childPulsate,$m.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,u.current=a},[i]),m=Au.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:f.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,m;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)m=Math.sqrt((2*l.width**2+l.height**2)/3),m%2==0&&(m+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;m=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{g({pulsate:i,rippleX:c,rippleY:u,rippleSize:m,cb:n})},h.start(80,()=>{p.current&&(p.current(),p.current=null)})):g({pulsate:i,rippleX:c,rippleY:u,rippleSize:m,cb:n})},[r,g,h]),v=Au.useCallback(()=>{m({},{pulsate:!0})},[m]),y=Au.useCallback((e,t)=>{if(h.clear(),"touchend"===(null==e?void 0:e.type)&&p.current)return p.current(),p.current=null,void h.start(0,()=>{y(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[h]);return Au.useImperativeHandle(t,()=>({pulsate:v,start:m,stop:y}),[v,m,y]),(0,Cu.jsx)(sv,(0,am.A)({className:(0,sm.A)($m.root,i.root,o),ref:f},a,{children:(0,Cu.jsx)(Hm,{component:null,exit:!0,children:s})}))});function uv(e){return(0,Cm.Ay)("MuiButtonBase",e)}const dv=(0,_m.A)("MuiButtonBase",["root","disabled","focusVisible"]),hv=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],pv=(0,um.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(dv.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),fv=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:p,onClick:f,onContextMenu:g,onDragLeave:m,onFocus:v,onFocusVisible:y,onKeyDown:b,onKeyUp:w,onMouseDown:x,onMouseLeave:A,onMouseUp:S,onTouchEnd:k,onTouchMove:_,onTouchStart:C,tabIndex:E=0,TouchRippleProps:T,touchRippleRef:I,type:P}=n,L=(0,Zn.A)(n,hv),N=Au.useRef(null),j=Au.useRef(null),R=(0,jm.A)(j,I),{isFocusVisibleRef:O,onFocus:z,onBlur:D,ref:M}=(0,Om.A)(),[F,B]=Au.useState(!1);l&&F&&B(!1),Au.useImperativeHandle(r,()=>({focusVisible:()=>{B(!0),N.current.focus()}}),[]);const[W,U]=Au.useState(!1);Au.useEffect(()=>{U(!0)},[]);const V=W&&!c&&!l;function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u;return(0,Rm.A)(r=>{t&&t(r);return!n&&j.current&&j.current[e](r),!0})}Au.useEffect(()=>{F&&d&&!c&&W&&j.current.pulsate()},[c,d,F,W]);const G=H("start",x),q=H("stop",g),K=H("stop",m),$=H("stop",S),X=H("stop",e=>{F&&e.preventDefault(),A&&A(e)}),Y=H("start",C),J=H("stop",k),Q=H("stop",_),Z=H("stop",e=>{D(e),!1===O.current&&B(!1),p&&p(e)},!1),ee=(0,Rm.A)(e=>{N.current||(N.current=e.currentTarget),z(e),!0===O.current&&(B(!0),y&&y(e)),v&&v(e)}),te=()=>{const e=N.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=Au.useRef(!1),re=(0,Rm.A)(e=>{d&&!ne.current&&F&&j.current&&" "===e.key&&(ne.current=!0,j.current.stop(e,()=>{j.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),f&&f(e))}),ie=(0,Rm.A)(e=>{d&&" "===e.key&&j.current&&F&&!e.defaultPrevented&&(ne.current=!1,j.current.stop(e,()=>{j.current.pulsate(e)})),w&&w(e),f&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&f(e)});let oe=s;"button"===oe&&(L.href||L.to)&&(oe=h);const ae={};"button"===oe?(ae.type=void 0===P?"button":P,ae.disabled=l):(L.href||L.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=(0,jm.A)(t,M,N);const le=(0,am.A)({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:E,focusVisible:F}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,lm.A)(o,uv,i);return n&&r&&(a.root+=" ".concat(r)),a})(le);return(0,Cu.jsxs)(pv,(0,am.A)({as:oe,className:(0,sm.A)(ce.root,a),ownerState:le,onBlur:Z,onClick:f,onContextMenu:q,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:G,onMouseLeave:X,onMouseUp:$,onDragLeave:K,onTouchEnd:J,onTouchMove:Q,onTouchStart:Y,ref:se,tabIndex:l?-1:E,type:P},ae,L,{children:[o,V?(0,Cu.jsx)(cv,(0,am.A)({ref:R,center:i},T)):null]}))}),gv=fv;function mv(e){return(0,Cm.Ay)("MuiIconButton",e)}const vv=(0,_m.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),yv=["edge","children","className","color","disabled","disableFocusRipple","size"],bv=(0,um.Ay)(gv,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,Sm.A)(n.color))],n.edge&&t["edge".concat((0,Sm.A)(n.edge))],t["size".concat((0,Sm.A)(n.size))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})},e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,am.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,am.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,am.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(vv.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),wv=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:a="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=(0,Zn.A)(n,yv),d=(0,am.A)({},n,{edge:r,color:a,disabled:s,disableFocusRipple:l,size:c}),h=(e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,a={root:["root",n&&"disabled","default"!==r&&"color".concat((0,Sm.A)(r)),i&&"edge".concat((0,Sm.A)(i)),"size".concat((0,Sm.A)(o))]};return(0,lm.A)(a,mv,t)})(d);return(0,Cu.jsx)(bv,(0,am.A)({className:(0,sm.A)(h.root,o),centerRipple:!0,focusRipple:!l,disabled:s,ref:t},u,{ownerState:d,children:i}))});var xv=i(1257);const Av=(0,xv.A)((0,Cu.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),Sv=(0,xv.A)((0,Cu.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),kv=(0,xv.A)((0,Cu.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),_v=(0,xv.A)((0,Cu.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),Cv=(0,xv.A)((0,Cu.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Ev=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],Tv=(0,um.Ay)(Pm,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,Sm.A)(n.color||n.severity))]]}})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?cm.e$:cm.a,r="light"===t.palette.mode?cm.a:cm.e$;return(0,am.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[i]=e;return{props:{colorSeverity:i,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(i,"Color")]:n(t.palette[i].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(i,"StandardBg")]:r(t.palette[i].light,.9),["& .".concat(Nm.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(i,"IconColor")]}:{color:t.palette[i].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:n(t.palette[r].light,.6),border:"1px solid ".concat((t.vars||t).palette[r].light),["& .".concat(Nm.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}}),...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.dark}).map(e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,am.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(n,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(n,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}})]})}),Iv=(0,um.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),Pv=(0,um.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),Lv=(0,um.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),Nv={success:(0,Cu.jsx)(Av,{fontSize:"inherit"}),warning:(0,Cu.jsx)(Sv,{fontSize:"inherit"}),error:(0,Cu.jsx)(kv,{fontSize:"inherit"}),info:(0,Cu.jsx)(_v,{fontSize:"inherit"})},jv=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:a="Close",color:s,components:l={},componentsProps:c={},icon:u,iconMapping:d=Nv,onClose:h,role:p="alert",severity:f="success",slotProps:g={},slots:m={},variant:v="standard"}=n,y=(0,Zn.A)(n,Ev),b=(0,am.A)({},n,{color:s,severity:f,variant:v,colorSeverity:s||f}),w=(e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root","color".concat((0,Sm.A)(n||r)),"".concat(t).concat((0,Sm.A)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,lm.A)(o,Lm,i)})(b),x={slots:(0,am.A)({closeButton:l.CloseButton,closeIcon:l.CloseIcon},m),slotProps:(0,am.A)({},c,g)},[A,S]=Am("closeButton",{elementType:wv,externalForwardedProps:x,ownerState:b}),[k,_]=Am("closeIcon",{elementType:Cv,externalForwardedProps:x,ownerState:b});return(0,Cu.jsxs)(Tv,(0,am.A)({role:p,elevation:0,ownerState:b,className:(0,sm.A)(w.root,o),ref:t},y,{children:[!1!==u?(0,Cu.jsx)(Iv,{ownerState:b,className:w.icon,children:u||d[f]||Nv[f]}):null,(0,Cu.jsx)(Pv,{ownerState:b,className:w.message,children:i}),null!=r?(0,Cu.jsx)(Lv,{ownerState:b,className:w.action,children:r}):null,null==r&&h?(0,Cu.jsx)(Lv,{ownerState:b,className:w.action,children:(0,Cu.jsx)(A,(0,am.A)({size:"small","aria-label":a,title:a,color:"inherit",onClick:h},S,{children:(0,Cu.jsx)(k,(0,am.A)({fontSize:"small"},_))}))}):null]}))});function Rv(e,t){const n=(0,Au.useRef)(e);(0,Au.useEffect)(()=>{n.current=e},[e]);const r=(0,Au.useMemo)(()=>wn(function(){return n.current(...arguments)},t),[t]);return(0,Au.useEffect)(()=>()=>{r.cancel()},[r]),r}function Ov(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const[r,i]=(0,Au.useState)(!0),[o,a]=(0,Au.useState)(t);(0,Au.useEffect)(()=>{let n=!0;return(async()=>{try{const r=await Bn.getObj(e);null==r?await Bn.setObj(e,t):n&&a(r)}catch(t){rt("storage load error for key: ".concat(e),t)}finally{n&&i(!1)}})(),()=>{n=!1}},[e,t]);const s=Rv((0,Au.useCallback)(async(e,t)=>{try{const n=await yc(e,t);null!=n&&n.isNew&&a(n.value)}catch(t){rt("Sync failed",e)}},[]),3e3);(0,Au.useEffect)(()=>{r||null!==o&&(Bn.setObj(e,o).catch(t=>{rt("storage save error for key: ".concat(e),t)}),n&&"options"===pn()&&s(n,o))},[e,n,r,o,s]);const l=(0,Au.useCallback)(e=>{a(t=>"function"==typeof e?e(t):e)},[]),c=(0,Au.useCallback)(e=>{a(t=>{const n="function"==typeof e?e(t):e;return h(h({},"object"==typeof t&&null!==t?t:{}),n)})},[]),u=(0,Au.useCallback)(async()=>{try{await Bn.del(e),a(null)}catch(t){rt("storage remove error for key: ".concat(e),t)}},[e]),d=(0,Au.useCallback)(async()=>{try{const n=await Bn.getObj(e);a(null!=n?n:t)}catch(t){rt("storage reload error for key: ".concat(e),t)}},[e,t]);return{data:o,save:l,update:c,remove:u,reload:d,isLoading:r}}function zv(e){return(0,Cm.Ay)("MuiCircularProgress",e)}(0,_m.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var Dv,Mv,Fv,Bv;const Wv=["className","color","disableShrink","size","style","thickness","value","variant"];let Uv,Vv,Hv,Gv;const qv=44,Kv=(0,Gm.i7)(Uv||(Uv=Dv||(Dv=bh(["\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n"])))),$v=(0,Gm.i7)(Vv||(Vv=Mv||(Mv=bh(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])))),Xv=(0,um.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["color".concat((0,Sm.A)(n.color))]]}})(e=>{let{ownerState:t,theme:n}=e;return(0,am.A)({display:"inline-block"},"determinate"===t.variant&&{transition:n.transitions.create("transform")},"inherit"!==t.color&&{color:(n.vars||n).palette[t.color].main})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&(0,Gm.AH)(Hv||(Hv=Fv||(Fv=bh(["\n animation: "," 1.4s linear infinite;\n "]))),Kv)}),Yv=(0,um.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Jv=(0,um.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t["circle".concat((0,Sm.A)(n.variant))],n.disableShrink&&t.circleDisableShrink]}})(e=>{let{ownerState:t,theme:n}=e;return(0,am.A)({stroke:"currentColor"},"determinate"===t.variant&&{transition:n.transitions.create("stroke-dashoffset")},"indeterminate"===t.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})},e=>{let{ownerState:t}=e;return"indeterminate"===t.variant&&!t.disableShrink&&(0,Gm.AH)(Gv||(Gv=Bv||(Bv=bh(["\n animation: "," 1.4s ease-in-out infinite;\n "]))),$v)}),Qv=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:a=40,style:s,thickness:l=3.6,value:c=0,variant:u="indeterminate"}=n,d=(0,Zn.A)(n,Wv),h=(0,am.A)({},n,{color:i,disableShrink:o,size:a,thickness:l,value:c,variant:u}),p=(e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,"color".concat((0,Sm.A)(r))],svg:["svg"],circle:["circle","circle".concat((0,Sm.A)(n)),i&&"circleDisableShrink"]};return(0,lm.A)(o,zv,t)})(h),f={},g={},m={};if("determinate"===u){const e=2*Math.PI*((qv-l)/2);f.strokeDasharray=e.toFixed(3),m["aria-valuenow"]=Math.round(c),f.strokeDashoffset="".concat(((100-c)/100*e).toFixed(3),"px"),g.transform="rotate(-90deg)"}return(0,Cu.jsx)(Xv,(0,am.A)({className:(0,sm.A)(p.root,r),style:(0,am.A)({width:a,height:a},g,s),ownerState:h,ref:t,role:"progressbar"},m,d,{children:(0,Cu.jsx)(Yv,{className:p.svg,ownerState:h,viewBox:"".concat(22," ").concat(22," ").concat(qv," ").concat(qv),children:(0,Cu.jsx)(Jv,{className:p.circle,style:f,ownerState:h,cx:qv,cy:qv,r:(qv-l)/2,fill:"none",strokeWidth:l})})}))}),Zv=Qv;var ey=i(5219);function ty(e){return(0,Cm.Ay)("MuiTypography",e)}(0,_m.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const ny=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],ry=(0,um.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,Sm.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})}),iy={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},oy={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ay=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiTypography"}),r=(e=>oy[e]||e)(n.color),i=(0,ey.A)((0,am.A)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:h=iy}=i,p=(0,Zn.A)(i,ny),f=(0,am.A)({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:h}),g=s||(u?"p":h[d]||iy[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align".concat((0,Sm.A)(t)),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return(0,lm.A)(s,ty,a)})(f);return(0,Cu.jsx)(ry,(0,am.A)({as:g,ref:t,ownerState:f,className:(0,sm.A)(m.root,a)},p))});function sy(e){return(0,Cm.Ay)("MuiLink",e)}const ly=(0,_m.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var cy=i(8853);const uy={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},dy=e=>{let{theme:t,ownerState:n}=e;const r=(e=>uy[e]||e)(n.color),i=(0,cy.Yn)(t,"palette.".concat(r),!1)||n.color,o=(0,cy.Yn)(t,"palette.".concat(r,"Channel"));return"vars"in t&&o?"rgba(".concat(o," / 0.4)"):(0,cm.X4)(i,.4)},hy=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],py=(0,um.Ay)(ay,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["underline".concat((0,Sm.A)(n.underline))],"button"===n.component&&t.button]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({},"none"===n.underline&&{textDecoration:"none"},"hover"===n.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===n.underline&&(0,am.A)({textDecoration:"underline"},"inherit"!==n.color&&{textDecorationColor:dy({theme:t,ownerState:n})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===n.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(ly.focusVisible)]:{outline:"auto"}})}),fy=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:o="a",onBlur:a,onFocus:s,TypographyClasses:l,underline:c="always",variant:u="inherit",sx:d}=n,h=(0,Zn.A)(n,hy),{isFocusVisibleRef:p,onBlur:f,onFocus:g,ref:m}=(0,Om.A)(),[v,y]=Au.useState(!1),b=(0,jm.A)(t,m),w=(0,am.A)({},n,{color:i,component:o,focusVisible:v,underline:c,variant:u}),x=(e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root","underline".concat((0,Sm.A)(i)),"button"===n&&"button",r&&"focusVisible"]};return(0,lm.A)(o,sy,t)})(w);return(0,Cu.jsx)(py,(0,am.A)({color:i,className:(0,sm.A)(x.root,r),classes:l,component:o,onBlur:e=>{f(e),!1===p.current&&y(!1),a&&a(e)},onFocus:e=>{g(e),!0===p.current&&y(!0),s&&s(e)},ref:b,ownerState:w,variant:u,sx:[...Object.keys(uy).includes(i)?[]:[{color:i}],...Array.isArray(d)?d:[d]]},h))});function gy(e){return(0,Cm.Ay)("MuiDivider",e)}const my=(0,_m.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),vy=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],yy=(0,um.Ay)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},n.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},n.light&&{borderColor:t.vars?"rgba(".concat(t.vars.palette.dividerChannel," / 0.08)"):(0,cm.X4)(t.palette.divider,.08)},"inset"===n.variant&&{marginLeft:72},"middle"===n.variant&&"horizontal"===n.orientation&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},"middle"===n.variant&&"vertical"===n.orientation&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},"vertical"===n.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},n.flexItem&&{alignSelf:"stretch",height:"auto"})},e=>{let{ownerState:t}=e;return(0,am.A)({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})},e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({},n.children&&"vertical"!==n.orientation&&{"&::before, &::after":{width:"100%",borderTop:"thin solid ".concat((t.vars||t).palette.divider),borderTopStyle:"inherit"}})},e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({},n.children&&"vertical"===n.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:"thin solid ".concat((t.vars||t).palette.divider),borderLeftStyle:"inherit"}})},e=>{let{ownerState:t}=e;return(0,am.A)({},"right"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===t.textAlign&&"vertical"!==t.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})}),by=(0,um.Ay)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({display:"inline-block",paddingLeft:"calc(".concat(t.spacing(1)," * 1.2)"),paddingRight:"calc(".concat(t.spacing(1)," * 1.2)")},"vertical"===n.orientation&&{paddingTop:"calc(".concat(t.spacing(1)," * 1.2)"),paddingBottom:"calc(".concat(t.spacing(1)," * 1.2)")})}),wy=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:h="fullWidth"}=n,p=(0,Zn.A)(n,vy),f=(0,am.A)({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:h}),g=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e,c={root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]};return(0,lm.A)(c,gy,r)})(f);return(0,Cu.jsx)(yy,(0,am.A)({as:a,className:(0,sm.A)(g.root,o),role:u,ref:t,ownerState:f},p,{children:i?(0,Cu.jsx)(by,{className:g.wrapper,ownerState:f,children:i}):null}))});wy.muiSkipListHighlight=!0;const xy=wy;function Ay(){return(0,Cu.jsxs)("center",{children:[(0,Cu.jsx)(xy,{children:(0,Cu.jsx)(fy,{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator v".concat("2.0.20")})}),(0,Cu.jsx)(Zv,{})]})}const Sy=(0,Au.createContext)({setting:At,updateSetting:()=>{},reloadSetting:()=>{}});function ky(e){let{children:t,context:n}=e;const r=(0,Au.useMemo)(()=>"options"===n,[n]),{data:i,isLoading:o,update:a,reload:s}=Ov(zt,At,Rt);(0,Au.useEffect)(()=>{"boolean"==typeof(null==i?void 0:i.darkMode)&&a(e=>h(h({},e),{},{darkMode:e.darkMode?"dark":"light"}))},[null==i?void 0:i.darkMode,a]),(0,Au.useEffect)(()=>{r&&(async()=>{try{nt.setLevel(null==i?void 0:i.logLevel),dn&&await cr("set_loglevel",null==i?void 0:i.logLevel)}catch(e){nt.error("Failed to fetch log level, using default.",e)}})()},[r,null==i?void 0:i.logLevel]);const l=(0,Au.useCallback)(e=>{a(e),Jn(Rt)},[a]),c=(0,Au.useCallback)(e=>async t=>{l(n=>h(h({},n),{},{[e]:h(h({},(null==n?void 0:n[e])||{}),t)}))},[l]),u=(0,Au.useMemo)(()=>({context:n,setting:i,updateSetting:l,updateChild:c,reloadSetting:s}),[n,i,l,c,s]);return o?r?(0,Cu.jsx)(Ay,{}):null:i?(0,Cu.jsx)(Sy.Provider,{value:u,children:t}):r?(0,Cu.jsx)("center",{children:(0,Cu.jsxs)(jv,{severity:"error",sx:{maxWidth:600,margin:"60px auto"},children:[(0,Cu.jsx)("p",{children:"数据加载出错,请刷新页面或卸载后重新安装。"}),(0,Cu.jsx)("p",{children:"Data loading error, please refresh the page or uninstall and reinstall."})]})}):null}function _y(){return(0,Au.useContext)(Sy)}var Cy=i(2372);const Ey=Au.createContext(null);function Ty(){return Au.useContext(Ey)}const Iy="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";const Py=function(e){const{children:t,theme:n}=e,r=Ty(),i=Au.useMemo(()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return(0,am.A)({},e,t)}(r,n);return null!=e&&(e[Iy]=null!==r),e},[n,r]);return(0,Cu.jsx)(Ey.Provider,{value:i,children:t})};const Ly=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=Au.useContext(ku.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},Ny=["value"],jy=Au.createContext();const Ry=function(e){let{value:t}=e,n=(0,Zn.A)(e,Ny);return(0,Cu.jsx)(jy.Provider,(0,am.A)({value:null==t||t},n))};var Oy=i(7441),zy=i(6489),Dy=i(7461),My=i(1296),Fy=i(7802),By=i(3013);const Wy=(0,By.A)();const Uy=function(){return Ly(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wy)};function Vy(e){const t=(0,My.internal_serializeStyles)(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles="@layer global{".concat(t.styles,"}")),t):e}const Hy=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const i=Uy(r),o=n&&i[n]||i;let a="function"==typeof t?t(o):t;return o.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Vy("function"==typeof e?e(o):e)):Vy(a)),(0,Cu.jsx)(Fy.A,{styles:a})};const Gy={};function qy(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Au.useMemo(()=>{const i=e&&t[e]||t;if("function"==typeof n){const o=n(i),a=e?(0,am.A)({},t,{[e]:o}):o;return r?()=>a:a}return e?(0,am.A)({},t,{[e]:n}):(0,am.A)({},t,n)},[e,t,n,r])}const Ky=function(e){const{children:t,theme:n,themeId:r}=e,i=Ly(Gy),o=Ty()||Gy,a=qy(r,i,n),s=qy(r,o,n,!0),l="rtl"===a.direction,c=function(e){const t=Ly(),n=(0,Dy.A)()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,i):"@layer ".concat(i,";"):"",(0,zy.A)(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){var r;if(t&&null!=(r=t.hasAttribute)&&r.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const o=document.createElement("style");o.setAttribute("data-mui-layer-order",n),o.textContent=i,e.prepend(o)}else{var o;null==(o=e.querySelector('style[data-mui-layer-order="'.concat(n,'"]')))||o.remove()}},[i,n]),i?(0,Cu.jsx)(Hy,{styles:i}):null}(a);return(0,Cu.jsx)(Py,{theme:s,children:(0,Cu.jsx)(ku.T.Provider,{value:a,children:(0,Cu.jsx)(Ry,{value:l,children:(0,Cu.jsxs)(Oy.A,{value:null==a?void 0:a.components,children:[c,t]})})})})};var $y=i(4882);const Xy=["theme"];function Yy(e){let{theme:t}=e,n=(0,Zn.A)(e,Xy);const r=t[$y.A];let i=r||t;return"function"!=typeof t&&(r&&!r.vars?i=(0,am.A)({},r,{vars:null}):t&&!t.vars&&(i=(0,am.A)({},t,{vars:null}))),(0,Cu.jsx)(Ky,(0,am.A)({},n,{themeId:r?$y.A:void 0,theme:i}))}var Jy=i(7239);const Qy=function(e){return(0,Cu.jsx)(Hy,(0,am.A)({},e,{defaultTheme:Jy.A,themeId:$y.A}))},Zy=(e,t)=>(0,am.A)({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),eb=e=>(0,am.A)({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}});const tb=function(e){const t=(0,dm.b)({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return(0,Cu.jsxs)(Au.Fragment,{children:[(0,Cu.jsx)(Qy,{styles:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(t=>{let[n,i]=t;var o;r[e.getColorSchemeSelector(n).replace(/\s*&/,"")]={colorScheme:null==(o=i.palette)?void 0:o.mode}});let i=(0,am.A)({html:Zy(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:(0,am.A)({margin:0},eb(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const o=null==(n=e.components)||null==(n=n.MuiCssBaseline)?void 0:n.styleOverrides;return o&&(i=[i,o]),i}(e,r)}),n]})};function nb(e){let{children:t,options:n={},styles:r={}}=e;const{darkMode:i}=function(){const{setting:{darkMode:e},updateSetting:t}=_y(),n=(0,Au.useCallback)(()=>{t({darkMode:{light:"dark",dark:"auto",auto:"light"}[e]||"light"})},[e,t]);return{darkMode:e,toggleDarkMode:n}}(),[o,l]=(0,Au.useState)(a);(0,Au.useEffect)(()=>{if("function"!=typeof window.matchMedia)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{l(e.matches?s:a)};return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);const c=(0,Au.useMemo)(()=>{let e=16;try{const t=window.getComputedStyle(document.documentElement).fontSize;e=parseInt(t.replace("px",""))}catch(e){}const t="dark"===i||"auto"===i&&o===s;return(0,Cy.A)(h({palette:{mode:t?s:a},typography:{htmlFontSize:e}},n))},[i,n,o]);return(0,Cu.jsxs)(Yy,{theme:c,children:[(0,Cu.jsx)(tb,{}),(0,Cu.jsx)(Qy,{styles:r}),t]})}var rb=i(3367);const ib=["className","component"];var ob=i(7599);const ab=(0,_m.A)("MuiBox",["root"]),sb=(0,Cy.A)(),lb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,o=(0,My.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(rb.A);return Au.forwardRef(function(e,a){const s=Uy(n),l=(0,ey.A)(e),{className:c,component:u="div"}=l,d=(0,Zn.A)(l,ib);return(0,Cu.jsx)(o,(0,am.A)({as:u,ref:a,className:(0,sm.A)(c,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:$y.A,defaultTheme:sb,defaultClassName:ab.root,generateClassName:ob.A.generate}),cb=lb;function ub(){const e=Uy(Jy.A);return e[$y.A]||e}var db=i(6253),hb=i(8581);function pb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,hb.A)(e,t,n)}function fb(e){if(e.type)return e;if("#"===e.charAt(0))return fb(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", "),")"):""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,db.A)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,db.A)(10,r))}else i=i.split(",");return i=i.map(e=>parseFloat(e)),{type:n,values:i,colorSpace:r}}function gb(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function mb(e,t){return e=fb(e),t=pb(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,gb(e)}const vb=["direction","size","setSize","position","setPosition","children","minSize","maxSize"],yb=["header","children","position","size","minSize","maxSize","setSize","setPosition","onChangeSize","onChangePosition","autoHeight"];function bb(e){let{direction:t,size:n,setSize:r,position:i,setPosition:o,children:a,minSize:s,maxSize:l}=e,c=er(e,vb);const[u,d]=(0,Au.useState)(null);function p(e){!Cc&&e.target.setPointerCapture(e.pointerId);const{clientX:t,clientY:r}=Cc?e.targetTouches[0]:e;d({x:i.x,y:i.y,w:n.w,h:n.h,clientX:t,clientY:r})}function f(e){const{clientX:a,clientY:c}=Cc?e.targetTouches[0]:e;if(u){const e=a-u.clientX,d=c-u.clientY;let h=i.x,p=i.y,f=n.w,g=n.h;switch(t){case"Header":h=u.x+e,p=u.y+d;break;case"TopLeft":h=u.x+e,p=u.y+d,f=u.w-e,g=u.h-d;break;case"Top":p=u.y+d,g=u.h-d;break;case"TopRight":p=u.y+d,f=u.w+e,g=u.h-d;break;case"Left":h=u.x+e,f=u.w-e;break;case"Right":f=u.w+e;break;case"BottomLeft":h=u.x+e,f=u.w-e,g=u.h+d;break;case"Bottom":g=u.h+d;break;case"BottomRight":f=u.w+e,g=u.h+d}f<s.w&&(f=s.w,h=i.x),f>l.w&&(f=l.w,h=i.x),g<s.h&&(g=s.h,p=i.y),g>l.h&&(g=l.h,p=i.y),o({x:vn(h,0,window.innerWidth-f),y:vn(p,0,window.innerHeight-50)}),r({w:vn(f,s.w,window.innerWidth),h:vn(g,s.h,window.innerHeight)})}}function g(e){e.stopPropagation(),d(null)}const m=Cc?{onTouchStart:p,onTouchMove:f,onTouchEnd:g}:{onPointerDown:p,onPointerMove:f,onPointerUp:g};return(0,Cu.jsx)("div",h(h(h({},c),m),{},{children:a}))}function wb(e){let{header:t,children:n,position:r={x:0,y:0},size:i={w:600,h:400},minSize:o={w:300,h:200},maxSize:a={w:1200,h:1200},setSize:s,setPosition:l,onChangeSize:c,onChangePosition:u,autoHeight:d}=e,p=er(e,yb);const f=ub(),g="dark"===f.palette.mode?"\n 0 0 0 1px rgba(255,255,255,0.18),\n 0 0 10px 2px rgba(255,255,255,0.18),\n 0 8px 32px rgba(0,0,0,0.35)\n ":" \n 0 4px 18px rgba(0, 0, 0, 0.15)\n ",m={size:i,setSize:s,position:r,setPosition:l,minSize:o,maxSize:a};return(0,Cu.jsxs)(cb,h(h({className:"KT-draggable",style:{touchAction:"none",position:"fixed",left:r.x,top:r.y,display:"grid",gridTemplateColumns:"".concat(8,"px auto ").concat(8,"px"),gridTemplateRows:"".concat(8,"px auto ").concat(8,"px"),zIndex:2147483647,borderRadius:"12px",overflow:"hidden"}},p),{},{children:[(0,Cu.jsx)(bb,h({direction:"TopLeft",style:{transform:"translate(".concat(4,"px, ").concat(4,"px)"),cursor:"nw-resize"}},m)),(0,Cu.jsx)(bb,h({direction:"Top",style:{margin:"0 ".concat(4,"px"),transform:"translate(0px, ".concat(4,"px)"),cursor:"row-resize"}},m)),(0,Cu.jsx)(bb,h({direction:"TopRight",style:{transform:"translate(-".concat(4,"px, ").concat(4,"px)"),cursor:"ne-resize"}},m)),(0,Cu.jsx)(bb,h({direction:"Left",style:{margin:"".concat(4,"px 0"),transform:"translate(".concat(4,"px, 0px)"),cursor:"col-resize"}},m)),(0,Cu.jsxs)(Pm,{className:"KT-draggable-body",elevation:4,sx:{borderRadius:4,overflow:"hidden",backgroundColor:f.palette.background.paper,boxShadow:g},children:[(0,Cu.jsx)(bb,h(h({className:"KT-draggable-header",direction:"Header",style:{cursor:"move"}},m),{},{children:t})),(0,Cu.jsx)(cb,{className:"KT-draggable-container",sx:()=>{const e=d?{maxWidth:i.w,maxHeight:i.h,overflow:"hidden auto"}:{maxWidth:i.w,height:i.h,overflow:"hidden auto"},t="dark"===f.palette.mode?"#1f1f23":f.palette.background.paper,n="dark"===f.palette.mode?mb(f.palette.text.primary,.28):mb(f.palette.text.primary,.24);return h(h({},e),{},{backgroundColor:f.palette.background.paper,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:t},"&::-webkit-scrollbar-thumb":{backgroundColor:n,borderRadius:8,border:"2px solid ".concat(f.palette.background.paper)},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:mb(f.palette.text.primary,.36)},scrollbarWidth:"thin",scrollbarColor:"".concat(n," ").concat(t)})},children:n})]}),(0,Cu.jsx)(bb,h({direction:"Right",style:{margin:"".concat(4,"px 0"),transform:"translate(-".concat(4,"px, 0px)"),cursor:"col-resize"}},m)),(0,Cu.jsx)(bb,h({direction:"BottomLeft",style:{transform:"translate(".concat(4,"px, -").concat(4,"px)"),cursor:"ne-resize"}},m)),(0,Cu.jsx)(bb,h({direction:"Bottom",style:{margin:"0 ".concat(4,"px"),transform:"translate(0px, -".concat(4,"px)"),cursor:"row-resize"}},m)),(0,Cu.jsx)(bb,h({direction:"BottomRight",style:{transform:"translate(-".concat(4,"px, -").concat(4,"px)"),cursor:"nw-resize"}},m))]}))}var xb=i(6997);const Ab=["ownerState"],Sb=["variants"],kb=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function _b(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Cb(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles="@layer ".concat(t,"{").concat(String(e.styles),"}")),e}const Eb=(0,By.A)(),Tb=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function Ib(e){let{defaultTheme:t,theme:n,themeId:r}=e;return i=n,0===Object.keys(i).length?t:n[r]||n;var i}function Pb(e){return e?(t,n)=>n[e]:null}function Lb(e,t,n){let{ownerState:r}=t,i=(0,Zn.A)(t,Ab);const o="function"==typeof e?e((0,am.A)({ownerState:r},i)):e;if(Array.isArray(o))return o.flatMap(e=>Lb(e,(0,am.A)({ownerState:r},i),n));if(o&&"object"==typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,Zn.A)(o,Sb);return e.forEach(e=>{let o=!0;if("function"==typeof e.props?o=e.props((0,am.A)({ownerState:r},i,r)):Object.keys(e.props).forEach(t=>{(null==r?void 0:r[t])!==e.props[t]&&i[t]!==e.props[t]&&(o=!1)}),o){Array.isArray(t)||(t=[t]);const o="function"==typeof e.style?e.style((0,am.A)({ownerState:r},i,r)):e.style;t.push(n?Cb((0,My.internal_serializeStyles)(o),n):o)}}),t}return n?Cb((0,My.internal_serializeStyles)(o),n):o}const Nb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=Eb,rootShouldForwardProp:r=_b,slotShouldForwardProp:i=_b}=e,o=e=>(0,rb.A)((0,am.A)({},e,{theme:Ib((0,am.A)({},e,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,My.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:c,skipSx:u,overridesResolver:d=Pb(Tb(l))}=a,h=(0,Zn.A)(a,kb),p=s&&s.startsWith("Mui")||l?"components":"custom",f=void 0!==c?c:l&&"Root"!==l&&"root"!==l||!1,g=u||!1;let m=_b;"Root"===l||"root"===l?m=r:l?m=i:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(m=void 0);const v=(0,My.default)(e,(0,am.A)({shouldForwardProp:m,label:undefined},h)),y=e=>"function"==typeof e&&e.__emotion_real!==e||(0,xb.Q)(e)?r=>{const i=Ib({theme:r.theme,defaultTheme:n,themeId:t});return Lb(e,(0,am.A)({},r,{theme:i}),i.modularCssLayers?p:void 0)}:e,b=function(r){let i=y(r);for(var a=arguments.length,l=new Array(a>1?a-1:0),c=1;c<a;c++)l[c-1]=arguments[c];const u=l?l.map(y):[];s&&d&&u.push(e=>{const r=Ib((0,am.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[s]||!r.components[s].styleOverrides)return null;const i=r.components[s].styleOverrides,o={};return Object.entries(i).forEach(t=>{let[n,i]=t;o[n]=Lb(i,(0,am.A)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),d(e,o)}),s&&!f&&u.push(e=>{var r;const i=Ib((0,am.A)({},e,{defaultTheme:n,themeId:t}));return Lb({variants:null==i||null==(r=i.components)||null==(r=r[s])?void 0:r.variants},(0,am.A)({},e,{theme:i}),i.modularCssLayers?"theme":void 0)}),g||u.push(o);const h=u.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=v(i,...u);return e.muiName&&(p.muiName=e.muiName),p};return v.withConfig&&(b.withConfig=v.withConfig),b}}(),jb=Nb;var Rb=i(3699);function Ob(e){let{props:t,name:n,defaultTheme:r,themeId:i}=e,o=Uy(r);i&&(o=o[i]||o);const a=function(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,Rb.A)(t.components[n].defaultProps,r):r}({theme:o,name:n,props:t});return a}var zb=i(2680),Db=i(1464);const Mb=["component","direction","spacing","divider","children","className","useFlexGap"],Fb=(0,By.A)(),Bb=jb("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function Wb(e){return Ob({props:e,name:"MuiStack",defaultTheme:Fb})}function Ub(e,t){const n=Au.Children.toArray(e).filter(Boolean);return n.reduce((e,r,i)=>(e.push(r),i<n.length-1&&e.push(Au.cloneElement(t,{key:"separator-".concat(i)})),e),[])}const Vb=e=>{let{ownerState:t,theme:n}=e,r=(0,am.A)({display:"flex",flexDirection:"column"},(0,zb.NI)({theme:n},(0,zb.kW)({values:t.direction,breakpoints:n.breakpoints.values}),e=>({flexDirection:e})));if(t.spacing){const e=(0,Db.LX)(n),i=Object.keys(n.breakpoints.values).reduce((e,n)=>(("object"==typeof t.spacing&&null!=t.spacing[n]||"object"==typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e),{}),o=(0,zb.kW)({values:t.direction,base:i}),a=(0,zb.kW)({values:t.spacing,base:i});"object"==typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){const r=t>0?o[n[t-1]]:"column";o[e]=r}});const s=(n,r)=>{return t.useFlexGap?{gap:(0,Db._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((i=r?o[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[i]))]:(0,Db._W)(e,n)}};var i};r=(0,xb.A)(r,(0,zb.NI)({theme:n},a,s))}return r=(0,zb.iZ)(n.breakpoints,r),r};const Hb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=Bb,useThemeProps:n=Wb,componentName:r="MuiStack"}=e,i=t(Vb),o=Au.forwardRef(function(e,t){const o=n(e),a=(0,ey.A)(o),{component:s="div",direction:l="column",spacing:c=0,divider:u,children:d,className:h,useFlexGap:p=!1}=a,f=(0,Zn.A)(a,Mb),g={direction:l,spacing:c,useFlexGap:p},m=(0,lm.A)({root:["root"]},e=>(0,Cm.Ay)(r,e),{});return(0,Cu.jsx)(i,(0,am.A)({as:s,ownerState:g,ref:t,className:(0,sm.A)(m.root,h)},f,{children:u?Ub(d,u):d}))});return o}({createStyledComponent:(0,um.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,dm.b)({props:e,name:"MuiStack"})}),Gb=Hb;var qb=i(7698),Kb=i(4690),$b=i(7876),Xb=i(3072),Yb=i(5362),Jb=i(8756),Qb=i(1496),Zb=i(5995);const ew=["execute"],tw=()=>{const[e,t]=(0,Au.useState)(null),[n,r]=(0,Au.useState)(!1),[i,o]=(0,Au.useState)(null),a=(0,Au.useCallback)(async function(e){if(e){r(!0),o(null);try{for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];const o=await e(...i);return t(o),r(!1),o}catch(e){o((null==e?void 0:e.message)||"An unknown error occurred"),r(!1)}}},[]);return{data:e,loading:n,error:i,execute:a,reset:(0,Au.useCallback)(()=>{t(null),r(!1),o(null)},[])}},nw=(e,t)=>{const n=tw(),{execute:r}=n,i=er(n,ew);return(0,Au.useEffect)(()=>{e&&r(e,t)},[r,e,t]),h({},i)},rw=e=>function(t){return function(e,t){var n,r;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!==(n=null==Pt||null===(r=Pt[t])||void 0===r?void 0:r[e])&&void 0!==n?n:i}(e,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")},iw=()=>{const{setting:{uiLang:e}}=_y();return rw(e)};var ow=i(6333),aw=i(6267),sw=i(2561);const lw=["onChange","maxRows","minRows","style","value"];function cw(e){return parseInt(e,10)||0}const uw={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function dw(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const hw=Au.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:o,value:a}=e,s=(0,Zn.A)(e,lw),{current:l}=Au.useRef(null!=a),c=Au.useRef(null),u=(0,hm.A)(t,c),d=Au.useRef(null),h=Au.useRef(null),p=Au.useCallback(()=>{const t=c.current,n=h.current;if(!t||!n)return;const o=(0,ow.A)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=cw(o.paddingBottom)+cw(o.paddingTop),l=cw(o.borderBottomWidth)+cw(o.borderTopWidth),u=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=u;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),f=(0,aw.A)(()=>{const e=c.current,t=p();if(!e||!t||dw(t))return!1;const n=t.outerHeightStyle;return null!=d.current&&d.current!==n}),g=Au.useCallback(()=>{const e=c.current,t=p();if(!e||!t||dw(t))return;const n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height="".concat(n,"px")),e.style.overflow=t.overflowing?"hidden":""},[p]),m=Au.useRef(-1);(0,zy.A)(()=>{const e=(0,sw.A)(g),t=null==c?void 0:c.current;if(!t)return;const n=(0,ow.A)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{f()&&(r.unobserve(t),cancelAnimationFrame(m.current),g(),m.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(m.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[p,g,f]),(0,zy.A)(()=>{g()});return(0,Cu.jsxs)(Au.Fragment,{children:[(0,Cu.jsx)("textarea",(0,am.A)({value:a,onChange:e=>{l||g(),n&&n(e)},ref:u,rows:i,style:o},s)),(0,Cu.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:h,tabIndex:-1,style:(0,am.A)({},uw,o,{paddingTop:0,paddingBottom:0})})]})}),pw=hw;function fw(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce((e,n)=>(e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e),{})}const gw=Au.createContext(void 0);function mw(){return Au.useContext(gw)}var vw=i(2392);function yw(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function bw(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(yw(e.value)&&""!==e.value||t&&yw(e.defaultValue)&&""!==e.defaultValue)}function ww(e){return(0,Cm.Ay)("MuiInputBase",e)}const xw=(0,_m.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Aw=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Sw=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,Sm.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},kw=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},_w=(0,um.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Sw})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(xw.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,am.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})}),Cw=(0,um.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:kw})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode,i=(0,am.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),o={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return(0,am.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(xw.formControl," &")]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(xw.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})}),Ew=(0,Cu.jsx)(Qy,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Tw=Au.forwardRef(function(e,t){var n;const r=(0,dm.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,components:l={},componentsProps:c={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:h,endAdornment:p,fullWidth:f=!1,id:g,inputComponent:m="input",inputProps:v={},inputRef:y,maxRows:b,minRows:w,multiline:x=!1,name:A,onBlur:S,onChange:k,onClick:_,onFocus:C,onKeyDown:E,onKeyUp:T,placeholder:I,readOnly:P,renderSuffix:L,rows:N,slotProps:j={},slots:R={},startAdornment:O,type:z="text",value:D}=r,M=(0,Zn.A)(r,Aw),F=null!=v.value?v.value:D,{current:B}=Au.useRef(null!=F),W=Au.useRef(),U=Au.useCallback(e=>{0},[]),V=(0,jm.A)(W,y,v.ref,U),[H,G]=Au.useState(!1),q=mw();const K=fw({props:r,muiFormControl:q,states:["color","disabled","error","hiddenLabel","size","required","filled"]});K.focused=q?q.focused:H,Au.useEffect(()=>{!q&&d&&H&&(G(!1),S&&S())},[q,d,H,S]);const $=q&&q.onFilled,X=q&&q.onEmpty,Y=Au.useCallback(e=>{bw(e)?$&&$():X&&X()},[$,X]);(0,vw.A)(()=>{B&&Y({value:F})},[F,Y,B]);Au.useEffect(()=>{Y(W.current)},[]);let J=m,Q=v;x&&"input"===J&&(Q=N?(0,am.A)({type:void 0,minRows:N,maxRows:N},Q):(0,am.A)({type:void 0,maxRows:b,minRows:w},Q),J=pw);Au.useEffect(()=>{q&&q.setAdornedStart(Boolean(O))},[q,O]);const Z=(0,am.A)({},r,{color:K.color||"primary",disabled:K.disabled,endAdornment:p,error:K.error,focused:K.focused,formControl:q,fullWidth:f,hiddenLabel:K.hiddenLabel,multiline:x,size:K.size,startAdornment:O,type:z}),ee=(e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:h,startAdornment:p,type:f}=e,g={root:["root","color".concat((0,Sm.A)(n)),r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",h&&"medium"!==h&&"size".concat((0,Sm.A)(h)),u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",u&&"inputMultiline","small"===h&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return(0,lm.A)(g,ww,t)})(Z),te=R.root||l.Root||_w,ne=j.root||c.root||{},re=R.input||l.Input||Cw;return Q=(0,am.A)({},Q,null!=(n=j.input)?n:c.input),(0,Cu.jsxs)(Au.Fragment,{children:[!h&&Ew,(0,Cu.jsxs)(te,(0,am.A)({},ne,!pm(te)&&{ownerState:(0,am.A)({},Z,ne.ownerState)},{ref:t,onClick:e=>{W.current&&e.currentTarget===e.target&&W.current.focus(),_&&_(e)}},M,{className:(0,sm.A)(ee.root,ne.className,s,P&&"MuiInputBase-readOnly"),children:[O,(0,Cu.jsx)(gw.Provider,{value:null,children:(0,Cu.jsx)(re,(0,am.A)({ownerState:Z,"aria-invalid":K.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:u,disabled:K.disabled,id:g,onAnimationStart:e=>{Y("mui-auto-fill-cancel"===e.animationName?W.current:{value:"x"})},name:A,placeholder:I,readOnly:P,required:K.required,rows:N,value:F,onKeyDown:E,onKeyUp:T,type:z},Q,!pm(re)&&{as:J,ownerState:(0,am.A)({},Z,Q.ownerState)},{ref:V,className:(0,sm.A)(ee.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{S&&S(e),v.onBlur&&v.onBlur(e),q&&q.onBlur?q.onBlur(e):G(!1)},onChange:function(e){if(!B){const t=e.target||W.current;if(null==t)throw new Error((0,db.A)(1));Y({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.onChange&&v.onChange(e,...n),k&&k(e,...n)},onFocus:e=>{K.disabled?e.stopPropagation():(C&&C(e),v.onFocus&&v.onFocus(e),q&&q.onFocus?q.onFocus(e):G(!0))}}))}),p,L?L((0,am.A)({},K,{startAdornment:O})):null]}))]})}),Iw=Tw;var Pw=i(5460);function Lw(e){return(0,Cm.Ay)("MuiInput",e)}const Nw=(0,am.A)({},xw,(0,_m.A)("MuiInput",["root","underline","input"])),jw=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],Rw=(0,um.Ay)(_w,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Sw(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;let r="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,am.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Nw.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Nw.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(r),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Nw.disabled,", .").concat(Nw.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(r)}},["&.".concat(Nw.disabled,":before")]:{borderBottomStyle:"dotted"}})}),Ow=(0,um.Ay)(Cw,{name:"MuiInput",slot:"Input",overridesResolver:kw})({}),zw=Au.forwardRef(function(e,t){var n,r,i,o;const a=(0,dm.b)({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:h=!1,slotProps:p,slots:f={},type:g="text"}=a,m=(0,Zn.A)(a,jw),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,lm.A)(r,Lw,t);return(0,am.A)({},t,i)})(a),y={root:{ownerState:{disableUnderline:s}}},b=(null!=p?p:c)?(0,xb.A)(null!=p?p:c,y):y,w=null!=(n=null!=(r=f.root)?r:l.Root)?n:Rw,x=null!=(i=null!=(o=f.input)?o:l.Input)?i:Ow;return(0,Cu.jsx)(Iw,(0,am.A)({slots:{root:w,input:x},slotProps:b,fullWidth:u,inputComponent:d,multiline:h,ref:t,type:g},m,{classes:v}))});zw.muiName="Input";const Dw=zw;function Mw(e){return(0,Cm.Ay)("MuiFilledInput",e)}const Fw=(0,am.A)({},xw,(0,_m.A)("MuiFilledInput",["root","underline","input"])),Bw=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],Ww=(0,um.Ay)(_w,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Sw(e,t),!n.disableUnderline&&t.underline]}})(e=>{let{theme:t,ownerState:n}=e;var r;const i="light"===t.palette.mode,o=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",l=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,am.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},["&.".concat(Fw.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(Fw.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:l}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(r=(t.vars||t).palette[n.color||"primary"])?void 0:r.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Fw.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Fw.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Fw.disabled,", .").concat(Fw.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(Fw.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,am.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))}),Uw=(0,um.Ay)(Cw,{name:"MuiFilledInput",slot:"Input",overridesResolver:kw})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})}),Vw=Au.forwardRef(function(e,t){var n,r,i,o;const a=(0,dm.b)({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:h,slots:p={},type:f="text"}=a,g=(0,Zn.A)(a,Bw),m=(0,am.A)({},a,{fullWidth:c,inputComponent:u,multiline:d,type:f}),v=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,lm.A)(r,Mw,t);return(0,am.A)({},t,i)})(a),y={root:{ownerState:m},input:{ownerState:m}},b=(null!=h?h:l)?(0,xb.A)(y,null!=h?h:l):y,w=null!=(n=null!=(r=p.root)?r:s.Root)?n:Ww,x=null!=(i=null!=(o=p.input)?o:s.Input)?i:Uw;return(0,Cu.jsx)(Iw,(0,am.A)({slots:{root:w,input:x},componentsProps:b,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:f},g,{classes:v}))});Vw.muiName="Input";const Hw=Vw;var Gw;const qw=["children","classes","className","label","notched"],Kw=(0,um.Ay)("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Pw.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),$w=(0,um.Ay)("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Pw.A})(e=>{let{ownerState:t,theme:n}=e;return(0,am.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,am.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))});function Xw(e){return(0,Cm.Ay)("MuiOutlinedInput",e)}const Yw=(0,am.A)({},xw,(0,_m.A)("MuiOutlinedInput",["root","notchedOutline","input"])),Jw=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Qw=(0,um.Ay)(_w,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Sw})(e=>{let{theme:t,ownerState:n}=e;const r="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,am.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(Yw.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(Yw.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):r}},["&.".concat(Yw.focused," .").concat(Yw.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(Yw.error," .").concat(Yw.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(Yw.disabled," .").concat(Yw.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,am.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))}),Zw=(0,um.Ay)(function(e){const{className:t,label:n,notched:r}=e,i=(0,Zn.A)(e,qw),o=null!=n&&""!==n,a=(0,am.A)({},e,{notched:r,withLabel:o});return(0,Cu.jsx)(Kw,(0,am.A)({"aria-hidden":!0,className:t,ownerState:a},i,{children:(0,Cu.jsx)($w,{ownerState:a,children:o?(0,Cu.jsx)("span",{children:n}):Gw||(Gw=(0,Cu.jsx)("span",{className:"notranslate",children:""}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}}),ex=(0,um.Ay)(Cw,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:kw})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})}),tx=Au.forwardRef(function(e,t){var n,r,i,o,a;const s=(0,dm.b)({props:e,name:"MuiOutlinedInput"}),{components:l={},fullWidth:c=!1,inputComponent:u="input",label:d,multiline:h=!1,notched:p,slots:f={},type:g="text"}=s,m=(0,Zn.A)(s,Jw),v=(e=>{const{classes:t}=e,n=(0,lm.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Xw,t);return(0,am.A)({},t,n)})(s),y=mw(),b=fw({props:s,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w=(0,am.A)({},s,{color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:y,fullWidth:c,hiddenLabel:b.hiddenLabel,multiline:h,size:b.size,type:g}),x=null!=(n=null!=(r=f.root)?r:l.Root)?n:Qw,A=null!=(i=null!=(o=f.input)?o:l.Input)?i:ex;return(0,Cu.jsx)(Iw,(0,am.A)({slots:{root:x,input:A},renderSuffix:e=>(0,Cu.jsx)(Zw,{ownerState:w,className:v.notchedOutline,label:null!=d&&""!==d&&b.required?a||(a=(0,Cu.jsxs)(Au.Fragment,{children:[d," ","*"]})):d,notched:void 0!==p?p:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:c,inputComponent:u,multiline:h,ref:t,type:g},m,{classes:(0,am.A)({},v,{notchedOutline:null})}))});tx.muiName="Input";const nx=tx;function rx(e){return(0,Cm.Ay)("MuiFormLabel",e)}const ix=(0,_m.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),ox=["children","className","color","component","disabled","error","filled","focused","required"],ax=(0,um.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,am.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(ix.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(ix.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(ix.error)]:{color:(t.vars||t).palette.error.main}})}),sx=(0,um.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(ix.error)]:{color:(t.vars||t).palette.error.main}}}),lx=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiFormLabel"}),{children:r,className:i,component:o="label"}=n,a=(0,Zn.A)(n,ox),s=fw({props:n,muiFormControl:mw(),states:["color","required","focused","disabled","error","filled"]}),l=(0,am.A)({},n,{color:s.color||"primary",component:o,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:a,required:s}=e,l={root:["root","color".concat((0,Sm.A)(n)),i&&"disabled",o&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return(0,lm.A)(l,rx,t)})(l);return(0,Cu.jsxs)(ax,(0,am.A)({as:o,ownerState:l,className:(0,sm.A)(c.root,i),ref:t},a,{children:[r,s.required&&(0,Cu.jsxs)(sx,{ownerState:l,"aria-hidden":!0,className:c.asterisk,children:[" ","*"]})]}))});function cx(e){return(0,Cm.Ay)("MuiInputLabel",e)}(0,_m.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const ux=["disableAnimation","margin","shrink","variant","className"],dx=(0,um.Ay)(lx,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(ix.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,am.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,am.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,am.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))}),hx=Au.forwardRef(function(e,t){const n=(0,dm.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,shrink:i,className:o}=n,a=(0,Zn.A)(n,ux),s=mw();let l=i;void 0===l&&s&&(l=s.filled||s.focused||s.adornedStart);const c=fw({props:n,muiFormControl:s,states:["size","variant","required","focused"]}),u=(0,am.A)({},n,{disableAnimation:r,formControl:s,shrink:l,size:c.size,variant:c.variant,required:c.required,focused:c.focused}),d=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:a,required:s}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&"normal"!==r&&"size".concat((0,Sm.A)(r)),a],asterisk:[s&&"asterisk"]},c=(0,lm.A)(l,cx,t);return(0,am.A)({},t,c)})(u);return(0,Cu.jsx)(dx,(0,am.A)({"data-shrink":l,ownerState:u,ref:t,className:(0,sm.A)(d.root,o)},a,{classes:d}))});var px=i(7026);function fx(e){return(0,Cm.Ay)("MuiFormControl",e)}(0,_m.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const gx=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],mx=(0,um.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,am.A)({},t.root,t["margin".concat((0,Sm.A)(n.margin))],n.fullWidth&&t.fullWidth)}})(e=>{let{ownerState:t}=e;return(0,am.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})}),vx=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiFormControl"}),{children:r,className:i,color:o="primary",component:a="div",disabled:s=!1,error:l=!1,focused:c,fullWidth:u=!1,hiddenLabel:d=!1,margin:h="none",required:p=!1,size:f="medium",variant:g="outlined"}=n,m=(0,Zn.A)(n,gx),v=(0,am.A)({},n,{color:o,component:a,disabled:s,error:l,fullWidth:u,hiddenLabel:d,margin:h,required:p,size:f,variant:g}),y=(e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root","none"!==n&&"margin".concat((0,Sm.A)(n)),r&&"fullWidth"]};return(0,lm.A)(i,fx,t)})(v),[b,w]=Au.useState(()=>{let e=!1;return r&&Au.Children.forEach(r,t=>{if(!(0,px.A)(t,["Input","Select"]))return;const n=(0,px.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}),e}),[x,A]=Au.useState(()=>{let e=!1;return r&&Au.Children.forEach(r,t=>{(0,px.A)(t,["Input","Select"])&&(bw(t.props,!0)||bw(t.props.inputProps,!0))&&(e=!0)}),e}),[S,k]=Au.useState(!1);s&&S&&k(!1);const _=void 0===c||s?S:c;let C;const E=Au.useMemo(()=>({adornedStart:b,setAdornedStart:w,color:o,disabled:s,error:l,filled:x,focused:_,fullWidth:u,hiddenLabel:d,size:f,onBlur:()=>{k(!1)},onEmpty:()=>{A(!1)},onFilled:()=>{A(!0)},onFocus:()=>{k(!0)},registerEffect:C,required:p,variant:g}),[b,o,s,l,x,_,u,d,C,p,f,g]);return(0,Cu.jsx)(gw.Provider,{value:E,children:(0,Cu.jsx)(mx,(0,am.A)({as:a,ownerState:v,className:(0,sm.A)(y.root,i),ref:t},m,{children:r}))})});function yx(e){return(0,Cm.Ay)("MuiFormHelperText",e)}const bx=(0,_m.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var wx;const xx=["children","className","component","disabled","error","filled","focused","margin","required","variant"],Ax=(0,um.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,Sm.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(bx.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(bx.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})}),Sx=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:i,component:o="p"}=n,a=(0,Zn.A)(n,xx),s=fw({props:n,muiFormControl:mw(),states:["variant","size","disabled","error","filled","focused","required"]}),l=(0,am.A)({},n,{component:o,contained:"filled"===s.variant||"outlined"===s.variant,variant:s.variant,size:s.size,disabled:s.disabled,error:s.error,filled:s.filled,focused:s.focused,required:s.required}),c=(e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:a,focused:s,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&"size".concat((0,Sm.A)(r)),n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return(0,lm.A)(c,yx,t)})(l);return(0,Cu.jsx)(Ax,(0,am.A)({as:o,ownerState:l,className:(0,sm.A)(c.root,i),ref:t},a,{children:" "===r?wx||(wx=(0,Cu.jsx)("span",{className:"notranslate",children:""})):r}))});function kx(e){var t;return parseInt(Au.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}var _x=i(9894);const Cx=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];const Ex=function(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=(0,Zn.A)(e,Cx),s=o?{}:gm(r,i),{props:l,internalRef:c}=ym((0,am.A)({},a,{externalSlotProps:s})),u=(0,hm.A)(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref);return fm(n,(0,am.A)({},l,{ref:u}),i)};const Tx=Au.createContext({});function Ix(e){return(0,Cm.Ay)("MuiList",e)}(0,_m.A)("MuiList",["root","padding","dense","subheader"]);const Px=["children","className","component","dense","disablePadding","subheader"],Lx=(0,um.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(e=>{let{ownerState:t}=e;return(0,am.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})}),Nx=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=(0,Zn.A)(n,Px),u=Au.useMemo(()=>({dense:a}),[a]),d=(0,am.A)({},n,{component:o,dense:a,disablePadding:s}),h=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e,o={root:["root",!n&&"padding",r&&"dense",i&&"subheader"]};return(0,lm.A)(o,Ix,t)})(d);return(0,Cu.jsx)(Tx.Provider,{value:u,children:(0,Cu.jsxs)(Lx,(0,am.A)({as:o,className:(0,sm.A)(h.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})});function jx(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const Rx=jx,Ox=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function zx(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Dx(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Mx(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function Fx(e,t,n,r,i,o){let a=!1,s=i(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&Mx(s,o)&&!t)return s.focus(),!0;s=i(e,s,n)}return!1}const Bx=Au.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:o,className:a,disabledItemsFocusable:s=!1,disableListWrap:l=!1,onKeyDown:c,variant:u="selectedMenu"}=e,d=(0,Zn.A)(e,Ox),h=Au.useRef(null),p=Au.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,vw.A)(()=>{r&&h.current.focus()},[r]),Au.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&r){const t="".concat(Rx((0,_x.A)(e)),"px");h.current.style["rtl"===n?"paddingLeft":"paddingRight"]=t,h.current.style.width="calc(100% + ".concat(t,")")}return h.current}}),[]);const f=(0,jm.A)(h,t);let g=-1;Au.Children.forEach(o,(e,t)=>{Au.isValidElement(e)?(e.props.disabled||("selectedMenu"===u&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=o.length&&(g=-1))):g===t&&(g+=1,g>=o.length&&(g=-1))});const m=Au.Children.map(o,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===u&&(t.tabIndex=0),Au.cloneElement(e,t)}return e});return(0,Cu.jsx)(Nx,(0,am.A)({role:"menu",ref:f,className:a,onKeyDown:e=>{const t=h.current,n=e.key,r=(0,_x.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),Fx(t,r,l,s,zx);else if("ArrowUp"===n)e.preventDefault(),Fx(t,r,l,s,Dx);else if("Home"===n)e.preventDefault(),Fx(t,null,l,s,zx);else if("End"===n)e.preventDefault(),Fx(t,null,l,s,Dx);else if(1===n.length){const i=p.current,o=n.toLowerCase(),a=performance.now();i.keys.length>0&&(a-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&o!==i.keys[0]&&(i.repeating=!1)),i.lastTime=a,i.keys.push(o);const l=r&&!i.repeating&&Mx(r,i);i.previousKeyMatched&&(l||Fx(t,r,!1,s,zx,i))?e.preventDefault():i.previousKeyMatched=!1}c&&c(e)},tabIndex:r?0:-1},d,{children:m}))});var Wx=i(1093),Ux=i(4519),Vx=i(7458);const Hx=!1;var Gx="unmounted",qx="exited",Kx="entering",$x="entered",Xx="exiting",Yx=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=qx,r.appearStatus=Kx):i=$x:i=t.unmountOnExit||t.mountOnEnter?Gx:qx,r.state={status:i},r.nextCallback=null,r}Dm(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Gx?{status:qx}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Kx&&n!==$x&&(t=Kx):n!==Kx&&n!==$x||(t=Xx)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Kx){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Vx.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===qx&&this.setState({status:Gx})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Vx.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Hx?this.safeSetState({status:$x},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:Kx},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:$x},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Vx.findDOMNode(this);t&&!Hx?(this.props.onExit(r),this.safeSetState({status:Xx},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:qx},function(){e.props.onExited(r)})})})):this.safeSetState({status:qx},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Vx.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Gx)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,Zn.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return Au.createElement(Mm.Provider,{value:null},"function"==typeof n?n(e,r):Au.cloneElement(Au.Children.only(n),r))},t}(Au.Component);function Jx(){}Yx.contextType=Mm,Yx.propTypes={},Yx.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Jx,onEntering:Jx,onEntered:Jx,onExit:Jx,onExiting:Jx,onExited:Jx},Yx.UNMOUNTED=Gx,Yx.EXITED=qx,Yx.ENTERING=Kx,Yx.ENTERED=$x,Yx.EXITING=Xx;const Qx=Yx,Zx=e=>e.scrollTop;function eA(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}const tA=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function nA(e){return"scale(".concat(e,", ").concat(e**2,")")}const rA={entering:{opacity:1,transform:nA(1)},entered:{opacity:1,transform:"none"}},iA="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),oA=Au.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:h,style:p,timeout:f="auto",TransitionComponent:g=Qx}=e,m=(0,Zn.A)(e,tA),v=(0,qm.A)(),y=Au.useRef(),b=ub(),w=Au.useRef(null),x=(0,jm.A)(w,kx(i),t),A=e=>t=>{if(e){const n=w.current;void 0===t?e(n):e(n,t)}},S=A(c),k=A((e,t)=>{Zx(e);const{duration:n,delay:r,easing:i}=eA({style:p,timeout:f,easing:o},{mode:"enter"});let a;"auto"===f?(a=b.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:iA?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),_=A(l),C=A(h),E=A(e=>{const{duration:t,delay:n,easing:r}=eA({style:p,timeout:f,easing:o},{mode:"exit"});let i;"auto"===f?(i=b.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:iA?i:.666*i,delay:iA?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=nA(.75),u&&u(e)}),T=A(d);return(0,Cu.jsx)(g,(0,am.A)({appear:r,in:a,nodeRef:w,onEnter:k,onEntered:_,onEntering:S,onExit:E,onExited:T,onExiting:C,addEndListener:e=>{"auto"===f&&v.start(y.current||0,e),n&&n(w.current,e)},timeout:"auto"===f?null:f},m,{children:(e,t)=>Au.cloneElement(i,(0,am.A)({style:(0,am.A)({opacity:0,transform:nA(.75),visibility:"exited"!==e||a?void 0:"hidden"},rA[e],p,i.props.style),ref:x},t))}))});oA.muiSupportAuto=!0;const aA=oA;var sA=i(9669);const lA=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function cA(e){const t=[],n=[];return Array.from(e.querySelectorAll(lA)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function uA(){return!0}const dA=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=cA,isEnabled:a=uA,open:s}=e,l=Au.useRef(!1),c=Au.useRef(null),u=Au.useRef(null),d=Au.useRef(null),h=Au.useRef(null),p=Au.useRef(!1),f=Au.useRef(null),g=(0,hm.A)(kx(t),f),m=Au.useRef(null);Au.useEffect(()=>{s&&f.current&&(p.current=!n)},[n,s]),Au.useEffect(()=>{if(!s||!f.current)return;const e=(0,sA.A)(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),p.current&&f.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),Au.useEffect(()=>{if(!s||!f.current)return;const e=(0,sA.A)(f.current),t=t=>{m.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==h.current)h.current=null;else if(null!==h.current)return;if(!p.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(f.current)),n.length>0){var i,s;const e=Boolean((null==(i=m.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=m.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const v=e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0};return(0,Cu.jsxs)(Au.Fragment,{children:[(0,Cu.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:c,"data-testid":"sentinelStart"}),Au.cloneElement(t,{ref:g,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0,h.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,Cu.jsx)("div",{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":"sentinelEnd"})]})};var hA=i(1941);const pA=Au.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=Au.useState(null),s=(0,hm.A)(Au.isValidElement(n)?kx(n):null,t);if((0,zy.A)(()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),(0,zy.A)(()=>{if(o&&!i)return(0,hA.A)(t,o),()=>{(0,hA.A)(t,null)}},[t,o,i]),i){if(Au.isValidElement(n)){const e={ref:s};return Au.cloneElement(n,e)}return(0,Cu.jsx)(Au.Fragment,{children:n})}return(0,Cu.jsx)(Au.Fragment,{children:o?Vx.createPortal(n,o):o})}),fA=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],gA={entering:{opacity:1},entered:{opacity:1}},mA=Au.forwardRef(function(e,t){const n=ub(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:h,onExited:p,onExiting:f,style:g,timeout:m=r,TransitionComponent:v=Qx}=e,y=(0,Zn.A)(e,fA),b=Au.useRef(null),w=(0,jm.A)(b,kx(a),t),x=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},A=x(d),S=x((e,t)=>{Zx(e);const r=eA({style:g,timeout:m,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),k=x(u),_=x(f),C=x(e=>{const t=eA({style:g,timeout:m,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),h&&h(e)}),E=x(p);return(0,Cu.jsx)(v,(0,am.A)({appear:o,in:l,nodeRef:b,onEnter:S,onEntered:k,onEntering:A,onExit:C,onExited:E,onExiting:_,addEndListener:e=>{i&&i(b.current,e)},timeout:m},y,{children:(e,t)=>Au.cloneElement(a,(0,am.A)({style:(0,am.A)({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},gA[e],g,a.props.style),ref:w},t))}))}),vA=mA;function yA(e){return(0,Cm.Ay)("MuiBackdrop",e)}(0,_m.A)("MuiBackdrop",["root","invisible"]);const bA=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],wA=(0,um.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(e=>{let{ownerState:t}=e;return(0,am.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})}),xA=Au.forwardRef(function(e,t){var n,r,i;const o=(0,dm.b)({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:h,slotProps:p={},slots:f={},TransitionComponent:g=vA,transitionDuration:m}=o,v=(0,Zn.A)(o,bA),y=(0,am.A)({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,lm.A)(r,yA,t)})(y),w=null!=(n=p.root)?n:u.root;return(0,Cu.jsx)(g,(0,am.A)({in:h,timeout:m},v,{children:(0,Cu.jsx)(wA,(0,am.A)({"aria-hidden":!0},w,{as:null!=(r=null!=(i=f.root)?i:c.Root)?r:l,className:(0,sm.A)(b.root,s,null==w?void 0:w.className),ownerState:(0,am.A)({},y,null==w?void 0:w.ownerState),classes:b,ref:t,children:a}))}))});var AA=i(4849);function SA(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function kA(e){return parseInt((0,ow.A)(e).getComputedStyle(e).paddingRight,10)||0}function _A(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&SA(e,i)})}function CA(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function EA(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,sA.A)(e);return t.body===e?(0,ow.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=jx((0,sA.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(kA(r)+e,"px");const t=(0,sA.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(kA(t)+e,"px")})}let e;if(r.parentNode instanceof DocumentFragment)e=(0,sA.A)(r).body;else{const t=r.parentElement,n=(0,ow.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)})}}const TA=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&SA(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);_A(t,e.mount,e.modalRef,r,!0);const i=CA(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=CA(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=EA(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=CA(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&SA(e.modalRef,t),_A(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&SA(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const IA=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=TA,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,h=Au.useRef({}),p=Au.useRef(null),f=Au.useRef(null),g=(0,hm.A)(f,d),[m,v]=Au.useState(!u),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const w=()=>(h.current.modalRef=f.current,h.current.mount=p.current,h.current),x=()=>{i.mount(w(),{disableScrollLock:r}),f.current&&(f.current.scrollTop=0)},A=(0,aw.A)(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,sA.A)(p.current).body;i.add(w(),e),f.current&&x()}),S=Au.useCallback(()=>i.isTopModal(w()),[i]),k=(0,aw.A)(e=>{p.current=e,e&&(u&&S()?x():f.current&&SA(f.current,b))}),_=Au.useCallback(()=>{i.remove(w(),b)},[b,i]);Au.useEffect(()=>()=>{_()},[_]),Au.useEffect(()=>{u?A():y&&o||_()},[u,_,y,o,A]);const C=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&S()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},E=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=mm(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=(0,am.A)({},n,t);return(0,am.A)({role:"presentation"},r,{onKeyDown:C(r),ref:g})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,am.A)({"aria-hidden":!0},e,{onClick:E(e),open:u})},getTransitionProps:()=>({onEnter:(0,AA.A)(()=>{v(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:(0,AA.A)(()=>{v(!0),s&&s(),o&&_()},null==l?void 0:l.props.onExited)}),rootRef:g,portalRef:k,isTopModal:S,exited:m,hasTransition:y}};function PA(e){return(0,Cm.Ay)("MuiModal",e)}(0,_m.A)("MuiModal",["root","hidden","backdrop"]);const LA=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],NA=(0,um.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})}),jA=(0,um.Ay)(xA,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),RA=Au.forwardRef(function(e,t){var n,r,i,o,a,s;const l=(0,dm.b)({name:"MuiModal",props:e}),{BackdropComponent:c=jA,BackdropProps:u,className:d,closeAfterTransition:h=!1,children:p,container:f,component:g,components:m={},componentsProps:v={},disableAutoFocus:y=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:w=!1,disablePortal:x=!1,disableRestoreFocus:A=!1,disableScrollLock:S=!1,hideBackdrop:k=!1,keepMounted:_=!1,onBackdropClick:C,open:E,slotProps:T,slots:I}=l,P=(0,Zn.A)(l,LA),L=(0,am.A)({},l,{closeAfterTransition:h,disableAutoFocus:y,disableEnforceFocus:b,disableEscapeKeyDown:w,disablePortal:x,disableRestoreFocus:A,disableScrollLock:S,hideBackdrop:k,keepMounted:_}),{getRootProps:N,getBackdropProps:j,getTransitionProps:R,portalRef:O,isTopModal:z,exited:D,hasTransition:M}=IA((0,am.A)({},L,{rootRef:t})),F=(0,am.A)({},L,{exited:D}),B=(e=>{const{open:t,exited:n,classes:r}=e,i={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,lm.A)(i,PA,r)})(F),W={};if(void 0===p.props.tabIndex&&(W.tabIndex="-1"),M){const{onEnter:e,onExited:t}=R();W.onEnter=e,W.onExited=t}const U=null!=(n=null!=(r=null==I?void 0:I.root)?r:m.Root)?n:NA,V=null!=(i=null!=(o=null==I?void 0:I.backdrop)?o:m.Backdrop)?i:c,H=null!=(a=null==T?void 0:T.root)?a:v.root,G=null!=(s=null==T?void 0:T.backdrop)?s:v.backdrop,q=Ex({elementType:U,externalSlotProps:H,externalForwardedProps:P,getSlotProps:N,additionalProps:{ref:t,as:g},ownerState:F,className:(0,sm.A)(d,null==H?void 0:H.className,null==B?void 0:B.root,!F.open&&F.exited&&(null==B?void 0:B.hidden))}),K=Ex({elementType:V,externalSlotProps:G,additionalProps:u,getSlotProps:e=>j((0,am.A)({},e,{onClick:t=>{C&&C(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,sm.A)(null==G?void 0:G.className,null==u?void 0:u.className,null==B?void 0:B.backdrop),ownerState:F});return _||E||M&&!D?(0,Cu.jsx)(pA,{ref:O,container:f,disablePortal:x,children:(0,Cu.jsxs)(U,(0,am.A)({},q,{children:[!k&&c?(0,Cu.jsx)(V,(0,am.A)({},K)):null,(0,Cu.jsx)(dA,{disableEnforceFocus:b,disableAutoFocus:y,disableRestoreFocus:A,isEnabled:z,open:E,children:Au.cloneElement(p,W)})]}))}):null}),OA=RA;function zA(e){return(0,Cm.Ay)("MuiPopover",e)}(0,_m.A)("MuiPopover",["root","paper"]);const DA=["onEntering"],MA=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],FA=["slotProps"];function BA(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function WA(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function UA(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?"".concat(e,"px"):e).join(" ")}function VA(e){return"function"==typeof e?e():e}const HA=(0,um.Ay)(OA,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),GA=(0,um.Ay)(Pm,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),qA=Au.forwardRef(function(e,t){var n,r,i;const o=(0,dm.b)({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:h,container:p,elevation:f=8,marginThreshold:g=16,open:m,PaperProps:v={},slots:y,slotProps:b,transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:x=aA,transitionDuration:A="auto",TransitionProps:{onEntering:S}={},disableScrollLock:k=!1}=o,_=(0,Zn.A)(o.TransitionProps,DA),C=(0,Zn.A)(o,MA),E=null!=(n=null==b?void 0:b.paper)?n:v,T=Au.useRef(),I=(0,jm.A)(T,E.ref),P=(0,am.A)({},o,{anchorOrigin:l,anchorReference:u,elevation:f,marginThreshold:g,externalPaperSlotProps:E,transformOrigin:w,TransitionComponent:x,transitionDuration:A,TransitionProps:_}),L=(e=>{const{classes:t}=e;return(0,lm.A)({root:["root"],paper:["paper"]},zA,t)})(P),N=Au.useCallback(()=>{if("anchorPosition"===u)return c;const e=VA(s),t=(e&&1===e.nodeType?e:(0,_x.A)(T.current).body).getBoundingClientRect();return{top:t.top+BA(t,l.vertical),left:t.left+WA(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,u]),j=Au.useCallback(e=>({vertical:BA(e,w.vertical),horizontal:WA(e,w.horizontal)}),[w.horizontal,w.vertical]),R=Au.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=j(t);if("none"===u)return{top:null,left:null,transformOrigin:UA(n)};const r=N();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=(0,Ux.A)(VA(s)),d=c.innerHeight-g,h=c.innerWidth-g;if(null!==g&&i<g){const e=i-g;i-=e,n.vertical+=e}else if(null!==g&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==g&&o<g){const e=o-g;o-=e,n.horizontal+=e}else if(l>h){const e=l-h;o-=e,n.horizontal+=e}return{top:"".concat(Math.round(i),"px"),left:"".concat(Math.round(o),"px"),transformOrigin:UA(n)}},[s,u,N,j,g]),[O,z]=Au.useState(m),D=Au.useCallback(()=>{const e=T.current;if(!e)return;const t=R(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,z(!0)},[R]);Au.useEffect(()=>(k&&window.addEventListener("scroll",D),()=>window.removeEventListener("scroll",D)),[s,k,D]);Au.useEffect(()=>{m&&D()}),Au.useImperativeHandle(a,()=>m?{updatePosition:()=>{D()}}:null,[m,D]),Au.useEffect(()=>{if(!m)return;const e=(0,Wx.A)(()=>{D()}),t=(0,Ux.A)(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,m,D]);let M=A;"auto"!==A||x.muiSupportAuto||(M=void 0);const F=p||(s?(0,_x.A)(VA(s)).body:void 0),B=null!=(r=null==y?void 0:y.root)?r:HA,W=null!=(i=null==y?void 0:y.paper)?i:GA,U=Ex({elementType:W,externalSlotProps:(0,am.A)({},E,{style:O?E.style:(0,am.A)({},E.style,{opacity:0})}),additionalProps:{elevation:f,ref:I},ownerState:P,className:(0,sm.A)(L.paper,null==E?void 0:E.className)}),V=Ex({elementType:B,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:C,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:m},ownerState:P,className:(0,sm.A)(L.root,h)}),{slotProps:H}=V,G=(0,Zn.A)(V,FA);return(0,Cu.jsx)(B,(0,am.A)({},G,!pm(B)&&{slotProps:H,disableScrollLock:k},{children:(0,Cu.jsx)(x,(0,am.A)({appear:!0,in:m,onEntering:(e,t)=>{S&&S(e,t),D()},onExited:()=>{z(!1)},timeout:M},_,{children:(0,Cu.jsx)(W,(0,am.A)({},U,{children:d}))}))}))});function KA(e){return(0,Cm.Ay)("MuiMenu",e)}(0,_m.A)("MuiMenu",["root","paper","list"]);const $A=["onEntering"],XA=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],YA={vertical:"top",horizontal:"right"},JA={vertical:"top",horizontal:"left"},QA=(0,um.Ay)(qA,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ZA=(0,um.Ay)(GA,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),eS=(0,um.Ay)(Bx,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),tS=Au.forwardRef(function(e,t){var n,r;const i=(0,dm.b)({props:e,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:s,disableAutoFocusItem:l=!1,MenuListProps:c={},onClose:u,open:d,PaperProps:h={},PopoverClasses:p,transitionDuration:f="auto",TransitionProps:{onEntering:g}={},variant:m="selectedMenu",slots:v={},slotProps:y={}}=i,b=(0,Zn.A)(i.TransitionProps,$A),w=(0,Zn.A)(i,XA),x=(()=>{const e=Au.useContext(jy);return null!=e&&e})(),A=(0,am.A)({},i,{autoFocus:o,disableAutoFocusItem:l,MenuListProps:c,onEntering:g,PaperProps:h,transitionDuration:f,TransitionProps:b,variant:m}),S=(e=>{const{classes:t}=e;return(0,lm.A)({root:["root"],paper:["paper"],list:["list"]},KA,t)})(A),k=o&&!l&&d,_=Au.useRef(null);let C=-1;Au.Children.map(a,(e,t)=>{Au.isValidElement(e)&&(e.props.disabled||("selectedMenu"===m&&e.props.selected||-1===C)&&(C=t))});const E=null!=(n=v.paper)?n:ZA,T=null!=(r=y.paper)?r:h,I=Ex({elementType:v.root,externalSlotProps:y.root,ownerState:A,className:[S.root,s]}),P=Ex({elementType:E,externalSlotProps:T,ownerState:A,className:S.paper});return(0,Cu.jsx)(QA,(0,am.A)({onClose:u,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?YA:JA,slots:{paper:E,root:v.root},slotProps:{root:I,paper:P},open:d,ref:t,transitionDuration:f,TransitionProps:(0,am.A)({onEntering:(e,t)=>{_.current&&_.current.adjustStyleForScrollbar(e,{direction:x?"rtl":"ltr"}),g&&g(e,t)}},b),ownerState:A},w,{classes:p,children:(0,Cu.jsx)(eS,(0,am.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))},actions:_,autoFocus:o&&(-1===C||l),autoFocusItem:k,variant:m},c,{className:(0,sm.A)(S.list,c.className),children:a}))}))});function nS(e){return(0,Cm.Ay)("MuiNativeSelect",e)}const rS=(0,_m.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),iS=["className","disabled","error","IconComponent","inputRef","variant"],oS=e=>{let{ownerState:t,theme:n}=e;return(0,am.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,am.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(rS.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},aS=(0,um.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Pw.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(rS.multiple)]:t.multiple}]}})(oS),sS=e=>{let{ownerState:t,theme:n}=e;return(0,am.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(rS.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},lS=(0,um.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,Sm.A)(n.variant))],n.open&&t.iconOpen]}})(sS),cS=Au.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=(0,Zn.A)(e,iS),c=(0,am.A)({},e,{disabled:r,variant:s,error:i}),u=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,Sm.A)(n)),o&&"iconOpen",r&&"disabled"]};return(0,lm.A)(s,nS,t)})(c);return(0,Cu.jsxs)(Au.Fragment,{children:[(0,Cu.jsx)(aS,(0,am.A)({ownerState:c,className:(0,sm.A)(u.select,n),disabled:r,ref:a||t},l)),e.multiple?null:(0,Cu.jsx)(lS,{as:o,ownerState:c,className:u.icon})]})});var uS=i(6228),dS=i(3473);function hS(e){return(0,Cm.Ay)("MuiSelect",e)}const pS=(0,_m.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var fS;const gS=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],mS=(0,um.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(pS.select)]:t.select},{["&.".concat(pS.select)]:t[n.variant]},{["&.".concat(pS.error)]:t.error},{["&.".concat(pS.multiple)]:t.multiple}]}})(oS,{["&.".concat(pS.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),vS=(0,um.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,Sm.A)(n.variant))],n.open&&t.iconOpen]}})(sS),yS=(0,um.Ay)("input",{shouldForwardProp:e=>(0,uS.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function bS(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function wS(e){return null==e||"string"==typeof e&&!e.trim()}const xS=Au.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:h,error:p=!1,IconComponent:f,inputRef:g,labelId:m,MenuProps:v={},multiple:y,name:b,onBlur:w,onChange:x,onClose:A,onFocus:S,onOpen:k,open:_,readOnly:C,renderValue:E,SelectDisplayProps:T={},tabIndex:I,value:P,variant:L="standard"}=e,N=(0,Zn.A)(e,gS),[j,R]=(0,dS.A)({controlled:P,default:u,name:"Select"}),[O,z]=(0,dS.A)({controlled:_,default:c,name:"Select"}),D=Au.useRef(null),M=Au.useRef(null),[F,B]=Au.useState(null),{current:W}=Au.useRef(null!=_),[U,V]=Au.useState(),H=(0,jm.A)(t,g),G=Au.useCallback(e=>{M.current=e,e&&B(e)},[]),q=null==F?void 0:F.parentNode;Au.useImperativeHandle(H,()=>({focus:()=>{M.current.focus()},node:D.current,value:j}),[j]),Au.useEffect(()=>{c&&O&&F&&!W&&(V(a?null:q.clientWidth),M.current.focus())},[F,a]),Au.useEffect(()=>{o&&M.current.focus()},[o]),Au.useEffect(()=>{if(!m)return;const e=(0,_x.A)(M.current).getElementById(m);if(e){const t=()=>{getSelection().isCollapsed&&M.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[m]);const K=(e,t)=>{e?k&&k(t):A&&A(t),W||(V(a?null:q.clientWidth),z(e))},$=Au.Children.toArray(s),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(j)?j.slice():[];const t=j.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),j!==n&&(R(n),x)){const r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:b}}),x(i,e)}y||K(!1,t)}},Y=null!==F&&O;let J,Q;delete N["aria-invalid"];const Z=[];let ee=!1,te=!1;(bw({value:j})||h)&&(E?J=E(j):ee=!0);const ne=$.map(e=>{if(!Au.isValidElement(e))return null;let t;if(y){if(!Array.isArray(j))throw new Error((0,db.A)(2));t=j.some(t=>bS(t,e.props.value)),t&&ee&&Z.push(e.props.children)}else t=bS(j,e.props.value),t&&ee&&(Q=e.props.children);return t&&(te=!0),Au.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});ee&&(J=y?0===Z.length?null:Z.reduce((e,t,n)=>(e.push(t),n<Z.length-1&&e.push(", "),e),[]):Q);let re,ie=U;!a&&W&&F&&(ie=q.clientWidth),re=void 0!==I?I:d?null:0;const oe=T.id||(b?"mui-component-select-".concat(b):void 0),ae=(0,am.A)({},e,{variant:L,value:j,open:Y,error:p}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon","icon".concat((0,Sm.A)(n)),o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,lm.A)(s,hS,t)})(ae),le=(0,am.A)({},v.PaperProps,null==(n=v.slotProps)?void 0:n.paper),ce=(0,Dy.A)();return(0,Cu.jsxs)(Au.Fragment,{children:[(0,Cu.jsx)(mS,(0,am.A)({ref:G,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":d?"true":void 0,"aria-expanded":Y?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[m,oe].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!C){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),K(!0,e))}},onMouseDown:d||C?null:e=>{0===e.button&&(e.preventDefault(),M.current.focus(),K(!0,e))},onBlur:e=>{!Y&&w&&(Object.defineProperty(e,"target",{writable:!0,value:{value:j,name:b}}),w(e))},onFocus:S},T,{ownerState:ae,className:(0,sm.A)(T.className,se.select,l),id:oe,children:wS(J)?fS||(fS=(0,Cu.jsx)("span",{className:"notranslate",children:""})):J})),(0,Cu.jsx)(yS,(0,am.A)({"aria-invalid":p,value:Array.isArray(j)?j.join(","):j,name:b,ref:D,"aria-hidden":!0,onChange:e=>{const t=$.find(t=>t.props.value===e.target.value);void 0!==t&&(R(t.props.value),x&&x(e,t))},tabIndex:-1,disabled:d,className:se.nativeInput,autoFocus:o,ownerState:ae},N)),(0,Cu.jsx)(vS,{as:f,className:se.icon,ownerState:ae}),(0,Cu.jsx)(tS,(0,am.A)({id:"menu-".concat(b||""),anchorEl:q,open:Y,onClose:e=>{K(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},v,{MenuListProps:(0,am.A)({"aria-labelledby":m,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ce},v.MenuListProps),slotProps:(0,am.A)({},v.slotProps,{paper:(0,am.A)({},le,{style:(0,am.A)({minWidth:ie},null!=le?le.style:null)})}),children:ne}))]})}),AS=xS,SS=(0,xv.A)((0,Cu.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),kS=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],_S=["root"],CS={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,Pw.A)(e)&&"variant"!==e,slot:"Root"},ES=(0,um.Ay)(Dw,CS)(""),TS=(0,um.Ay)(nx,CS)(""),IS=(0,um.Ay)(Hw,CS)(""),PS=Au.forwardRef(function(e,t){const n=(0,dm.b)({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:o={},className:a,defaultOpen:s=!1,displayEmpty:l=!1,IconComponent:c=SS,id:u,input:d,inputProps:h,label:p,labelId:f,MenuProps:g,multiple:m=!1,native:v=!1,onClose:y,onOpen:b,open:w,renderValue:x,SelectDisplayProps:A,variant:S="outlined"}=n,k=(0,Zn.A)(n,kS),_=v?cS:AS,C=fw({props:n,muiFormControl:mw(),states:["variant","error"]}),E=C.variant||S,T=(0,am.A)({},n,{variant:E,classes:o}),I=(e=>{const{classes:t}=e;return t})(T),P=(0,Zn.A)(I,_S),L=d||{standard:(0,Cu.jsx)(ES,{ownerState:T}),outlined:(0,Cu.jsx)(TS,{label:p,ownerState:T}),filled:(0,Cu.jsx)(IS,{ownerState:T})}[E],N=(0,jm.A)(t,kx(L));return(0,Cu.jsx)(Au.Fragment,{children:Au.cloneElement(L,(0,am.A)({inputComponent:_,inputProps:(0,am.A)({children:i,error:C.error,IconComponent:c,variant:E,type:void 0,multiple:m},v?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:l,labelId:f,MenuProps:g,onClose:y,onOpen:b,open:w,renderValue:x,SelectDisplayProps:(0,am.A)({id:u},A)},h,{classes:h?(0,xb.A)(P,h.classes):P},d?d.props.inputProps:{})},(m&&v||l)&&"outlined"===E?{notched:!0}:{},{ref:N,className:(0,sm.A)(L.props.className,a,I.root)},!d&&{variant:E},k))})});PS.muiName="Select";const LS=PS;function NS(e){return(0,Cm.Ay)("MuiTextField",e)}(0,_m.A)("MuiTextField",["root"]);const jS=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],RS={standard:Dw,filled:Hw,outlined:nx},OS=(0,um.Ay)(vx,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),zS=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:i=!1,children:o,className:a,color:s="primary",defaultValue:l,disabled:c=!1,error:u=!1,FormHelperTextProps:d,fullWidth:h=!1,helperText:p,id:f,InputLabelProps:g,inputProps:m,InputProps:v,inputRef:y,label:b,maxRows:w,minRows:x,multiline:A=!1,name:S,onBlur:k,onChange:_,onFocus:C,placeholder:E,required:T=!1,rows:I,select:P=!1,SelectProps:L,type:N,value:j,variant:R="outlined"}=n,O=(0,Zn.A)(n,jS),z=(0,am.A)({},n,{autoFocus:i,color:s,disabled:c,error:u,fullWidth:h,multiline:A,required:T,select:P,variant:R}),D=(e=>{const{classes:t}=e;return(0,lm.A)({root:["root"]},NS,t)})(z);const M={};"outlined"===R&&(g&&void 0!==g.shrink&&(M.notched=g.shrink),M.label=b),P&&(L&&L.native||(M.id=void 0),M["aria-describedby"]=void 0);const F=(0,Dy.A)(f),B=p&&F?"".concat(F,"-helper-text"):void 0,W=b&&F?"".concat(F,"-label"):void 0,U=RS[R],V=(0,Cu.jsx)(U,(0,am.A)({"aria-describedby":B,autoComplete:r,autoFocus:i,defaultValue:l,fullWidth:h,multiline:A,name:S,rows:I,maxRows:w,minRows:x,type:N,value:j,id:F,inputRef:y,onBlur:k,onChange:_,onFocus:C,placeholder:E,inputProps:m},M,v));return(0,Cu.jsxs)(OS,(0,am.A)({className:(0,sm.A)(D.root,a),disabled:c,error:u,fullWidth:h,ref:t,required:T,color:s,variant:R,ownerState:z},O,{children:[null!=b&&""!==b&&(0,Cu.jsx)(hx,(0,am.A)({htmlFor:F,id:W},g,{children:b})),P?(0,Cu.jsx)(LS,(0,am.A)({"aria-describedby":B,id:F,labelId:W,value:j,input:V},L,{children:o})):V,p&&(0,Cu.jsx)(Sx,(0,am.A)({id:B},d,{children:p}))]}))}),DS=zS;const MS=(0,_m.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);const FS=(0,_m.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function BS(e){return(0,Cm.Ay)("MuiMenuItem",e)}const WS=(0,_m.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),US=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],VS=(0,um.Ay)(gv,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(WS.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,cm.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(WS.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,cm.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(WS.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,cm.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,cm.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(WS.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(WS.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(my.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(my.inset)]:{marginLeft:52},["& .".concat(FS.root)]:{marginTop:0,marginBottom:0},["& .".concat(FS.inset)]:{paddingLeft:36},["& .".concat(MS.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,am.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(MS.root," svg")]:{fontSize:"1.25rem"}}))}),HS=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:o=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d}=n,h=(0,Zn.A)(n,US),p=Au.useContext(Tx),f=Au.useMemo(()=>({dense:o||p.dense||!1,disableGutters:s}),[p.dense,o,s]),g=Au.useRef(null);(0,vw.A)(()=>{r&&g.current&&g.current.focus()},[r]);const m=(0,am.A)({},n,{dense:f.dense,divider:a,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:a}=e,s={root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},l=(0,lm.A)(s,BS,a);return(0,am.A)({},a,l)})(n),y=(0,jm.A)(g,t);let b;return n.disabled||(b=void 0!==u?u:-1),(0,Cu.jsx)(Tx.Provider,{value:f,children:(0,Cu.jsx)(VS,(0,am.A)({ref:y,role:c,tabIndex:b,component:i,focusVisibleClassName:(0,sm.A)(v.focusVisible,l),className:(0,sm.A)(v.root,d)},h,{ownerState:m,classes:v}))})});const GS=Au.createContext();function qS(e){return(0,Cm.Ay)("MuiGrid",e)}const KS=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],$S=(0,_m.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>"spacing-xs-".concat(e)),...["column-reverse","column","row-reverse","row"].map(e=>"direction-xs-".concat(e)),...["nowrap","wrap-reverse","wrap"].map(e=>"wrap-xs-".concat(e)),...KS.map(e=>"grid-xs-".concat(e)),...KS.map(e=>"grid-sm-".concat(e)),...KS.map(e=>"grid-md-".concat(e)),...KS.map(e=>"grid-lg-".concat(e)),...KS.map(e=>"grid-xl-".concat(e))]),XS=$S,YS=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function JS(e){const t=parseFloat(e);return"".concat(t).concat(String(e).replace(String(t),"")||"px")}function QS(e){let{breakpoints:t,values:n}=e,r="";Object.keys(n).forEach(e=>{""===r&&0!==n[e]&&(r=e)});const i=Object.keys(t).sort((e,n)=>t[e]-t[n]);return i.slice(0,i.indexOf(r))}const ZS=(0,um.Ay)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n["spacing-xs-".concat(String(e))]];const r=[];return t.forEach(t=>{const i=e[t];Number(i)>0&&r.push(n["spacing-".concat(t,"-").concat(String(i))])}),r}(a,c,t));const d=[];return c.forEach(e=>{const r=n[e];r&&d.push(t["grid-".concat(e,"-").concat(String(r))])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...u,"row"!==i&&t["direction-xs-".concat(String(i))],"wrap"!==s&&t["wrap-xs-".concat(String(s))],...d]}})(e=>{let{ownerState:t}=e;return(0,am.A)({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},"wrap"!==t.wrap&&{flexWrap:t.wrap})},function(e){let{theme:t,ownerState:n}=e;const r=(0,zb.kW)({values:n.direction,breakpoints:t.breakpoints.values});return(0,zb.NI)({theme:t},r,e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t["& > .".concat(XS.item)]={maxWidth:"none"}),t})},function(e){let{theme:t,ownerState:n}=e;const{container:r,rowSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,zb.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=QS({breakpoints:t.breakpoints.values,values:e})),o=(0,zb.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{marginTop:"-".concat(JS(o)),["& > .".concat(XS.item)]:{paddingTop:JS(o)}}:null!=(i=n)&&i.includes(r)?{}:{marginTop:0,["& > .".concat(XS.item)]:{paddingTop:0}}})}return o},function(e){let{theme:t,ownerState:n}=e;const{container:r,columnSpacing:i}=n;let o={};if(r&&0!==i){const e=(0,zb.kW)({values:i,breakpoints:t.breakpoints.values});let n;"object"==typeof e&&(n=QS({breakpoints:t.breakpoints.values,values:e})),o=(0,zb.NI)({theme:t},e,(e,r)=>{var i;const o=t.spacing(e);return"0px"!==o?{width:"calc(100% + ".concat(JS(o),")"),marginLeft:"-".concat(JS(o)),["& > .".concat(XS.item)]:{paddingLeft:JS(o)}}:null!=(i=n)&&i.includes(r)?{}:{width:"100%",marginLeft:0,["& > .".concat(XS.item)]:{paddingLeft:0}}})}return o},function(e){let t,{theme:n,ownerState:r}=e;return n.breakpoints.keys.reduce((e,i)=>{let o={};if(r[i]&&(t=r[i]),!t)return e;if(!0===t)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===t)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=(0,zb.kW)({values:r.columns,breakpoints:n.breakpoints.values}),s="object"==typeof a?a[i]:a;if(null==s)return e;const l="".concat(Math.round(t/s*1e8)/1e6,"%");let c={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const t="calc(".concat(l," + ").concat(JS(e),")");c={flexBasis:t,maxWidth:t}}}o=(0,am.A)({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===n.breakpoints.values[i]?Object.assign(e,o):e[n.breakpoints.up(i)]=o,e},{})});const ek=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return["spacing-xs-".concat(String(e))];const n=[];return t.forEach(t=>{const r=e[t];if(Number(r)>0){const e="spacing-".concat(t,"-").concat(String(r));n.push(e)}}),n}(o,l));const u=[];l.forEach(t=>{const n=e[t];n&&u.push("grid-".concat(t,"-").concat(String(n)))});const d={root:["root",n&&"container",i&&"item",s&&"zeroMinWidth",...c,"row"!==r&&"direction-xs-".concat(String(r)),"wrap"!==a&&"wrap-xs-".concat(String(a)),...u]};return(0,lm.A)(d,qS,t)},tk=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiGrid"}),{breakpoints:r}=ub(),i=(0,ey.A)(n),{className:o,columns:a,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:h,spacing:p=0,wrap:f="wrap",zeroMinWidth:g=!1}=i,m=(0,Zn.A)(i,YS),v=h||p,y=s||p,b=Au.useContext(GS),w=c?a||12:b,x={},A=(0,am.A)({},m);r.keys.forEach(e=>{null!=m[e]&&(x[e]=m[e],delete A[e])});const S=(0,am.A)({},i,{columns:w,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:y,wrap:f,zeroMinWidth:g,spacing:p},x,{breakpoints:r.keys}),k=ek(S);return(0,Cu.jsx)(GS.Provider,{value:w,children:(0,Cu.jsx)(ZS,(0,am.A)({ownerState:S,className:(0,sm.A)(k.root,o),as:l,ref:t},A))})});const nk=tk;var rk=i(9311),ik=i(4743),ok=i(1099),ak=i(1985);function sk(e){let{text:t,title:n="copy"}=e;const[r,i]=(0,Au.useState)(!1);return(0,Cu.jsx)(wv,{size:"small",sx:{opacity:.5,"&:hover":{opacity:1}},onClick:async e=>{e.stopPropagation(),await navigator.clipboard.writeText(t),i(!0);const n=setTimeout(()=>{clearTimeout(n),i(!1)},500)},title:n,children:r?(0,Cu.jsx)(ak.A,{fontSize:"inherit"}):(0,Cu.jsx)(ok.A,{fontSize:"inherit"})})}function lk(e){let{text:t,fromLang:n,toLang:r,apiSlug:i,transApis:o,simpleStyle:a=!1}=e;const s=iw(),[l,c]=(0,Au.useState)(""),[u,d]=(0,Au.useState)(!1),[h,p]=(0,Au.useState)(""),f=(0,Au.useMemo)(()=>o.find(e=>e.apiSlug===i),[o,i]);return(0,Au.useEffect)(()=>{null!=t&&t.trim()&&f&&(async()=>{try{d(!0),c(""),p("");const{trText:e}=await Uo({text:t,fromLang:n,toLang:r,apiSetting:f});c(e)}catch(e){p(e.message)}finally{d(!1)}})()},[t,n,r,f]),a?(0,Cu.jsx)(cb,{children:h?(0,Cu.jsx)(jv,{severity:"error",children:h}):u?(0,Cu.jsx)(Zv,{size:16}):(0,Cu.jsx)(ay,{style:{whiteSpace:"pre-line"},children:l})}):(0,Cu.jsx)(cb,{children:(0,Cu.jsx)(DS,{size:"small",label:"".concat(s("translated_text")," - ").concat(f.apiName),fullWidth:!0,multiline:!0,value:l,helperText:h,InputProps:{startAdornment:u?(0,Cu.jsx)(Zv,{size:16}):null,endAdornment:(0,Cu.jsx)(Gb,{direction:"row",sx:{position:"absolute",right:0,top:0},children:(0,Cu.jsx)(sk,{text:l,title:s("copy")})})}})})}var ck=i(43),uk=i(1957);const dk={};function hk(e){let{word:t,title:n}=e;const{favWords:r,toggleFav:i}=function(){const{data:e,save:t}=Ov(Mt,dk,jt),n=(0,Au.useCallback)(e=>{t(e),Jn(jt)},[t]),r=(0,Au.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];n(n=>{if(!n[e]){const a={createdAt:Date.now(),timestamp:t,phonetic:r,definition:i,examples:o};return Object.keys(a).forEach(e=>{(null===a[e]||void 0===a[e]||Array.isArray(a[e])&&0===a[e].length||"string"==typeof a[e]&&0===a[e].length)&&delete a[e]}),h(h({},n),{},{[e]:a})}const a=h({},n);return delete a[e],a})},[n]),i=(0,Au.useCallback)(e=>{n(t=>h(h({},e.reduce((e,t)=>(e[t]={createdAt:Date.now()},e),{})),t))},[n]),o=(0,Au.useCallback)(()=>{n({})},[n]),a=(0,Au.useMemo)(()=>Object.entries(e||{}).sort((e,t)=>e[0].localeCompare(t[0])),[e]),s=(0,Au.useMemo)(()=>a.map(e=>{let[t]=e;return t}),[a]);return{favWords:e,favList:a,wordList:s,toggleFav:r,mergeWords:i,clearWords:o}}(),[o,a]=(0,Au.useState)(!1);return(0,Cu.jsx)(wv,{disabled:o,size:"small",onClick:()=>{try{a(!0),i(t)}catch(e){rt("set fav",e)}finally{a(!1)}},title:n,children:r[t]?(0,Cu.jsx)(ck.A,{fontSize:"inherit"}):(0,Cu.jsx)(uk.A,{fontSize:"inherit"})})}var pk=i(2964);function fk(e){let{src:t}=e;const{error:n,ready:r,playing:i,onPlay:o}=function(e){const t=(0,Au.useRef)(null),[n,r]=(0,Au.useState)(null),[i,o]=(0,Au.useState)(!1),[a,s]=(0,Au.useState)(!1),[l,c]=(0,Au.useState)(!1),u=(0,Au.useCallback)(async()=>{if(t.current)try{await t.current.play()}catch(e){nt.info("Playback failed:",e),s(!1)}},[]),d=(0,Au.useCallback)(()=>{var e;null===(e=t.current)||void 0===e||e.pause()},[]);return(0,Au.useEffect)(()=>{if(!e)return;let n=!1;o(!1),r(null),s(!1),c(!0);const i=new Audio;t.current=i;const a=()=>o(!0),l=()=>s(!0),u=()=>s(!1),d=()=>s(!1),h=e=>{n||(r(i.error||e),o(!1),c(!1))};return i.addEventListener("canplaythrough",a),i.addEventListener("play",l),i.addEventListener("pause",u),i.addEventListener("ended",d),i.addEventListener("error",h),(async()=>{try{const t=await pi(e,{},{expect:"audio"});if(n)return;i.src=t,c(!1)}catch(e){n||(nt.info("Audio fetch failed:",e),r(e),c(!1))}})(),()=>{n=!0,i.pause(),i.removeAttribute("src"),i.removeEventListener("canplaythrough",a),i.removeEventListener("play",l),i.removeEventListener("pause",u),i.removeEventListener("ended",d),i.removeEventListener("error",h)}},[e]),{loading:l,error:n,ready:i,playing:a,onPlay:u,onPause:d}}(t);return n||!r?(0,Cu.jsx)(wv,{disabled:!0,size:"small",children:(0,Cu.jsx)(pk.A,{fontSize:"inherit"})}):i?(0,Cu.jsx)(wv,{color:"primary",size:"small",children:(0,Cu.jsx)(pk.A,{fontSize:"inherit"})}):(0,Cu.jsx)(wv,{onClick:o,size:"small",children:(0,Cu.jsx)(pk.A,{fontSize:"inherit"})})}function gk(e){let{text:t,lan:n="uk",spd:r=3}=e;if(!t)return null;const i="https://fanyi.baidu.com/gettts?".concat(Yi.stringify({lan:n,text:t,spd:r}));return(0,Cu.jsx)(fk,{src:i})}const mk={[E]:{apiFn:Mo,reWord:e=>null==e?void 0:e.word,toText:e=>{var t;return(null==e||null===(t=e.trs)||void 0===t?void 0:t.map(e=>{let{pos:t,def:n}=e;return"".concat(t?"[".concat(t,"] "):"").concat(n)}))||[]},uiAudio:e=>{var t;return(0,Cu.jsx)(ay,{component:"div",children:null==e||null===(t=e.aus)||void 0===t?void 0:t.map(e=>{let{key:t,audio:n,phonetic:r}=e;return(0,Cu.jsxs)(ay,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,Cu.jsx)(ay,{component:"span",children:"".concat(t," [").concat(r||"","]")}),(0,Cu.jsx)(fk,{src:n})]},t)})})},uiTrans:e=>{var t,n,r,i;return(0,Cu.jsxs)(ay,{component:"div",children:[(0,Cu.jsx)(ay,{component:"ul",children:null==e||null===(t=e.trs)||void 0===t?void 0:t.map((e,t)=>{let{pos:n,def:r}=e;return(0,Cu.jsxs)(ay,{component:"li",children:[n&&"[".concat(n,"] "),r]},t)})}),(null==e||null===(n=e.presents)||void 0===n?void 0:n.length)>0&&(0,Cu.jsx)(ay,{component:"div",style:{marginTop:"10px"},children:e.presents.join(", ")}),(null==e||null===(r=e.ecs)||void 0===r?void 0:r.length)>0&&(0,Cu.jsxs)(ay,{component:"div",style:{marginTop:"10px"},children:[(0,Cu.jsx)(ay,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"英汉双解"}),e.ecs.map(e=>{let{pos:t,lis:n}=e;return(0,Cu.jsxs)(ay,{component:"div",children:[(0,Cu.jsx)(ay,{component:"div",children:t}),(0,Cu.jsx)(ay,{component:"ul",children:n.map((e,t)=>(0,Cu.jsx)(ay,{component:"li",children:e},t))})]},t)})]}),(null==e||null===(i=e.sentences)||void 0===i?void 0:i.length)>0&&(0,Cu.jsxs)(ay,{component:"div",style:{marginTop:"10px"},children:[(0,Cu.jsx)(ay,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"例句"}),e.sentences.slice(0,2).map((t,n)=>{var r,i;return(0,Cu.jsxs)(ay,{component:"div",style:{marginBottom:"5px"},children:[(0,Cu.jsx)(ay,{component:"div",children:null===(r=t.eng)||void 0===r||null===(i=r.split(e.word))||void 0===i?void 0:i.map((t,n,r)=>(0,Cu.jsxs)("span",{children:[n>0&&(0,Cu.jsx)("span",{style:{fontWeight:"bold",color:"#1e88e5"},children:e.word}),t]},n))}),(0,Cu.jsx)(ay,{component:"div",style:{opacity:"0.6",fontStyle:"italic"},children:t.chs})]},n)})]})]})}},[T]:{apiFn:async e=>{const t="https://dict.youdao.com/jsonapi_s?".concat(Yi.stringify({doctype:"json",jsonversion:4})),n={headers:{accept:"application/json, text/plain, */*","accept-language":"en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ja;q=0.6","content-type":"application/x-www-form-urlencoded"},method:"POST",body:Yi.stringify({q:e,le:"en",t:3,client:"web",keyfrom:"webdict"})},r=await pi(t,n,{useCache:!0});return r?(await Rr(t,n,r),r):null},reWord:e=>{var t,n;return null==e||null===(t=e.ec)||void 0===t||null===(n=t.word)||void 0===n?void 0:n["return-phrase"]},toText:e=>{var t,n,r;return(null==e||null===(t=e.ec)||void 0===t||null===(n=t.word)||void 0===n||null===(r=n.trs)||void 0===r?void 0:r.map(e=>{let{pos:t,tran:n}=e;return"".concat(t?"[".concat(t,"] "):"").concat(n)}))||[]},uiAudio:e=>{var t,n,r,i,o,a,s,l,c,u,d,h;return(0,Cu.jsxs)(ay,{component:"div",children:[(0,Cu.jsxs)(ay,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,Cu.jsx)(ay,{component:"span",children:"英 ".concat(null!=e&&null!==(t=e.ec)&&void 0!==t&&null!==(n=t.word)&&void 0!==n&&n.ukphone?"[".concat(null==e||null===(r=e.ec)||void 0===r||null===(i=r.word)||void 0===i?void 0:i.ukphone,"]"):"")}),(0,Cu.jsx)(gk,{text:null==e||null===(o=e.ec)||void 0===o||null===(a=o.word)||void 0===a?void 0:a["return-phrase"],lan:"uk"})]}),(0,Cu.jsxs)(ay,{component:"div",style:{display:"inline-block",paddingRight:"1em"},children:[(0,Cu.jsx)(ay,{component:"span",children:"美 ".concat(null!=e&&null!==(s=e.ec)&&void 0!==s&&null!==(l=s.word)&&void 0!==l&&l.usphone?"[".concat(null==e||null===(c=e.ec)||void 0===c||null===(u=c.word)||void 0===u?void 0:u.usphone,"]"):"")}),(0,Cu.jsx)(gk,{text:null==e||null===(d=e.ec)||void 0===d||null===(h=d.word)||void 0===h?void 0:h["return-phrase"],lan:"en"})]})]})},uiTrans:e=>{var t,n,r,i,o;return(0,Cu.jsxs)(ay,{component:"div",children:[(0,Cu.jsx)(ay,{component:"ul",children:null==e||null===(t=e.ec)||void 0===t||null===(n=t.word)||void 0===n||null===(r=n.trs)||void 0===r?void 0:r.map((e,t)=>{let{pos:n,tran:r}=e;return(0,Cu.jsxs)(ay,{component:"li",children:[n&&"[".concat(n,"] "),r]},t)})}),(null==e||null===(i=e.blng_sents_part)||void 0===i||null===(o=i["sentence-pair"])||void 0===o?void 0:o.length)>0&&(0,Cu.jsxs)(ay,{component:"div",style:{marginTop:"10px"},children:[(0,Cu.jsx)(ay,{component:"div",style:{fontWeight:"bold",marginBottom:"5px"},children:"例句"}),e.blng_sents_part["sentence-pair"].slice(0,2).map((t,n)=>{var r,i,o,a;return(0,Cu.jsxs)(ay,{component:"div",style:{marginBottom:"5px"},children:[(0,Cu.jsx)(ay,{component:"div",children:null===(r=t.sentence)||void 0===r||null===(i=r.split(null===(o=e.ec)||void 0===o||null===(a=o.word)||void 0===a?void 0:a["return-phrase"]))||void 0===i?void 0:i.map((t,n,r)=>{var i,o;return(0,Cu.jsxs)("span",{children:[n>0&&(null===(i=e.ec)||void 0===i||null===(o=i.word)||void 0===o?void 0:o["return-phrase"])&&(0,Cu.jsx)("span",{style:{fontWeight:"bold",color:"#1e88e5"},children:e.ec.word["return-phrase"]}),t]},n)})}),(0,Cu.jsx)(ay,{component:"div",style:{opacity:"0.6",fontStyle:"italic"},children:t["sentence-translation"]})]},n)})]})]})}}};function vk(e){let{text:t,setCopyText:n,setRealWord:r,dict:i}=e;const{loading:o,error:a,data:s}=nw(i.apiFn,t);(0,Au.useEffect)(()=>{if(!s)return;const e=i.reWord(s)||t,o=[e,i.toText(s).join("\n")].join("\n");r(e),n(o)},[s,t,i,n,r]);const l=(0,Au.useMemo)(()=>i.uiAudio(s),[s,i]),c=(0,Au.useMemo)(()=>i.uiTrans(s),[s,i]);return o?(0,Cu.jsx)(Zv,{size:16}):a?(0,Cu.jsx)(jv,{severity:"error",children:a}):s?(0,Cu.jsxs)(ay,{component:"div",children:[l,c]}):(0,Cu.jsx)(ay,{children:"Not found!"})}function yk(e){let{text:t,enDict:n}=e;const r=iw(),[i,o]=(0,Au.useState)(t),[a,s]=(0,Au.useState)(t),l=mk[n];return(0,Cu.jsxs)(Gb,{spacing:1,children:[t&&(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"space-between",children:[(0,Cu.jsx)(ay,{variant:"subtitle1",style:{fontWeight:"bold"},children:a}),(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"space-between",children:[(0,Cu.jsx)(sk,{text:i,title:r("copy")}),(0,Cu.jsx)(hk,{word:a,title:r("collect")})]})]}),(0,Cu.jsx)(xy,{}),l&&(0,Cu.jsx)(vk,{text:t,setCopyText:o,setRealWord:s,dict:l})]})}function bk(e){let{text:t}=e;const{loading:n,error:r,data:i}=nw(Fo,t);return n?(0,Cu.jsx)(Zv,{size:16}):r?(0,Cu.jsx)(jv,{severity:"error",children:r}):i?(0,Cu.jsx)(Cu.Fragment,{children:i.map(e=>{let{k:t,v:n}=e;return(0,Cu.jsxs)(ay,{component:"div",children:[(0,Cu.jsx)(ay,{children:t}),(0,Cu.jsx)(ay,{component:"ul",style:{margin:"0"},children:(0,Cu.jsx)(ay,{component:"li",children:n})})]},t)})}):null}function wk(e){let{text:t}=e;const{loading:n,error:r,data:i}=nw(Bo,t);return n?(0,Cu.jsx)(Zv,{size:16}):r?(0,Cu.jsx)(jv,{severity:"error",children:r}):i?(0,Cu.jsx)(Cu.Fragment,{children:i.map(e=>{let{entry:t,explain:n}=e;return(0,Cu.jsxs)(ay,{component:"div",children:[(0,Cu.jsx)(ay,{children:t}),(0,Cu.jsx)(ay,{component:"ul",style:{margin:"0"},children:(0,Cu.jsx)(ay,{component:"li",children:n})})]},t)})}):null}function xk(e){let{text:t,enSug:n}=e;const r={[L]:(0,Cu.jsx)(bk,{text:t}),[N]:(0,Cu.jsx)(wk,{text:t})};return(0,Cu.jsxs)(Gb,{spacing:1,children:[(0,Cu.jsx)(xy,{}),r[n]||(0,Cu.jsx)(ay,{children:"Sug not support"})]})}function Ak(e){let{text:t,setText:n,apiSlugs:r,fromLang:i,toLang:o,toLang2:a,transApis:s,simpleStyle:l=!1,langDetector:c="-",enDict:u="-",enSug:d="-",isPlaygound:h=!1}=e;const p=iw(),[f,g]=(0,Au.useState)(!1),[m,v]=(0,Au.useState)(t),[y,b]=(0,Au.useState)(r),[w,x]=(0,Au.useState)(i),[A,S]=(0,Au.useState)(o),[k,_]=(0,Au.useState)(a),[C,E]=(0,Au.useState)(c),[T,L]=(0,Au.useState)(u),[N,O]=(0,Au.useState)(d),[z,D]=(0,Au.useState)(""),[M,F]=(0,Au.useState)(!1),B=(0,Au.useRef)(null);(0,Au.useEffect)(()=>{const e=B.current;if(!e)return;e.focus();const t=e.value.length;e.setSelectionRange(t,t)},[]),(0,Au.useEffect)(()=>{if(En(t)){const e=new CustomEvent("kiss-add-word",{detail:{word:t}});document.dispatchEvent(e)}},[t]),(0,Au.useEffect)(()=>{f||v(t)},[t,f]),(0,Au.useEffect)(()=>{t.trim()?(async()=>{try{F(!0);const e=await Wh(t,C);e&&D(e)}catch(e){rt("tranbox: detect lang",e)}finally{F(!1)}})():D("")},[t,C,D,F]);const W=(0,Au.useMemo)(()=>"auto"===w&&A!==k&&"-"!==k&&z===A?k:A,[w,A,k,z]),U=(0,Au.useMemo)(()=>s.filter(e=>!e.isDisabled).map(e=>({key:e.apiSlug,name:e.apiName||e.apiSlug})),[s]),V=(0,Au.useMemo)(()=>En(t),[t]),H=(0,Au.useMemo)(()=>h?6:4,[h]),G=(0,Au.useMemo)(()=>h?3:4,[h]);return(0,Cu.jsxs)(Gb,{spacing:l?1:2,children:[!l&&(0,Cu.jsxs)(Cu.Fragment,{children:[(0,Cu.jsx)(cb,{children:(0,Cu.jsxs)(nk,{container:!0,spacing:2,columns:12,children:[(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsx)(DS,{select:!0,SelectProps:{multiple:!0,MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",value:y,name:"apiSlugs",label:p("translate_service_multiple"),onChange:e=>{b(e.target.value)},children:U.map(e=>{let{key:t,name:n}=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})})}),(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"fromLang",value:w,label:p("from_lang"),onChange:e=>{x(e.target.value)},children:se.map(e=>{let[t,n]=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})})}),(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"toLang",value:A,label:p("to_lang"),onChange:e=>{S(e.target.value)},children:oe.map(e=>{let[t,n]=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})})}),h&&(0,Cu.jsxs)(Cu.Fragment,{children:[(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"toLang2",value:k,label:p("to_lang2"),onChange:e=>{_(e.target.value)},children:oe.map(e=>{let[t,n]=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})})}),(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsxs)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"enDict",value:T,label:p("english_dict"),onChange:e=>{L(e.target.value)},children:[(0,Cu.jsx)(HS,{value:"-",children:p("disable")}),I.map(e=>(0,Cu.jsx)(HS,{value:e,children:e},e))]})}),(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsxs)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"enSug",value:N,label:p("english_suggest"),onChange:e=>{O(e.target.value)},children:[(0,Cu.jsx)(HS,{value:"-",children:p("disable")}),j.map(e=>(0,Cu.jsx)(HS,{value:e,children:e},e))]})}),(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsxs)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!h}},fullWidth:!0,size:"small",name:"langDetector",value:C,label:p("detected_lang"),onChange:e=>{E(e.target.value)},children:[(0,Cu.jsx)(HS,{value:"-",children:p("disable")}),ne.map(e=>(0,Cu.jsx)(HS,{value:e,children:e},e))]})}),(0,Cu.jsx)(nk,{item:!0,xs:H,md:G,children:(0,Cu.jsx)(DS,{fullWidth:!0,size:"small",name:"deLang",value:z&&le.get(z),label:p("detected_result"),disabled:!0,InputProps:{startAdornment:M?(0,Cu.jsx)(Zv,{size:16}):null}})})]})]})}),(0,Cu.jsx)(cb,{children:(0,Cu.jsx)(DS,{size:"small",label:p("original_text"),fullWidth:!0,multiline:!0,inputRef:B,minRows:h?2:1,maxRows:10,value:m,onChange:e=>{v(e.target.value)},onFocus:()=>{g(!0)},onBlur:()=>{g(!1),n(m.trim())},InputProps:{endAdornment:(0,Cu.jsx)(Gb,{direction:"row",sx:{position:"absolute",right:0,top:0},children:f?(0,Cu.jsx)(wv,{size:"small",onClick:e=>{e.stopPropagation(),g(!1),n(m.trim())},title:p("submit"),children:(0,Cu.jsx)(rk.A,{fontSize:"inherit"})}):t?(0,Cu.jsx)(sk,{text:t,title:p("copy")}):(0,Cu.jsx)(wv,{size:"small",onClick:async()=>{try{const e=await navigator.clipboard.readText();n(e.trim())}catch(e){}},title:p("paste"),children:(0,Cu.jsx)(ik.A,{fontSize:"inherit"})})})}})})]}),y.map(e=>(0,Cu.jsx)(lk,{text:t,fromLang:w,toLang:W,simpleStyle:l,apiSlug:e,transApis:s},e)),V&&P.has(T)&&(0,Cu.jsx)(yk,{text:t,enDict:T}),V&&R.has(N)&&(0,Cu.jsx)(xk,{text:t,enSug:N})]})}const Sk="data:image/x-icon;base64,AAABAAMAMDAAAAEAIACoJQAANgAAACAgAAABACAAqBAAAN4lAAAQEAAAAQAgAGgEAACGNgAAKAAAADAAAABgAAAAAQAgAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAADunB8Q7pwgd+6cINTunCD67pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD67pwg1O6cIHfunR8QAAAAAO6cHxDunCCW7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCCW7pwfEO6cIHfunCD47pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgd+6cINPunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg0+6cIPnunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bHv/umx3/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7psd/+6bHf/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pse/+6bHf/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7p0i//GsRP/ytlv/8a9K/+6eJf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//vnyj/8bFP//K2Wv/wqj7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCH/8Kk9//KzVf/xrUb/7p4k/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8rVY//3y4v/++/f//fbq//S+bP/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/2yIT//vjw//779//87db/8axF/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6bHv/xsEz//O7Z//769P/99en/9MBx/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9smG//////////////////jVn//unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6fJv/64r7//////////////v3/9L9v/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/1xHn/////////////////+Nmq/+6dIf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suK//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/++fKP/65MH///////////////7/9MF0/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dut/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/++fJ//65MH//////////////v7/9MFz/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwf/++gKf/75cX//////////////v7/9MFz/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pod//GuSP/98+T///////////////7/9MF0/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8a1G//rkw////////////////////vz/9L5t/+6aHP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwf/+6cH//ytlz//O3W///////////////////////98eH/8axE/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/umx//7p4k//TCdv/99ej///////////////////////3x4P/zu2b/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jWpP/unCD/7pwg/+6bHv/voSz/98+S//769P//////////////////////++jK//KxUP/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpf/unB//7psd//CnOf/5267///37///////////////////9+//53K//8Kg7/+6bHf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////vmx//wpjj/8rFQ//vmx////////////////////////vrz//fOkf/voSz/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ///////////////////9+v/87df//fXo///////////////////////99Ob/9MFz/+6dI//umx//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////////////////////////////////////zr0v/ytVj/7psf/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ////////////////////////////////////////////++fJ//GrQv/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ////////////////////////////////////////////9cN3/+6aG//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ////////////////////////////////////////////+Nai/+6eJf/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ/////////////////////////////////////////////vv2//bKiP/uniT/7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ///////////////////+/f/+9+3///z5//////////////////769f/2yYX/7p0j/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////zr0v/xsE7/9siE//748P/////////////////++vT/9siD/+6dI//unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jYp//umx7/7pwh//XFfP/++fH//////////////////vrz//XHgP/unSL/7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jWpP/unCD/7pwf/+6dIv/1xn3//vny//////////////////758v/1xn7/7p0i/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cH//unSL/9cZ///758//////////////////++fH/9cV7/+6dIv/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unB//7p0j//XHgf/++vP//////////////////vjw//XDef/unSH/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwf/+6dI//1yIP//vr0//////////////////747//0wXP/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHf/1xn7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//uniP/9smF//769f/////////////////98d//8KpB/+6bHv/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/1xX7/////////////////+dqt/+6dIv/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7p4k//fOkf///vz//////////////fz/9L1q/+6aHP/unB//7psf/+6bH//umx//7pse/+6aG//2yof/////////////////+d60/+6dIv/umx7/7psf/+6bH//umx//7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pse//CnOP/879r//////////////v7/9MFz/+6aHP/vnyf/8KY2//CmN//wpjf/8KY3//KxT//76Mv//////////////////fPk//O6ZP/wpjj/8KY3//CmN//wpjb/76Er/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suJ//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwf/++gKP/65MP//////////////v7/9MBy/++kMf/5267//PDe//3x3//88d///fHf//737v////7///////////////////////768//98uH//PHf//3x3//88d//+uTB//GuSP/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9suK//////////////////jXpP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/++fKP/65MH///////////////7/9MBw//O4X////fr///////////////////////////////////////////////////////////////////////////////////////bJhv/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx3/9smF//////////////////jUnv/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6fJv/64r3//////////////v3/9L1q//O6Y////fv///////////////////////////////////////////////////////////////////////////////////////bLif/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8rNU//zv3P/++vP//fTl//O7Z//umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//1xn7//fbr//768//76tD/8KpA//CoO//75sj//vjw//748P/++PD//vjw//748P/++PD//vjw//748P/++PD//vjw//748P/++PD//vjw//748P/++PD//O7a//KzVf/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwh//CpPv/ys1P/8axD/+6dI//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unib/8a5I//KyUv/wpzn/7pwg/+6cIP/wpTT/8a9M//GwTf/xsE3/8bBN//GwTf/xsE3/8bBN//GwTf/xsE3/8bBN//GwTf/xsE3/8bBN//GwTf/xsE3/8Kg7/+6cIf/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bHv/umx3/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pse/+6bHf/umx7/7pwg/+6cIP/umx//7psd/+6bHf/umx3/7psd/+6bHf/umx3/7psd/+6bHf/umx3/7psd/+6bHf/umx3/7psd/+6bHf/umx3/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg+e6cINTunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg1O6cIHfunCD47pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgd+6cHxDunCCW7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCCW7pwfEAAAAADunB8Q7pwgd+6cINTunCD67pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD67pwg1O6cIHfunB8QAAAAAOAAAAAABwAAgAAAAAABAACAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAQAAgAAAAAABAADgAAAAAAcAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAADunB8S7pwgie6cIOvunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIOvunCCJ7pwgEu6cIInunCD57pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIPnunCCJ7pwg6u6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIOrunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//uniX/7p8m/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cH//uniT/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6dIf/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx7/8KpA//netf/64bz/8a5J/+6bHv/unCD/7pwg/+6cIP/umx//76Qz//jZqf/65MP/87Zc/+6bHv/unCD/7pwg/+6cIP/uniX/9syL//vlxP/0wnb/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/zvGn///78///////1xHr/7poc/+6cIP/unCD/7pwg/+6bHf/yslP//vr0///////30pr/7pse/+6cIP/unCD/7psf/++kM//87tr///////rjwP/unyb/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S+bP///v3///////XFff/umhz/7pwg/+6cIP/unCD/7psd//KzVP/++vX///////jUnf/umx7/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV9/+6aHP/unCD/7pwg/+6cIP/umhv/87de//78+P//////+NSd/+6bHv/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////1xX3/7poc/+6cIP/unCD/7psd//CmN//637j////////////30pn/7pse/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////XFff/umhz/7pwg/+6bHv/xr0r/++bG/////////////vft//O5Yf/umx3/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV8/+6aHP/unCD/87lh//zv3P////////////3x3//zvGf/7p0h/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////2yIP/7p0i//XFfP/+9uz////////////758n/8bBN/+6bHv/unCD/7pwg/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////zt1v/53rT//vv1/////////fv/+dut//CnOf/umx3/7pwg/+6cIP/unCD/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f///////////////////////vr1//bOkP/voSv/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////////////////////526//7p0i/+6bH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////////////////////voy//wpzj/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f///////vv3//768/////////////rguv/wpjb/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////41J7/87hf//zv2/////////////rft//wpTX/7pse/+6cIP/unCD/7pwg/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////XFfP/tmRn/8rNV//zw3P////////////netf/wpTT/7pse/+6cIP/unCD/7pwg/+6cIP/umx//8KU1//zv3P//////+uTC/++fJ//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV9/+6aHP/umx7/8rRW//zw3v/////////+//nds//vpDP/7pse/+6cIP/unCD/7pwg/+6bH//wpTX//O/c///////65ML/758n/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vWz///79///////1xX3/7poc/+6cIP/umx7/8rVY//3x3//////////+//ncsP/vozD/7pwf/+6cIP/unCD/7psf//ClNf/879z///////rkwv/vnyf/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7poc//S9bP///v3///////XFff/umhz/7pwg/+6cIP/umx7/8rVZ//3y4v////////79//XEev/umx3/7psf/+6bHv/umx3/76Qz//zw3P//////+uTC/+6eJf/umx7/7pse/+6cH//unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/umhz/9L1s///+/f//////9cV9/+6aHP/unCD/7pwg/+6cIP/umx3/9cV7///+/f//////99Ob/+6cIf/wpTT/8Kc4//CmN//zu2b//vjv///////88N7/8rJT//CmN//wpzj/76Mx/+6cIf/unCD/7pwg/+6cIP/unCD/7pwg/+6aHP/0vmz///79///////1xX3/7poc/+6cIP/unCD/7pwg/+6bHf/ytFX//vv1///////30pv/87tn//zv2//98uH//fLh//758f///////////////v/+9+3//fHh//3y4f/76tD/8bBM/+6bHv/unCD/7pwg/+6cIP/unCD/7poc//O8af///vz///////XEef/umhz/7pwg/+6cIP/unCD/7psd//KyUv/++vP///////fRlv/3zpH////////////////////////////////////////////////////////+/P/0vWv/7poc/+6cIP/unCD/7pwg/+6cIP/umx7/8Kk+//ncsP/537b/8a1H/+6bHv/unCD/7pwg/+6cIP/unB//76Qx//jWo//64r7/8rRW//KyUv/537f/+uO///riv//64r//+uK///riv//64r//+uK///riv//647//+dqs//CpPv/umx7/7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7p4k/+6eJP/unB//7pwg/+6cIP/unCD/7pwg/+6cIP/unB//7p0j/+6eJf/unB//7pwf/+6eJP/unib/7p4l/+6eJf/uniX/7p4l/+6eJf/uniX/7p4l/+6eJv/unSP/7pwf/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg6u6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIOrunCCJ7pwg+e6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD57pwgie6cIBLunCCJ7pwg6+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg6+6cIInunB8SgAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAEoAAAAEAAAACAAAAABACAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAA7pwgnu6cIPjunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgnu6cIPfunB//7psd/+6cH//unCD/7pwg/+6bHv/umx3/7pwg/+6cIP/umx7/7psd/+6cIP/unCD/7pwg/+6cIPfunB//76Mv//S9a//vpDH/7pwf/+6cH//xsE7/87dc/+6cIf/umx//8axD//O5Yf/unSP/7pwg/+6cIP/unCD/7psd//KxT//99en/8rRX/+6bHf/umx7/+NWh//vmxv/vnyf/7poc//bLiv/87NX/76Iu/+6cH//unCD/7pwg/+6bHf/yslH//fbr//K1Wf/umhr/76Iu//rkw//75sb/7p8n/+6aHP/2zIz//O3X/++jL//unB//7pwg/+6cIP/umx3/8rJR//326//ytFX/8Kc4//netv/+9+3/9cN4/+6cIP/umh3/9syM//zt1//voy//7pwf/+6cIP/unCD/7psd//KyUf/++O//99Oc//voy//98eD/87tl/+6cIf/unCD/7psd//bMjP/87df/76Mv/+6cH//unCD/7pwg/+6bHf/ysVD//vrz///////98uL/8bBO/+6bHf/unCD/7pwg/+6aHf/2zIz//O3X/++jL//unB//7pwg/+6cIP/umx3/8rFQ//768//++/b//fXo//O3Xf/umx7/7pwg/+6cIP/umh3/9syM//zt1//voy//7pwf/+6cIP/unCD/7psd//KyUf/+9+3/9cV9//rguf/98+P/8rZb/+6bHv/unCD/7pod//bMjP/87df/76Mv/+6cH//unCD/7pwg/+6bHf/yslH//fbr//K0Vv/vpTT/+uK+//3y4f/ytFf/7pse/+6aG//2y4v//O3X/++iLf/umx7/7pwg/+6cIP/umx3/8rJR//326//ytVn/7pka//CnOf/869L/+uG7/++kM//wpjj/+NWh//3y4f/xr0z/8KU1/+6dI//unCD/7psd//KxT//99en/8rRX/+6bHf/umx3/+Nai//vnyv/52ar//fTm//779f///v3//fXp//zs0//xrET/7psd/+6cH//voi7/87xo/++jMf/unB//7pwf//GvTP/ytlv/8rZZ//XEev/1w3j/9cN3//XEef/0v3D/76Iu/+6cH//unCD37pwf/+6bHf/unB//7pwg/+6cIP/umx7/7psd/+6bHf/umhz/7poc/+6aHP/umhz/7poc/+6cH//unCD37pwgnu6cIPjunCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD/7pwg/+6cIP/unCD47pwgngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",kk=e=>{let{size:t=16,className:n="",style:r={},onClick:i}=e;return(0,Cu.jsx)("img",{src:Sk,alt:"Logo",className:n,onClick:i,style:h({width:"".concat(t,"px"),height:"".concat(t,"px"),objectFit:"contain",display:"block"},r)})};function _k(e){let{setShowBox:t,simpleStyle:n,setSimpleStyle:r,hideClickAway:i,setHideClickAway:o,followSelection:a,setFollowSelection:s}=e;const l=ub(),c=iw(),u=l.palette.text.secondary,d=(0,Au.useCallback)(()=>{cr("open_separate_window")},[]),p=e=>e.currentTarget.blur(),f={borderRadius:"6px",padding:"5px",minWidth:"30px",minHeight:"30px",transition:"all 0.2s ease",backgroundColor:"transparent","& svg":{color:u}};return(0,Cu.jsx)(cb,{onMouseUp:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),sx:{backgroundColor:l.palette.background.default,padding:"4px 8px 4px 12px",height:"36px",display:"flex",alignItems:"center",minHeight:"auto"},children:(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:1,sx:{width:"100%",height:"100%"},children:[(0,Cu.jsxs)(Gb,{direction:"row",alignItems:"center",spacing:1,children:[(0,Cu.jsx)(cb,{sx:{width:18,height:18,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",backgroundColor:l.palette.background.paper,border:"1px solid ".concat(l.palette.divider),transition:"all 0.2s ease","&:hover":{boxShadow:l.shadows[2],transform:"translateY(-1px)",backgroundColor:l.palette.action.hover}},children:(0,Cu.jsx)(kk,{size:16})}),!n&&(0,Cu.jsx)(ay,{variant:"caption",sx:{fontWeight:500,fontSize:"12px",color:l.palette.text.secondary},children:"".concat("KISS Translator"," v").concat("2.0.20")})]}),(0,Cu.jsxs)(Gb,{direction:"row",alignItems:"center",spacing:.5,children:[dn&&(0,Cu.jsx)(wv,{size:"small",title:c("open_separate_window"),onClick:d,onMouseLeave:p,sx:h(h({},f),{},{"&:hover":{backgroundColor:l.palette.primary.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.primary.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.primary.light+"40"}}),children:(0,Cu.jsx)($b.A,{sx:{width:16,height:16}})}),(0,Cu.jsx)(wv,{size:"small",title:c("btn_tip_click_away"),onMouseLeave:p,onClick:()=>o(e=>!e),sx:h(h({},f),{},{"&:hover":{backgroundColor:l.palette.success.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.success.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.success.light+"40"}}),children:i?(0,Cu.jsx)(Qb.A,{sx:{width:16,height:16,color:l.palette.success.main}}):(0,Cu.jsx)(Jb.A,{sx:{width:16,height:16}})}),(0,Cu.jsx)(wv,{size:"small",title:c("btn_tip_follow_selection"),onMouseLeave:p,onClick:()=>s(e=>!e),sx:h(h({},f),{},{"&:hover":{backgroundColor:l.palette.warning.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.warning.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.warning.light+"40"}}),children:a?(0,Cu.jsx)(Yb.A,{sx:{width:16,height:16,color:l.palette.warning.main}}):(0,Cu.jsx)(Xb.A,{sx:{width:16,height:16}})}),(0,Cu.jsx)(wv,{size:"small",title:c("btn_tip_simple_style"),onMouseLeave:p,onClick:()=>r(e=>!e),sx:h(h({},f),{},{"&:hover":{backgroundColor:l.palette.info.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.info.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.info.light+"40"}}),children:n?(0,Cu.jsx)(Kb.A,{sx:{width:16,height:16,color:l.palette.info.main}}):(0,Cu.jsx)(qb.A,{sx:{width:16,height:16}})}),(0,Cu.jsx)(wv,{size:"small",title:c("close"),onMouseLeave:p,onClick:()=>t(!1),sx:h(h({},f),{},{"&:hover":{backgroundColor:l.palette.error.light+"20",transform:"scale(1.05)",boxShadow:l.shadows[2],"& svg":{color:l.palette.error.main}},"&:active":{transform:"scale(0.95)",backgroundColor:l.palette.error.light+"40"}}),children:(0,Cu.jsx)(Zb.A,{sx:{width:16,height:16}})})]})]})})}function Ck(e){let{simpleStyle:t,text:n,setText:r,apiSlugs:i,fromLang:o,toLang:a,toLang2:s,transApis:l,langDetector:c,enDict:u,enSug:d}=e;const h=ub(),p="dark"===h.palette.mode,f="dark"===h.palette.mode?"#1f1f23":h.palette.background.paper,g="dark"===h.palette.mode?mb(h.palette.text.primary,.28):mb(h.palette.text.primary,.24);return(0,Cu.jsx)(cb,{sx:{p:t?1:2,backgroundColor:h.palette.background.paper,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{background:f},"&::-webkit-scrollbar-thumb":{backgroundColor:g,borderRadius:8,border:"2px solid ".concat(h.palette.background.paper)},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:mb(h.palette.text.primary,.36)},scrollbarWidth:"thin",scrollbarColor:"".concat(g," ").concat(f),color:p?"rgba(255,255,255,0.82)":h.palette.text.primary,lineHeight:1.55},children:(0,Cu.jsx)(Ak,{text:n,setText:r,apiSlugs:i,fromLang:o,toLang:a,toLang2:s,transApis:l,simpleStyle:t,langDetector:c,enDict:u,enSug:d})})}function Ek(e){const[t,n]=(0,Au.useState)(!1),r=e.simpleStyle,i=e.setSimpleStyle,o=e.hideClickAway,a=e.setHideClickAway,s=e.followSelection,l=e.setFollowSelection;return(0,Cu.jsx)(ky,{context:"tranbox",children:(0,Cu.jsx)(nb,{styles:e.extStyles,children:e.showBox&&(0,Cu.jsx)(wb,{position:e.boxPosition,size:e.boxSize,setSize:e.setBoxSize,setPosition:e.setBoxPosition,autoHeight:e.tranboxSetting.autoHeight,header:(0,Cu.jsx)(_k,{setShowBox:e.setShowBox,simpleStyle:r,setSimpleStyle:i,hideClickAway:o,setHideClickAway:a,followSelection:s,setFollowSelection:l,mouseHover:t}),onClick:e=>e.stopPropagation(),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:(0,Cu.jsx)(Ck,{simpleStyle:r,text:e.text,setText:e.setText,apiSlugs:e.tranboxSetting.apiSlugs,fromLang:e.tranboxSetting.fromLang,toLang:e.tranboxSetting.toLang,toLang2:e.tranboxSetting.toLang2,transApis:e.transApis,langDetector:e.langDetector,enDict:e.tranboxSetting.enDict,enSug:e.tranboxSetting.enSug})})})})}function Tk(e){const{simpleStyle:t=!1,hideClickAway:n=!1,followSelection:r=!1,boxOffsetX:i=0,boxOffsetY:o=10}=e,a=Cc||t?400:vn(window.innerWidth,400,800),s=Cc||t?200:vn(window.innerHeight,200,600),[l,c]=(0,Au.useState)({w:a,h:s}),[u,d]=(0,Au.useState)({x:(window.innerWidth-a)/2,y:(window.innerHeight-s)/2}),[p,f]=(0,Au.useState)(t),[g,m]=(0,Au.useState)(n),[v,y]=(0,Au.useState)(r);return(0,Au.useEffect)(()=>{(async()=>{try{const{w:e,h:t,x:n,y:r}=await Mn(Wt)||{};void 0!==e&&void 0!==t&&c({w:Math.min(e,window.innerWidth),h:Math.min(t,window.innerHeight)}),void 0!==n&&void 0!==r&&d({x:vn(n,0,window.innerWidth-e),y:vn(r,0,window.innerHeight-50)})}catch(e){}})()},[]),(0,Au.useEffect)(()=>{!Qn&&l.w>0&&l.h>0&&$n(h(h({},l),u))},[l,u]),{boxSize:l,setBoxSize:c,boxPosition:u,setBoxPosition:d,simpleStyle:p,setSimpleStyle:f,hideClickAway:g,setHideClickAway:m,followSelection:v,setFollowSelection:y,boxOffsetX:i,boxOffsetY:o}}function Ik(e){let{tranboxSetting:t,followSelection:n,boxOffsetX:r,boxOffsetY:i,boxSize:o,setBoxPosition:a,hideClickAway:s}=e;const{hideTranBtn:l=!1,triggerMode:c}=t,[u,d]=(0,Au.useState)(!1),[h,p]=(0,Au.useState)(!1),[f,g]=(0,Au.useState)(""),[m,v]=(0,Au.useState)(""),[y,b]=(0,Au.useState)({x:0,y:0});!function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{delay:i=5e3,distance:o=100}=r,a=(0,Au.useRef)(null),s=(0,Au.useRef)({x:0,y:0});(0,Au.useEffect)(()=>{if(!e)return;s.current=n,a.current=setTimeout(()=>{t(!1)},i);const r=e=>{const{x:n,y:r}=s.current,i=e.clientX-n,a=e.clientY-r;i*i+a*a>o*o&&t(!1)},l=e=>{2===e.button&&t(!1)};return window.addEventListener("mousemove",r),window.addEventListener("mousedown",l,!0),()=>{clearTimeout(a.current),window.removeEventListener("mousemove",r),window.removeEventListener("mousedown",l,!0)}},[e,n,i,o,t])}(h,p,y);const w=(0,Au.useCallback)(e=>{p(!1),v(e||f),d(!0)},[f]),x=(0,Au.useCallback)(()=>{var e,t;p(!1);const s=window.getSelection(),l=(null==s||null===(e=s.toString())||void 0===e?void 0:e.trim())||"";if(!l)return void d(e=>!e);const c=null==s||null===(t=s.getRangeAt(0))||void 0===t?void 0:t.getBoundingClientRect();if(c&&n){const e=(c.left+c.right)/2+r,t=c.bottom+i;a({x:vn(e,0,window.innerWidth-o.w),y:vn(t,0,window.innerHeight-50)})}g(l),v(l),d(!0)},[n,r,i,a,o]),A=(0,Au.useMemo)(()=>Cc?"onTouchEnd":c===gt?"onMouseOver":"onMouseUp",[c]);return(0,Au.useEffect)(()=>{const e=Cc?"touchend":"mouseup";async function t(e){var t,s;if(2===e.button)return;await bn(200);const u=window.getSelection(),d=(null==u||null===(t=u.toString())||void 0===t?void 0:t.trim())||"";if(g(d),!d)return void p(!1);const h=null==u||null===(s=u.getRangeAt(0))||void 0===s?void 0:s.getBoundingClientRect();if(h&&n){const e=(h.left+h.right)/2+r,t=h.bottom+i;a({x:vn(e,0,window.innerWidth-o.w),y:vn(t,0,window.innerHeight-50)})}if(c===mt)return void w(d);const{clientX:f,clientY:m}=Cc?e.changedTouches[0]:e;p(!l),b({x:f,y:m})}return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[l,c,n,r,i,w,o,a]),(0,Au.useEffect)(()=>{if(s){const e=()=>{d(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}}},[s]),{showBox:u,setShowBox:d,showBtn:h,setShowBtn:p,selectedText:f,setSelText:g,text:m,setText:v,position:y,setPosition:b,handleOpenTranbox:w,handleToggleTranbox:x,btnEvent:A}}function Pk(e){let{contextMenuType:t,tranboxSetting:n,transApis:r,uiLang:i,langDetector:o}=e;const{boxSize:a,setBoxSize:s,boxPosition:l,setBoxPosition:c,simpleStyle:u,setSimpleStyle:d,hideClickAway:h,setHideClickAway:p,followSelection:f,setFollowSelection:g,boxOffsetX:m,boxOffsetY:v}=Tk(n),{showBox:y,setShowBox:b,showBtn:w,text:x,setText:A,position:S,handleOpenTranbox:k,handleToggleTranbox:_,btnEvent:C}=Ik({tranboxSetting:n,followSelection:f,boxOffsetX:m,boxOffsetY:v,boxSize:a,setBoxPosition:c,hideClickAway:h});return function(e){let{tranboxSetting:t,showBox:n,setShowBox:r,handleToggleTranbox:i,contextMenuType:o,uiLang:a}=e;const{tranboxShortcut:s=vt}=t,l=rw(a),c=(0,Au.useCallback)(()=>{n?r(!1):i()},[n,i,r]);(0,Au.useEffect)(()=>{if(dn)return;const e=Mh(s,c);return()=>{e()}},[s,c]),(0,Au.useEffect)(()=>{const e=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.action)===Qt&&c()};return document.addEventListener(an,e),()=>{document.removeEventListener(an,e)}},[c]),(0,Au.useEffect)(()=>{try{var e,t;const n=[];return 0!==o&&n.push(null===(e=(t=GM).registerMenuCommand)||void 0===e?void 0:e.call(t,l("translate_selected_text"),e=>{i()},"S")),()=>{n.forEach(e=>{var t,n;null===(t=(n=GM).unregisterMenuCommand)||void 0===t||t.call(n,e)})}}catch(e){rt("registerMenuCommand",e)}},[i,o,l])}({tranboxSetting:n,showBox:y,setShowBox:b,handleToggleTranbox:_,contextMenuType:t,uiLang:i}),(0,Cu.jsxs)(Cu.Fragment,{children:[(0,Cu.jsx)(Ek,{showBox:y,text:x,setText:A,boxSize:a,setBoxSize:s,boxPosition:l,setBoxPosition:c,tranboxSetting:n,transApis:r,setShowBox:b,simpleStyle:u,setSimpleStyle:d,hideClickAway:h,setHideClickAway:p,followSelection:f,setFollowSelection:g,langDetector:o}),w&&(0,Cu.jsx)(om,{position:S,btnOffsetX:n.btnOffsetX,btnOffsetY:n.btnOffsetY,btnEvent:C,onTrigger:e=>{e.stopPropagation(),k()}})]})}var Lk=pr("container"),Nk=pr("reactRoot"),jk=pr("shadowContainer"),Rk=pr("props");class Ok{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.defineProperty(this,Lk,{writable:!0,value:null}),Object.defineProperty(this,Nk,{writable:!0,value:null}),Object.defineProperty(this,jk,{writable:!0,value:null}),Object.defineProperty(this,Rk,{writable:!0,value:{}}),dr(this,Rk)[Rk]=e;const{tranboxSetting:t=yt}=dr(this,Rk)[Rk];null!=t&&t.transOpen&&this.enable()}isEnabled(){return!!dr(this,Lk)[Lk]&&document.body.contains(dr(this,Lk)[Lk])}enable(){if(!this.isEnabled()){dr(this,Lk)[Lk]=document.createElement("div"),dr(this,Lk)[Lk].id=r.boxID,dr(this,Lk)[Lk].className="notranslate",document.body.appendChild(dr(this,Lk)[Lk]),dr(this,jk)[jk]=dr(this,Lk)[Lk].attachShadow({mode:"open"});const e=document.createElement("div");e.className="".concat(r.boxID,"_wrapper notranslate"),dr(this,jk)[jk].appendChild(e);const t=(0,_u.A)({key:r.boxID,prepend:!0,container:dr(this,jk)[jk]});dr(this,Nk)[Nk]=Su.createRoot(e),dr(this,Nk)[Nk].render((0,Cu.jsx)(Au.StrictMode,{children:(0,Cu.jsx)(ku.C,{value:t,children:(0,Cu.jsx)(Pk,h({},dr(this,Rk)[Rk]))})}))}}disable(){this.isEnabled()&&dr(this,Nk)[Nk]&&(dr(this,Nk)[Nk].unmount(),dr(this,Lk)[Lk].remove(),dr(this,Lk)[Lk]=null,dr(this,Nk)[Nk]=null,dr(this,jk)[jk]=null)}toggle(){this.isEnabled()?this.disable():this.enable()}update(e){var t;(dr(this,Rk)[Rk]=h(h({},dr(this,Rk)[Rk]),e),this.isEnabled())&&(null!==(t=dr(this,Rk)[Rk].tranboxSetting)&&void 0!==t&&t.transOpen?this.enable():this.disable())}}var zk=pr("hostElement"),Dk=pr("reactRoot"),Mk=pr("isVisible"),Fk=pr("isProcessing"),Bk=pr("mount");class Wk{constructor(e){let{id:t,className:n="",reactComponent:r,props:i={},rootElement:o=document.body}=e;if(Object.defineProperty(this,Bk,{value:Uk}),Object.defineProperty(this,zk,{writable:!0,value:null}),Object.defineProperty(this,Dk,{writable:!0,value:null}),Object.defineProperty(this,Mk,{writable:!0,value:!1}),Object.defineProperty(this,Fk,{writable:!0,value:!1}),!t||!r)throw new Error("ID and a React Component must be provided.");this._id=t,this._className=n,this._ReactComponent=r,this._props=i,this._rootElement=o}get isVisible(){return dr(this,Mk)[Mk]}show(e){if(!dr(this,Mk)[Mk]&&!dr(this,Fk)[Fk]){if(!dr(this,zk)[zk]){dr(this,Fk)[Fk]=!0;try{dr(this,Bk)[Bk](e||this._props)}catch(e){return nt.warn('Failed to mount component with id "'.concat(this._id,'":'),e),void(dr(this,Fk)[Fk]=!1)}finally{dr(this,Fk)[Fk]=!1}}dr(this,zk)[zk].style.display="",dr(this,Mk)[Mk]=!0}}hide(){dr(this,Mk)[Mk]&&dr(this,zk)[zk]&&(dr(this,zk)[zk].style.display="none",dr(this,Mk)[Mk]=!1)}destroy(){dr(this,zk)[zk]&&(dr(this,Fk)[Fk]=!0,dr(this,Dk)[Dk]&&dr(this,Dk)[Dk].unmount(),dr(this,zk)[zk].remove(),dr(this,zk)[zk]=null,dr(this,Dk)[Dk]=null,dr(this,Mk)[Mk]=!1,dr(this,Fk)[Fk]=!1,nt.info('Component with id "'.concat(this._id,'" has been destroyed.')))}toggle(e){dr(this,Mk)[Mk]?this.hide():this.show(e||this._props)}}function Uk(e){const t=document.createElement("div");t.id=this._id,this._className&&(t.className=this._className),this._rootElement.appendChild(t),dr(this,zk)[zk]=t;const n=t.attachShadow({mode:"open"}),r=document.createElement("div");r.className="".concat(this._id,"_wrapper notranslate"),n.appendChild(r);const i=(0,_u.A)({key:this._id,prepend:!0,container:n}),o=h(h({},e),{},{onClose:this.hide.bind(this)}),a=this._ReactComponent;dr(this,Dk)[Dk]=Su.createRoot(r),dr(this,Dk)[Dk].render((0,Cu.jsx)(Au.StrictMode,{children:(0,Cu.jsx)(ku.C,{value:i,children:(0,Cu.jsx)(a,h({},o))})}))}const Vk=["children","usePaper"];function Hk(e){let{children:t,usePaper:n}=e,r=er(e,Vk);return n?(0,Cu.jsx)(Pm,h(h({},r),{},{elevation:4,children:t})):(0,Cu.jsx)("div",h(h({},r),{},{children:t}))}function Gk(e){let{windowSize:{w:t,h:n},width:r,height:i,left:o,top:a,show:s=!0,snapEdge:l,onStart:c,onMove:u,handler:d,children:p,usePaper:f}=e;const[g,m]=(0,Au.useState)(!1),[v,y]=(0,Au.useState)(null),[b,w]=(0,Au.useState)({x:o,y:a}),x=(0,Au.useMemo)(()=>wn(Kn,500),[]),A=e=>{!Cc&&e.target.setPointerCapture(e.pointerId),c&&c();const{x:t,y:n}=b,{clientX:r,clientY:i}=Cc?e.targetTouches[0]:e;y({x:t,y:n,clientX:r,clientY:i})},S=e=>{u&&u();const{clientX:o,clientY:a}=Cc?e.targetTouches[0]:e;if(v){const e=o-v.clientX,s=a-v.clientY;let l=v.x+e,c=v.y+s;l=vn(l,-r/2,t-r/2),c=vn(c,0,n-i/2),w({x:l,y:c})}},k=e=>{e.stopPropagation(),y(null)};(0,Au.useEffect)(()=>{l&&!v&&w(e=>{const o=(e=>{let{x:t,y:n,width:r,height:i,windowWidth:o,windowHeight:a,hover:s}=e;const l=o-t-r,c=a-n-i;switch(Math.min(t,n,l,c)){case l:t=s?o-r:o-r/2;break;case t:t=s?0:-r/2;break;case c:n=s?a-i:a-i/2;break;default:n=s?0:-i/2}return{x:t,y:n}})(h(h({},e),{},{width:r,height:i,windowWidth:t,windowHeight:n,hover:g}));return x(o),o})},[v,g,r,i,t,n,l,x]);const _=(0,Au.useMemo)(()=>l?g||v?1:.2:v?.8:1,[v,l,g]),C=Cc?{onTouchStart:A,onTouchMove:S,onTouchEnd:k}:{onPointerDown:A,onPointerMove:S,onPointerUp:k};return(0,Cu.jsxs)(Hk,{usePaper:f,style:{opacity:_,position:"fixed",left:b.x,top:b.y,zIndex:2147483647,display:s?"block":"none"},onMouseEnter:e=>{e.stopPropagation(),m(!0)},onMouseLeave:e=>{e.stopPropagation(),m(!1)},onClick:e=>{e.stopPropagation()},children:[(0,Cu.jsx)("div",h(h({style:{touchAction:"none"}},C),{},{children:d})),(0,Cu.jsx)("div",{children:p})]})}var qk=i(1852),Kk=i(785);function $k(e){let{onClose:t,toggleTab:n,openSeparateWindow:r}=e;const i=iw();return(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"space-between",alignItems:"center",spacing:2,children:[(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"flex-start",alignItems:"center",children:[(0,Cu.jsx)(wv,{onClick:()=>{window.open("https://github.com/fishjar/kiss-translator","_blank")},children:(0,Cu.jsx)(qk.A,{})}),(0,Cu.jsx)(ay,{component:"div",sx:{userSelect:"none",WebkitUserSelect:"none",fontWeight:"bold"},children:"".concat("KISS Translator"," v").concat("2.0.20")})]}),t?(0,Cu.jsx)(wv,{onClick:()=>{t()},children:(0,Cu.jsx)(Zb.A,{})}):(0,Cu.jsxs)(Gb,{direction:"row",alignItems:"center",title:i("toggle_transbox"),children:[(0,Cu.jsx)(wv,{onClick:n,children:(0,Cu.jsx)(Kk.A,{})}),(0,Cu.jsx)(wv,{onClick:r,title:i("open_separate_window"),children:(0,Cu.jsx)($b.A,{})})]})]})}const Xk=function(){const[e,t]=(0,Au.useState)({w:window.innerWidth,h:window.innerHeight}),n=Rv(()=>{t({w:window.innerWidth,h:window.innerHeight})},200);return(0,Au.useEffect)(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[n]),e};function Yk(e){return(0,Cm.Ay)("MuiFormControlLabel",e)}const Jk=(0,_m.A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),Qk=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Zk=(0,um.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Jk.label)]:t.label},t.root,t["labelPlacement".concat((0,Sm.A)(n.labelPlacement))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(Jk.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(Jk.label)]:{["&.".concat(Jk.disabled)]:{color:(t.vars||t).palette.text.disabled}}})}),e_=(0,um.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(e=>{let{theme:t}=e;return{["&.".concat(Jk.error)]:{color:(t.vars||t).palette.error.main}}}),t_=Au.forwardRef(function(e,t){var n,r;const i=(0,dm.b)({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:c,label:u,labelPlacement:d="end",required:h,slotProps:p={}}=i,f=(0,Zn.A)(i,Qk),g=mw(),m=null!=(n=null!=l?l:s.props.disabled)?n:null==g?void 0:g.disabled,v=null!=h?h:s.props.required,y={disabled:m,required:v};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===s.props[e]&&void 0!==i[e]&&(y[e]=i[e])});const b=fw({props:i,muiFormControl:g,states:["error"]}),w=(0,am.A)({},i,{disabled:m,labelPlacement:d,required:v,error:b.error}),x=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,a={root:["root",n&&"disabled","labelPlacement".concat((0,Sm.A)(r)),i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return(0,lm.A)(a,Yk,t)})(w),A=null!=(r=p.typography)?r:a.typography;let S=u;return null==S||S.type===ay||c||(S=(0,Cu.jsx)(ay,(0,am.A)({component:"span"},A,{className:(0,sm.A)(x.label,null==A?void 0:A.className),children:S}))),(0,Cu.jsxs)(Zk,(0,am.A)({className:(0,sm.A)(x.root,o),ownerState:w,ref:t},f,{children:[Au.cloneElement(s,y),v?(0,Cu.jsxs)(Gb,{display:"block",children:[S,(0,Cu.jsxs)(e_,{ownerState:w,"aria-hidden":!0,className:x.asterisk,children:[" ","*"]})]}):S]}))});function n_(e){return(0,Cm.Ay)("PrivateSwitchBase",e)}(0,_m.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const r_=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],i_=(0,um.Ay)(gv,{name:"MuiSwitchBase"})(e=>{let{ownerState:t}=e;return(0,am.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})}),o_=(0,um.Ay)("input",{name:"MuiSwitchBase",shouldForwardProp:Pw.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),a_=Au.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:i,className:o,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:h,inputRef:p,name:f,onBlur:g,onChange:m,onFocus:v,readOnly:y,required:b=!1,tabIndex:w,type:x,value:A}=e,S=(0,Zn.A)(e,r_),[k,_]=(0,dS.A)({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),C=mw();let E=s;C&&void 0===E&&(E=C.disabled);const T="checkbox"===x||"radio"===x,I=(0,am.A)({},e,{checked:k,disabled:E,disableFocusRipple:l,edge:c}),P=(e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&"edge".concat((0,Sm.A)(i))],input:["input"]};return(0,lm.A)(o,n_,t)})(I);return(0,Cu.jsxs)(i_,(0,am.A)({component:"span",className:(0,sm.A)(P.root,o),centerRipple:!0,focusRipple:!l,disabled:E,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),C&&C.onFocus&&C.onFocus(e)},onBlur:e=>{g&&g(e),C&&C.onBlur&&C.onBlur(e)},ownerState:I,ref:t},S,{children:[(0,Cu.jsx)(o_,(0,am.A)({autoFocus:n,checked:r,defaultChecked:a,className:P.input,disabled:E,id:T?d:void 0,name:f,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;_(t),m&&m(e,t)},readOnly:y,ref:p,required:b,ownerState:I,tabIndex:w,type:x},"checkbox"===x&&void 0===A?{}:{value:A},h)),k?i:u]}))}),s_=a_;function l_(e){return(0,Cm.Ay)("MuiSwitch",e)}const c_=(0,_m.A)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),u_=["className","color","edge","size","sx"],d_=(0,um.Ay)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t["edge".concat((0,Sm.A)(n.edge))],t["size".concat((0,Sm.A)(n.size))]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,["& .".concat(c_.thumb)]:{width:16,height:16},["& .".concat(c_.switchBase)]:{padding:4,["&.".concat(c_.checked)]:{transform:"translateX(16px)"}}}}]}),h_=(0,um.Ay)(s_,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{["& .".concat(c_.input)]:t.input},"default"!==n.color&&t["color".concat((0,Sm.A)(n.color))]]}})(e=>{let{theme:t}=e;return{position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:"".concat("light"===t.palette.mode?t.palette.common.white:t.palette.grey[300]),transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),["&.".concat(c_.checked)]:{transform:"translateX(20px)"},["&.".concat(c_.disabled)]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:"".concat("light"===t.palette.mode?t.palette.grey[100]:t.palette.grey[600])},["&.".concat(c_.checked," + .").concat(c_.track)]:{opacity:.5},["&.".concat(c_.disabled," + .").concat(c_.track)]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:"".concat("light"===t.palette.mode?.12:.2)},["& .".concat(c_.input)]:{left:"-100%",width:"300%"}}},e=>{let{theme:t}=e;return{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(e=>{let[,t]=e;return t.main&&t.light}).map(e=>{let[n]=e;return{props:{color:n},style:{["&.".concat(c_.checked)]:{color:(t.vars||t).palette[n].main,"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(t.palette[n].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(c_.disabled)]:{color:t.vars?t.vars.palette.Switch["".concat(n,"DisabledColor")]:"".concat("light"===t.palette.mode?(0,cm.a)(t.palette[n].main,.62):(0,cm.e$)(t.palette[n].main,.55))}},["&.".concat(c_.checked," + .").concat(c_.track)]:{backgroundColor:(t.vars||t).palette[n].main}}}})]}}),p_=(0,um.Ay)("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(e=>{let{theme:t}=e;return{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:"".concat("light"===t.palette.mode?t.palette.common.black:t.palette.common.white),opacity:t.vars?t.vars.opacity.switchTrack:"".concat("light"===t.palette.mode?.38:.3)}}),f_=(0,um.Ay)("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(e=>{let{theme:t}=e;return{boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}}),g_=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiSwitch"}),{className:r,color:i="primary",edge:o=!1,size:a="medium",sx:s}=n,l=(0,Zn.A)(n,u_),c=(0,am.A)({},n,{color:i,edge:o,size:a}),u=(e=>{const{classes:t,edge:n,size:r,color:i,checked:o,disabled:a}=e,s={root:["root",n&&"edge".concat((0,Sm.A)(n)),"size".concat((0,Sm.A)(r))],switchBase:["switchBase","color".concat((0,Sm.A)(i)),o&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=(0,lm.A)(s,l_,t);return(0,am.A)({},t,l)})(c),d=(0,Cu.jsx)(f_,{className:u.thumb,ownerState:c});return(0,Cu.jsxs)(d_,{className:(0,sm.A)(u.root,r),sx:s,ownerState:c,children:[(0,Cu.jsx)(h_,(0,am.A)({type:"checkbox",icon:d,checkedIcon:d,ref:t,ownerState:c},l,{classes:(0,am.A)({},u,{root:u.switchBase})})),(0,Cu.jsx)(p_,{className:u.track,ownerState:c})]})});function m_(e){return(0,Cm.Ay)("MuiButton",e)}const v_=(0,_m.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const y_=Au.createContext({});const b_=Au.createContext(void 0),w_=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],x_=e=>(0,am.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),A_=(0,um.Ay)(gv,{shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,Sm.A)(n.color))],t["size".concat((0,Sm.A)(n.size))],t["".concat(n.variant,"Size").concat((0,Sm.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;const o="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],a="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,am.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,am.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,cm.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:a,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,am.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(v_.focusVisible)]:(0,am.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(v_.disabled)]:(0,am.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,cm.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:o,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})},e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(v_.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(v_.disabled)]:{boxShadow:"none"}}}),S_=(0,um.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,Sm.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,am.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},x_(t))}),k_=(0,um.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,Sm.A)(n.size))]]}})(e=>{let{ownerState:t}=e;return(0,am.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},x_(t))}),__=Au.forwardRef(function(e,t){const n=Au.useContext(y_),r=Au.useContext(b_),i=(0,Rb.A)(n,e),o=(0,dm.b)({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:g=!1,size:m="medium",startIcon:v,type:y,variant:b="text"}=o,w=(0,Zn.A)(o,w_),x=(0,am.A)({},o,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:h,fullWidth:g,size:m,type:y,variant:b}),A=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e,s={root:["root",o,"".concat(o).concat((0,Sm.A)(t)),"size".concat((0,Sm.A)(i)),"".concat(o,"Size").concat((0,Sm.A)(i)),"color".concat((0,Sm.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,Sm.A)(i))],endIcon:["icon","endIcon","iconSize".concat((0,Sm.A)(i))]},l=(0,lm.A)(s,m_,a);return(0,am.A)({},a,l)})(x),S=v&&(0,Cu.jsx)(S_,{className:A.startIcon,ownerState:x,children:v}),k=p&&(0,Cu.jsx)(k_,{className:A.endIcon,ownerState:x,children:p}),_=r||"";return(0,Cu.jsxs)(A_,(0,am.A)({ownerState:x,className:(0,sm.A)(n.className,A.root,c,_),component:l,disabled:u,focusRipple:!h,focusVisibleClassName:(0,sm.A)(A.focusVisible,f),ref:t,type:y},w,{classes:A,children:[S,a,k]}))}),C_=__;const E_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:o}=e,a=(0,qm.A)();Au.useEffect(()=>{if(i)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){e.defaultPrevented||"Escape"!==e.key&&"Esc"!==e.key||null==r||r(e,"escapeKeyDown")}},[i,r]);const s=(0,aw.A)((e,t)=>{null==r||r(e,t)}),l=(0,aw.A)(e=>{r&&null!=e&&a.start(e,()=>{s(null,"timeout")})});Au.useEffect(()=>(i&&l(t),a.clear),[i,t,l,a]);const c=a.clear,u=Au.useCallback(()=>{null!=t&&l(null!=o?o:.5*t)},[t,o,l]),d=e=>t=>{const n=e.onFocus;null==n||n(t),c()},h=e=>t=>{const n=e.onMouseEnter;null==n||n(t),c()},p=e=>t=>{const n=e.onMouseLeave;null==n||n(t),u()};return Au.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",u),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",c)}},[n,i,u,c]),{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,am.A)({},mm(e),mm(t));return(0,am.A)({role:"presentation"},t,n,{onBlur:(r=n,e=>{const t=r.onBlur;null==t||t(e),u()}),onFocus:d(n),onMouseEnter:h(n),onMouseLeave:p(n)});var r},onClickAway:e=>{null==r||r(e,"clickaway")}}};function T_(e){return e.substring(2).toLowerCase()}function I_(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,a=Au.useRef(!1),s=Au.useRef(null),l=Au.useRef(!1),c=Au.useRef(!1);Au.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=(0,hm.A)(kx(t),s),d=(0,aw.A)(e=>{const t=c.current;c.current=!1;const r=(0,sA.A)(s.current);if(!l.current||!s.current||"clientX"in e&&function(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}(e,r))return;if(a.current)return void(a.current=!1);let o;o=e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target),o||!n&&t||i(e)}),h=e=>n=>{c.current=!0;const r=t.props[e];r&&r(n)},p={ref:u};return!1!==o&&(p[o]=h(o)),Au.useEffect(()=>{if(!1!==o){const e=T_(o),t=(0,sA.A)(s.current),n=()=>{a.current=!0};return t.addEventListener(e,d),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,d),t.removeEventListener("touchmove",n)}}},[d,o]),!1!==r&&(p[r]=h(r)),Au.useEffect(()=>{if(!1!==r){const e=T_(r),t=(0,sA.A)(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),(0,Cu.jsx)(Au.Fragment,{children:Au.cloneElement(t,p)})}function P_(e){return(0,Cm.Ay)("MuiSnackbarContent",e)}(0,_m.A)("MuiSnackbarContent",["root","message","action"]);const L_=["action","className","message","role"],N_=(0,um.Ay)(Pm,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(e=>{let{theme:t}=e;const n="light"===t.palette.mode?.8:.98,r=(0,cm.tL)(t.palette.background.default,n);return(0,am.A)({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(r),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:r,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),j_=(0,um.Ay)("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),R_=(0,um.Ay)("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),O_=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiSnackbarContent"}),{action:r,className:i,message:o,role:a="alert"}=n,s=(0,Zn.A)(n,L_),l=n,c=(e=>{const{classes:t}=e;return(0,lm.A)({root:["root"],action:["action"],message:["message"]},P_,t)})(l);return(0,Cu.jsxs)(N_,(0,am.A)({role:a,square:!0,elevation:6,className:(0,sm.A)(c.root,i),ownerState:l,ref:t},s,{children:[(0,Cu.jsx)(j_,{className:c.message,ownerState:l,children:o}),r?(0,Cu.jsx)(R_,{className:c.action,ownerState:l,children:r}):null]}))});function z_(e){return(0,Cm.Ay)("MuiSnackbar",e)}(0,_m.A)("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const D_=["onEnter","onExited"],M_=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],F_=(0,um.Ay)("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["anchorOrigin".concat((0,Sm.A)(n.anchorOrigin.vertical)).concat((0,Sm.A)(n.anchorOrigin.horizontal))]]}})(e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},"top"===n.anchorOrigin.vertical?{top:8}:{bottom:8},"left"===n.anchorOrigin.horizontal&&{justifyContent:"flex-start"},"right"===n.anchorOrigin.horizontal&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:(0,am.A)({},"top"===n.anchorOrigin.vertical?{top:24}:{bottom:24},"center"===n.anchorOrigin.horizontal&&{left:"50%",right:"auto",transform:"translateX(-50%)"},"left"===n.anchorOrigin.horizontal&&{left:24,right:"auto"},"right"===n.anchorOrigin.horizontal&&{right:24,left:"auto"})})}),B_=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiSnackbar"}),r=ub(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{action:o,anchorOrigin:{vertical:a,horizontal:s}={vertical:"bottom",horizontal:"left"},autoHideDuration:l=null,children:c,className:u,ClickAwayListenerProps:d,ContentProps:h,disableWindowBlurListener:p=!1,message:f,open:g,TransitionComponent:m=aA,transitionDuration:v=i,TransitionProps:{onEnter:y,onExited:b}={}}=n,w=(0,Zn.A)(n.TransitionProps,D_),x=(0,Zn.A)(n,M_),A=(0,am.A)({},n,{anchorOrigin:{vertical:a,horizontal:s},autoHideDuration:l,disableWindowBlurListener:p,TransitionComponent:m,transitionDuration:v}),S=(e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root","anchorOrigin".concat((0,Sm.A)(n.vertical)).concat((0,Sm.A)(n.horizontal))]};return(0,lm.A)(r,z_,t)})(A),{getRootProps:k,onClickAway:_}=E_((0,am.A)({},A)),[C,E]=Au.useState(!0),T=Ex({elementType:F_,getSlotProps:k,externalForwardedProps:x,ownerState:A,additionalProps:{ref:t},className:[S.root,u]});return!g&&C?null:(0,Cu.jsx)(I_,(0,am.A)({onClickAway:_},d,{children:(0,Cu.jsx)(F_,(0,am.A)({},T,{children:(0,Cu.jsx)(m,(0,am.A)({appear:!0,in:g,timeout:v,direction:"top"===a?"down":"up",onEnter:(e,t)=>{E(!1),y&&y(e,t)},onExited:e=>{E(!0),b&&b(e)}},w,{children:c||(0,Cu.jsx)(O_,(0,am.A)({message:f,action:o},h))}))}))}))}),W_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:45;if(e.length<=t)return e;const n=t-3,r=Math.ceil(n/2),i=Math.floor(n/2);return"".concat(e.slice(0,r)).concat("...").concat(e.slice(-i))},U_=e=>{if(!e||"string"!=typeof e)return[];try{if(e.startsWith("file"))return(e=>{const t=e.replace(/^file:\/\//,""),n=t.substring(t.lastIndexOf("/")+1),r=t.substring(0,t.lastIndexOf("/")),i=n.includes(".")?n.substring(n.lastIndexOf(".")):"",o=[];if(t)try{o.push(decodeURIComponent(t))}catch(e){o.push(t)}if(r&&o.push("".concat(r,"/*")),i&&o.push("*".concat(i)),n&&n!==t)try{o.push(decodeURIComponent(n))}catch(e){o.push(n)}return o})(e);if(!e.startsWith("http"))return[];const t=new URL(e),{hostname:n,port:r,protocol:i}=t,o="https:"===i?"443":"80",a=(e=>{if((e=>{const t=/^(\d{1,3}\.){3}\d{1,3}$/.test(e),n=e.includes(":");return t||n})(e))return[e];const t=e.split(".");if(t.length<=1)return[e];if(2===t.length)return[e,"*.".concat(e)];const n=[e],r=t.slice(-2).join(".");for(let e=1;e<=t.length-2;e++){const i="*.".repeat(e),o=t.slice(e).join(".");o===r&&1!==e||n.push("".concat(i).concat(o))}return n})(n);if(r&&r!==o){const e=a[0];return["".concat(e,":").concat(r),"".concat(e,":*"),e,...a.slice(1)]}return a}catch(e){return[]}};function V_(){const{customStyles:e,updateSetting:t}=function(){const{setting:e,updateSetting:t}=_y();return{customStyles:(null==e?void 0:e.customStyles)||[],updateSetting:t}}();return{customStyles:e,addStyle:(0,Au.useCallback)(()=>{const e=Ue[0],n=crypto.randomUUID(),r="custom_".concat(crypto.randomUUID()),i="Style_".concat(n.slice(0,8)),o=h(h({},e),{},{styleSlug:r,styleName:i});t(e=>h(h({},e),{},{customStyles:[...(null==e?void 0:e.customStyles)||[],o]}))},[t]),deleteStyle:(0,Au.useCallback)(e=>{t(t=>h(h({},t),{},{customStyles:((null==t?void 0:t.customStyles)||[]).filter(t=>t.styleSlug!==e)}))},[t]),updateStyle:(0,Au.useCallback)((e,n)=>{t(t=>h(h({},t),{},{customStyles:((null==t?void 0:t.customStyles)||[]).map(t=>t.styleSlug===e?h(h({},t),n):t)}))},[t])}}function H_(e){let{rule:t,setting:n,setRule:r,setSetting:i,handleOpenSetting:o,processActions:a,isContent:s=!1}=e;const l=iw(),[c,u]=(0,Au.useState)({}),[d,p]=(0,Au.useState)([]),[f,g]=(0,Au.useState)(""),[m,v]=(0,Au.useState)({open:!1,message:""}),{allTextStyles:y}=function(){const{customStyles:e}=V_(),t=iw(),n=(0,Au.useMemo)(()=>We.map(e=>({styleSlug:e,styleName:t(e),styleCode:Dh[e]||""})),[t]),r=(0,Au.useMemo)(()=>[...n,...e],[n,e]);return{builtinStyles:n,customStyles:e,allTextStyles:r}}(),b=async e=>{try{let{name:t,value:n,checked:i}=e.target;"isPlainText"===t&&(n=i),r(e=>h(h({},e),{},{[t]:n})),a?a({action:Zt,args:{[t]:n}}):await ur(Zt,{[t]:n})}catch(e){rt("update rule",e)}};(0,Au.useEffect)(()=>{(async()=>{try{let t="";if(s){var e;t=null===(e=window.location)||void 0===e?void 0:e.href}else{t=(await lr()).url}if(t&&"string"==typeof t){const e=U_(t);p(e),e.length>0&&g(e[0])}}catch(e){rt("get domain options",e)}})()},[s]),(0,Au.useEffect)(()=>{(async()=>{try{const e={};if(dn){(await cr("command_shortcuts")).forEach(t=>{let{name:n,shortcut:r}=t;e[n]=r})}else{const t=n.shortcuts;t&&Object.entries(t).forEach(t=>{let[n,r]=t;e[n]=r.join("+")})}u(e)}catch(e){rt("query cmds",e)}})()},[n.shortcuts]);const w=(0,Au.useMemo)(()=>n.transApis.filter(e=>!e.isDisabled).sort((e,t)=>(e.sortOrder||0)-(t.sortOrder||0)).map(e=>({key:e.apiSlug,name:e.apiName||e.apiSlug})),[n.transApis]),x=n.tranboxSetting.transOpen,A=n.mouseHoverSetting.useMouseHover,S=n.inputRule.transOpen,{transOpen:k,apiSlug:_,fromLang:C,toLang:E,textStyle:T,autoScan:I,transOnly:P,hasRichText:L,scanAll:N,isPlainText:j=!1}=t;return(0,Cu.jsxs)(Gb,{sx:{p:2},spacing:2,children:[(0,Cu.jsxs)(nk,{container:!0,columns:12,spacing:1,children:[(0,Cu.jsx)(nk,{item:!0,xs:12,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{checked:"true"===k,onChange:async e=>{try{r(h(h({},t),{},{transOpen:e.target.checked?"true":"false"})),a?a({action:Yt}):await ur(Yt)}catch(e){rt("toggle trans",e)}}}),label:c.toggleTranslate?"".concat(l("translate_alt"),"(").concat(c.toggleTranslate,")"):l("translate_alt")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"autoScan",value:"true"===I?"false":"true",checked:"true"===I,onChange:b}),label:l("autoscan_alt")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"scanAll",value:"true"===N?"false":"true",checked:"true"===N,onChange:b}),label:l("scan_all_nodes")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"hasRichText",value:"true"===L?"false":"true",checked:"true"===L,onChange:b}),label:l("richtext_alt")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"transOnly",value:"true"===P?"false":"true",checked:"true"===P,onChange:b}),label:l("transonly_alt")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"tranboxEnabled",value:!x,checked:x,onChange:async e=>{try{i(t=>h(h({},t),{},{tranboxSetting:h(h({},t.tranboxSetting),{},{transOpen:e.target.checked})})),a?a({action:en}):await ur(en)}catch(e){rt("toggle transbox",e)}}}),label:l("selection_translate")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"mouseHoverEnabled",value:!A,checked:A,onChange:async e=>{try{i(t=>h(h({},t),{},{mouseHoverSetting:h(h({},t.mouseHoverSetting),{},{useMouseHover:e.target.checked})})),a?a({action:nn}):await ur(nn)}catch(e){rt("toggle mousehover",e)}}}),label:l("mousehover_translate")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"inputTransEnabled",value:!S,checked:S,onChange:async e=>{try{i(t=>h(h({},t),{},{inputRule:h(h({},t.inputRule),{},{transOpen:e.target.checked})})),a?a({action:rn}):await ur(rn)}catch(e){rt("toggle inputtrans",e)}}}),label:l("input_translate")})}),(0,Cu.jsx)(nk,{item:!0,xs:6,children:(0,Cu.jsx)(t_,{control:(0,Cu.jsx)(g_,{size:"small",name:"isPlainText",value:!j,checked:j,onChange:b}),label:l("plain_text_translate")})})]}),(0,Cu.jsxs)(Gb,{direction:"row",spacing:2,children:[(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:C,name:"fromLang",label:l("from_lang"),onChange:b,fullWidth:!0,children:se.map(e=>{let[t,n]=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})}),(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:E,name:"toLang",label:l("to_lang"),onChange:b,fullWidth:!0,children:oe.map(e=>{let[t,n]=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})})]}),(0,Cu.jsxs)(Gb,{direction:"row",spacing:2,children:[(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:_,name:"apiSlug",label:l("translate_service"),onChange:b,fullWidth:!0,children:w.map(e=>{let{key:t,name:n}=e;return(0,Cu.jsx)(HS,{value:t,children:n},t)})}),(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:T,name:"textStyle",label:c.toggleStyle?"".concat(l("text_style_alt"),"(").concat(c.toggleStyle,")"):l("text_style_alt"),onChange:b,fullWidth:!0,children:y.map(e=>(0,Cu.jsx)(HS,{value:e.styleSlug,children:e.styleName},e.styleSlug))})]}),(0,Cu.jsxs)(Gb,{children:[(0,Cu.jsx)(DS,{select:!0,SelectProps:{MenuProps:{disablePortal:!0}},size:"small",value:f,label:l("domain"),onChange:e=>g(e.target.value),fullWidth:!0,sx:{mb:1},children:d.map(e=>(0,Cu.jsx)(HS,{value:e,title:e,children:W_(e)},e))}),(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Cu.jsx)(C_,{variant:"text",onClick:async()=>{try{if(!f)return;const e=h(h({},t),{},{pattern:f});dn&&s?cr("save_rule",e):(async e=>{const t=await Un(),n=t.findIndex(t=>t.pattern!==Ve&&An(e.pattern,t.pattern));if(-1!==n){const r=t.splice(n,1)[0];e=h(h(h({},r),e),{},{pattern:r.pattern,selector:r.selector,keepSelector:r.keepSelector,rootsSelector:r.rootsSelector,ignoreSelector:r.ignoreSelector})}const r={},i=h(h({},Ze),t.find(e=>e.pattern===Ve)||{});Object.keys(Ze).forEach(t=>{r[t]=e[t]&&e[t]!==i[t]?e[t]:Qe[t]}),t.unshift(r),await Vn(t),wc()})(e),v({open:!0,message:"".concat(l("save_rule"),": ").concat(f)})}catch(e){rt("save rule",e)}},disabled:0===d.length,children:l("save_rule")}),(0,Cu.jsx)(C_,{variant:"text",onClick:()=>{(async()=>{try{dn&&!fn()?await cr("clear_caches"):await caches.delete(Vt)}catch(e){rt("clean caches",e)}})()},children:l("clear_cache")})]}),(0,Cu.jsxs)(Gb,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,Cu.jsx)(C_,{variant:"text",onClick:()=>{window.open("https://chromewebstore.google.com/detail/kiss-translator/bdiifdefkgmcblbcghdlonllpjhhjgof/reviews","_blank")},children:l("comment_support")}),(0,Cu.jsx)(C_,{variant:"text",onClick:()=>{window.open("https://github.com/fishjar/kiss-translator#%E8%B5%9E%E8%B5%8F","_blank")},children:l("appreciate_support")}),(0,Cu.jsx)(C_,{variant:"text",onClick:o,children:l("setting")})]})]}),(0,Cu.jsx)(B_,{open:m.open,autoHideDuration:3e3,onClose:()=>v({open:!1,message:""}),anchorOrigin:{vertical:"top",horizontal:"center"},children:(0,Cu.jsx)(jv,{onClose:()=>v({open:!1,message:""}),severity:"success",variant:"filled",sx:{width:"100%"},children:m.message})})]})}function G_(e){let{translator:t,processActions:n}=e;const[r,i]=(0,Au.useState)(!0),[o,a]=(0,Au.useState)(t.rule),[s,l]=(0,Au.useState)(t.setting),c=Xk(),u=(0,Au.useCallback)(()=>{dn?cr("open_options"):window.open("https://fishjar.github.io/kiss-translator/options.html","_blank")},[]);(0,Au.useEffect)(()=>{const e=()=>{i(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}},[]),(0,Au.useEffect)(()=>{const e=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.action)===tn&&i(e=>!e)};return document.addEventListener(an,e),()=>{document.removeEventListener(an,e)}},[]),(0,Au.useEffect)(()=>{r&&(a(t.rule),l(t.setting))},[r,t]);const d=(0,Au.useMemo)(()=>{const e=Math.min(c.w,360),t=Math.min(c.h,442),n=(c.w-e)/2,r=(c.h-t)/2;return{windowSize:c,width:e,height:t,left:n,top:r}},[c]);return(0,Cu.jsx)(ky,{context:"contentPopup",children:(0,Cu.jsx)(nb,{children:r&&(0,Cu.jsx)(Gk,h(h({},d),{},{usePaper:!0,handler:(0,Cu.jsxs)(cb,{style:{cursor:"move"},children:[(0,Cu.jsx)($k,{onClose:()=>{i(!1)}}),(0,Cu.jsx)(xy,{})]}),children:(0,Cu.jsx)(cb,{width:360,children:(0,Cu.jsx)(H_,{rule:o,setting:s,setRule:a,setSetting:l,handleOpenSetting:u,processActions:n,isContent:!0})})}),"pop")})})}class q_ extends Wk{constructor(e){let{translator:t,processActions:n}=e;super({id:r.popupID,className:"notranslate",reactComponent:G_,props:{translator:t,processActions:n}})}toggle(e){this.isVisible?document.dispatchEvent(new CustomEvent(an,{detail:{action:tn}})):this.show(e||this._props)}}function K_(e){return(0,Cm.Ay)("MuiFab",e)}const $_=(0,_m.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),X_=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],Y_=(0,um.Ay)(gv,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,Pw.A)(e)||"classes"===e,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["size".concat((0,Sm.A)(n.size))],"inherit"===n.color&&t.colorInherit,t[(0,Sm.A)(n.size)],t[n.color]]}})(e=>{let{theme:t,ownerState:n}=e;var r,i;return(0,am.A)({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:null==(r=(i=t.palette).getContrastText)?void 0:r.call(i,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},["&.".concat($_.focusVisible)]:{boxShadow:(t.vars||t).shadows[6]}},"small"===n.size&&{width:40,height:40},"medium"===n.size&&{width:48,height:48},"extended"===n.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===n.variant&&"small"===n.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===n.variant&&"medium"===n.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===n.color&&{color:"inherit"})},e=>{let{theme:t,ownerState:n}=e;return(0,am.A)({},"inherit"!==n.color&&"default"!==n.color&&null!=(t.vars||t).palette[n.color]&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}})},e=>{let{theme:t}=e;return{["&.".concat($_.disabled)]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}}),J_=Au.forwardRef(function(e,t){const n=(0,dm.b)({props:e,name:"MuiFab"}),{children:r,className:i,color:o="default",component:a="button",disabled:s=!1,disableFocusRipple:l=!1,focusVisibleClassName:c,size:u="large",variant:d="circular"}=n,h=(0,Zn.A)(n,X_),p=(0,am.A)({},n,{color:o,component:a,disabled:s,disableFocusRipple:l,size:u,variant:d}),f=(e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,"size".concat((0,Sm.A)(i)),"inherit"===t?"colorInherit":t]},a=(0,lm.A)(o,K_,r);return(0,am.A)({},r,a)})(p);return(0,Cu.jsx)(Y_,(0,am.A)({className:(0,sm.A)(f.root,i),component:a,disabled:s,focusRipple:!l,focusVisibleClassName:(0,sm.A)(f.focusVisible,c),ownerState:p,ref:t},h,{classes:f,children:r}))});var Q_=i(609);function Z_(e){let{fabConfig:{x:t,y:n,fabClickAction:r=0}={},processActions:i}=e;const o=Xk(),[a,s]=(0,Au.useState)(!1),l=(0,Au.useCallback)(()=>{s(!1)},[]),c=(0,Au.useCallback)(()=>{s(!0)},[]),u=(0,Au.useCallback)(()=>{a||i(1===r?{action:Yt}:{action:tn})},[a,r,i]),d=(0,Au.useMemo)(()=>({windowSize:o,width:40,height:40,left:null!=t?t:-40,top:null!=n?n:o.h/2}),[o,40,t,n]);return(0,Cu.jsx)(ky,{context:"fab",children:(0,Cu.jsx)(nb,{children:(0,Cu.jsx)(Gk,h(h({snapEdge:!0},d),{},{onStart:l,onMove:c,handler:(0,Cu.jsx)(J_,{size:"small",color:"primary",onClick:u,children:(0,Cu.jsx)(Q_.A,{sx:{width:24,height:24}})})}),"fab")})})}class eC extends Wk{constructor(e){let{processActions:t,fabConfig:n}=e;super({id:r.fabID,className:"notranslate",reactComponent:Z_,props:{processActions:t,fabConfig:n}}),null!=n&&n.isHide||this.show()}}var tC=pr("clearShortcuts"),nC=pr("menuCommandIds"),rC=pr("clearTouchListeners"),iC=pr("isActive"),oC=pr("isUserscript"),aC=pr("isIframe"),sC=pr("innerMessageHandler"),lC=pr("browserMessageHandler"),cC=pr("windowMessageHandler"),uC=pr("setupMessageListeners"),dC=pr("setupTouchOperations"),hC=pr("handleWindowMessage"),pC=pr("handleInnerMessage"),fC=pr("handleBrowserMessage"),gC=pr("registerShortcuts"),mC=pr("registerMenus"),vC=pr("processActions");class yC{constructor(e){let{setting:t,rule:n,fabConfig:r,favWords:i,isIframe:o,isUserscript:a}=e;Object.defineProperty(this,vC,{value:CC}),Object.defineProperty(this,mC,{value:_C}),Object.defineProperty(this,gC,{value:kC}),Object.defineProperty(this,fC,{value:SC}),Object.defineProperty(this,pC,{value:AC}),Object.defineProperty(this,hC,{value:xC}),Object.defineProperty(this,dC,{value:wC}),Object.defineProperty(this,uC,{value:bC}),Object.defineProperty(this,tC,{writable:!0,value:[]}),Object.defineProperty(this,nC,{writable:!0,value:[]}),Object.defineProperty(this,rC,{writable:!0,value:[]}),Object.defineProperty(this,iC,{writable:!0,value:!1}),Object.defineProperty(this,oC,{writable:!0,value:void 0}),Object.defineProperty(this,aC,{writable:!0,value:void 0}),Object.defineProperty(this,sC,{writable:!0,value:null}),Object.defineProperty(this,lC,{writable:!0,value:null}),Object.defineProperty(this,cC,{writable:!0,value:null}),dr(this,aC)[aC]=o,dr(this,oC)[oC]=a,this._translator=new Rf({rule:n,setting:t,favWords:i,isUserscript:a,isIframe:o}),this._transboxManager=new Ok(t),o||(this._inputTranslator=new im(t),this._popupManager=new q_({translator:this._translator,processActions:dr(this,vC)[vC].bind(this)}),this._fabManager=new eC({processActions:dr(this,vC)[vC].bind(this),fabConfig:r})),dr(this,sC)[sC]=dr(this,pC)[pC].bind(this),dr(this,lC)[lC]=dr(this,fC)[fC].bind(this),dr(this,cC)[cC]=dr(this,hC)[hC].bind(this)}start(){dr(this,iC)[iC]?nt.info("TranslatorManager is already started."):(dr(this,uC)[uC](),dr(this,dC)[dC](),!dr(this,aC)[aC]&&dr(this,oC)[oC]&&(dr(this,gC)[gC](),dr(this,mC)[mC]()),dr(this,iC)[iC]=!0,nt.info("TranslatorManager started."))}stop(){var e,t,n,r;dr(this,iC)[iC]?(window.removeEventListener(sn,dr(this,sC)[sC]),dr(this,oC)[oC]?window.removeEventListener("message",dr(this,sC)[sC]):(hn.runtime.onMessage.removeListener(dr(this,lC)[lC]),dr(this,aC)[aC]&&window.removeEventListener("message",dr(this,sC)[sC])),dr(this,tC)[tC].forEach(e=>e()),dr(this,tC)[tC]=[],dr(this,rC)[rC].forEach(e=>e()),dr(this,rC)[rC]=[],globalThis.GM&&dr(this,nC)[nC].length>0&&(dr(this,nC)[nC].forEach(e=>{var t,n;return null===(t=(n=GM).unregisterMenuCommand)||void 0===t?void 0:t.call(n,e)}),dr(this,nC)[nC]=[]),null===(e=this._popupManager)||void 0===e||e.destroy(),null===(t=this._fabManager)||void 0===t||t.destroy(),null===(n=this._transboxManager)||void 0===n||n.disable(),null===(r=this._inputTranslator)||void 0===r||r.disable(),this._translator.stop(),dr(this,iC)[iC]=!1,nt.info("TranslatorManager stopped.")):nt.info("TranslatorManager is not running.")}}function bC(){dr(this,oC)[oC]?window.addEventListener("message",dr(this,sC)[sC]):(hn.runtime.onMessage.addListener(dr(this,lC)[lC]),dr(this,aC)[aC]&&window.addEventListener("message",dr(this,sC)[sC])),window.addEventListener(sn,dr(this,cC)[cC])}function wC(){if(dr(this,aC)[aC])return;const{touchModes:e=[2]}=this._translator.setting;if(0===e.length)return;const t=()=>{dr(this,vC)[vC]({action:Yt})},n=e=>{let n=null;switch(e){case 2:case 3:case 4:n={taps:1,fingers:e};break;case 5:n={taps:2,fingers:1};break;case 6:n={taps:3,fingers:1};break;case 7:n={taps:2,fingers:2}}n&&dr(this,rC)[rC].push(function(e){const t=h({taps:2,fingers:1,delay:300},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});let n=0,r=0,i=null;const o=e=>{n=Math.max(n,e.touches.length)},a=o=>{0===o.touches.length&&(n===t.fingers?(r++,clearTimeout(i),r===t.taps?(e(o),r=0):i=setTimeout(()=>{r=0},t.delay)):(r=0,clearTimeout(i)),n=0)};return document.addEventListener("touchstart",o,{passive:!0}),document.addEventListener("touchend",a,{passive:!0}),()=>{clearTimeout(i),document.removeEventListener("touchstart",o),document.removeEventListener("touchend",a)}}(t,n))};e.forEach(e=>n(e))}function xC(e){nt.debug("handle window message:",e),dr(this,vC)[vC](e.detail)}function AC(e){dr(this,vC)[vC](e.data)}function SC(e,t,n){return n(dr(this,vC)[vC](e,!0)||{rule:this._translator.rule,setting:this._translator.setting}),!0}function kC(){const{shortcuts:e}=this._translator.setting;dr(this,tC)[tC]=[Mh(e[it],()=>dr(this,vC)[vC]({action:Yt})),Mh(e[ot],()=>dr(this,vC)[vC]({action:Jt})),Mh(e[at],()=>dr(this,vC)[vC]({action:tn})),Mh(e[st],()=>window.open("https://fishjar.github.io/kiss-translator/options.html","_blank"))]}function _C(){var e,t,n,r,i,o,a,s;if(!globalThis.GM)return;const{contextMenuType:l,uiLang:c}=this._translator.setting;if(0===l)return;const u=Lt(c||"zh");dr(this,nC)[nC]=[null===(e=(t=GM).registerMenuCommand)||void 0===e?void 0:e.call(t,u("translate_switch"),()=>dr(this,vC)[vC]({action:Yt}),"Q"),null===(n=(r=GM).registerMenuCommand)||void 0===n?void 0:n.call(r,u("toggle_style"),()=>dr(this,vC)[vC]({action:Jt}),"C"),null===(i=(o=GM).registerMenuCommand)||void 0===i?void 0:i.call(o,u("open_menu"),()=>dr(this,vC)[vC]({action:tn}),"K"),null===(a=(s=GM).registerMenuCommand)||void 0===a?void 0:a.call(s,u("open_setting"),()=>window.open("https://fishjar.github.io/kiss-translator/options.html","_blank"),"O")]}function CC(){var e,t,n;let{action:r,args:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r)switch(arguments.length>1&&void 0!==arguments[1]&&arguments[1]||((e,t)=>{document.querySelectorAll("iframe").forEach(n=>{n.contentWindow.postMessage({action:e,args:t},"*")})})(r,i),nt.debug("process action:",r,i),r){case Yt:this._translator.toggle();break;case Jt:this._translator.toggleStyle();break;case"trans_getrule":break;case Zt:this._translator.updateRule(i);break;case Qt:document.dispatchEvent(new CustomEvent(an,{detail:{action:Qt}}));break;case tn:null===(e=this._popupManager)||void 0===e||e.toggle();break;case en:null===(t=this._transboxManager)||void 0===t||t.toggle(),this._translator.toggleTransbox();break;case nn:this._translator.toggleMouseHover();break;case rn:null===(n=this._inputTranslator)||void 0===n||n.toggle(),this._translator.toggleInputTranslate();break;case"toggle_hover_node":this._translator.toggleHoverNode();break;case"input_translate":this._inputTranslator.handleTranslate();break;default:return nt.info("Message action is unavailable: ".concat(r)),{error:"Message action is unavailable: ".concat(r)}}}!async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{var t,n,r,i;const o=await Wn();nt.setLevel(o.logLevel);const a=(null===(t=document)||void 0===t||null===(n=t.contentType)||void 0===n?void 0:n.toLowerCase())||"";if(!a.includes("text")&&!a.includes("html"))return void nt.info("Skip running in document content type: ",a);const s=(null===(r=document)||void 0===r||null===(i=r.location)||void 0===i?void 0:i.href)||"";if(e&&(globalThis.GM||(globalThis.GM={xmlHttpRequest:globalThis.GM_xmlhttpRequest,registerMenuCommand:globalThis.GM_registerMenuCommand,unregisterMenuCommand:globalThis.GM_unregisterMenuCommand,setValue:globalThis.GM_setValue,getValue:globalThis.GM_getValue,deleteValue:globalThis.GM_deleteValue,info:globalThis.GM_info}),s.includes("http://localhost:3000/options.html")||s.includes("https://fishjar.github.io/kiss-translator/options.html")))return void function(){var e,t,n;if(null!==(e=GM.info)&&void 0!==e&&null!==(t=e.script)&&void 0!==t&&null!==(n=t.grant)&&void 0!==n&&n.includes("unsafeWindow"))unsafeWindow.GM=GM,unsafeWindow.APP_INFO={name:"KISS Translator",version:"2.0.20"};else{const e=_n();window.addEventListener(e,_i),ph("(".concat(ki,')("').concat(e,'")'),"kiss-translator-options-injector")}}();if(((e,t)=>{let{blacklist:n}=t;return n.split(/\n|,/).some(t=>An(e,t.trim()))})(s,o))return;const l=await Sc(s,o),c=await async function(e){if(e.highlightWords&&e.highlightWords!==$e)try{return Object.keys(await Hn())}catch(e){nt.info("get fav words",e)}return[]}(l),u=await qn();if(new yC({setting:o,rule:l,fabConfig:u,favWords:c,isIframe:Qn,isUserscript:e}).start(),Qn)return;!function(e){let{href:t,setting:n}=e;try{const e=n.subtitleSetting||wt;if(!e.enabled)return;const r=yh.find(e=>An(t,e.pattern));if(r){vh(fh,"kiss-translator-inject-subtitle-js");const t=n.transApis.find(t=>t.apiSlug===e.apiSlug)||Ae;r.start(h(h({},e),{},{apiSetting:t,transApis:n.transApis,uiLang:n.uiLang}))}}catch(e){nt.error("start subtitle provider",e)}}({href:s,setting:o,rule:l,isUserscript:e}),e&&qo(o)}catch(e){console.error("[KISS-Translator]",e),function(e){const t="KISS-Translator-Message",n=document.getElementById(t);n&&n.remove();const r=document.createElement("div");r.id=t,Object.assign(r.style,{position:"fixed",top:"0",left:"0",width:"100%",backgroundColor:"#f44336",color:"white",textAlign:"center",padding:"8px 16px",zIndex:"1001",boxSizing:"border-box",fontSize:"16px",boxShadow:"0 2px 5px rgba(0,0,0,0.2)"});const i=document.createElement("span");i.textContent="×",Object.assign(i.style,{position:"absolute",top:"50%",right:"20px",transform:"translateY(-50%)",cursor:"pointer",fontSize:"22px",fontWeight:"bold"});const o=document.createTextNode("KISS-Translator: ".concat(e));r.appendChild(o),r.appendChild(i),document.body.appendChild(r);const a=()=>{r.style.transition="opacity 0.5s ease",r.style.opacity="0",setTimeout(()=>{r&&r.parentNode&&r.parentNode.removeChild(r)},500)};i.onclick=a,setTimeout(a,1e4)}(e.message)}}(!0)})()})();