@forsion/extend 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +4 -2
- package/SIGNATURE +6 -6
- package/dist/main.js +99 -49
- package/manifest.json +3 -3
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
"use strict";var __fxExtend=(()=>{var lr=Object.defineProperty;var
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Es(t,e){return Ss(t)||As(t,e)||Cs(t,e)||Ts()}function Cs(t,e){if(t){if(typeof t=="string")return Io(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Io(t,e):void 0}}function pn(t){var e,n;function r(i,s){try{var l=t[i](s),u=l.value,d=u instanceof _s;Promise.resolve(d?u.v:u).then(function(p){if(d){var m=i==="return"&&u.k?i:"next";if(!u.k||p.done)return r(m,p);p=t[m](p).value}o(!!l.done,p)},function(p){r("throw",p)})}catch(p){o(2,p)}}function o(i,s){i===2?e.reject(s):e.resolve({value:s,done:i}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(i,s){return new Promise(function(l,u){var d={key:i,arg:s,resolve:l,reject:u,next:null};n?n=n.next=d:(e=n=d,r(i,s))})},typeof t.return!="function"&&(this.return=void 0)}pn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},pn.prototype.next=function(t){return this._invoke("next",t)},pn.prototype.throw=function(t){return this._invoke("throw",t)},pn.prototype.return=function(t){return this._invoke("return",t)};var Go=Object.entries,Do=Object.setPrototypeOf,Rs=Object.isFrozen,Ps=Object.getPrototypeOf,Ms=Object.getOwnPropertyDescriptor,le=Object.freeze,ce=Object.seal,Tt=Object.create,Yo=typeof Reflect<"u"&&Reflect,hr=Yo.apply,gr=Yo.construct;le||(le=function(e){return e});ce||(ce=function(e){return e});hr||(hr=function(e,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return e.apply(n,o)});gr||(gr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new e(...r)});var it=ie(Array.prototype.forEach);Array.prototype.indexOf;var Ls=ie(Array.prototype.lastIndexOf),No=ie(Array.prototype.pop),Ot=ie(Array.prototype.push);Array.prototype.slice;var Is=ie(Array.prototype.splice),Et=Array.isArray,Bt=ie(String.prototype.toLowerCase),cr=ie(String.prototype.toString),Oo=ie(String.prototype.match),zt=ie(String.prototype.replace),zo=ie(String.prototype.indexOf),Ds=ie(String.prototype.trim),Ns=ie(Number.prototype.toString),Os=ie(Boolean.prototype.toString),Fo=typeof BigInt>"u"?null:ie(BigInt.prototype.toString),Bo=typeof Symbol>"u"?null:ie(Symbol.prototype.toString),be=ie(Object.prototype.hasOwnProperty),Ft=ie(Object.prototype.toString),fe=ie(RegExp.prototype.test),je=zs(TypeError);function ie(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return hr(t,e,r)}}function zs(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return gr(t,n)}}function O(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bt;if(Do&&Do(t,null),!Et(e))return t;let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){let i=n(o);i!==o&&(Rs(e)||(e[r]=i),o=i)}t[o]=!0}return t}function Fs(t){for(let e=0;e<t.length;e++)be(t,e)||(t[e]=null);return t}function we(t){let e=Tt(null);for(let r of Go(t)){var n=Es(r,2);let o=n[0],i=n[1];be(t,o)&&(Et(i)?e[o]=Fs(i):i&&typeof i=="object"&&i.constructor===Object?e[o]=we(i):e[o]=i)}return e}function Bs(t){switch(typeof t){case"string":return t;case"number":return Ns(t);case"boolean":return Os(t);case"bigint":return Fo?Fo(t):"0";case"symbol":return Bo?Bo(t):"Symbol()";case"undefined":return Ft(t);case"function":case"object":{if(t===null)return Ft(t);let e=t,n=Ae(e,"toString");if(typeof n=="function"){let r=n(e);return typeof r=="string"?r:Ft(r)}return Ft(t)}default:return Ft(t)}}function Ae(t,e){for(;t!==null;){let r=Ms(t,e);if(r){if(r.get)return ie(r.get);if(typeof r.value=="function")return ie(r.value)}t=Ps(t)}function n(){return null}return n}function $s(t){try{return fe(t,""),!0}catch{return!1}}var $o=le(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ur=le(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),dr=le(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Us=le(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fr=le(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qs=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Uo=le(["#text"]),qo=le(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pr=le(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ho=le(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mn=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Hs=ce(/{{[\w\W]*|^[\w\W]*}}/g),Ws=ce(/<%[\w\W]*|^[\w\W]*%>/g),Xs=ce(/\${[\w\W]*/g),js=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vs=ce(/^aria-[\-\w]+$/),Wo=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gs=ce(/^(?:\w+script|data):/i),Ys=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Js=ce(/^html$/i),Zs=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),Xo=ce(/<[/\w!]/g),jo=ce(/<[/\w]/g),Ks=ce(/<\/no(script|embed|frames)/i),Qs=ce(/\/>/i),ve={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Jo=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],el=le(O({},Jo)),tl=(function(){let t={};return it(Jo,e=>{t[e]=ce(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),le(t)})(),nl=function(){return typeof window>"u"?null:window},rl=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},Vo=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ve=function(e,n,r,o){return be(e,n)&&Et(e[n])?O(o.base?we(o.base):{},e[n],o.transform):r},mr=function(e,n,r){let o=be(e,n)?e[n]:void 0;return o&&typeof o=="object"?we(o):r()};function Zo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nl(),e=w=>Zo(w);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==ve.document||!t.Element)return e.isSupported=!1,e;let n=t.document,r=n,o=r.currentScript;t.DocumentFragment;let i=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let d=t.DOMParser,p=t.trustedTypes,m=l.prototype,f=Ae(m,"cloneNode"),g=Ae(m,"remove"),b=Ae(m,"removeAttributeNode"),v=Ae(m,"nextSibling"),k=Ae(m,"childNodes"),T=Ae(m,"parentNode"),x=Ae(m,"shadowRoot"),_=Ae(m,"attributes"),A=s&&s.prototype?Ae(s.prototype,"nodeType"):null,R=s&&s.prototype?Ae(s.prototype,"nodeName"):null,N=s&&s.prototype?Ae(s.prototype,"ownerDocument"):null,G=function(c){return A?A(c):c.nodeType},z=function(c){return R?R(c):c.nodeName};if(typeof i=="function"){let w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}let H,re="",pe,Pe=!1,Oe=0,gt=function(){if(Oe>0)throw je('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},bt=function(c){gt(),Oe++;try{return H.createHTML(c)}finally{Oe--}},Ha=function(c){gt(),Oe++;try{return H.createScriptURL(c)}finally{Oe--}},Wa=function(){return Pe||(pe=rl(p,o),Pe=!0),pe},Qt=n,jn=Qt.implementation,no=Qt.createNodeIterator,Xa=Qt.createDocumentFragment,ja=Qt.getElementsByTagName,Va=r.importNode,Y=Vo();e.isSupported=typeof Go=="function"&&typeof T=="function"&&jn&&jn.createHTMLDocument!==void 0;let Ga=Hs,Ya=Ws,Ja=Xs,Za=js,Ka=Vs,Qa=Gs,ro=Ys,es=Zs,oo=Wo,J=null,Vn=O({},[...$o,...ur,...dr,...fr,...Uo]),Z=null,Gn=O({},[...qo,...pr,...Ho,...mn]),Me=Object.seal(Tt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),It=null,io=null,He=Object.seal(Tt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ao=!0,Yn=!0,so=!1,lo=!0,We=!1,nt=!0,rt=!1,Jn=!1,en=null,tn=null,Zn=!1,xt=!1,nn=!1,rn=!1,co=!0,uo=!1,fo="user-content-",Kn=!0,Qn=!1,yt={},vt=null,po=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),mo=null,ho=O({},["audio","video","img","source","image","track"]),go=null,bo=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),on="http://www.w3.org/1998/Math/MathML",an="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml",wt=Le,er=!1,tr=null,ts=O({},[on,an,Le],cr),xo=le(["mi","mo","mn","ms","mtext"]),nr=O({},xo),yo=le(["annotation-xml"]),rr=O({},yo),ns=O({},["title","style","font","a","script"]),Dt=null,rs=["application/xhtml+xml","text/html"],os="text/html",oe=null,kt=null,is=n.createElement("form"),vo=function(c){return c instanceof RegExp||c instanceof Function},or=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(kt&&kt===c)return;(!c||typeof c!="object")&&(c={}),c=we(c),Dt=rs.indexOf(c.PARSER_MEDIA_TYPE)===-1?os:c.PARSER_MEDIA_TYPE,oe=Dt==="application/xhtml+xml"?cr:Bt,J=Ve(c,"ALLOWED_TAGS",Vn,{transform:oe}),Z=Ve(c,"ALLOWED_ATTR",Gn,{transform:oe}),tr=Ve(c,"ALLOWED_NAMESPACES",ts,{transform:cr}),go=Ve(c,"ADD_URI_SAFE_ATTR",bo,{transform:oe,base:bo}),mo=Ve(c,"ADD_DATA_URI_TAGS",ho,{transform:oe,base:ho}),vt=Ve(c,"FORBID_CONTENTS",po,{transform:oe}),It=Ve(c,"FORBID_TAGS",we({}),{transform:oe}),io=Ve(c,"FORBID_ATTR",we({}),{transform:oe}),yt=be(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?we(c.USE_PROFILES):c.USE_PROFILES:!1,ao=c.ALLOW_ARIA_ATTR!==!1,Yn=c.ALLOW_DATA_ATTR!==!1,so=c.ALLOW_UNKNOWN_PROTOCOLS||!1,lo=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,We=c.SAFE_FOR_TEMPLATES||!1,nt=c.SAFE_FOR_XML!==!1,rt=c.WHOLE_DOCUMENT||!1,xt=c.RETURN_DOM||!1,nn=c.RETURN_DOM_FRAGMENT||!1,rn=c.RETURN_TRUSTED_TYPE||!1,Zn=c.FORCE_BODY||!1,co=c.SANITIZE_DOM!==!1,uo=c.SANITIZE_NAMED_PROPS||!1,Kn=c.KEEP_CONTENT!==!1,Qn=c.IN_PLACE||!1,oo=$s(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:Wo,wt=typeof c.NAMESPACE=="string"?c.NAMESPACE:Le,nr=mr(c,"MATHML_TEXT_INTEGRATION_POINTS",()=>O({},xo)),rr=mr(c,"HTML_INTEGRATION_POINTS",()=>O({},yo));let h=mr(c,"CUSTOM_ELEMENT_HANDLING",()=>Tt(null));if(Me=Tt(null),be(h,"tagNameCheck")&&vo(h.tagNameCheck)&&(Me.tagNameCheck=h.tagNameCheck),be(h,"attributeNameCheck")&&vo(h.attributeNameCheck)&&(Me.attributeNameCheck=h.attributeNameCheck),be(h,"allowCustomizedBuiltInElements")&&typeof h.allowCustomizedBuiltInElements=="boolean"&&(Me.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),ce(Me),We&&(Yn=!1),nn&&(xt=!0),yt&&(J=O({},Uo),Z=Tt(null),yt.html===!0&&(O(J,$o),O(Z,qo)),yt.svg===!0&&(O(J,ur),O(Z,pr),O(Z,mn)),yt.svgFilters===!0&&(O(J,dr),O(Z,pr),O(Z,mn)),yt.mathMl===!0&&(O(J,fr),O(Z,Ho),O(Z,mn))),He.tagCheck=null,He.attributeCheck=null,be(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?He.tagCheck=c.ADD_TAGS:Et(c.ADD_TAGS)&&(J===Vn&&(J=we(J)),O(J,c.ADD_TAGS,oe))),be(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?He.attributeCheck=c.ADD_ATTR:Et(c.ADD_ATTR)&&(Z===Gn&&(Z=we(Z)),O(Z,c.ADD_ATTR,oe))),be(c,"ADD_FORBID_CONTENTS")&&Et(c.ADD_FORBID_CONTENTS)&&(vt===po&&(vt=we(vt)),O(vt,c.ADD_FORBID_CONTENTS,oe)),Kn&&(J["#text"]=!0),rt&&O(J,["html","head","body"]),J.table&&(O(J,["tbody"]),delete It.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let y=H;H=c.TRUSTED_TYPES_POLICY;try{re=bt("")}catch(S){throw H=y,S}}else c.TRUSTED_TYPES_POLICY===null?(H=void 0,re=""):(H===void 0&&(H=Wa()),H&&typeof re=="string"&&(re=bt("")));le&&le(c),kt=c},wo=O({},[...ur,...dr,...Us]),ko=O({},[...fr,...qs]),as=function(c,h,y){return h.namespaceURI===Le?c==="svg":h.namespaceURI===on?c==="svg"&&(y==="annotation-xml"||nr[y]):!!wo[c]},ss=function(c,h,y){return h.namespaceURI===Le?c==="math":h.namespaceURI===an?c==="math"&&rr[y]:!!ko[c]},ls=function(c,h,y){return h.namespaceURI===an&&!rr[y]||h.namespaceURI===on&&!nr[y]?!1:!ko[c]&&(ns[c]||!wo[c])},cs=function(c){let h=T(c);(!h||!h.tagName)&&(h={namespaceURI:wt,tagName:"template"});let y=Bt(c.tagName),S=Bt(h.tagName);return tr[c.namespaceURI]?c.namespaceURI===an?as(y,h,S):c.namespaceURI===on?ss(y,h,S):c.namespaceURI===Le?ls(y,h,S):!!(Dt==="application/xhtml+xml"&&tr[c.namespaceURI]):!1},Xe=function(c){Ot(e.removed,{element:c});try{T(c).removeChild(c)}catch{if(g(c),!T(c))throw je("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},_o=function(c,h,y){try{b(c,h)}catch{try{c.removeAttribute(y)}catch{}}},sn=function(c){ln(c);let h=k(c);if(h){let S=[];it(h,C=>{Ot(S,C)}),it(S,C=>{try{g(C)}catch{}})}let y=_(c);if(y)for(let S=y.length-1;S>=0;--S){let C=y[S],L=C&&C.name;typeof L=="string"&&_o(c,C,L)}},ot=function(c,h,y){if(!y)try{y=h.getAttributeNode(c)}catch{y=null}Ot(e.removed,{attribute:y||null,from:h});try{y?b(h,y):h.removeAttribute(c)}catch{try{h.removeAttribute(c)}catch{}}if(c==="is")if(xt||nn)try{Xe(h)}catch{}else try{h.setAttribute(c,"")}catch{}},us=function(c){let h=_(c);if(h)for(let y=h.length-1;y>=0;--y){let S=h[y],C=S&&S.name;typeof C!="string"||Z[oe(C)]||_o(c,S,C)}},ln=function(c){let h=[c];for(;h.length>0;){let y=h.pop();G(y)===ve.element&&us(y);let S=k(y);if(S)for(let C=S.length-1;C>=0;--C)h.push(S[C])}},So=function(c,h){return nt?c==="patchsrc"?!0:c==="for"&&h!=="label"&&h!=="output":!1},ds=function(c){if(!nt)return;let h=[c];for(;h.length>0;){let y=h.pop(),S=G(y);if(S===ve.processingInstruction||S===ve.comment&&fe(jo,y.data)){try{g(y)}catch{}continue}if(S===ve.element){let L=y,D=oe(z(y));try{L.hasAttribute&&L.hasAttribute("patchsrc")&&L.removeAttribute("patchsrc"),L.hasAttribute&&L.hasAttribute("for")&&So("for",D)&&L.removeAttribute("for")}catch{}}let C=k(y);if(C)for(let L=C.length-1;L>=0;--L)h.push(C[L])}},Ao=function(c){let h=null,y=null;if(Zn)c="<remove></remove>"+c;else{let L=Oo(c,/^[\r\n\t ]+/);y=L&&L[0]}Dt==="application/xhtml+xml"&&wt===Le&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");let S=H?bt(c):c;if(wt===Le)try{h=new d().parseFromString(S,Dt)}catch{}if(!h||!h.documentElement){h=jn.createDocument(wt,"template",null);try{h.documentElement.innerHTML=er?re:S}catch{}}let C=h.body||h.documentElement;return c&&y&&C.insertBefore(n.createTextNode(y),C.childNodes[0]||null),wt===Le?ja.call(h,rt?"html":"body")[0]:rt?h.documentElement:C},To=function(c){let h=N?N(c):c.ownerDocument;return no.call(h||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},cn=function(c){return c=zt(c,Ga," "),c=zt(c,Ya," "),c=zt(c,Ja," "),c},ir=function(c){var h;c.normalize();let y=N?N(c):c.ownerDocument,S=no.call(y||c,c,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),C=S.nextNode();for(;C;)C.data=cn(C.data),C=S.nextNode();let L=(h=c.querySelectorAll)===null||h===void 0?void 0:h.call(c,"template");L&&it(L,D=>{_t(D.content)&&ir(D.content)})},un=function(c){let h=R?R(c):null;return typeof h!="string"||oe(h)!=="form"?!1:typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||c.attributes!==_(c)||typeof c.removeAttribute!="function"||typeof c.removeAttributeNode!="function"||typeof c.getAttributeNode!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function"||c.nodeType!==A(c)||c.childNodes!==k(c)},_t=function(c){if(!A||typeof c!="object"||c===null)return!1;try{return A(c)===ve.documentFragment}catch{return!1}},Nt=function(c){if(!A||typeof c!="object"||c===null)return!1;try{return typeof A(c)=="number"}catch{return!1}};function Ie(w,c,h){w.length!==0&&it(w,y=>{y.call(e,c,h,kt)})}let fs=function(c,h){return!!(nt&&c.hasChildNodes()&&!Nt(c.firstElementChild)&&fe(Xo,c.textContent)&&fe(Xo,c.innerHTML)||nt&&c.namespaceURI===Le&&el[h]&&(Nt(c.firstElementChild)||typeof c.textContent=="string"&&fe(tl[h],c.textContent))||c.nodeType===ve.processingInstruction||nt&&c.nodeType===ve.comment&&fe(jo,c.data))},dn=function(c,h){if(c instanceof RegExp)return fe(c,h);if(c instanceof Function){for(var y=arguments.length,S=new Array(y>2?y-2:0),C=2;C<y;C++)S[C-2]=arguments[C];return!!c(h,...S)}return!1},ps=function(c,h,y){if(!It[h]&&Po(h)&&dn(Me.tagNameCheck,h))return!1;if(Kn&&!vt[h]){let S=T(c),C=k(c);if(C&&S){let L=C.length;for(let D=L-1;D>=0;--D){let te=c===y?f(C[D],!0):C[D];S.insertBefore(te,v(c))}}}return Xe(c),!0},Eo=function(c,h,y,S){return c.length===0?h:h===y||h===S?we(h):h},St=function(c,h){return c===h||T(c)!==null?!1:(Qn&&ln(c),!0)},Co=function(c,h){if(Ie(Y.beforeSanitizeElements,c,null),St(c,h))return!0;if(un(c))return Xe(c),!0;let y=oe(z(c));if(J=Eo(Y.uponSanitizeElement,J,Vn,en),Ie(Y.uponSanitizeElement,c,{tagName:y,allowedTags:J}),St(c,h))return!0;if(fs(c,y))return Xe(c),!0;if(It[y]||!(He.tagCheck instanceof Function&&He.tagCheck(y))&&!J[y]){let S=ps(c,y,h);return S===!1&&(Ie(Y.afterSanitizeElements,c,null),St(c,h))?!0:S}if(G(c)===ve.element&&!cs(c)||(y==="noscript"||y==="noembed"||y==="noframes")&&fe(Ks,c.innerHTML))return Xe(c),!0;if(We&&c.nodeType===ve.text){let S=cn(c.textContent);c.textContent!==S&&(Ot(e.removed,{element:c.cloneNode()}),c.textContent=S)}return Ie(Y.afterSanitizeElements,c,null),St(c,h)},Ro=function(c,h,y){if(io[h]||So(h,c)||co&&(h==="id"||h==="name")&&(y in n||y in is))return!1;let S=Z[h]||He.attributeCheck instanceof Function&&He.attributeCheck(h,c);return Yn&&fe(Za,h)||ao&&fe(Ka,h)?!0:S?go[h]||fe(oo,zt(y,ro,""))||(h==="src"||h==="xlink:href"||h==="href")&&c!=="script"&&zo(y,"data:")===0&&mo[c]||so&&!fe(Qa,zt(y,ro,""))?!0:!y:Po(c)&&dn(Me.tagNameCheck,c)&&dn(Me.attributeNameCheck,h,c)||h==="is"&&Me.allowCustomizedBuiltInElements&&dn(Me.tagNameCheck,y)},ms=O({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Po=function(c){return!ms[Bt(c)]&&fe(es,c)},hs=function(c,h,y,S){if(H&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!y)switch(p.getAttributeType(c,h)){case"TrustedHTML":return bt(S);case"TrustedScriptURL":return Ha(S)}return S},gs=function(c,h,y,S){try{return y?c.setAttributeNS(y,h,S):c.setAttribute(h,S),un(c)?(Xe(c),!1):!0}catch{return ot(h,c),!1}},Mo=function(c,h){if(Ie(Y.beforeSanitizeAttributes,c,null),St(c,h))return;let y=c.attributes;if(!y||un(c))return;Z=Eo(Y.uponSanitizeAttribute,Z,Gn,tn);let S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0},C=y.length,L=oe(c.nodeName);for(;C--;){let D=y[C],te=D.name,Se=D.namespaceURI,ye=D.value,At=oe(te),sr=ye,me=te==="value"?sr:Ds(sr),Lo=!1;if(S.attrName=At,S.attrValue=me,S.keepAttr=!0,S.forceKeepAttr=void 0,Ie(Y.uponSanitizeAttribute,c,S),me=S.attrValue,uo&&(At==="id"||At==="name")&&zo(me,fo)!==0&&(ot(te,c,D),me=fo+me,Lo=!0),nt&&fe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,me)){ot(te,c,D);continue}if(At==="attributename"&&Oo(me,"href")){ot(te,c,D);continue}if(!S.forceKeepAttr){if(!S.keepAttr){ot(te,c,D);continue}if(!lo&&fe(Qs,me)){ot(te,c,D);continue}if(We&&(me=cn(me)),!Ro(L,At,me)){ot(te,c,D);continue}me=hs(L,At,Se,me),me!==sr&&gs(c,te,Se,me)&&Lo&&No(e.removed)}}Ie(Y.afterSanitizeAttributes,c,null),St(c,h)},fn=function(c){let h=null,y=To(c);for(Ie(Y.beforeSanitizeShadowDOM,c,null);h=y.nextNode();)if(Ie(Y.uponSanitizeShadowNode,h,null),Co(h,c),Mo(h,c),_t(h.content)&&fn(h.content),G(h)===ve.element){let S=x(h);_t(S)&&(ar(S),fn(S))}Ie(Y.afterSanitizeShadowDOM,c,null)},ar=function(c){let h=[{node:c,shadow:null}];for(;h.length>0;){let y=h.pop();if(y.shadow){fn(y.shadow);continue}let S=y.node,C=G(S)===ve.element,L=k(S);if(L)for(let D=L.length-1;D>=0;--D)h.push({node:L[D],shadow:null});if(C){let D=R?R(S):null;if(typeof D=="string"&&oe(D)==="template"){let te=S.content;_t(te)&&h.push({node:te,shadow:null})}}if(C){let D=x(S);_t(D)&&h.push({node:null,shadow:D},{node:D,shadow:null})}}};return e.sanitize=function(w){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,y=null,S=null,C=null;if(er=!w,er&&(w="<!-->"),typeof w!="string"&&!Nt(w)&&(w=Bs(w),typeof w!="string"))throw je("dirty is not a string, aborting");if(!e.isSupported)return w;Jn?(J=en,Z=tn):or(c),(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&(J=we(J)),Y.uponSanitizeAttribute.length>0&&(Z=we(Z)),e.removed=[];let L=Qn&&typeof w!="string"&&Nt(w);if(L){ds(w);let Se=z(w);if(typeof Se=="string"){let ye=oe(Se);if(!J[ye]||It[ye])throw sn(w),je("root node is forbidden and cannot be sanitized in-place")}if(un(w))throw sn(w),je("root node is clobbered and cannot be sanitized in-place");try{ar(w)}catch(ye){throw sn(w),ye}}else if(Nt(w))h=Ao("<!---->"),y=h.ownerDocument.importNode(w,!0),y.nodeType===ve.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?h=y:h.appendChild(y),ar(h);else{if(!xt&&!We&&!rt&&w.indexOf("<")===-1)return H&&rn?bt(w):w;if(h=Ao(w),!h)return xt?null:rn?re:""}h&&Zn&&Xe(h.firstChild);let D=L?w:h;try{let Se=To(D);for(;S=Se.nextNode();)Co(S,D),Mo(S,D),_t(S.content)&&fn(S.content)}catch(Se){throw L&&(sn(w),it(e.removed,ye=>{ye.element&&ln(ye.element)})),Se}if(L){let Se=!1;if(it(e.removed,ye=>{ye.element&&(ye.element===w&&(Se=!0),ln(ye.element))}),Se)throw je("a node selected for removal could not be safely returned; refusing to sanitize in place");return We&&ir(w),w}if(xt){if(We&&ir(h),nn)for(C=Xa.call(h.ownerDocument);h.firstChild;)C.appendChild(h.firstChild);else C=h;return(Z.shadowroot||Z.shadowrootmode)&&(C=Va.call(r,C,!0)),C}let te=rt?h.outerHTML:h.innerHTML;return rt&&J["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&fe(Js,h.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
|
|
3
|
-
`+
|
|
4
|
-
]`).replace("lheading",
|
|
5
|
-
`),n=e.length-1;for(;n>=0&&
|
|
6
|
-
`)}function
|
|
7
|
-
`).map(
|
|
8
|
-
`)}function
|
|
9
|
-
`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:
|
|
10
|
-
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=
|
|
1
|
+
"use strict";var __fxExtend=(()=>{var lr=Object.defineProperty;var ks=Object.getOwnPropertyDescriptor;var ys=Object.getOwnPropertyNames;var vs=Object.prototype.hasOwnProperty;var ws=(t,e)=>{for(var n in e)lr(t,n,{get:e[n],enumerable:!0})},_s=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ys(e))!vs.call(t,a)&&a!==n&&lr(t,a,{get:()=>e[a],enumerable:!(r=ks(e,a))||r.enumerable});return t};var Ss=t=>_s(lr({},"__esModule",{value:!0}),t);var Wu={};ws(Wu,{dispose:()=>Wi});function As(t,e){this.v=t,this.k=e}function Ma(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ts(t){if(Array.isArray(t))return t}function Es(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,a,o,s,l=[],u=!0,d=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(p){d=!0,a=p}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(d)throw a}}return l}}function Cs(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rs(t,e){return Ts(t)||Es(t,e)||Ps(t,e)||Cs()}function Ps(t,e){if(t){if(typeof t=="string")return Ma(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ma(t,e):void 0}}function mn(t){var e,n;function r(o,s){try{var l=t[o](s),u=l.value,d=u instanceof As;Promise.resolve(d?u.v:u).then(function(p){if(d){var m=o==="return"&&u.k?o:"next";if(!u.k||p.done)return r(m,p);p=t[m](p).value}a(!!l.done,p)},function(p){r("throw",p)})}catch(p){a(2,p)}}function a(o,s){o===2?e.reject(s):e.resolve({value:s,done:o}),(e=e.next)?r(e.key,e.arg):n=null}this._invoke=function(o,s){return new Promise(function(l,u){var d={key:o,arg:s,resolve:l,reject:u,next:null};n?n=n.next=d:(e=n=d,r(o,s))})},typeof t.return!="function"&&(this.return=void 0)}mn.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},mn.prototype.next=function(t){return this._invoke("next",t)},mn.prototype.throw=function(t){return this._invoke("throw",t)},mn.prototype.return=function(t){return this._invoke("return",t)};var Va=Object.entries,La=Object.setPrototypeOf,Is=Object.isFrozen,Ms=Object.getPrototypeOf,Ls=Object.getOwnPropertyDescriptor,de=Object.freeze,fe=Object.seal,Et=Object.create,Ga=typeof Reflect<"u"&&Reflect,hr=Ga.apply,gr=Ga.construct;de||(de=function(e){return e});fe||(fe=function(e){return e});hr||(hr=function(e,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];return e.apply(n,a)});gr||(gr=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return new e(...r)});var it=se(Array.prototype.forEach);Array.prototype.indexOf;var Ds=se(Array.prototype.lastIndexOf),Da=se(Array.prototype.pop),Ot=se(Array.prototype.push);Array.prototype.slice;var Ns=se(Array.prototype.splice),Ct=Array.isArray,$t=se(String.prototype.toLowerCase),cr=se(String.prototype.toString),Na=se(String.prototype.match),Ft=se(String.prototype.replace),za=se(String.prototype.indexOf),zs=se(String.prototype.trim),Os=se(Number.prototype.toString),Fs=se(Boolean.prototype.toString),Oa=typeof BigInt>"u"?null:se(BigInt.prototype.toString),Fa=typeof Symbol>"u"?null:se(Symbol.prototype.toString),be=se(Object.prototype.hasOwnProperty),Bt=se(Object.prototype.toString),me=se(RegExp.prototype.test),Ve=Bs(TypeError);function se(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return hr(t,e,r)}}function Bs(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return gr(t,n)}}function B(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$t;if(La&&La(t,null),!Ct(e))return t;let r=e.length;for(;r--;){let a=e[r];if(typeof a=="string"){let o=n(a);o!==a&&(Is(e)||(e[r]=o),a=o)}t[a]=!0}return t}function $s(t){for(let e=0;e<t.length;e++)be(t,e)||(t[e]=null);return t}function ve(t){let e=Et(null);for(let r of Va(t)){var n=Rs(r,2);let a=n[0],o=n[1];be(t,a)&&(Ct(o)?e[a]=$s(o):o&&typeof o=="object"&&o.constructor===Object?e[a]=ve(o):e[a]=o)}return e}function Us(t){switch(typeof t){case"string":return t;case"number":return Os(t);case"boolean":return Fs(t);case"bigint":return Oa?Oa(t):"0";case"symbol":return Fa?Fa(t):"Symbol()";case"undefined":return Bt(t);case"function":case"object":{if(t===null)return Bt(t);let e=t,n=Ee(e,"toString");if(typeof n=="function"){let r=n(e);return typeof r=="string"?r:Bt(r)}return Bt(t)}default:return Bt(t)}}function Ee(t,e){for(;t!==null;){let r=Ls(t,e);if(r){if(r.get)return se(r.get);if(typeof r.value=="function")return se(r.value)}t=Ms(t)}function n(){return null}return n}function qs(t){try{return me(t,""),!0}catch{return!1}}var Ba=de(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ur=de(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),dr=de(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Hs=de(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),fr=de(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ws=de(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$a=de(["#text"]),Ua=de(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),pr=de(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qa=de(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),hn=de(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xs=fe(/{{[\w\W]*|^[\w\W]*}}/g),js=fe(/<%[\w\W]*|^[\w\W]*%>/g),Vs=fe(/\${[\w\W]*/g),Gs=fe(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ks=fe(/^aria-[\-\w]+$/),Ha=fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ys=fe(/^(?:\w+script|data):/i),Js=fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Zs=fe(/^html$/i),Qs=fe(/^[a-z][.\w]*(-[.\w]+)+$/i),Wa=fe(/<[/\w!]/g),Xa=fe(/<[/\w]/g),el=fe(/<\/no(script|embed|frames)/i),tl=fe(/\/>/i),ye={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ka=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],nl=de(B({},Ka)),rl=(function(){let t={};return it(Ka,e=>{t[e]=fe(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),de(t)})(),al=function(){return typeof window>"u"?null:window},ol=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(r=n.getAttribute(a));let o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},ja=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ge=function(e,n,r,a){return be(e,n)&&Ct(e[n])?B(a.base?ve(a.base):{},e[n],a.transform):r},mr=function(e,n,r){let a=be(e,n)?e[n]:void 0;return a&&typeof a=="object"?ve(a):r()};function Ya(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:al(),e=w=>Ya(w);if(e.version="3.4.16",e.removed=[],!t||!t.document||t.document.nodeType!==ye.document||!t.Element)return e.isSupported=!1,e;let n=t.document,r=n,a=r.currentScript;t.DocumentFragment;let o=t.HTMLTemplateElement,s=t.Node,l=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let d=t.DOMParser,p=t.trustedTypes,m=l.prototype,f=Ee(m,"cloneNode"),b=Ee(m,"remove"),g=Ee(m,"removeAttributeNode"),k=Ee(m,"nextSibling"),y=Ee(m,"childNodes"),A=Ee(m,"parentNode"),x=Ee(m,"shadowRoot"),_=Ee(m,"attributes"),T=s&&s.prototype?Ee(s.prototype,"nodeType"):null,R=s&&s.prototype?Ee(s.prototype,"nodeName"):null,F=s&&s.prototype?Ee(s.prototype,"ownerDocument"):null,G=function(c){return T?T(c):c.nodeType},U=function(c){return R?R(c):c.nodeName};if(typeof o=="function"){let w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}let W,re="",he,Le=!1,Oe=0,bt=function(){if(Oe>0)throw Ve('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},xt=function(c){bt(),Oe++;try{return W.createHTML(c)}finally{Oe--}},Xi=function(c){bt(),Oe++;try{return W.createScriptURL(c)}finally{Oe--}},ji=function(){return Le||(he=ol(p,a),Le=!0),he},en=n,jn=en.implementation,na=en.createNodeIterator,Vi=en.createDocumentFragment,Gi=en.getElementsByTagName,Ki=r.importNode,K=ja();e.isSupported=typeof Va=="function"&&typeof A=="function"&&jn&&jn.createHTMLDocument!==void 0;let Yi=Xs,Ji=js,Zi=Vs,Qi=Gs,es=Ks,ts=Ys,ra=Js,ns=Qs,aa=Ha,Y=null,Vn=B({},[...Ba,...ur,...dr,...fr,...$a]),J=null,Gn=B({},[...Ua,...pr,...qa,...hn]),De=Object.seal(Et(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,oa=null,We=Object.seal(Et(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ia=!0,Kn=!0,sa=!1,la=!0,Xe=!1,rt=!0,at=!1,Yn=!1,tn=null,nn=null,Jn=!1,kt=!1,rn=!1,an=!1,ca=!0,ua=!1,da="user-content-",Zn=!0,Qn=!1,yt={},vt=null,fa=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),pa=null,ma=B({},["audio","video","img","source","image","track"]),ha=null,ga=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),on="http://www.w3.org/1998/Math/MathML",sn="http://www.w3.org/2000/svg",Ne="http://www.w3.org/1999/xhtml",wt=Ne,er=!1,tr=null,rs=B({},[on,sn,Ne],cr),ba=de(["mi","mo","mn","ms","mtext"]),nr=B({},ba),xa=de(["annotation-xml"]),rr=B({},xa),as=B({},["title","style","font","a","script"]),Nt=null,os=["application/xhtml+xml","text/html"],is="text/html",ae=null,_t=null,ss=n.createElement("form"),ka=function(c){return c instanceof RegExp||c instanceof Function},ar=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(_t&&_t===c)return;(!c||typeof c!="object")&&(c={}),c=ve(c),Nt=os.indexOf(c.PARSER_MEDIA_TYPE)===-1?is:c.PARSER_MEDIA_TYPE,ae=Nt==="application/xhtml+xml"?cr:$t,Y=Ge(c,"ALLOWED_TAGS",Vn,{transform:ae}),J=Ge(c,"ALLOWED_ATTR",Gn,{transform:ae}),tr=Ge(c,"ALLOWED_NAMESPACES",rs,{transform:cr}),ha=Ge(c,"ADD_URI_SAFE_ATTR",ga,{transform:ae,base:ga}),pa=Ge(c,"ADD_DATA_URI_TAGS",ma,{transform:ae,base:ma}),vt=Ge(c,"FORBID_CONTENTS",fa,{transform:ae}),Dt=Ge(c,"FORBID_TAGS",ve({}),{transform:ae}),oa=Ge(c,"FORBID_ATTR",ve({}),{transform:ae}),yt=be(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?ve(c.USE_PROFILES):c.USE_PROFILES:!1,ia=c.ALLOW_ARIA_ATTR!==!1,Kn=c.ALLOW_DATA_ATTR!==!1,sa=c.ALLOW_UNKNOWN_PROTOCOLS||!1,la=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xe=c.SAFE_FOR_TEMPLATES||!1,rt=c.SAFE_FOR_XML!==!1,at=c.WHOLE_DOCUMENT||!1,kt=c.RETURN_DOM||!1,rn=c.RETURN_DOM_FRAGMENT||!1,an=c.RETURN_TRUSTED_TYPE||!1,Jn=c.FORCE_BODY||!1,ca=c.SANITIZE_DOM!==!1,ua=c.SANITIZE_NAMED_PROPS||!1,Zn=c.KEEP_CONTENT!==!1,Qn=c.IN_PLACE||!1,aa=qs(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:Ha,wt=typeof c.NAMESPACE=="string"?c.NAMESPACE:Ne,nr=mr(c,"MATHML_TEXT_INTEGRATION_POINTS",()=>B({},ba)),rr=mr(c,"HTML_INTEGRATION_POINTS",()=>B({},xa));let h=mr(c,"CUSTOM_ELEMENT_HANDLING",()=>Et(null));if(De=Et(null),be(h,"tagNameCheck")&&ka(h.tagNameCheck)&&(De.tagNameCheck=h.tagNameCheck),be(h,"attributeNameCheck")&&ka(h.attributeNameCheck)&&(De.attributeNameCheck=h.attributeNameCheck),be(h,"allowCustomizedBuiltInElements")&&typeof h.allowCustomizedBuiltInElements=="boolean"&&(De.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),fe(De),Xe&&(Kn=!1),rn&&(kt=!0),yt&&(Y=B({},$a),J=Et(null),yt.html===!0&&(B(Y,Ba),B(J,Ua)),yt.svg===!0&&(B(Y,ur),B(J,pr),B(J,hn)),yt.svgFilters===!0&&(B(Y,dr),B(J,pr),B(J,hn)),yt.mathMl===!0&&(B(Y,fr),B(J,qa),B(J,hn))),We.tagCheck=null,We.attributeCheck=null,be(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?We.tagCheck=c.ADD_TAGS:Ct(c.ADD_TAGS)&&(Y===Vn&&(Y=ve(Y)),B(Y,c.ADD_TAGS,ae))),be(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?We.attributeCheck=c.ADD_ATTR:Ct(c.ADD_ATTR)&&(J===Gn&&(J=ve(J)),B(J,c.ADD_ATTR,ae))),be(c,"ADD_FORBID_CONTENTS")&&Ct(c.ADD_FORBID_CONTENTS)&&(vt===fa&&(vt=ve(vt)),B(vt,c.ADD_FORBID_CONTENTS,ae)),Zn&&(Y["#text"]=!0),at&&B(Y,["html","head","body"]),Y.table&&(B(Y,["tbody"]),delete Dt.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let v=W;W=c.TRUSTED_TYPES_POLICY;try{re=xt("")}catch(S){throw W=v,S}}else c.TRUSTED_TYPES_POLICY===null?(W=void 0,re=""):(W===void 0&&(W=ji()),W&&typeof re=="string"&&(re=xt("")));de&&de(c),_t=c},ya=B({},[...ur,...dr,...Hs]),va=B({},[...fr,...Ws]),ls=function(c,h,v){return h.namespaceURI===Ne?c==="svg":h.namespaceURI===on?c==="svg"&&(v==="annotation-xml"||nr[v]):!!ya[c]},cs=function(c,h,v){return h.namespaceURI===Ne?c==="math":h.namespaceURI===sn?c==="math"&&rr[v]:!!va[c]},us=function(c,h,v){return h.namespaceURI===sn&&!rr[v]||h.namespaceURI===on&&!nr[v]?!1:!va[c]&&(as[c]||!ya[c])},ds=function(c){let h=A(c);(!h||!h.tagName)&&(h={namespaceURI:wt,tagName:"template"});let v=$t(c.tagName),S=$t(h.tagName);return tr[c.namespaceURI]?c.namespaceURI===sn?ls(v,h,S):c.namespaceURI===on?cs(v,h,S):c.namespaceURI===Ne?us(v,h,S):!!(Nt==="application/xhtml+xml"&&tr[c.namespaceURI]):!1},je=function(c){Ot(e.removed,{element:c});try{A(c).removeChild(c)}catch{if(b(c),!A(c))throw Ve("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},wa=function(c,h,v){try{g(c,h)}catch{try{c.removeAttribute(v)}catch{}}},ln=function(c){cn(c);let h=y(c);if(h){let S=[];it(h,C=>{Ot(S,C)}),it(S,C=>{try{b(C)}catch{}})}let v=_(c);if(v)for(let S=v.length-1;S>=0;--S){let C=v[S],L=C&&C.name;typeof L=="string"&&wa(c,C,L)}},ot=function(c,h,v){if(!v)try{v=h.getAttributeNode(c)}catch{v=null}Ot(e.removed,{attribute:v||null,from:h});try{v?g(h,v):h.removeAttribute(c)}catch{try{h.removeAttribute(c)}catch{}}if(c==="is")if(kt||rn)try{je(h)}catch{}else try{h.setAttribute(c,"")}catch{}},fs=function(c){let h=_(c);if(h)for(let v=h.length-1;v>=0;--v){let S=h[v],C=S&&S.name;typeof C!="string"||J[ae(C)]||wa(c,S,C)}},cn=function(c){let h=[c];for(;h.length>0;){let v=h.pop();G(v)===ye.element&&fs(v);let S=y(v);if(S)for(let C=S.length-1;C>=0;--C)h.push(S[C])}},_a=function(c,h){return rt?c==="patchsrc"?!0:c==="for"&&h!=="label"&&h!=="output":!1},ps=function(c){if(!rt)return;let h=[c];for(;h.length>0;){let v=h.pop(),S=G(v);if(S===ye.processingInstruction||S===ye.comment&&me(Xa,v.data)){try{b(v)}catch{}continue}if(S===ye.element){let L=v,O=ae(U(v));try{L.hasAttribute&&L.hasAttribute("patchsrc")&&L.removeAttribute("patchsrc"),L.hasAttribute&&L.hasAttribute("for")&&_a("for",O)&&L.removeAttribute("for")}catch{}}let C=y(v);if(C)for(let L=C.length-1;L>=0;--L)h.push(C[L])}},Sa=function(c){let h=null,v=null;if(Jn)c="<remove></remove>"+c;else{let L=Na(c,/^[\r\n\t ]+/);v=L&&L[0]}Nt==="application/xhtml+xml"&&wt===Ne&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");let S=W?xt(c):c;if(wt===Ne)try{h=new d().parseFromString(S,Nt)}catch{}if(!h||!h.documentElement){h=jn.createDocument(wt,"template",null);try{h.documentElement.innerHTML=er?re:S}catch{}}let C=h.body||h.documentElement;return c&&v&&C.insertBefore(n.createTextNode(v),C.childNodes[0]||null),wt===Ne?Gi.call(h,at?"html":"body")[0]:at?h.documentElement:C},Aa=function(c){let h=F?F(c):c.ownerDocument;return na.call(h||c,c,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},un=function(c){return c=Ft(c,Yi," "),c=Ft(c,Ji," "),c=Ft(c,Zi," "),c},or=function(c){var h;c.normalize();let v=F?F(c):c.ownerDocument,S=na.call(v||c,c,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),C=S.nextNode();for(;C;)C.data=un(C.data),C=S.nextNode();let L=(h=c.querySelectorAll)===null||h===void 0?void 0:h.call(c,"template");L&&it(L,O=>{St(O.content)&&or(O.content)})},dn=function(c){let h=R?R(c):null;return typeof h!="string"||ae(h)!=="form"?!1:typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||c.attributes!==_(c)||typeof c.removeAttribute!="function"||typeof c.removeAttributeNode!="function"||typeof c.getAttributeNode!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function"||c.nodeType!==T(c)||c.childNodes!==y(c)},St=function(c){if(!T||typeof c!="object"||c===null)return!1;try{return T(c)===ye.documentFragment}catch{return!1}},zt=function(c){if(!T||typeof c!="object"||c===null)return!1;try{return typeof T(c)=="number"}catch{return!1}};function ze(w,c,h){w.length!==0&&it(w,v=>{v.call(e,c,h,_t)})}let ms=function(c,h){return!!(rt&&c.hasChildNodes()&&!zt(c.firstElementChild)&&me(Wa,c.textContent)&&me(Wa,c.innerHTML)||rt&&c.namespaceURI===Ne&&nl[h]&&(zt(c.firstElementChild)||typeof c.textContent=="string"&&me(rl[h],c.textContent))||c.nodeType===ye.processingInstruction||rt&&c.nodeType===ye.comment&&me(Xa,c.data))},fn=function(c,h){if(c instanceof RegExp)return me(c,h);if(c instanceof Function){for(var v=arguments.length,S=new Array(v>2?v-2:0),C=2;C<v;C++)S[C-2]=arguments[C];return!!c(h,...S)}return!1},hs=function(c,h,v){if(!Dt[h]&&Ra(h)&&fn(De.tagNameCheck,h))return!1;if(Zn&&!vt[h]){let S=A(c),C=y(c);if(C&&S){let L=C.length;for(let O=L-1;O>=0;--O){let ne=c===v?f(C[O],!0):C[O];S.insertBefore(ne,k(c))}}}return je(c),!0},Ta=function(c,h,v,S){return c.length===0?h:h===v||h===S?ve(h):h},At=function(c,h){return c===h||A(c)!==null?!1:(Qn&&cn(c),!0)},Ea=function(c,h){if(ze(K.beforeSanitizeElements,c,null),At(c,h))return!0;if(dn(c))return je(c),!0;let v=ae(U(c));if(Y=Ta(K.uponSanitizeElement,Y,Vn,tn),ze(K.uponSanitizeElement,c,{tagName:v,allowedTags:Y}),At(c,h))return!0;if(ms(c,v))return je(c),!0;if(Dt[v]||!(We.tagCheck instanceof Function&&We.tagCheck(v))&&!Y[v]){let S=hs(c,v,h);return S===!1&&(ze(K.afterSanitizeElements,c,null),At(c,h))?!0:S}if(G(c)===ye.element&&!ds(c)||(v==="noscript"||v==="noembed"||v==="noframes")&&me(el,c.innerHTML))return je(c),!0;if(Xe&&c.nodeType===ye.text){let S=un(c.textContent);c.textContent!==S&&(Ot(e.removed,{element:c.cloneNode()}),c.textContent=S)}return ze(K.afterSanitizeElements,c,null),At(c,h)},Ca=function(c,h,v){if(oa[h]||_a(h,c)||ca&&(h==="id"||h==="name")&&(v in n||v in ss))return!1;let S=J[h]||We.attributeCheck instanceof Function&&We.attributeCheck(h,c);return Kn&&me(Qi,h)||ia&&me(es,h)?!0:S?ha[h]||me(aa,Ft(v,ra,""))||(h==="src"||h==="xlink:href"||h==="href")&&c!=="script"&&za(v,"data:")===0&&pa[c]||sa&&!me(ts,Ft(v,ra,""))?!0:!v:Ra(c)&&fn(De.tagNameCheck,c)&&fn(De.attributeNameCheck,h,c)||h==="is"&&De.allowCustomizedBuiltInElements&&fn(De.tagNameCheck,v)},gs=B({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ra=function(c){return!gs[$t(c)]&&me(ns,c)},bs=function(c,h,v,S){if(W&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!v)switch(p.getAttributeType(c,h)){case"TrustedHTML":return xt(S);case"TrustedScriptURL":return Xi(S)}return S},xs=function(c,h,v,S){try{return v?c.setAttributeNS(v,h,S):c.setAttribute(h,S),dn(c)?(je(c),!1):!0}catch{return ot(h,c),!1}},Pa=function(c,h){if(ze(K.beforeSanitizeAttributes,c,null),At(c,h))return;let v=c.attributes;if(!v||dn(c))return;J=Ta(K.uponSanitizeAttribute,J,Gn,nn);let S={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:J,forceKeepAttr:void 0},C=v.length,L=ae(c.nodeName);for(;C--;){let O=v[C],ne=O.name,Te=O.namespaceURI,ke=O.value,Tt=ae(ne),sr=ke,ge=ne==="value"?sr:zs(sr),Ia=!1;if(S.attrName=Tt,S.attrValue=ge,S.keepAttr=!0,S.forceKeepAttr=void 0,ze(K.uponSanitizeAttribute,c,S),ge=S.attrValue,ua&&(Tt==="id"||Tt==="name")&&za(ge,da)!==0&&(ot(ne,c,O),ge=da+ge,Ia=!0),rt&&me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ge)){ot(ne,c,O);continue}if(Tt==="attributename"&&Na(ge,"href")){ot(ne,c,O);continue}if(!S.forceKeepAttr){if(!S.keepAttr){ot(ne,c,O);continue}if(!la&&me(tl,ge)){ot(ne,c,O);continue}if(Xe&&(ge=un(ge)),!Ca(L,Tt,ge)){ot(ne,c,O);continue}ge=bs(L,Tt,Te,ge),ge!==sr&&xs(c,ne,Te,ge)&&Ia&&Da(e.removed)}}ze(K.afterSanitizeAttributes,c,null),At(c,h)},pn=function(c){let h=null,v=Aa(c);for(ze(K.beforeSanitizeShadowDOM,c,null);h=v.nextNode();)if(ze(K.uponSanitizeShadowNode,h,null),Ea(h,c),Pa(h,c),St(h.content)&&pn(h.content),G(h)===ye.element){let S=x(h);St(S)&&(ir(S),pn(S))}ze(K.afterSanitizeShadowDOM,c,null)},ir=function(c){let h=[{node:c,shadow:null}];for(;h.length>0;){let v=h.pop();if(v.shadow){pn(v.shadow);continue}let S=v.node,C=G(S)===ye.element,L=y(S);if(L)for(let O=L.length-1;O>=0;--O)h.push({node:L[O],shadow:null});if(C){let O=R?R(S):null;if(typeof O=="string"&&ae(O)==="template"){let ne=S.content;St(ne)&&h.push({node:ne,shadow:null})}}if(C){let O=x(S);St(O)&&h.push({node:null,shadow:O},{node:O,shadow:null})}}};return e.sanitize=function(w){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,v=null,S=null,C=null;if(er=!w,er&&(w="<!-->"),typeof w!="string"&&!zt(w)&&(w=Us(w),typeof w!="string"))throw Ve("dirty is not a string, aborting");if(!e.isSupported)return w;Yn?(Y=tn,J=nn):ar(c),(K.uponSanitizeElement.length>0||K.uponSanitizeAttribute.length>0)&&(Y=ve(Y)),K.uponSanitizeAttribute.length>0&&(J=ve(J)),e.removed=[];let L=Qn&&typeof w!="string"&&zt(w);if(L){ps(w);let Te=U(w);if(typeof Te=="string"){let ke=ae(Te);if(!Y[ke]||Dt[ke])throw ln(w),Ve("root node is forbidden and cannot be sanitized in-place")}if(dn(w))throw ln(w),Ve("root node is clobbered and cannot be sanitized in-place");try{ir(w)}catch(ke){throw ln(w),ke}}else if(zt(w))h=Sa("<!---->"),v=h.ownerDocument.importNode(w,!0),v.nodeType===ye.element&&v.nodeName==="BODY"||v.nodeName==="HTML"?h=v:h.appendChild(v),ir(h);else{if(!kt&&!Xe&&!at&&w.indexOf("<")===-1)return W&&an?xt(w):w;if(h=Sa(w),!h)return kt?null:an?re:""}h&&Jn&&je(h.firstChild);let O=L?w:h;try{let Te=Aa(O);for(;S=Te.nextNode();)Ea(S,O),Pa(S,O),St(S.content)&&pn(S.content)}catch(Te){throw L&&(ln(w),it(e.removed,ke=>{ke.element&&cn(ke.element)})),Te}if(L){let Te=!1;if(it(e.removed,ke=>{ke.element&&(ke.element===w&&(Te=!0),cn(ke.element))}),Te)throw Ve("a node selected for removal could not be safely returned; refusing to sanitize in place");return Xe&&or(w),w}if(kt){if(Xe&&or(h),rn)for(C=Vi.call(h.ownerDocument);h.firstChild;)C.appendChild(h.firstChild);else C=h;return(J.shadowroot||J.shadowrootmode)&&(C=Ki.call(r,C,!0)),C}let ne=at?h.outerHTML:h.innerHTML;return at&&Y["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&me(Zs,h.ownerDocument.doctype.name)&&(ne="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
|
|
3
|
+
`+ne),Xe&&(ne=un(ne)),W&&an?xt(ne):ne},e.setConfig=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ar(w),Yn=!0,tn=Y,nn=J},e.clearConfig=function(){_t=null,Yn=!1,tn=null,nn=null,W=he,re=""},e.isValidAttribute=function(w,c,h){_t||ar({});let v=ae(w),S=ae(c);return Ca(v,S,h)},e.addHook=function(w,c){typeof c=="function"&&be(K,w)&&Ot(K[w],c)},e.removeHook=function(w,c){if(be(K,w)){if(c!==void 0){let h=Ds(K[w],c);return h===-1?void 0:Ns(K[w],h,1)[0]}return Da(K[w])}},e.removeHooks=function(w){be(K,w)&&(K[w]=[])},e.removeAllHooks=function(){K=ja()},e}var br=Ya();function vr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ct=vr();function so(t){ct=t}var st={exec:()=>null};function Rt(t){let e=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),a=e[r];return a||(a=t(r),e[r]=a),a}}function I(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(a,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(pe.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var il=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),pe={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Rt(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Rt(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Rt(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:Rt(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:Rt(t=>new RegExp(`^ {0,${t}}(?:</?(?:${Wt})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:Rt(t=>new RegExp(`^ {0,${t}}>`))},sl=/^(?:[ \t]*(?:\n|$))+/,ll=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cl=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ht=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ul=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,co=I(lo).replace(/bull/g,wr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dl=I(lo).replace(/bull/g,wr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_r=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,fl=/^[^\n]+/,Sr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,pl=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ml=I(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wr).getRegex(),Wt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ar=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hl=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ar).replace("tag",Wt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uo=t=>I(_r).replace("hr",Ht).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wt).getRegex(),gl=uo(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),bl=uo(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),xl=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bl).getRegex(),Tr={blockquote:xl,code:ll,def:pl,fences:cl,heading:ul,hr:Ht,html:hl,lheading:co,list:ml,newline:sl,paragraph:gl,table:st,text:fl},Ja=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ht).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wt).getRegex(),kl={...Tr,lheading:dl,table:Ja,paragraph:I(_r).replace("hr",Ht).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ja).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Wt).getRegex()},yl={...Tr,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ar).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:st,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(_r).replace("hr",Ht).replace("heading",` *#{1,6} *[^
|
|
4
|
+
]`).replace("lheading",co).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vl=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wl=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fo=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,_l=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Fe=/[\p{P}\p{S}]/u,Pt=/[\s\p{P}\p{S}]/u,Xt=/[^\s\p{P}\p{S}]/u,Sl=I(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Pt).getRegex(),Al=/[\p{Pi}\p{Ps}"']/u,po=/(?!~)[\p{P}\p{S}]/u,Tl=/(?!~)[\s\p{P}\p{S}]/u,El=/(?:[^\s\p{P}\p{S}]|~)/u,Cl=I(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",il?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),mo=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Rl=I(mo,"u").replace(/punct/g,Fe).getRegex(),Pl=I(mo,"u").replace(/punct/g,po).getRegex(),Il=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ml=I(Il,"u").replace(/openQuote/g,Al).replace(/punct/g,Fe).getRegex(),ho="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ll=I(ho,"gu").replace(/notPunctSpace/g,Xt).replace(/punctSpace/g,Pt).replace(/punct/g,Fe).getRegex(),Dl=I(ho,"gu").replace(/notPunctSpace/g,El).replace(/punctSpace/g,Tl).replace(/punct/g,po).getRegex(),Nl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",zl=I(Nl,"gu").replace(/notPunctSpace/g,Xt).replace(/punctSpace/g,Pt).replace(/punct/g,Fe).getRegex(),Ol=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xt).replace(/punctSpace/g,Pt).replace(/punct/g,Fe).getRegex(),Fl="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Bl=I(Fl,"gu").replace(/notPunctSpace/g,Xt).replace(/punctSpace/g,Pt).replace(/punct/g,Fe).getRegex(),$l=I(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Fe).getRegex(),Ul="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ql=I(Ul,"gu").replace(/notPunctSpace/g,Xt).replace(/punctSpace/g,Pt).replace(/punct/g,Fe).getRegex(),Hl=I(/\\(punct)/,"gu").replace(/punct/g,Fe).getRegex(),Wl=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Xl=I(Ar).replace("(?:-->|$)","-->").getRegex(),jl=I("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Xl).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),go=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,bn=I(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",go).getRegex(),Vl=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",bn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Gl=I(/^!?\[(label)\]\[(ref)\]/).replace("label",bn).replace("ref",Sr).getRegex(),Kl=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sr).getRegex(),Za=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Yl=I(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",go).getRegex(),Jl=I("reflink|nolink(?!\\()","g").replace("reflink",I(/^!?\[(label)\]\[(ref)\]/).replace("label",Yl).replace("ref",Za).getRegex()).replace("nolink",I(/^!?\[(ref)\](?:\[\])?/).replace("ref",Za).getRegex()).getRegex(),Qa=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Zl=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ql=I(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Zl).getRegex(),Er={_backpedal:st,anyPunctuation:Hl,autolink:Wl,blockSkip:Cl,br:fo,code:wl,del:st,delLDelim:st,delRDelim:st,emStrongLDelim:Rl,emStrongRDelimAst:Ll,emStrongRDelimUnd:Ol,escape:vl,link:Vl,nolink:Kl,punctuation:Sl,reflink:Gl,reflinkSearch:Jl,tag:jl,text:_l,url:st},ec={...Er,emStrongLDelim:Ml,emStrongRDelimAst:zl,emStrongRDelimUnd:Bl,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",bn).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bn).getRegex()},xr={...Er,emStrongRDelimAst:Dl,emStrongLDelim:Pl,delLDelim:$l,delRDelim:ql,url:I(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ql).replace("protocol",Qa).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:I(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Qa).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},tc={...xr,br:I(fo).replace("{2,}","*").getRegex(),text:I(xr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gn={normal:Tr,gfm:kl,pedantic:yl},Ut={normal:Er,gfm:xr,breaks:tc,pedantic:ec},nc={"&":"&","<":"<",">":">",'"':""","'":"'"},eo=t=>nc[t];function we(t,e){if(e){if(pe.escapeTest.test(t))return t.replace(pe.escapeReplace,eo)}else if(pe.escapeTestNoEncode.test(t))return t.replace(pe.escapeReplaceNoEncode,eo);return t}function rc(t){return t.replace(pe.numericCharacterReference,(e,n,r)=>{let a=n===void 0?Number.parseInt(r,16):Number.parseInt(n,10);return a===0||a>1114111||a>=55296&&a<=57343?"\uFFFD":String.fromCodePoint(a)})}function to(t){try{t=encodeURI(t).replace(pe.percentDecode,"%")}catch{return null}return t}function no(t,e){let n=t.replace(pe.findPipe,(o,s,l)=>{let u=!1,d=s;for(;--d>=0&&l[d]==="\\";)u=!u;return u?"|":" |"}),r=n.split(pe.splitPipe),a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(pe.slashPipe,"|");return r}function Ke(t,e,n){let r=t.length;if(r===0)return"";let a=0;for(;a<r;){let o=t.charAt(r-a-1);if(o===e&&!n)a++;else if(o!==e&&n)a++;else break}return t.slice(0,r-a)}function ro(t){let e=t.split(`
|
|
5
|
+
`),n=e.length-1;for(;n>=0&&pe.blankLine.test(e[n]);)n--;return e.length-n<=2?t:e.slice(0,n+1).join(`
|
|
6
|
+
`)}function xn(t){return t.trim().toLowerCase().toUpperCase().toLowerCase()}function ac(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function ao(t,e=0){let n=e,r="";for(let a of t)if(a===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=a,n++;return r}function oo(t,e,n,r,a){let o=e.href,s=e.title||null,l=t[1].replace(a.other.outputLinkReplace,"$1"),u=t[0].charAt(0)==="!";r.state.inLink=!0;let d=r.state.linkEmitted,p=r.state.inRawBlock;r.state.linkEmitted=!1;let m=r.inlineTokens(l),f=r.state.linkEmitted;if(r.state.linkEmitted=d,r.state.inLink=!1,!u){if(f){r.state.inRawBlock=p;return}r.state.linkEmitted=!0}return{type:u?"image":"link",raw:n,href:o,title:s,text:l,tokens:m}}function oc(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let a=r[1];return e.split(`
|
|
7
|
+
`).map(o=>{let s=o.match(n.other.beginningSpace);if(s===null)return o;let[l]=s;return o.slice(Math.min(l.length,a.length))}).join(`
|
|
8
|
+
`)}function io(t,e,n,r){if(!e.includes("<"))return!1;for(let a=0;a<e.length;a++){if(e[a]==="\\"){a++;continue}if(e[a]==="`"){let l=r.inline.code.exec(e.slice(a));if(l){a+=l[0].length-1;continue}}if(e[a]!=="<")continue;let o=t.slice(n+a),s=r.inline.tag.exec(o)||r.inline.autolink.exec(o);if(s){if(s[0].length>e.length-a)return!0;a+=s[0].length-1}}return!1}var kn=class{options;rules;lexer;constructor(t){this.options=t||ct}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=this.options.pedantic?e[0]:ro(e[0]),r=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:r}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],r=oc(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=Ke(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceTabChar.test(r))&&(n=r.trim())}return{type:"heading",raw:Ke(e[0],`
|
|
9
|
+
`),depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Ke(e[0],`
|
|
10
|
+
`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=Ke(e[0],`
|
|
11
11
|
`).split(`
|
|
12
|
-
`),r="",
|
|
12
|
+
`),r="",a="",o=[];for(;n.length>0;){let s=!1,l=[],u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))l.push(n[u]),s=!0;else if(!s)l.push(n[u]);else break;n=n.slice(u);let d=l.join(`
|
|
13
13
|
`),p=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
14
14
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
15
|
-
${d}`:d,
|
|
16
|
-
${p}`:p;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,
|
|
17
|
-
`),
|
|
18
|
-
`+
|
|
15
|
+
${d}`:d,a=a?`${a}
|
|
16
|
+
${p}`:p;let m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,o,!0),this.lexer.state.top=m,n.length===0)break;let f=o.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let b=f,g=n.join(`
|
|
17
|
+
`),k=b.raw+`
|
|
18
|
+
`+g.replace(this.rules.other.blockquoteSetextReplace2,""),y=this.blockquote(k);o[o.length-1]=y;let A=k.substring(y.raw.length).replace(/^\n/,""),x=A?A.split(`
|
|
19
19
|
`).length:0,_=x?n.slice(0,-x):n;_.length>0&&(r=`${r}
|
|
20
20
|
${_.join(`
|
|
21
|
-
`)}`),
|
|
21
|
+
`)}`),a=a.substring(0,a.length-b.text.length)+y.text;break}else if(f?.type==="list"){let b=f,g=b.raw+`
|
|
22
22
|
`+n.join(`
|
|
23
|
-
`),
|
|
24
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:
|
|
25
|
-
`,1)[0],f=e[1].length,
|
|
26
|
-
`,1)[0],
|
|
27
|
-
`,t=t.substring(
|
|
28
|
-
`,1)[0],
|
|
29
|
-
`+
|
|
30
|
-
`+
|
|
31
|
-
`,t=t.substring(G.length+1),
|
|
32
|
-
`),href:r,title:
|
|
33
|
-
`):[],
|
|
34
|
-
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?
|
|
23
|
+
`),k=this.list(g);o[o.length-1]=k,r=r.substring(0,r.length-f.raw.length)+k.raw,a=a.substring(0,a.length-b.raw.length)+k.raw,n=g.substring(o.at(-1).raw.length).split(`
|
|
24
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:o,text:a}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),r=n.length>1,a={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let u=!1,d="",p="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;d=e[0],t=t.substring(d.length);let m=e[2].split(`
|
|
25
|
+
`,1)[0],f=e[1].length,b=this.options.pedantic?ao(m,f):m.replace(this.rules.other.leadingSpaceTab,A=>ao(A,f)),g=t.split(`
|
|
26
|
+
`,1)[0],k=!b.trim(),y=0;if(this.options.pedantic?(y=2,p=b.trimStart()):k?y=f+1:(y=b.search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=b.slice(y),y+=f),k&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
|
27
|
+
`,t=t.substring(g.length+1),u=!0),!u){let A=this.rules.other.nextBulletRegex(y),x=this.rules.other.hrRegex(y),_=this.rules.other.fencesBeginRegex(y),T=this.rules.other.headingBeginRegex(y),R=this.rules.other.htmlBeginRegex(y),F=this.rules.other.blockquoteBeginRegex(y);for(;t;){let G=t.split(`
|
|
28
|
+
`,1)[0],U;if(g=G,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),U=g):U=g.replace(this.rules.other.leadingSpaceTab,W=>W.replace(this.rules.other.tabCharGlobal," ")),_.test(g)||T.test(g)||R.test(g)||F.test(g)||A.test(g)||x.test(g))break;if(U.search(this.rules.other.nonSpaceChar)>=y||!g.trim())p+=`
|
|
29
|
+
`+U.slice(y);else{if(k||b.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(b)||T.test(b)||x.test(b))break;p+=`
|
|
30
|
+
`+g}k=!g.trim(),d+=G+`
|
|
31
|
+
`,t=t.substring(G.length+1),b=U.slice(y)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(s=!0)),a.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),a.raw+=d}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u of a.items)if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),!a.loose){let d=u.tokens.filter(m=>m.type==="space"),p=d.length>0&&d.some(m=>this.rules.other.anyLine.test(m.raw));a.loose=p}for(let u of a.items){let d=u.tokens[0];if(u.task&&(d?.type==="text"||d?.type==="paragraph")){u.text=u.text.replace(this.rules.other.listReplaceTask,""),d.raw=d.raw.replace(this.rules.other.listReplaceTask,""),d.text=d.text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(u.raw);if(p){let m={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};u.checked=m.checked,a.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=m.raw+u.tokens[0].raw,u.tokens[0].text=m.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(m)):u.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):u.tokens.unshift(m)}}else u.task&&(u.task=!1)}if(a.loose)for(let u of a.items){u.loose=!0;for(let d of u.tokens)d.type==="text"&&(d.type="paragraph")}return a}}html(t){let e=this.rules.block.html.exec(t);if(e){let n=ro(e[0]);return{type:"html",block:!0,raw:n,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:n}}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=xn(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:Ke(e[0],`
|
|
32
|
+
`),href:r,title:a}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=no(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
33
|
+
`):[],o={type:"table",raw:Ke(e[0],`
|
|
34
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let s of r)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<n.length;s++)o.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:o.align[s]});for(let s of a)o.rows.push(no(s,o.header.length).map((l,u)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[u]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:Ke(e[0],`
|
|
35
35
|
`),depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
|
|
36
|
-
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&
|
|
37
|
-
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(
|
|
38
|
-
`:n.push(
|
|
36
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&io(t,e[1],n,this.rules))return;let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Ke(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=ac(e[2],"()");if(s===-2)return;if(s>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let a=e[2],o="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],o=s[3])}else o=e[3]?e[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?a=a.slice(1):a=a.slice(1,-1)),oo(e,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let r=n[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&io(t,n[1],r,this.rules))return;let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=e[xn(a)];if(!o){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return oo(n,o,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(t);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let a=[...r[0]].length-1,o,s,l=a,u=0,d=r[0][0],p=n===d,m=d==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,e=e.slice(-1*t.length+a);(r=m.exec(e))!==null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(s=[...o].length,r[3]||r[4]){l+=s;continue}else if(r[5]||r[6]){if(a%3&&!((a+s)%3)){u+=s;continue}if(p)break}if(l-=s,l>0)continue;s=Math.min(s,s+l+u);let f=[...r[0]][0].length,b=t.slice(0,a+r.index+f+s);if(Math.min(a,s)%2){let k=b.slice(1,-1);return{type:"em",raw:b,text:k,tokens:this.lexer.inlineTokens(k)}}let g=b.slice(2,-2);return{type:"strong",raw:b,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let r=this.rules.inline.delLDelim.exec(t);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let a=[...r[0]].length-1,o,s,l=a,u=this.rules.inline.delRDelim;for(u.lastIndex=0,e=e.slice(-1*t.length+a);(r=u.exec(e))!==null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o||(s=[...o].length,s!==a))continue;if(r[3]||r[4]){l+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l);let d=[...r[0]][0].length,p=t.slice(0,a+r.index+d+s),m=p.slice(a,-a);return{type:"del",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let a;do a=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(a!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,autolink:!0,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:n?e[0]:rc(e[0]),escaped:n}}}},Pe=class kr{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ct,this.options.tokenizer=this.options.tokenizer||new kn,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let n={other:pe,block:gn.normal,inline:Ut.normal};this.options.pedantic?(n.block=gn.pedantic,n.inline=Ut.pedantic):this.options.gfm&&(n.block=gn.gfm,this.options.breaks?n.inline=Ut.breaks:n.inline=Ut.gfm),this.tokenizer.rules=n}static get rules(){return{block:gn,inline:Ut}}static lex(e,n){return new kr(n).lex(e)}static lexInline(e,n){return new kr(n).inlineTokens(e)}lex(e){e=e.replace(pe.carriageReturn,`
|
|
37
|
+
`),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(pe.tabCharGlobal," ").replace(pe.spaceLine,""));let a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let o;if(this.options.extensions?.block?.some(l=>(o=l.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let l=n.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
|
|
38
|
+
`:n.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
39
39
|
`)?"":`
|
|
40
|
-
`)+
|
|
41
|
-
`+
|
|
40
|
+
`)+o.raw,l.text+=`
|
|
41
|
+
`+o.text,this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
42
42
|
`)?"":`
|
|
43
|
-
`)+
|
|
44
|
-
`+
|
|
43
|
+
`)+o.raw,l.text+=`
|
|
44
|
+
`+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),n.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let l=1/0,u=e.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},u),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(s=e.substring(0,l+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
45
45
|
`)?"":`
|
|
46
|
-
`)+
|
|
47
|
-
`+
|
|
46
|
+
`)+o.raw,l.text+=`
|
|
47
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o),r=s.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
48
48
|
`)?"":`
|
|
49
|
-
`)+
|
|
50
|
-
`+
|
|
51
|
-
`:"";return r?'<pre><code class="language-'+
|
|
52
|
-
`:"<pre><code>"+(n?
|
|
49
|
+
`)+o.raw,l.text+=`
|
|
50
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}linkInText(e){if(!e.includes("["))return!1;let n=this.tokenizer.rules.inline.link;for(let r of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(n.test(r[0])&&e.charAt(r.index-1)!=="!")return!0;for(let r of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let a=r[0],o=a.lastIndexOf("[");if(!(a.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,xn(a.slice(o+1,-1))))&&!(o>1&&this.linkInText(a.slice(1,o-1))))return!0}return!1}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let r=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,u=d=>{let p=d.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,xn(d.slice(p+1,-1))))return d;if(p>1&&d.charAt(0)!=="!"){let m=d.slice(1,p-1);if(this.linkInText(m))return"["+m.replace(l,u)+"]["+"a".repeat(d.length-p-2)+"]"}return"["+"a".repeat(d.length-2)+"]"};r=r.replace(l,u)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,l=>"+".repeat(l.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(l,u,d)=>{let p=d?d.length:0;return l.slice(0,p)+"["+"a".repeat(l.length-p-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="",s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(o=""),a=!1;let l;if(this.options.extensions?.inline?.some(d=>(l=d.call({lexer:this},e,n))?(e=e.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let d=n.at(-1);l.type==="text"&&d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(e,r,o)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(e,r,o)){e=e.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),n.push(l);continue}let u=e;if(this.options.extensions?.startInline){let d=1/0,p=e.slice(1),m;this.options.extensions.startInline.forEach(f=>{m=f.call({lexer:this},p),typeof m=="number"&&m>=0&&(d=Math.min(d,m))}),d<1/0&&d>=0&&(u=e.substring(0,d+1))}if(l=this.tokenizer.inlineText(u)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!0;let d=n.at(-1);d?.type==="text"?(d.raw+=l.raw,d.text+=l.text):n.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}infiniteLoopError(e){let n="Infinite loop on byte: "+e;if(this.options.silent)console.error(n);else throw new Error(n)}},yn=class{options;parser;constructor(t){this.options=t||ct}space(t){return""}code({text:t,lang:e,escaped:n}){let r=(e||"").match(pe.notSpaceStart)?.[0],a=t?t.replace(pe.endingNewline,"")+`
|
|
51
|
+
`:"";return r?'<pre><code class="language-'+we(r)+'">'+(n?a:we(a,!0))+`</code></pre>
|
|
52
|
+
`:"<pre><code>"+(n?a:we(a,!0))+`</code></pre>
|
|
53
53
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
54
54
|
${this.parser.parse(t)}</blockquote>
|
|
55
55
|
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
|
|
56
56
|
`}hr(t){return`<hr>
|
|
57
|
-
`}list(t){let e=t.ordered,n=t.start,r="";for(let s=0;s<t.items.length;s++){let l=t.items[s];r+=this.listitem(l)}let
|
|
58
|
-
`+r+"</"+
|
|
57
|
+
`}list(t){let e=t.ordered,n=t.start,r="";for(let s=0;s<t.items.length;s++){let l=t.items[s];r+=this.listitem(l)}let a=e?"ol":"ul",o=e&&n!==1?' start="'+n+'"':"";return"<"+a+o+`>
|
|
58
|
+
`+r+"</"+a+`>
|
|
59
59
|
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
60
60
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
61
|
-
`}table(t){let e="",n="";for(let
|
|
61
|
+
`}table(t){let e="",n="";for(let a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);e+=this.tablerow({text:n});let r="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
62
62
|
<thead>
|
|
63
63
|
`+e+`</thead>
|
|
64
64
|
`+r+`</table>
|
|
65
65
|
`}tablerow({text:t}){return`<tr>
|
|
66
66
|
${t}</tr>
|
|
67
67
|
`}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
|
|
68
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${
|
|
69
|
-
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+ke(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},st=new Rr;function W(t,e){return st.parse(t,e)}W.options=W.setOptions=function(t){return st.setOptions(t),W.defaults=st.defaults,li(W.defaults),W};W.getDefaults=wr;W.defaults=lt;function oc(...t){return st.use(...t),W.defaults=st.defaults,li(W.defaults),W}W.use=oc;W.walkTokens=function(t,e){return st.walkTokens(t,e)};W.parseInline=st.parseInline;W.Parser=Ee;W.parser=Ee.parse;W.Renderer=yn;W.TextRenderer=Cr;W.Lexer=Te;W.lexer=Te.lex;W.Tokenizer=xn;W.Hooks=Ut;W.parse=W;var qu=W.options,Hu=W.setOptions,Wu=W.walkTokens,Xu=W.parseInline;var ju=Ee.parse,Vu=Te.lex;var En,U,vi,ic,Ye,bi,wi,ki,Pr,wn,Xt,_i,Dr,Mr,Lr,Si,Sn={},An=[],ac=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Cn=Array.isArray;function Fe(t,e){for(var n in e)t[n]=e[n];return t}function Nr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function sc(t,e,n){var r,o,i,s={};for(i in e)i=="key"?r=e[i]:i=="ref"?o=e[i]:s[i]=e[i];if(arguments.length>2&&(s.children=arguments.length>3?En.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return kn(t,s,r,o,null)}function kn(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++vi,__i:-1,__u:0};return o==null&&U.vnode!=null&&U.vnode(i),i}function V(t){return t.children}function _n(t,e){this.props=t,this.context=e}function ct(t,e){if(e==null)return t.__?ct(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?ct(t):null}function lc(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],o=[],i=Fe({},e);i.__v=e.__v+1,U.vnode&&U.vnode(i),Or(t.__P,i,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??ct(e),!!(32&e.__u),o),i.__v=e.__v,i.__.__k[i.__i]=i,Ri(r,i,o),e.__e=e.__=null,i.__e!=n&&Ai(i)}}function Ai(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Ai(t)}function Ir(t){(!t.__d&&(t.__d=!0)&&Ye.push(t)&&!Tn.__r++||bi!=U.debounceRendering)&&((bi=U.debounceRendering)||wi)(Tn)}function Tn(){try{for(var t,e=1;Ye.length;)Ye.length>e&&Ye.sort(ki),t=Ye.shift(),e=Ye.length,lc(t)}finally{Ye.length=Tn.__r=0}}function Ti(t,e,n,r,o,i,s,l,u,d,p){var m,f,g,b,v,k,T=r&&r.__k||An,x=e.length;for(u=cc(n,e,T,u,x),m=0;m<x;m++)(g=n.__k[m])!=null&&(f=g.__i!=-1&&T[g.__i]||Sn,g.__i=m,k=Or(t,g,f,o,i,s,l,u,d,p),b=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&zr(f.ref,null,g),p.push(g.ref,g.__c||b,g)),v==null&&b!=null&&(v=b),4&g.__u?(u=Ei(g,u,t),f.__e&&(f.__e=null)):typeof g.type=="function"&&k!==void 0?u=k:b&&(u=b.nextSibling),g.__u&=-7);return n.__e=v,u}function cc(t,e,n,r,o){var i,s,l,u,d,p=n.length,m=p,f=0;for(t.__k=new Array(o),i=0;i<o;i++)(s=e[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[i]=kn(null,s,null,null,null):Cn(s)?s=t.__k[i]=kn(V,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[i]=kn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,u=i+f,s.__=t,s.__b=t.__b+1,l=null,(d=s.__i=uc(s,n,u,m))!=-1&&(m--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(o>p?f--:o<p&&f++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?f--:d==u+1?f++:(d>u?f--:f++,s.__u|=4))):t.__k[i]=null;if(m)for(i=0;i<p;i++)(l=n[i])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=ct(l)),Mi(l,l));return r}function Ei(t,e,n){var r,o;if(typeof t.type=="function"){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=Ei(r[o],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=ct(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function uc(t,e,n,r){var o,i,s,l=t.key,u=t.type,d=e[n],p=d!=null&&(2&d.__u)==0;if(d===null&&l==null||p&&l==d.key&&u==d.type)return n;if(r>(p?1:0)){for(o=n-1,i=n+1;o>=0||i<e.length;)if((d=e[s=o>=0?o--:i++])!=null&&(2&d.__u)==0&&l==d.key&&u==d.type)return s}return-1}function xi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||ac.test(e)?n:n+"px"}function vn(t,e,n,r,o){var i,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||xi(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||xi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(_i,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n[Xt]=r[Xt]:(n[Xt]=Dr,t.addEventListener(e,i?Lr:Mr,i)):t.removeEventListener(e,i?Lr:Mr,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function yi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[wn]==null)e[wn]=Dr++;else if(e[wn]<n[Xt])return;return n(U.event?U.event(e):e)}}}function Or(t,e,n,r,o,i,s,l,u,d){var p,m,f,g,b,v,k,T,x,_,A,R,N,G,z,H,re=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),i=[l=e.__e=n.__e]),(p=U.__b)&&p(e);e:if(typeof re=="function"){m=s.length;try{if(x=e.props,_=re.prototype&&re.prototype.render,A=(p=re.contextType)&&r[p.__c],R=p?A?A.props.value:p.__:r,n.__c?T=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new re(x,R):(e.__c=f=new _n(x,R),f.constructor=re,f.render=fc),A&&A.sub(f),f.state||(f.state={}),f.__n=r,g=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&re.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Fe({},f.__s)),Fe(f.__s,re.getDerivedStateFromProps(x,f.__s))),b=f.props,v=f.state,f.__v=e,g)_&&re.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&re.getDerivedStateFromProps==null&&x!==b&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,R),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,R)===!1){e.__v!=n.__v&&(f.props=x,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(pe){pe&&(pe.__=e)}),An.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f),l=ct(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,R),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(b,v,k)})}if(f.context=R,f.props=x,f.__P=t,f.__e=!1,N=U.__r,G=0,_)f.state=f.__s,f.__d=!1,N&&N(e),p=f.render(f.props,f.state,f.context),An.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,N&&N(e),p=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++G<25);f.state=f.__s,f.getChildContext!=null&&(r=Fe(Fe({},r),f.getChildContext())),_&&!g&&f.getSnapshotBeforeUpdate!=null&&(k=f.getSnapshotBeforeUpdate(b,v)),z=p!=null&&p.type===V&&p.key==null?Pi(p.props.children):p,l=Ti(t,Cn(z)?z:[z],e,n,r,o,i,s,l,u,d),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),T&&(f.__E=f.__=null)}catch(pe){if(s.length=m,e.__v=null,u||i!=null){if(pe.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i!=null&&(i[i.indexOf(l)]=null),e.__e=l}else if(i!=null)for(H=i.length;H--;)Nr(i[H])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),pe.then||Ci(e),U.__e(pe,e,n)}}else i==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=dc(n.__e,e,n,r,o,i,s,u,d);return(p=U.diffed)&&p(e),128&e.__u?void 0:l}function Ci(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Ci))}function Ri(t,e,n){for(var r=0;r<n.length;r++)zr(n[r],n[++r],n[++r]);U.__c&&U.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){U.__e(i,o.__v)}})}function Pi(t){return typeof t!="object"||t==null||t.__b>0?t:Cn(t)?t.map(Pi):t.constructor!==void 0?null:Fe({},t)}function dc(t,e,n,r,o,i,s,l,u){var d,p,m,f,g,b,v,k=n.props||Sn,T=e.props,x=e.type;if(x=="svg"?o="http://www.w3.org/2000/svg":x=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((g=i[d])&&"setAttribute"in g==!!x&&(x?g.localName==x:g.nodeType==3)){t=g,i[d]=null;break}}if(t==null){if(x==null)return document.createTextNode(T);t=document.createElementNS(o,x,T.is&&T),l&&(U.__m&&U.__m(e,i),l=!1),i=null}if(x==null)k===T||l&&t.data==T||(t.data=T);else{if(i=x=="textarea"&&T.defaultValue!=null?null:i&&En.call(t.childNodes),!l&&i!=null)for(k={},d=0;d<t.attributes.length;d++)k[(g=t.attributes[d]).name]=g.value;for(d in k)g=k[d],d=="dangerouslySetInnerHTML"?m=g:d=="children"||d in T||d=="value"&&"defaultValue"in T||d=="checked"&&"defaultChecked"in T||vn(t,d,null,g,o);for(d in T)g=T[d],d=="children"?f=g:d=="dangerouslySetInnerHTML"?p=g:d=="value"?b=g:d=="checked"?v=g:l&&typeof g!="function"||k[d]===g||vn(t,d,g,k[d],o);if(p)l||m&&(p.__html==m.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(m&&(t.innerHTML=""),Ti(e.type=="template"?t.content:t,Cn(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,s,i?i[0]:n.__k&&ct(n,0),l,u),i!=null)for(d=i.length;d--;)Nr(i[d]);l&&x!="textarea"||(d="value",x=="progress"&&b==null?t.removeAttribute("value"):b!=null&&(b!==t[d]||x=="progress"&&!b||x=="option"&&b!=k[d])&&vn(t,d,b,k[d],o),d="checked",v!=null&&v!=t[d]&&vn(t,d,v,k[d],o))}return t}function zr(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(o){U.__e(o,n)}}function Mi(t,e,n){var r,o;if(U.unmount&&U.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||zr(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){U.__e(i,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&Mi(r[o],e,n||typeof t.type!="function");n||Nr(t.__e),t.__c=t.__=t.__e=void 0}function fc(t,e,n){return this.constructor(t,n)}function Pt(t,e,n){var r,o,i,s;e==document&&(e=document.documentElement),U.__&&U.__(t,e),o=(r=typeof n=="function")?null:n&&n.__k||e.__k,i=[],s=[],Or(e,t=(!r&&n||e).__k=sc(V,null,[t]),o||Sn,Sn,e.namespaceURI,!r&&n?[n]:o?null:e.firstChild?En.call(e.childNodes):null,i,!r&&n?n:o?o.__e:e.firstChild,r,s),Ri(i,t,s),t.props.children=null}function Li(t){function e(n){var r,o;return this.getChildContext||(r=new Set,(o={})[e.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(s){s.__e=!0,Ir(s)})},this.sub=function(i){r.add(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),s&&s.call(i)}}),n.children}return e.__c="__cC"+Si++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}En=An.slice,U={__e:function(t,e,n,r){for(var o,i,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),s=o.__d),s)return o.__E=o}catch(l){t=l}throw t}},vi=0,ic=function(t){return t!=null&&t.constructor===void 0},_n.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Fe({},this.state),typeof t=="function"&&(t=t(Fe({},n),this.props)),t&&Fe(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Ir(this))},_n.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Ir(this))},_n.prototype.render=V,Ye=[],wi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ki=function(t,e){return t.__v.__b-e.__v.__b},Tn.__r=0,Pr=Math.random().toString(8),wn="__d"+Pr,Xt="__a"+Pr,_i=/(PointerCapture)$|Capture$/i,Dr=0,Mr=yi(!1),Lr=yi(!0),Si=0;var Mt,Q,Fr,Ii,jt=0,Ui=[],ae=U,Di=ae.__b,Ni=ae.__r,Oi=ae.diffed,zi=ae.__c,Fi=ae.unmount,Bi=ae.__;function Pn(t,e){ae.__h&&ae.__h(Q,t,jt||e),jt=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function E(t){return jt=1,pc(Wi,t)}function pc(t,e,n){var r=Pn(Mt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Wi(void 0,e),function(l){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,l);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.__f)){var o=function(l,u,d){if(!r.__c.__H)return!0;var p=!1,m=r.__c.props!==l;if(r.__c.__H.__.some(function(g){if(g.__N){p=!0;var b=g.__[0];g.__=g.__N,g.__N=void 0,b!==g.__[0]&&(m=!0)}}),i){var f=i.call(this,l,u,d);return p?f||m:f}return!p||m};Q.__f=!0;var i=Q.shouldComponentUpdate,s=Q.componentWillUpdate;Q.componentWillUpdate=function(l,u,d){if(this.__e){var p=i;i=void 0,o(l,u,d),i=p}s&&s.call(this,l,u,d)},Q.shouldComponentUpdate=o}return r.__N||r.__}function X(t,e){var n=Pn(Mt++,3);!ae.__s&&Hi(n.__H,e)&&(n.__=t,n.u=e,Q.__H.__h.push(n))}function ee(t){return jt=5,Je(function(){return{current:t}},[])}function Je(t,e){var n=Pn(Mt++,7);return Hi(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ze(t,e){return jt=8,Je(function(){return t},e)}function qi(t){var e=Q.context[t.__c],n=Pn(Mt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Q)),e.props.value):t.__}function mc(){for(var t;t=Ui.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Rn),e.__h.some(Br),e.__h=[]}catch(n){e.__h=[],ae.__e(n,t.__v)}}}ae.__b=function(t){Q=null,Di&&Di(t)},ae.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Bi&&Bi(t,e)},ae.__r=function(t){Ni&&Ni(t),Mt=0;var e=(Q=t.__c).__H;e&&(Fr===Q?(e.__h=[],Q.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Rn),e.__h.some(Br),e.__h=[],Mt=0)),Fr=Q},ae.diffed=function(t){Oi&&Oi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ui.push(e)!==1&&Ii===ae.requestAnimationFrame||((Ii=ae.requestAnimationFrame)||hc)(mc)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),Fr=Q=null},ae.__c=function(t,e){e.some(function(n){try{n.__h.some(Rn),n.__h=n.__h.filter(function(r){return!r.__||Br(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],ae.__e(r,n.__v)}}),zi&&zi(t,e)},ae.unmount=function(t){Fi&&Fi(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Rn(r)}catch(o){e=o}}),n.__H=void 0,e&&ae.__e(e,n.__v))};var $i=typeof requestAnimationFrame=="function";function hc(t){var e,n=function(){clearTimeout(r),$i&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);$i&&(e=requestAnimationFrame(n))}function Rn(t){var e=Q,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Q=e}function Br(t){var e=Q;t.__c=t.__(),Q=e}function Hi(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Wi(t,e){return typeof e=="function"?e(t):e}var j=()=>typeof window<"u"&&window.tangu||{};function Xi(t){let e=typeof t?.status=="number"?t.status:0;if(e>=200&&e<300)return{ok:!0,status:e,data:t?.json??null};let n=t?.json&&typeof t.json=="object"?t.json:null,r=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,o=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:r,detail:o,transport:typeof t?.error=="string"?t.error:null}}var $r=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function M(t,e={}){let n=j().cloudFetch;if(!n)return $r("no_bridge");try{return Xi(await n({path:t,...e}))}catch(r){return $r(String(r?.message||r))}}async function Mn(t,e){if(!t)return e();try{return Xi(await t())}catch(n){return $r(String(n?.message||n))}}var Ln=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function Ke(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function In(t){let e=j().cloudInvoke;if(!e)return!1;try{return!!(await e("auth:openPayCenter",t))?.ok}catch{return!1}}async function Dn(t){let e=j().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var gc=0;function a(t,e,n,r,o,i){e||(e={});var s,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?s=e[l]:u[l]=e[l];var d={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--gc,__i:-1,__u:0,__source:o,__self:i};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return U.vnode&&U.vnode(d),d}var bc={user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M4 20c.8-3.5 4-5.5 8-5.5s7.2 2 8 5.5",gauge:"M4 16a8 8 0 1 1 16 0 M12 16l4-5 M12 16h.01",shield:"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3Z",chart:"M4 20V10 M10 20V4 M16 20v-7 M21 20H3",message:"M5 4h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-7l-5 4v-4H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",card:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z M3 10h18 M7 15h4",coins:"M9 11a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z M15.5 9.2A5 5 0 1 1 9.8 16",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M12 7v5l3 2",gift:"M4 11h16v9H4z M3 7h18v4H3z M12 7v13 M12 7c-1.5-3-5-3-5-1s3 1 5 1c2 0 5 1 5-1s-3.5-2-5 1",key:"M8 15a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M11 11h10 M17 11v3 M20 11v2",laptop:"M5 5h14v10H5z M3 19h18",alert:"M12 4l9 16H3l9-16Z M12 10v4 M12 17h.01",external:"M14 4h6v6 M20 4l-9 9 M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5",copy:"M9 9h11v11H9z M5 15H4V4h11v1",check:"M5 12.5l4.5 4.5L19 7.5",chevron:"M9 6l6 6-6 6",back:"M15 6l-6 6 6 6",pencil:"M4 20h4L19 9l-4-4L4 16v4Z M13.5 6.5l4 4",plus:"M12 5v14 M5 12h14",refresh:"M20 11a8 8 0 0 0-14.3-4.9L4 8 M4 4v4h4 M4 13a8 8 0 0 0 14.3 4.9L20 16 M20 20v-4h-4",phone:"M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M11 18h2",mail:"M4 6h16v12H4z M4 7l8 6 8-6",image:"M4 5h16v14H4z M4 16l5-5 4 4 3-3 4 4 M15.5 9.5h.01",x:"M6 6l12 12 M18 6L6 18",logout:"M15 4h4v16h-4 M10 8l-4 4 4 4 M6 12h10"};function q({name:t,size:e=14,class:n}){return a("svg",{class:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:a("path",{d:bc[t]})})}function Vt({size:t=12}){return a("svg",{class:"spin",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true",focusable:"false",children:a("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var xc={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","common.cancel":"\u53D6\u6D88","common.copied":"\u5DF2\u590D\u5236","common.copyFailed":"\u590D\u5236\u5931\u8D25","common.done":"\u5B8C\u6210","common.loadFailed":"\u6CA1\u80FD\u52A0\u8F7D","common.loadMore":"\u52A0\u8F7D\u66F4\u591A","common.loading":"\u52A0\u8F7D\u4E2D\u2026","common.openInBrowser":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00","common.retry":"\u91CD\u8BD5","common.save":"\u4FDD\u5B58","common.thisWeek":"\u672C\u5468","common.today":"\u4ECA\u65E5","common.unlimited":"\u4E0D\u9650","ann.eyebrow":"FORSION \xB7 \u516C\u544A","ann.close":"\u5173\u95ED","ann.ok":"\u77E5\u9053\u4E86","signin.button":"\u767B\u5F55 Forsion","signin.desc":"\u767B\u5F55 Forsion \u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u7BA1\u7406\u8D26\u53F7\u3001\u989D\u5EA6\u3001\u5B89\u5168\u4E0E\u53CD\u9988\u3002","signin.pending":"\u7B49\u5F85\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u767B\u5F55\u2026","signin.deviceHint":"\u6D4F\u89C8\u5668\u4F1A\u81EA\u52A8\u6253\u5F00\u767B\u5F55\u9875\uFF1B\u6CA1\u6709\u6253\u5F00\u7684\u8BDD\uFF0C\u7528\u624B\u673A\u626B\u7801\u6216\u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u5E76\u6838\u5BF9\u9A8C\u8BC1\u7801\u3002","signin.code":"\u9A8C\u8BC1\u7801","signin.openLink":"\u6253\u5F00\u767B\u5F55\u9875","signin.copyLink":"\u590D\u5236\u94FE\u63A5","signin.qrLabel":"\u767B\u5F55\u4E8C\u7EF4\u7801","account.profile.title":"\u4E2A\u4EBA\u8D44\u6599","account.profile.desc":"\u5934\u50CF\u3001\u6635\u79F0\uFF0C\u4EE5\u53CA\u7ED1\u5B9A\u7684\u624B\u673A\u548C\u90AE\u7BB1","account.avatar.change":"\u66F4\u6362\u5934\u50CF","account.avatar.saved":"\u5934\u50CF\u5DF2\u66F4\u65B0","account.nickname.edit":"\u4FEE\u6539\u6635\u79F0","account.nickname.label":"\u6635\u79F0","account.nickname.saved":"\u6635\u79F0\u5DF2\u66F4\u65B0","account.role.admin":"\u7BA1\u7406\u5458","account.username":"\u7528\u6237\u540D {name}","account.contact.phone":"\u624B\u673A","account.contact.email":"\u90AE\u7BB1","account.contact.unbound":"\u672A\u7ED1\u5B9A","account.contact.manage":"\u53BB\u5B89\u5168\u9875\u7BA1\u7406","account.web.open":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u4E2A\u4EBA\u4E2D\u5FC3","account.web.desc":"\u4E91\u7A7A\u95F4\u3001AI \u5927\u8111\u3001\u6295\u7A3F\u4E0E\u4E3B\u9898\u5728\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7BA1\u7406\u3002","member.title":"\u4F1A\u5458","member.desc":"\u5F53\u524D\u6863\u4F4D\u3001\u65B9\u6848\u4E0E\u5230\u671F\u65E5","member.upgrade":"\u5347\u7EA7\u4F1A\u5458","member.renew":"\u7EED\u8D39","member.freeName":"\u514D\u8D39\u7248","member.freeHint":"\u5347\u7EA7\u4F1A\u5458\u53EF\u4EE5\u83B7\u5F97\u66F4\u591A AI \u989D\u5EA6","member.expires":"{date} \u5230\u671F","member.noExpiry":"\u957F\u671F\u6709\u6548","member.loadFailed":"\u4F1A\u5458\u4FE1\u606F\u6682\u65F6\u62FF\u4E0D\u5230\u3002","local.title":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u8D26\u53F7","local.desc":"\u5728\u767B\u5F55\u8FC7\u7684\u8D26\u53F7\u4E4B\u95F4\u5207\u6362","local.current":"\u5F53\u524D","local.switch":"\u5207\u6362","local.add":"\u767B\u5F55\u5176\u4ED6\u8D26\u53F7","local.signOut":"\u9000\u51FA\u767B\u5F55","local.empty":"\u8FD8\u6CA1\u6709\u4FDD\u5B58\u7684\u8D26\u53F7","local.loadFailed":"\u8D26\u53F7\u5217\u8868\u6682\u65F6\u8BFB\u4E0D\u5230","quota.ai.title":"AI \u989D\u5EA6","quota.ai.desc":"\u4ECA\u65E5\u548C\u672C\u5468\u5404\u8FD8\u5269\u591A\u5C11\uFF1B\u7528\u5B8C\u540E\u53EF\u4EE5\u7528\u989D\u5EA6\u91CD\u7F6E\u5361\u6062\u590D","quota.resetDaily":"\u6BCF\u5929 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","quota.resetWeekly":"{date} 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","card.title":"\u989D\u5EA6\u91CD\u7F6E\u5361","card.desc":"\u628A\u4ECA\u65E5\u548C\u672C\u5468\u7684 AI \u989D\u5EA6\u6062\u590D\u5230 100%","card.owned":"\u6301\u6709 {n} \u5F20","card.use":"\u4F7F\u7528\u4E00\u5F20","card.useConfirm":"\u786E\u8BA4\u4F7F\u7528","card.used":"\u5DF2\u4F7F\u7528 1 \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","card.left":"\u8FD8\u5269 {n} \u5F20","card.noneHint":"\u6CA1\u6709\u989D\u5EA6\u91CD\u7F6E\u5361\u4E86\uFF0C\u53EF\u4EE5\u7528\u79EF\u5206\u5151\u6362\u3002","card.exchange":"\u7528\u79EF\u5206\u5151\u6362","card.price":"\u6BCF\u5F20 {price} \u79EF\u5206\uFF0C\u4E00\u6B21 1\u201350 \u5F20","card.count":"\u5151\u6362\u5F20\u6570","card.cost":"\u82B1\u8D39 {cost} \u79EF\u5206","card.countHint":"\u586B 1\u201350","card.exchangeButton":"\u5151\u6362","card.exchangeConfirm":"\u786E\u8BA4\u82B1\u8D39 {cost} \u79EF\u5206","card.exchanged":"\u5DF2\u5151\u6362 {n} \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","points.title":"\u79EF\u5206","points.desc":"\u79EF\u5206\u53EF\u4EE5\u5151\u6362\u989D\u5EA6\u91CD\u7F6E\u5361","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","bg.title":"\u540E\u53F0\u989D\u5EA6","bg.desc":"Muse \u4E0E\u81EA\u52A8\u5316\u4F7F\u7528\uFF0C\u548C AI \u989D\u5EA6\u5206\u5F00\u8BA1\u7B97","bg.autoMain":"\u7528\u5B8C\u540E\u6539\u7528 AI \u989D\u5EA6\u7EE7\u7EED","bg.autoMainDesc":"\u5173\u7740\u65F6\uFF0C\u540E\u53F0\u989D\u5EA6\u7528\u5B8C\u540E Muse \u4E0E\u81EA\u52A8\u5316\u4F1A\u6682\u505C","bg.convert":"\u4ECE AI \u989D\u5EA6\u8F6C\u5165","bg.convertDesc":"\u6309 AI \u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B\u8F6C\u5165\uFF0C\u672C\u5468\u671F\u5185\u6709\u6548","bg.convertConfirm":"\u786E\u8BA4\u8F6C\u5165 {pct}%","bg.converted":"\u5DF2\u4ECE AI \u989D\u5EA6\u8F6C\u5165 {pct}%","invite.title":"\u9080\u8BF7\u4E0E\u5151\u6362","invite.desc":"\u9080\u8BF7\u597D\u53CB\u6CE8\u518C\uFF0C\u6216\u5151\u6362\u4F60\u6536\u5230\u7684\u7801","invite.myCode":"\u6211\u7684\u9080\u8BF7\u7801","invite.count":"\u5DF2\u9080\u8BF7 {n} \u4EBA","invite.copyCode":"\u590D\u5236\u9080\u8BF7\u7801","invite.copyLink":"\u590D\u5236\u9080\u8BF7\u94FE\u63A5","invite.loadFailed":"\u9080\u8BF7\u7801\u6682\u65F6\u62FF\u4E0D\u5230","invite.claim":"\u586B\u5199\u9080\u8BF7\u7801","invite.claimDesc":"\u6CE8\u518C\u540E 7 \u5929\u5185\uFF0C\u53EF\u4EE5\u8865\u586B\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimPlaceholder":"\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimSubmit":"\u63D0\u4EA4","invite.claimed":"\u9080\u8BF7\u7801\u5DF2\u751F\u6548","redeem.title":"\u5151\u6362\u7801","redeem.desc":"\u5151\u6362\u79EF\u5206\u3001\u4F1A\u5458\u6216\u5176\u4ED6\u5956\u52B1","redeem.placeholder":"\u8F93\u5165\u5151\u6362\u7801","redeem.submit":"\u5151\u6362","redeem.success":"\u5151\u6362\u6210\u529F","redeem.successWith":"\u5151\u6362\u6210\u529F\uFF1A{what}","redeem.gotPoints":"{n} \u79EF\u5206","redeem.gotMembership":"\u4F1A\u5458","sec.methods.title":"\u767B\u5F55\u65B9\u5F0F","sec.methods.desc":"\u624B\u673A\u548C\u90AE\u7BB1\u53EF\u4EE5\u7528\u6765\u767B\u5F55\u3001\u627E\u56DE\u5BC6\u7801","sec.bind":"\u7ED1\u5B9A","sec.change":"\u66F4\u6362","sec.phone":"\u624B\u673A\u53F7","sec.email":"\u90AE\u7BB1\u5730\u5740","sec.newPhone":"\u65B0\u624B\u673A\u53F7","sec.newEmail":"\u65B0\u90AE\u7BB1\u5730\u5740","sec.phonePlaceholder":"\u4E2D\u56FD\u5927\u9646\u53F7\u7801\u76F4\u63A5\u586B\uFF0C\u5176\u4ED6\u5730\u533A\u5E26 +\u533A\u53F7","sec.emailPlaceholder":"name@example.com","sec.code":"\u9A8C\u8BC1\u7801","sec.codePlaceholder":"\u8F93\u5165\u9A8C\u8BC1\u7801","sec.sendCode":"\u53D1\u9001\u9A8C\u8BC1\u7801","sec.resendIn":"{s} \u79D2\u540E\u91CD\u53D1","sec.codeSent":"\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001","sec.bindSubmit":"\u786E\u8BA4\u7ED1\u5B9A","sec.phoneBound":"\u624B\u673A\u5DF2\u7ED1\u5B9A","sec.emailBound":"\u90AE\u7BB1\u5DF2\u7ED1\u5B9A","sec.devices.title":"\u767B\u5F55\u8BBE\u5907","sec.devices.desc":"\u62C5\u5FC3\u8D26\u53F7\u88AB\u522B\u4EBA\u7528\u4E86\uFF0C\u53EF\u4EE5\u8BA9\u6240\u6709\u8BBE\u5907\u91CD\u65B0\u767B\u5F55","sec.logoutAll":"\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDesc":"\u5305\u62EC\u8FD9\u53F0\u7535\u8111\uFF0C\u6240\u6709\u8BBE\u5907\u90FD\u8981\u91CD\u65B0\u767B\u5F55","sec.logoutAllConfirm":"\u786E\u8BA4\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDone":"\u5DF2\u9000\u51FA\u6240\u6709\u8BBE\u5907","pw.title":"\u5BC6\u7801","pw.desc":"{min}\u2013{max} \u4F4D\uFF0C\u542B\u5C0F\u5199\u5B57\u6BCD\u3001\u5927\u5199\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E0D\u80FD\u6709\u7A7A\u683C","pw.change":"\u4FEE\u6539\u5BC6\u7801","pw.modeLabel":"\u4FEE\u6539\u65B9\u5F0F","pw.mode.current":"\u7528\u5F53\u524D\u5BC6\u7801","pw.mode.code":"\u7528\u9A8C\u8BC1\u7801","pw.current":"\u5F53\u524D\u5BC6\u7801","pw.currentRequired":"\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801","pw.new":"\u65B0\u5BC6\u7801","pw.confirm":"\u518D\u8F93\u4E00\u6B21\u65B0\u5BC6\u7801","pw.mismatch":"\u4E24\u6B21\u8F93\u5165\u7684\u65B0\u5BC6\u7801\u4E0D\u4E00\u81F4","pw.submit":"\u4FEE\u6539\u5BC6\u7801","pw.submitReset":"\u8BBE\u7F6E\u65B0\u5BC6\u7801","pw.changed":"\u5BC6\u7801\u5DF2\u66F4\u65B0","pw.noPasswordYet":"\u8FD9\u4E2A\u8D26\u53F7\u8FD8\u6CA1\u6709\u8BBE\u7F6E\u5BC6\u7801\uFF0C\u8BF7\u6539\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u3002","pw.codeNeedsContact":"\u7ED1\u5B9A\u624B\u673A\u6216\u90AE\u7BB1\u540E\uFF0C\u624D\u80FD\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u5BC6\u7801\u3002","pw.via":"\u9A8C\u8BC1\u7801\u53D1\u5230","pw.codeTo":"\u9A8C\u8BC1\u7801\u4F1A\u53D1\u5230 {target}","pw.rulesLabel":"\u5BC6\u7801\u89C4\u5219","pw.req.length":"{min}\u2013{max} \u4F4D","pw.req.lower":"\u542B\u5C0F\u5199\u5B57\u6BCD","pw.req.upper":"\u542B\u5927\u5199\u5B57\u6BCD","pw.req.special":"\u542B\u7279\u6B8A\u5B57\u7B26","pw.req.space":"\u4E0D\u542B\u7A7A\u683C","pw.rule.format":"\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E","pw.rule.min":"\u5BC6\u7801\u81F3\u5C11 8 \u4F4D","pw.rule.max":"\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D","pw.rule.space":"\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C","pw.rule.lower":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD","pw.rule.upper":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD","pw.rule.special":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26","del.title":"\u6CE8\u9500\u8D26\u53F7","del.desc":"\u6C38\u4E45\u5220\u9664\u8D26\u53F7\u548C\u5168\u90E8\u6570\u636E\uFF0C\u65E0\u6CD5\u6062\u590D","del.start":"\u6CE8\u9500\u8D26\u53F7","del.warn":"\u6CE8\u9500\u540E\uFF0C\u8D26\u53F7\u3001\u79EF\u5206\u3001\u4F1A\u5458\u3001\u4E91\u7A7A\u95F4\u548C\u5168\u90E8\u6570\u636E\u90FD\u4F1A\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u627E\u56DE\u3002","del.methodLabel":"\u9A8C\u8BC1\u65B9\u5F0F","del.byCode":"\u9A8C\u8BC1\u7801","del.byPassword":"\u5BC6\u7801","del.codeLabel":"\u53D1\u5230 {target} \u7684\u9A8C\u8BC1\u7801","del.passwordLabel":"\u8D26\u53F7\u5BC6\u7801","del.submit":"\u6CE8\u9500\u8D26\u53F7","del.confirm":"\u786E\u8BA4\u6C38\u4E45\u6CE8\u9500","del.done":"\u8D26\u53F7\u5DF2\u6CE8\u9500","usage.overview.title":"\u7528\u91CF\u6982\u89C8","usage.overview.desc":"\u6240\u9009\u65F6\u95F4\u6BB5\u5185\u7684\u8BF7\u6C42\u4E0E AI \u989D\u5EA6\u6D88\u8017","usage.range":"\u65F6\u95F4\u8303\u56F4","usage.days":"{n} \u5929","usage.requests":"\u8BF7\u6C42\u6B21\u6570","usage.successRate":"\u6210\u529F\u7387","usage.consumption":"AI \u989D\u5EA6\u6D88\u8017","usage.ofToday":"\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650","usage.unlimitedNote":"\u4F60\u7684 AI \u989D\u5EA6\u4E0D\u9650\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.noLimitNote":"\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u4E3A 0 \u6216\u6682\u65F6\u62FF\u4E0D\u5230\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.byModel.title":"\u6309\u6A21\u578B","usage.byModel.desc":"\u5404\u6A21\u578B\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.byApp.title":"\u6309\u5E94\u7528","usage.byApp.desc":"\u5404\u5E94\u7528\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.col.model":"\u6A21\u578B","usage.col.app":"\u5E94\u7528","usage.col.requests":"\u8BF7\u6C42","usage.col.consumption":"\u989D\u5EA6\u6D88\u8017","usage.empty":"\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u7528\u91CF","usage.appUnknown":"\u5176\u4ED6","usage.recent.title":"\u6700\u8FD1\u6D88\u8017","usage.recent.desc":"\u6BCF\u6B21\u8C03\u7528\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B","usage.recentEmpty":"\u8FD8\u6CA1\u6709\u6D88\u8017\u8BB0\u5F55","usage.failed":"\u5931\u8D25","usage.shown":"\u5DF2\u663E\u793A {shown} / {total} \u6761","fb.list.title":"\u6211\u7684\u53CD\u9988","fb.list.desc":"\u63D0\u4EA4\u8FC7\u7684\u95EE\u9898\u548C\u5EFA\u8BAE\uFF0C\u56DE\u590D\u4F1A\u663E\u793A\u5728\u8FD9\u91CC","fb.new":"\u65B0\u5EFA\u53CD\u9988","fb.empty":"\u8FD8\u6CA1\u6709\u53CD\u9988","fb.untitled":"\u672A\u547D\u540D\u53CD\u9988","fb.unread":"\u6709\u65B0\u56DE\u590D","fb.shown":"\u5DF2\u663E\u793A {n} \u6761","fb.submitted":"\u5DF2\u63D0\u4EA4\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D","fb.descLabel":"\u63CF\u8FF0\u95EE\u9898\u6216\u5EFA\u8BAE","fb.descPlaceholder":"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF0C\u4F60\u671F\u671B\u600E\u6837\u2026\u2026","fb.imagesHint":"\u6700\u591A\u9644 {n} \u5F20\u622A\u56FE\uFF08\u6BCF\u5F20\u4E0D\u8D85\u8FC7 5MB\uFF09\uFF0C\u53EF\u4EE5\u7C98\u8D34\u6216\u62D6\u8FDB\u6765\u3002","fb.addImages":"\u6DFB\u52A0\u622A\u56FE","fb.removeImage":"\u79FB\u9664\u8FD9\u5F20\u56FE","fb.submit":"\u63D0\u4EA4","fb.back":"\u8FD4\u56DE\u5217\u8868","fb.you":"\u4F60","fb.support":"Forsion \u56E2\u961F","fb.attachment":"\u9644\u4EF6","fb.imagePreview":"\u67E5\u770B\u5927\u56FE","fb.closedNote":"\u8FD9\u4E2A\u5DE5\u5355\u5DF2\u5173\u95ED\uFF0C\u4E0D\u80FD\u518D\u56DE\u590D\u3002\u6709\u65B0\u95EE\u9898\u8BF7\u65B0\u5EFA\u53CD\u9988\u3002","fb.replyPlaceholder":"\u56DE\u590D\u2026","fb.replySend":"\u53D1\u9001\u56DE\u590D","fb.replySent":"\u56DE\u590D\u5DF2\u53D1\u9001","fb.status.open":"\u5F85\u5904\u7406","fb.status.in_progress":"\u5904\u7406\u4E2D","fb.status.resolved":"\u5DF2\u89E3\u51B3","fb.status.closed":"\u5DF2\u5173\u95ED","err.accountGone":"\u8FD9\u4E2A\u8D26\u53F7\u5DF2\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.adminCannotDelete":"\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500","err.avatarInvalid":"\u8FD9\u5F20\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6362\u4E00\u5F20\u8BD5\u8BD5","err.avatarTooLarge":"\u56FE\u7247\u592A\u5927\u4E86\uFF0C\u6362\u4E00\u5F20\u5C0F\u4E00\u70B9\u7684","err.backgroundUnavailable":"\u540E\u53F0\u989D\u5EA6\u6682\u65F6\u4E0D\u53EF\u7528","err.captcha":"\u9700\u8981\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u4EBA\u673A\u9A8C\u8BC1","err.codeCooldown":"\u53D1\u9001\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.codeInvalid":"\u9A8C\u8BC1\u7801\u4E0D\u5BF9\u6216\u5DF2\u8FC7\u671F","err.codeRequired":"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801","err.codeSendFailed":"\u9A8C\u8BC1\u7801\u6CA1\u53D1\u51FA\u53BB\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.currentPasswordWrong":"\u5F53\u524D\u5BC6\u7801\u4E0D\u5BF9","err.deleteTargetInvalid":"\u9A8C\u8BC1\u7801\u53EA\u80FD\u53D1\u5230\u8D26\u53F7\u7ED1\u5B9A\u7684\u624B\u673A\u6216\u90AE\u7BB1","err.deleteVerifyFailed":"\u9A8C\u8BC1\u6CA1\u901A\u8FC7\uFF0C\u8D26\u53F7\u6CA1\u6709\u6CE8\u9500","err.emailInUse":"\u8FD9\u4E2A\u90AE\u7BB1\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.emailInvalid":"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.featureDisabled":"\u8FD9\u9879\u529F\u80FD\u6682\u65F6\u5173\u95ED\u4E86","err.feedbackEmpty":"\u8BF7\u5199\u4E00\u4E0B\u95EE\u9898\u6216\u5EFA\u8BAE","err.feedbackTooLong":"\u63CF\u8FF0\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.generic":"\u64CD\u4F5C\u6CA1\u6709\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.imageRead":"\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765","err.imageTooLarge":"\u6BCF\u5F20\u56FE\u7247\u4E0D\u80FD\u8D85\u8FC7 5MB","err.imageType":"\u53EA\u80FD\u6DFB\u52A0\u56FE\u7247","err.insufficientMainQuota":"AI \u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6","err.insufficientPoints":"\u79EF\u5206\u4E0D\u591F","err.priceChanged":"\u91CD\u7F6E\u5361\u5355\u4EF7\u521A\u521A\u8C03\u6574\u8FC7\uFF0C\u8BF7\u770B\u4E00\u4E0B\u65B0\u4EF7\u683C\uFF0C\u518D\u786E\u8BA4\u5151\u6362\u3002","err.invalidCount":"\u5F20\u6570\u8981\u5728 1\u201350 \u4E4B\u95F4","err.invalidInviteCode":"\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548","err.inviteAlreadyUsed":"\u4F60\u5DF2\u7ECF\u7528\u8FC7\u9080\u8BF7\u7801\u4E86","err.inviteEmpty":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","err.inviteOwnCode":"\u4E0D\u80FD\u586B\u81EA\u5DF1\u7684\u9080\u8BF7\u7801","err.inviteWindowExpired":"\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F","err.loginCodeExpired":"\u767B\u5F55\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.loginInProgress":"\u6B63\u5728\u767B\u5F55\u4E2D","err.loginTimeout":"\u767B\u5F55\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5","err.loginUnsupported":"\u8FD9\u4E2A\u4E91\u7AEF\u4E0D\u652F\u6301\u684C\u9762\u7AEF\u767B\u5F55","err.network":"\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5","err.noCloudUrl":"\u8BF7\u5148\u5728\u300C\u8FDE\u63A5\u300D\u91CC\u586B\u5199\u4E91\u7AEF\u5730\u5740","err.noResetCard":"\u6CA1\u6709\u53EF\u7528\u7684\u989D\u5EA6\u91CD\u7F6E\u5361","err.openFailed":"\u6CA1\u80FD\u6253\u5F00\u6D4F\u89C8\u5668","err.passwordRequired":"\u8BF7\u586B\u5199\u5F53\u524D\u5BC6\u7801\u548C\u65B0\u5BC6\u7801","err.phoneInUse":"\u8FD9\u4E2A\u624B\u673A\u53F7\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.phoneInvalid":"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u5BF9\uFF08\u5176\u4ED6\u5730\u533A\u8BF7\u5E26 +\u533A\u53F7\uFF09","err.redeemEmpty":"\u8BF7\u8F93\u5165\u5151\u6362\u7801","err.redeemExpired":"\u5151\u6362\u7801\u5DF2\u8FC7\u671F","err.redeemInactive":"\u5151\u6362\u7801\u5DF2\u505C\u7528","err.redeemNotFound":"\u5151\u6362\u7801\u4E0D\u5B58\u5728","err.redeemUsedUp":"\u5151\u6362\u7801\u5DF2\u88AB\u7528\u5B8C","err.redeemUserLimit":"\u4F60\u5DF2\u7ECF\u5151\u6362\u8FC7\u8FD9\u4E2A\u7801\u4E86","err.replyEmpty":"\u8BF7\u8F93\u5165\u56DE\u590D\u5185\u5BB9","err.replyTooLong":"\u56DE\u590D\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.server":"\u670D\u52A1\u5668\u51FA\u9519\u4E86\uFF08{status}\uFF09\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.session":"\u767B\u5F55\u72B6\u6001\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.signedOut":"\u8BF7\u5148\u767B\u5F55 Forsion","err.targetInvalid":"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.ticketNotFound":"\u8FD9\u6761\u53CD\u9988\u4E0D\u5B58\u5728\u6216\u5DF2\u5220\u9664","err.tooFrequent":"\u64CD\u4F5C\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.tooManyImages":"\u6700\u591A\u6DFB\u52A0 5 \u5F20\u56FE\u7247","err.unavailable":"\u8FD9\u4E2A\u7248\u672C\u7684\u684C\u9762\u7AEF\u8FD8\u4E0D\u652F\u6301\u8FD9\u4E2A\u64CD\u4F5C\uFF0C\u8BF7\u66F4\u65B0 Forsion"},yc={"page.account":"Account","page.quota":"Quota & points","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","common.cancel":"Cancel","common.copied":"Copied","common.copyFailed":"Couldn't copy","common.done":"Done","common.loadFailed":"Couldn't load","common.loadMore":"Load more","common.loading":"Loading\u2026","common.openInBrowser":"Open in browser","common.retry":"Retry","common.save":"Save","common.thisWeek":"This week","common.today":"Today","common.unlimited":"Unlimited","ann.eyebrow":"FORSION \xB7 Announcement","ann.close":"Close","ann.ok":"Got it","signin.button":"Sign in to Forsion","signin.desc":"Sign in to your Forsion account to manage your account, quota, security and feedback here.","signin.pending":"Waiting for you to finish in your browser\u2026","signin.deviceHint":"Your browser opens the sign-in page on its own. If it doesn't, scan the code with your phone or open the link below, and check that the code matches.","signin.code":"Code","signin.openLink":"Open sign-in page","signin.copyLink":"Copy link","signin.qrLabel":"Sign-in QR code","account.profile.title":"Profile","account.profile.desc":"Your photo and nickname, plus the phone and email linked to your account","account.avatar.change":"Change photo","account.avatar.saved":"Photo updated","account.nickname.edit":"Edit nickname","account.nickname.label":"Nickname","account.nickname.saved":"Nickname updated","account.role.admin":"Admin","account.username":"Username {name}","account.contact.phone":"Phone","account.contact.email":"Email","account.contact.unbound":"Not linked","account.contact.manage":"Manage in Security","account.web.open":"Open the account center in your browser","account.web.desc":"Cloud storage, AI Brain, submissions and themes are managed in the web account center.","member.title":"Membership","member.desc":"Your tier, plan and expiry date","member.upgrade":"Upgrade membership","member.renew":"Renew","member.freeName":"Free plan","member.freeHint":"Upgrade to get more AI quota","member.expires":"Expires {date}","member.noExpiry":"No expiry","member.loadFailed":"Couldn't load your membership.","local.title":"Accounts on this computer","local.desc":"Switch between accounts you've signed in with","local.current":"Current","local.switch":"Switch","local.add":"Sign in to another account","local.signOut":"Sign out","local.empty":"No saved accounts yet","local.loadFailed":"Couldn't read the account list","quota.ai.title":"AI quota","quota.ai.desc":"What's left today and this week; a quota reset card restores it","quota.resetDaily":"Resets daily at 0:00 (Beijing time)","quota.resetWeekly":"Resets {date} at 0:00 (Beijing time)","card.title":"Quota reset card","card.desc":"Restores today's and this week's AI quota to 100%","card.owned":"You have {n}","card.use":"Use one","card.useConfirm":"Confirm","card.used":"Used 1 quota reset card","card.left":"{n} left","card.noneHint":"You have no quota reset cards left. You can exchange points for more.","card.exchange":"Exchange points","card.price":"{price} points each, 1\u201350 at a time","card.count":"Number of cards","card.cost":"Costs {cost} points","card.countHint":"Enter 1\u201350","card.exchangeButton":"Exchange","card.exchangeConfirm":"Spend {cost} points","card.exchanged":"Quota reset cards added: {n}","points.title":"Points","points.desc":"Use points to get quota reset cards","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy points","bg.title":"Background quota","bg.desc":"Used by Muse and automations, counted separately from your AI quota","bg.autoMain":"Continue with AI quota when used up","bg.autoMainDesc":"When off, Muse and automations pause once the background quota runs out","bg.convert":"Move from AI quota","bg.convertDesc":"Moves a share of your AI quota limit, valid for the current period","bg.convertConfirm":"Move {pct}%","bg.converted":"Moved {pct}% from your AI quota","invite.title":"Invites & codes","invite.desc":"Invite friends to join, or redeem a code you received","invite.myCode":"My invite code","invite.count":"{n} invited","invite.copyCode":"Copy code","invite.copyLink":"Copy invite link","invite.loadFailed":"Couldn't load your invite code","invite.claim":"Enter an invite code","invite.claimDesc":"Within 7 days of signing up, you can enter a friend's invite code","invite.claimPlaceholder":"Friend's invite code","invite.claimSubmit":"Submit","invite.claimed":"Invite code applied","redeem.title":"Redemption code","redeem.desc":"Redeem points, membership or other rewards","redeem.placeholder":"Enter a code","redeem.submit":"Redeem","redeem.success":"Redeemed","redeem.successWith":"Redeemed: {what}","redeem.gotPoints":"{n} points","redeem.gotMembership":"membership","sec.methods.title":"Sign-in methods","sec.methods.desc":"Your phone and email can be used to sign in and reset your password","sec.bind":"Link","sec.change":"Change","sec.phone":"Phone number","sec.email":"Email address","sec.newPhone":"New phone number","sec.newEmail":"New email address","sec.phonePlaceholder":"Mainland China numbers as is; others with +country code","sec.emailPlaceholder":"name@example.com","sec.code":"Verification code","sec.codePlaceholder":"Enter the code","sec.sendCode":"Send code","sec.resendIn":"Resend in {s}s","sec.codeSent":"Code sent","sec.bindSubmit":"Link","sec.phoneBound":"Phone linked","sec.emailBound":"Email linked","sec.devices.title":"Signed-in devices","sec.devices.desc":"If you think someone else is using your account, sign out on every device","sec.logoutAll":"Sign out everywhere","sec.logoutAllDesc":"Including this computer: every device has to sign in again","sec.logoutAllConfirm":"Confirm sign out everywhere","sec.logoutAllDone":"Signed out everywhere","pw.title":"Password","pw.desc":"{min}\u2013{max} characters, with a lowercase letter, an uppercase letter and a special character, and no spaces","pw.change":"Change password","pw.modeLabel":"How to change it","pw.mode.current":"With current password","pw.mode.code":"With a verification code","pw.current":"Current password","pw.currentRequired":"Enter your current password","pw.new":"New password","pw.confirm":"Confirm new password","pw.mismatch":"The new passwords don't match","pw.submit":"Change password","pw.submitReset":"Set new password","pw.changed":"Password updated","pw.noPasswordYet":"This account doesn't have a password yet. Set one with a verification code instead.","pw.codeNeedsContact":"Link a phone or email first to set a password with a verification code.","pw.via":"Send the code to","pw.codeTo":"The code goes to {target}","pw.rulesLabel":"Password rules","pw.req.length":"{min}\u2013{max} characters","pw.req.lower":"A lowercase letter","pw.req.upper":"An uppercase letter","pw.req.special":"A special character","pw.req.space":"No spaces","pw.rule.format":"Invalid password","pw.rule.min":"Password must be at least 8 characters","pw.rule.max":"Password can't be longer than 64 characters","pw.rule.space":"Password can't contain spaces","pw.rule.lower":"Password needs a lowercase letter","pw.rule.upper":"Password needs an uppercase letter","pw.rule.special":"Password needs a special character","del.title":"Delete account","del.desc":"Permanently delete your account and all its data. This can't be undone","del.start":"Delete account","del.warn":"Deleting your account removes your account, points, membership, cloud storage and all other data for good.","del.methodLabel":"Verify with","del.byCode":"Verification code","del.byPassword":"Password","del.codeLabel":"Code sent to {target}","del.passwordLabel":"Account password","del.submit":"Delete account","del.confirm":"Delete permanently","del.done":"Account deleted","usage.overview.title":"Overview","usage.overview.desc":"Requests and AI quota used in the selected period","usage.range":"Time range","usage.days":"{n} days","usage.requests":"Requests","usage.successRate":"Success rate","usage.consumption":"AI quota used","usage.ofToday":"Of your daily limit","usage.unlimitedNote":"Your AI quota is unlimited, so usage isn't shown as a percentage.","usage.noLimitNote":"Your daily limit is 0 or unavailable right now, so usage isn't shown as a percentage.","usage.byModel.title":"By model","usage.byModel.desc":"Requests and quota used per model","usage.byApp.title":"By app","usage.byApp.desc":"Requests and quota used per app","usage.col.model":"Model","usage.col.app":"App","usage.col.requests":"Requests","usage.col.consumption":"Quota used","usage.empty":"No usage in this period","usage.appUnknown":"Other","usage.recent.title":"Recent usage","usage.recent.desc":"Each call as a share of your daily limit","usage.recentEmpty":"No usage yet","usage.failed":"Failed","usage.shown":"Showing {shown} of {total}","fb.list.title":"My feedback","fb.list.desc":"Issues and suggestions you've sent; replies show up here","fb.new":"New feedback","fb.empty":"No feedback yet","fb.untitled":"Untitled feedback","fb.unread":"New reply","fb.shown":"Showing {n}","fb.submitted":"Sent. We'll reply as soon as we can","fb.descLabel":"Describe the issue or suggestion","fb.descPlaceholder":"What happened, and what did you expect?","fb.imagesHint":"Attach up to {n} screenshots (5 MB each). You can paste or drop them here.","fb.addImages":"Add screenshots","fb.removeImage":"Remove this image","fb.submit":"Send","fb.back":"Back to list","fb.you":"You","fb.support":"Forsion team","fb.attachment":"Attachment","fb.imagePreview":"View image","fb.closedNote":"This ticket is closed and can't take replies. Send new feedback for a new issue.","fb.replyPlaceholder":"Reply\u2026","fb.replySend":"Send reply","fb.replySent":"Reply sent","fb.status.open":"Open","fb.status.in_progress":"In progress","fb.status.resolved":"Resolved","fb.status.closed":"Closed","err.accountGone":"This account is signed out. Sign in again","err.adminCannotDelete":"Admin accounts can't be deleted here","err.avatarInvalid":"Couldn't read this image. Try another one","err.avatarTooLarge":"This image is too large. Try a smaller one","err.backgroundUnavailable":"Background quota is unavailable right now","err.captcha":"You need to finish a verification check in your browser","err.codeCooldown":"Too many codes requested. Try again shortly","err.codeInvalid":"The code is wrong or has expired","err.codeRequired":"Enter the verification code","err.codeSendFailed":"Couldn't send the code. Try again later","err.currentPasswordWrong":"Your current password is incorrect","err.deleteTargetInvalid":"Codes can only go to the phone or email linked to your account","err.deleteVerifyFailed":"Verification failed, so your account wasn't deleted","err.emailInUse":"This email is already used by another account","err.emailInvalid":"Enter a valid email address","err.featureDisabled":"This feature is turned off for now","err.feedbackEmpty":"Describe the issue or suggestion first","err.feedbackTooLong":"The description is too long (10,000 characters max)","err.generic":"That didn't work. Try again later","err.imageRead":"Couldn't read the image","err.imageTooLarge":"Each image must be 5 MB or less","err.imageType":"Only images can be added","err.insufficientMainQuota":"Your AI quota is used up, so there's nothing to move","err.insufficientPoints":"Not enough points","err.priceChanged":"The reset card price just changed. Check the new price, then confirm the exchange again.","err.invalidCount":"Choose between 1 and 50 cards","err.invalidInviteCode":"This invite code is invalid or has expired","err.inviteAlreadyUsed":"You've already used an invite code","err.inviteEmpty":"Enter an invite code","err.inviteOwnCode":"You can't use your own invite code","err.inviteWindowExpired":"The 7-day window after sign-up has passed","err.loginCodeExpired":"The sign-in code expired. Sign in again","err.loginInProgress":"A sign-in is already in progress","err.loginTimeout":"Sign-in timed out. Try again","err.loginUnsupported":"This cloud doesn't support desktop sign-in","err.network":"Network error. Check your connection and try again","err.noCloudUrl":"Set the cloud address under Connection first","err.noResetCard":"You have no quota reset cards","err.openFailed":"Couldn't open the browser","err.passwordRequired":"Enter your current and new password","err.phoneInUse":"This phone number is already used by another account","err.phoneInvalid":"Enter a valid phone number (with +country code outside mainland China)","err.redeemEmpty":"Enter a code","err.redeemExpired":"This code has expired","err.redeemInactive":"This code is no longer active","err.redeemNotFound":"This code doesn't exist","err.redeemUsedUp":"This code has been used up","err.redeemUserLimit":"You've already redeemed this code","err.replyEmpty":"Write a reply first","err.replyTooLong":"The reply is too long (10,000 characters max)","err.server":"Server error ({status}). Try again later","err.session":"You've been signed out. Sign in again","err.signedOut":"Sign in to Forsion first","err.targetInvalid":"Enter a valid phone number or email","err.ticketNotFound":"This feedback doesn't exist or was deleted","err.tooFrequent":"Too many attempts. Try again shortly","err.tooManyImages":"You can add up to 5 images","err.unavailable":"This version of the desktop app can't do that yet. Update Forsion"},ji={zh:xc,en:yc},Be=t=>t==="en"?"en":"zh";function Ur(t,e,n){let r=ji[t][e]??ji.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(o,i)=>i in n?String(n[i]):o):r}var Nn=t=>(e,n)=>Ur(t,e,n),$e=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var Vi=`
|
|
68
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${we(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:n,tokens:r,autolink:a}){let o=a?we(n,!0):this.parser.parseInline(r),s=to(t);if(s===null)return o;t=we(s,a);let l='<a href="'+t+'"';return e&&(l+=' title="'+we(e)+'"'),l+=">"+o+"</a>",l}image({href:t,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let a=to(t);if(a===null)return we(n);t=a;let o=`<img src="${we(t)}" alt="${we(n)}"`;return e&&(o+=` title="${we(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:we(t.text)}},Cr=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},Ie=class yr{options;renderer;textRenderer;constructor(e){this.options=e||ct,this.options.renderer=this.options.renderer||new yn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Cr}static parse(e,n){return new yr(n).parse(e)}static parseInline(e,n){return new yr(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let r=0;r<e.length;r++){let a=e[r];if(this.options.extensions?.renderers?.[a.type]){let s=a,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(s.type)){n+=l||"";continue}}let o=a;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let r="";for(let a=0;a<e.length;a++){let o=e[a];if(this.options.extensions?.renderers?.[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let s=o;switch(s.type){case"escape":{r+=n.text(s);break}case"html":{r+=n.html(s);break}case"link":{r+=n.link(s);break}case"image":{r+=n.image(s);break}case"checkbox":{r+=n.checkbox(s);break}case"strong":{r+=n.strong(s);break}case"em":{r+=n.em(s);break}case"codespan":{r+=n.codespan(s);break}case"br":{r+=n.br(s);break}case"del":{r+=n.del(s);break}case"text":{r+=n.text(s);break}default:{let l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},qt=class{options;block;constructor(t){this.options=t||ct}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?Pe.lex:Pe.lexInline}provideParser(t=this.block){return t?Ie.parse:Ie.parseInline}},Rr=class{defaults=vr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ie;Renderer=yn;TextRenderer=Cr;Lexer=Pe;Tokenizer=kn;Hooks=qt;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let a=r;for(let o of a.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of a.rows)for(let s of o)n=n.concat(this.walkTokens(s.tokens,e));break}case"list":{let a=r;n=n.concat(this.walkTokens(a.items,e));break}default:{let a=r;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(o=>{let s=a[o].flat(1/0);n=n.concat(this.walkTokens(s,e))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let o=e.renderers[a.name];o?e.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:e.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=e[a.level];o?o.unshift(a.tokenizer):e[a.level]=[a.tokenizer],a.start&&(a.level==="block"?e.startBlock?e.startBlock.push(a.start):e.startBlock=[a.start]:a.level==="inline"&&(e.startInline?e.startInline.push(a.start):e.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(e.childTokens[a.name]=a.childTokens)}),r.extensions=e),n.renderer){let a=this.defaults.renderer||new yn(this.defaults);for(let o in n.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,l=n.renderer[s],u=a[s];a[s]=(...d)=>{let p=l.apply(a,d);return p===!1&&(p=u.apply(a,d)),p||""}}r.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new kn(this.defaults);for(let o in n.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,l=n.tokenizer[s],u=a[s];a[s]=(...d)=>{let p=l.apply(a,d);return p===!1&&(p=u.apply(a,d)),p}}r.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new qt;for(let o in n.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,l=n.hooks[s],u=a[s];qt.passThroughHooks.has(o)?a[s]=d=>{if(this.defaults.async&&qt.passThroughHooksRespectAsync.has(o))return(async()=>{let m=await l.call(a,d);return u.call(a,m)})();let p=l.call(a,d);return u.call(a,p)}:a[s]=(...d)=>{if(this.defaults.async)return(async()=>{let m=await l.apply(a,d);return m===!1&&(m=await u.apply(a,d)),m})();let p=l.apply(a,d);return p===!1&&(p=u.apply(a,d)),p}}r.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Pe.lex(t,e??this.defaults)}parser(t,e){return Ie.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let r={...n},a={...this.defaults,...r},o=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&r.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let s=a.hooks?await a.hooks.preprocess(e):e,l=await(a.hooks?await a.hooks.provideLexer(t):t?Pe.lex:Pe.lexInline)(s,a),u=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(u,a.walkTokens));let d=await(a.hooks?await a.hooks.provideParser(t):t?Ie.parse:Ie.parseInline)(u,a);return a.hooks?await a.hooks.postprocess(d):d})().catch(o);try{a.hooks&&(e=a.hooks.preprocess(e));let s=(a.hooks?a.hooks.provideLexer(t):t?Pe.lex:Pe.lexInline)(e,a);a.hooks&&(s=a.hooks.processAllTokens(s)),a.walkTokens&&this.walkTokens(s,a.walkTokens);let l=(a.hooks?a.hooks.provideParser(t):t?Ie.parse:Ie.parseInline)(s,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(s){return o(s)}}}onError(t,e){return n=>{if(n.message+=`
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error occurred:</p><pre>"+we(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},lt=new Rr;function X(t,e){return lt.parse(t,e)}X.options=X.setOptions=function(t){return lt.setOptions(t),X.defaults=lt.defaults,so(X.defaults),X};X.getDefaults=vr;X.defaults=ct;function ic(...t){return lt.use(...t),X.defaults=lt.defaults,so(X.defaults),X}X.use=ic;X.walkTokens=function(t,e){return lt.walkTokens(t,e)};X.parseInline=lt.parseInline;X.Parser=Ie;X.parser=Ie.parse;X.Renderer=yn;X.TextRenderer=Cr;X.Lexer=Pe;X.lexer=Pe.lex;X.Tokenizer=kn;X.Hooks=qt;X.parse=X;var Vu=X.options,Gu=X.setOptions,Ku=X.walkTokens,Yu=X.parseInline;var Ju=Ie.parse,Zu=Pe.lex;var Cn,H,yo,sc,Ye,bo,vo,wo,Pr,wn,jt,_o,Dr,Ir,Mr,So,An={},Tn=[],lc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Rn=Array.isArray;function Be(t,e){for(var n in e)t[n]=e[n];return t}function Nr(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function cc(t,e,n){var r,a,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?a=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Cn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return _n(t,s,r,a,null)}function _n(t,e,n,r,a){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:a??++yo,__i:-1,__u:0};return a==null&&H.vnode!=null&&H.vnode(o),o}function q(t){return t.children}function Sn(t,e){this.props=t,this.context=e}function ut(t,e){if(e==null)return t.__?ut(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?ut(t):null}function uc(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,r=[],a=[],o=Be({},e);o.__v=e.__v+1,H.vnode&&H.vnode(o),zr(t.__P,o,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,r,n??ut(e),!!(32&e.__u),a),o.__v=e.__v,o.__.__k[o.__i]=o,Ro(r,o,a),e.__e=e.__=null,o.__e!=n&&Ao(o)}}function Ao(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Ao(t)}function Lr(t){(!t.__d&&(t.__d=!0)&&Ye.push(t)&&!En.__r++||bo!=H.debounceRendering)&&((bo=H.debounceRendering)||vo)(En)}function En(){try{for(var t,e=1;Ye.length;)Ye.length>e&&Ye.sort(wo),t=Ye.shift(),e=Ye.length,uc(t)}finally{Ye.length=En.__r=0}}function To(t,e,n,r,a,o,s,l,u,d,p){var m,f,b,g,k,y,A=r&&r.__k||Tn,x=e.length;for(u=dc(n,e,A,u,x),m=0;m<x;m++)(b=n.__k[m])!=null&&(f=b.__i!=-1&&A[b.__i]||An,b.__i=m,y=zr(t,b,f,a,o,s,l,u,d,p),g=b.__e,b.ref&&f.ref!=b.ref&&(f.ref&&Or(f.ref,null,b),p.push(b.ref,b.__c||g,b)),k==null&&g!=null&&(k=g),4&b.__u?(u=Eo(b,u,t),f.__e&&(f.__e=null)):typeof b.type=="function"&&y!==void 0?u=y:g&&(u=g.nextSibling),b.__u&=-7);return n.__e=k,u}function dc(t,e,n,r,a){var o,s,l,u,d,p=n.length,m=p,f=0;for(t.__k=new Array(a),o=0;o<a;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=t.__k[o]=_n(null,s,null,null,null):Rn(s)?s=t.__k[o]=_n(q,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=t.__k[o]=_n(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[o]=s,u=o+f,s.__=t,s.__b=t.__b+1,l=null,(d=s.__i=fc(s,n,u,m))!=-1&&(m--,(l=n[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(a>p?f--:a<p&&f++),typeof s.type!="function"&&(s.__u|=4)):d!=u&&(d==u-1?f--:d==u+1?f++:(d>u?f--:f++,s.__u|=4))):t.__k[o]=null;if(m)for(o=0;o<p;o++)(l=n[o])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=ut(l)),Io(l,l));return r}function Eo(t,e,n){var r,a;if(typeof t.type=="function"){for(r=t.__k,a=0;r&&a<r.length;a++)r[a]&&(r[a].__=t,e=Eo(r[a],e,n));return e}t.__e!=e&&(e&&t.type&&!e.parentNode&&(e=ut(t)),e=n.insertBefore(t.__e,e||null));do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function fc(t,e,n,r){var a,o,s,l=t.key,u=t.type,d=e[n],p=d!=null&&(2&d.__u)==0;if(d===null&&l==null||p&&l==d.key&&u==d.type)return n;if(r>(p?1:0)){for(a=n-1,o=n+1;a>=0||o<e.length;)if((d=e[s=a>=0?a--:o++])!=null&&(2&d.__u)==0&&l==d.key&&u==d.type)return s}return-1}function xo(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||lc.test(e)?n:n+"px"}function vn(t,e,n,r,a){var o,s;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||xo(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||xo(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(_o,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n[jt]=r[jt]:(n[jt]=Dr,t.addEventListener(e,o?Mr:Ir,o)):t.removeEventListener(e,o?Mr:Ir,o);else{if(a=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ko(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[wn]==null)e[wn]=Dr++;else if(e[wn]<n[jt])return;return n(H.event?H.event(e):e)}}}function zr(t,e,n,r,a,o,s,l,u,d){var p,m,f,b,g,k,y,A,x,_,T,R,F,G,U,W,re=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),o=[l=e.__e=n.__e]),(p=H.__b)&&p(e);e:if(typeof re=="function"){m=s.length;try{if(x=e.props,_=re.prototype&&re.prototype.render,T=(p=re.contextType)&&r[p.__c],R=p?T?T.props.value:p.__:r,n.__c?A=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new re(x,R):(e.__c=f=new Sn(x,R),f.constructor=re,f.render=mc),T&&T.sub(f),f.state||(f.state={}),f.__n=r,b=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&re.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Be({},f.__s)),Be(f.__s,re.getDerivedStateFromProps(x,f.__s))),g=f.props,k=f.state,f.__v=e,b)_&&re.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&re.getDerivedStateFromProps==null&&x!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,R),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,R)===!1){e.__v!=n.__v&&(f.props=x,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(he){he&&(he.__=e)}),Tn.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&s.push(f),l=ut(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,R),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,k,y)})}if(f.context=R,f.props=x,f.__P=t,f.__e=!1,F=H.__r,G=0,_)f.state=f.__s,f.__d=!1,F&&F(e),p=f.render(f.props,f.state,f.context),Tn.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,F&&F(e),p=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++G<25);f.state=f.__s,f.getChildContext!=null&&(r=Be(Be({},r),f.getChildContext())),_&&!b&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(g,k)),U=p!=null&&p.type===q&&p.key==null?Po(p.props.children):p,l=To(t,Rn(U)?U:[U],e,n,r,a,o,s,l,u,d),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),A&&(f.__E=f.__=null)}catch(he){if(s.length=m,e.__v=null,u||o!=null){if(he.then){for(e.__u|=u?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;o!=null&&(o[o.indexOf(l)]=null),e.__e=l}else if(o!=null)for(W=o.length;W--;)Nr(o[W])}else e.__e=n.__e;e.__k==null&&(e.__k=n.__k||[]),he.then||Co(e),H.__e(he,e,n)}}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):l=e.__e=pc(n.__e,e,n,r,a,o,s,u,d);return(p=H.diffed)&&p(e),128&e.__u?void 0:l}function Co(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(Co))}function Ro(t,e,n){for(var r=0;r<n.length;r++)Or(n[r],n[++r],n[++r]);H.__c&&H.__c(e,t),t.some(function(a){try{t=a.__h,a.__h=[],t.some(function(o){o.call(a)})}catch(o){H.__e(o,a.__v)}})}function Po(t){return typeof t!="object"||t==null||t.__b>0?t:Rn(t)?t.map(Po):t.constructor!==void 0?null:Be({},t)}function pc(t,e,n,r,a,o,s,l,u){var d,p,m,f,b,g,k,y=n.props||An,A=e.props,x=e.type;if(x=="svg"?a="http://www.w3.org/2000/svg":x=="math"?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((b=o[d])&&"setAttribute"in b==!!x&&(x?b.localName==x:b.nodeType==3)){t=b,o[d]=null;break}}if(t==null){if(x==null)return document.createTextNode(A);t=document.createElementNS(a,x,A.is&&A),l&&(H.__m&&H.__m(e,o),l=!1),o=null}if(x==null)y===A||l&&t.data==A||(t.data=A);else{if(o=x=="textarea"&&A.defaultValue!=null?null:o&&Cn.call(t.childNodes),!l&&o!=null)for(y={},d=0;d<t.attributes.length;d++)y[(b=t.attributes[d]).name]=b.value;for(d in y)b=y[d],d=="dangerouslySetInnerHTML"?m=b:d=="children"||d in A||d=="value"&&"defaultValue"in A||d=="checked"&&"defaultChecked"in A||vn(t,d,null,b,a);for(d in A)b=A[d],d=="children"?f=b:d=="dangerouslySetInnerHTML"?p=b:d=="value"?g=b:d=="checked"?k=b:l&&typeof b!="function"||y[d]===b||vn(t,d,b,y[d],a);if(p)l||m&&(p.__html==m.__html||p.__html==t.innerHTML)||(t.innerHTML=p.__html),e.__k=[];else if(m&&(t.innerHTML=""),To(e.type=="template"?t.content:t,Rn(f)?f:[f],e,n,r,x=="foreignObject"?"http://www.w3.org/1999/xhtml":a,o,s,o?o[0]:n.__k&&ut(n,0),l,u),o!=null)for(d=o.length;d--;)Nr(o[d]);l&&x!="textarea"||(d="value",x=="progress"&&g==null?t.removeAttribute("value"):g!=null&&(g!==t[d]||x=="progress"&&!g||x=="option"&&g!=y[d])&&vn(t,d,g,y[d],a),d="checked",k!=null&&k!=t[d]&&vn(t,d,k,y[d],a))}return t}function Or(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(a){H.__e(a,n)}}function Io(t,e,n){var r,a;if(H.unmount&&H.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||Or(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){H.__e(o,e)}r.base=r.__P=r.__n=null}if(r=t.__k)for(a=0;a<r.length;a++)r[a]&&Io(r[a],e,n||typeof t.type!="function");n||Nr(t.__e),t.__c=t.__=t.__e=void 0}function mc(t,e,n){return this.constructor(t,n)}function It(t,e,n){var r,a,o,s;e==document&&(e=document.documentElement),H.__&&H.__(t,e),a=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],zr(e,t=(!r&&n||e).__k=cc(q,null,[t]),a||An,An,e.namespaceURI,!r&&n?[n]:a?null:e.firstChild?Cn.call(e.childNodes):null,o,!r&&n?n:a?a.__e:e.firstChild,r,s),Ro(o,t,s),t.props.children=null}function Mo(t){function e(n){var r,a;return this.getChildContext||(r=new Set,(a={})[e.__c]=this,this.getChildContext=function(){return a},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&r.forEach(function(s){s.__e=!0,Lr(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return e.__c="__cC"+So++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,r){return n.children(r)}).contextType=e,e}Cn=Tn.slice,H={__e:function(t,e,n,r){for(var a,o,s;e=e.__;)if((a=e.__c)&&!a.__)try{if((o=a.constructor)&&o.getDerivedStateFromError!=null&&(a.setState(o.getDerivedStateFromError(t)),s=a.__d),a.componentDidCatch!=null&&(a.componentDidCatch(t,r||{}),s=a.__d),s)return a.__E=a}catch(l){t=l}throw t}},yo=0,sc=function(t){return t!=null&&t.constructor===void 0},Sn.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Be({},this.state),typeof t=="function"&&(t=t(Be({},n),this.props)),t&&Be(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Lr(this))},Sn.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Lr(this))},Sn.prototype.render=q,Ye=[],vo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,wo=function(t,e){return t.__v.__b-e.__v.__b},En.__r=0,Pr=Math.random().toString(8),wn="__d"+Pr,jt="__a"+Pr,_o=/(PointerCapture)$|Capture$/i,Dr=0,Ir=ko(!1),Mr=ko(!0),So=0;var Mt,ee,Fr,Lo,Vt=0,Uo=[],le=H,Do=le.__b,No=le.__r,zo=le.diffed,Oo=le.__c,Fo=le.unmount,Bo=le.__;function In(t,e){le.__h&&le.__h(ee,t,Vt||e),Vt=0;var n=ee.__H||(ee.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function E(t){return Vt=1,hc(Wo,t)}function hc(t,e,n){var r=In(Mt++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Wo(void 0,e),function(l){var u=r.__N?r.__N[0]:r.__[0],d=r.t(u,l);u!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=ee,!ee.__f)){var a=function(l,u,d){if(!r.__c.__H)return!0;var p=!1,m=r.__c.props!==l;if(r.__c.__H.__.some(function(b){if(b.__N){p=!0;var g=b.__[0];b.__=b.__N,b.__N=void 0,g!==b.__[0]&&(m=!0)}}),o){var f=o.call(this,l,u,d);return p?f||m:f}return!p||m};ee.__f=!0;var o=ee.shouldComponentUpdate,s=ee.componentWillUpdate;ee.componentWillUpdate=function(l,u,d){if(this.__e){var p=o;o=void 0,a(l,u,d),o=p}s&&s.call(this,l,u,d)},ee.shouldComponentUpdate=a}return r.__N||r.__}function j(t,e){var n=In(Mt++,3);!le.__s&&Ho(n.__H,e)&&(n.__=t,n.u=e,ee.__H.__h.push(n))}function te(t){return Vt=5,Je(function(){return{current:t}},[])}function Je(t,e){var n=In(Mt++,7);return Ho(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ze(t,e){return Vt=8,Je(function(){return t},e)}function qo(t){var e=ee.context[t.__c],n=In(Mt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(ee)),e.props.value):t.__}function gc(){for(var t;t=Uo.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Pn),e.__h.some(Br),e.__h=[]}catch(n){e.__h=[],le.__e(n,t.__v)}}}le.__b=function(t){ee=null,Do&&Do(t)},le.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Bo&&Bo(t,e)},le.__r=function(t){No&&No(t),Mt=0;var e=(ee=t.__c).__H;e&&(Fr===ee?(e.__h=[],ee.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Pn),e.__h.some(Br),e.__h=[],Mt=0)),Fr=ee},le.diffed=function(t){zo&&zo(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Uo.push(e)!==1&&Lo===le.requestAnimationFrame||((Lo=le.requestAnimationFrame)||bc)(gc)),e.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),Fr=ee=null},le.__c=function(t,e){e.some(function(n){try{n.__h.some(Pn),n.__h=n.__h.filter(function(r){return!r.__||Br(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],le.__e(r,n.__v)}}),Oo&&Oo(t,e)},le.unmount=function(t){Fo&&Fo(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(r){try{Pn(r)}catch(a){e=a}}),n.__H=void 0,e&&le.__e(e,n.__v))};var $o=typeof requestAnimationFrame=="function";function bc(t){var e,n=function(){clearTimeout(r),$o&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);$o&&(e=requestAnimationFrame(n))}function Pn(t){var e=ee,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),ee=e}function Br(t){var e=ee;t.__c=t.__(),ee=e}function Ho(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Wo(t,e){return typeof e=="function"?e(t):e}var V=()=>typeof window<"u"&&window.tangu||{};function Xo(t){let e=typeof t?.status=="number"?t.status:0;if(e>=200&&e<300)return{ok:!0,status:e,data:t?.json??null};let n=t?.json&&typeof t.json=="object"?t.json:null,r=typeof n?.error=="string"?n.error:typeof n?.code=="string"?n.code:null,a=typeof n?.detail=="string"?n.detail:typeof n?.message=="string"?n.message:null;return{ok:!1,status:e,code:r,detail:a,transport:typeof t?.error=="string"?t.error:null}}var $r=t=>({ok:!1,status:0,code:null,detail:null,transport:t});async function P(t,e={}){let n=V().cloudFetch;if(!n)return $r("no_bridge");try{return Xo(await n({path:t,...e}))}catch(r){return $r(String(r?.message||r))}}async function Mn(t,e){if(!t)return e();try{return Xo(await t())}catch(n){return $r(String(n?.message||n))}}var Ln=t=>t.status===401&&(t.transport==="not_signed_in"||t.code===null&&t.detail===null&&t.transport===null);function Qe(t){return String(t?.message??t??"").replace(/^Error invoking remote method '[^']*':\s*/,"").replace(/^(?:[A-Za-z]*Error):\s*/,"").trim()}async function Dn(t){let e=V().cloudInvoke;if(!e)return!1;try{return!!(await e("auth:openPayCenter",t))?.ok}catch{return!1}}async function Nn(t){let e=V().openAccountCenter;if(!e)return!1;try{return!!(await e(t)).ok}catch{return!1}}var xc=0;function i(t,e,n,r,a,o){e||(e={});var s,l,u=e;if("ref"in u)for(l in u={},e)l=="ref"?s=e[l]:u[l]=e[l];var d={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xc,__i:-1,__u:0,__source:a,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return H.vnode&&H.vnode(d),d}var kc={user:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M4 20c.8-3.5 4-5.5 8-5.5s7.2 2 8 5.5",backpack:"M9 5V3h6v2 M6 8a6 6 0 0 1 12 0v12H6V8Z M9 13h6v5H9z M3 11h3v7H3z M18 11h3v7h-3 M10 8h4",gauge:"M4 16a8 8 0 1 1 16 0 M12 16l4-5 M12 16h.01",shield:"M12 3l7 3v5c0 4.5-3 8.2-7 10-4-1.8-7-5.5-7-10V6l7-3Z",chart:"M4 20V10 M10 20V4 M16 20v-7 M21 20H3",message:"M5 4h14a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-7l-5 4v-4H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",card:"M4 6h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Z M3 10h18 M7 15h4",coins:"M9 11a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z M15.5 9.2A5 5 0 1 1 9.8 16",clock:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z M12 7v5l3 2",gift:"M4 11h16v9H4z M3 7h18v4H3z M12 7v13 M12 7c-1.5-3-5-3-5-1s3 1 5 1c2 0 5 1 5-1s-3.5-2-5 1",key:"M8 15a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z M11 11h10 M17 11v3 M20 11v2",laptop:"M5 5h14v10H5z M3 19h18",alert:"M12 4l9 16H3l9-16Z M12 10v4 M12 17h.01",external:"M14 4h6v6 M20 4l-9 9 M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5",copy:"M9 9h11v11H9z M5 15H4V4h11v1",check:"M5 12.5l4.5 4.5L19 7.5",chevron:"M9 6l6 6-6 6",back:"M15 6l-6 6 6 6",pencil:"M4 20h4L19 9l-4-4L4 16v4Z M13.5 6.5l4 4",plus:"M12 5v14 M5 12h14",refresh:"M20 11a8 8 0 0 0-14.3-4.9L4 8 M4 4v4h4 M4 13a8 8 0 0 0 14.3 4.9L20 16 M20 20v-4h-4",phone:"M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1Z M11 18h2",mail:"M4 6h16v12H4z M4 7l8 6 8-6",image:"M4 5h16v14H4z M4 16l5-5 4 4 3-3 4 4 M15.5 9.5h.01",x:"M6 6l12 12 M18 6L6 18",logout:"M15 4h4v16h-4 M10 8l-4 4 4 4 M6 12h10"};function D({name:t,size:e=14,class:n}){return i("svg",{class:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:i("path",{d:kc[t]})})}function Gt({size:t=12}){return i("svg",{class:"spin",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true",focusable:"false",children:i("path",{d:"M21 12a9 9 0 1 1-6.2-8.56"})})}var yc={"page.account":"\u8D26\u53F7","page.quota":"\u989D\u5EA6\u4E0E\u79EF\u5206","page.backpack":"\u80CC\u5305","page.security":"\u5B89\u5168","page.usage":"\u7528\u91CF\u8BB0\u5F55","page.feedback":"\u53CD\u9988","backpack.desc":"\u5728\u8FD9\u91CC\u67E5\u770B\u4F60\u83B7\u5F97\u7684\u7269\u54C1\uFF0C\u70B9\u51FB\u683C\u5B50\u67E5\u770B\u8BE6\u60C5\u3002","backpack.refresh":"\u5237\u65B0","backpack.total":"\u5171 {n} \u4EF6\u7269\u54C1","backpack.grid":"\u80CC\u5305\u7269\u54C1","backpack.slot":"{name}\uFF0C\u6570\u91CF {n}","backpack.item":"\u7269\u54C1","backpack.empty":"\u80CC\u5305\u8FD8\u662F\u7A7A\u7684","backpack.emptyHint":"\u5151\u6362\u6216\u83B7\u8D60\u7684\u7269\u54C1\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002","backpack.select":"\u70B9\u51FB\u7269\u54C1\u67E5\u770B\u8BE6\u60C5","backpack.details":"\u7269\u54C1\u8BE6\u60C5","backpack.quantity":"\u6301\u6709\u6570\u91CF","backpack.acquired":"\u83B7\u5F97\u65F6\u95F4","backpack.source":"\u83B7\u5F97\u65B9\u5F0F","backpack.source.points":"\u79EF\u5206\u5151\u6362","backpack.source.admin":"\u8D60\u9001","backpack.source.reward":"\u5956\u52B1","backpack.source.other":"\u4E91\u7AEF\u53D1\u653E","backpack.consumable":"\u6D88\u8017\u54C1","backpack.voucher":"\u5361\u5238","backpack.getCards":"\u5151\u6362\u91CD\u7F6E\u5361","backpack.manageCards":"\u4F7F\u7528\u6216\u5151\u6362","backpack.reveal":"\u67E5\u770B\u5361\u5BC6","backpack.copyKey":"\u590D\u5236\u5361\u5BC6","backpack.noKey":"\u8FD9\u4EF6\u7269\u54C1\u6CA1\u6709\u5361\u5BC6\u3002","backpack.use":"\u4F7F\u7528","backpack.confirmUse":"\u786E\u8BA4\u4F7F\u7528","backpack.consumeConfirm":"\u4F7F\u7528\u540E\u6D88\u8017 1 \u4EF6\u7269\u54C1\u3002","backpack.collectible":"\u7EAA\u5FF5\u54C1","backpack.effect.points":"+{n} \u79EF\u5206","backpack.effect.cards":"+{n} \u5F20\u91CD\u7F6E\u5361","backpack.effect.quota":"\u91CD\u7F6E\u4ECA\u65E5\u4E0E\u672C\u5468\u989D\u5EA6","backpack.rarity.common":"\u666E\u901A","backpack.rarity.rare":"\u7A00\u6709","backpack.rarity.epic":"\u53F2\u8BD7","backpack.rarity.legendary":"\u4F20\u8BF4","backpack.unavailable":"\u8FD9\u4EF6\u7269\u54C1\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5237\u65B0\u80CC\u5305\u3002","backpack.notUsable":"\u8FD9\u4EF6\u7269\u54C1\u4E0D\u80FD\u4F7F\u7528\u3002","backpack.quotaUnavailable":"\u8BF7\u5148\u4F7F\u7528\u4E91\u7AEF AI \u521D\u59CB\u5316\u989D\u5EA6\uFF0C\u518D\u4F7F\u7528\u8FD9\u4EF6\u7269\u54C1\u3002","common.cancel":"\u53D6\u6D88","common.copied":"\u5DF2\u590D\u5236","common.copyFailed":"\u590D\u5236\u5931\u8D25","common.done":"\u5B8C\u6210","common.loadFailed":"\u6CA1\u80FD\u52A0\u8F7D","common.loadMore":"\u52A0\u8F7D\u66F4\u591A","common.loading":"\u52A0\u8F7D\u4E2D\u2026","common.openInBrowser":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00","common.retry":"\u91CD\u8BD5","common.save":"\u4FDD\u5B58","common.thisWeek":"\u672C\u5468","common.today":"\u4ECA\u65E5","common.unlimited":"\u4E0D\u9650","ann.eyebrow":"FORSION \xB7 \u516C\u544A","ann.close":"\u5173\u95ED","ann.ok":"\u77E5\u9053\u4E86","signin.button":"\u767B\u5F55 Forsion","signin.desc":"\u767B\u5F55 Forsion \u8D26\u53F7\u540E\uFF0C\u53EF\u4EE5\u5728\u8FD9\u91CC\u7BA1\u7406\u8D26\u53F7\u3001\u989D\u5EA6\u3001\u5B89\u5168\u4E0E\u53CD\u9988\u3002","signin.pending":"\u7B49\u5F85\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u767B\u5F55\u2026","signin.deviceHint":"\u6D4F\u89C8\u5668\u4F1A\u81EA\u52A8\u6253\u5F00\u767B\u5F55\u9875\uFF1B\u6CA1\u6709\u6253\u5F00\u7684\u8BDD\uFF0C\u7528\u624B\u673A\u626B\u7801\u6216\u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u5E76\u6838\u5BF9\u9A8C\u8BC1\u7801\u3002","signin.code":"\u9A8C\u8BC1\u7801","signin.openLink":"\u6253\u5F00\u767B\u5F55\u9875","signin.copyLink":"\u590D\u5236\u94FE\u63A5","signin.qrLabel":"\u767B\u5F55\u4E8C\u7EF4\u7801","account.profile.title":"\u4E2A\u4EBA\u8D44\u6599","account.profile.desc":"\u5934\u50CF\u3001\u6635\u79F0\uFF0C\u4EE5\u53CA\u7ED1\u5B9A\u7684\u624B\u673A\u548C\u90AE\u7BB1","account.avatar.change":"\u66F4\u6362\u5934\u50CF","account.avatar.saved":"\u5934\u50CF\u5DF2\u66F4\u65B0","account.nickname.edit":"\u4FEE\u6539\u6635\u79F0","account.nickname.label":"\u6635\u79F0","account.nickname.saved":"\u6635\u79F0\u5DF2\u66F4\u65B0","account.role.admin":"\u7BA1\u7406\u5458","account.username":"\u7528\u6237\u540D {name}","account.contact.phone":"\u624B\u673A","account.contact.email":"\u90AE\u7BB1","account.contact.unbound":"\u672A\u7ED1\u5B9A","account.contact.manage":"\u53BB\u5B89\u5168\u9875\u7BA1\u7406","account.web.open":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u4E2A\u4EBA\u4E2D\u5FC3","account.web.desc":"\u4E91\u7A7A\u95F4\u3001AI \u5927\u8111\u3001\u6295\u7A3F\u4E0E\u4E3B\u9898\u5728\u7F51\u9875\u4E2A\u4EBA\u4E2D\u5FC3\u7BA1\u7406\u3002","member.title":"\u4F1A\u5458","member.desc":"\u5F53\u524D\u6863\u4F4D\u3001\u65B9\u6848\u4E0E\u5230\u671F\u65E5","member.upgrade":"\u5347\u7EA7\u4F1A\u5458","member.renew":"\u7EED\u8D39","member.freeName":"\u514D\u8D39\u7248","member.freeHint":"\u5347\u7EA7\u4F1A\u5458\u53EF\u4EE5\u83B7\u5F97\u66F4\u591A AI \u989D\u5EA6","member.expires":"{date} \u5230\u671F","member.noExpiry":"\u957F\u671F\u6709\u6548","member.loadFailed":"\u4F1A\u5458\u4FE1\u606F\u6682\u65F6\u62FF\u4E0D\u5230\u3002","local.title":"\u8FD9\u53F0\u7535\u8111\u4E0A\u7684\u8D26\u53F7","local.desc":"\u5728\u767B\u5F55\u8FC7\u7684\u8D26\u53F7\u4E4B\u95F4\u5207\u6362","local.current":"\u5F53\u524D","local.switch":"\u5207\u6362","local.add":"\u767B\u5F55\u5176\u4ED6\u8D26\u53F7","local.signOut":"\u9000\u51FA\u767B\u5F55","local.empty":"\u8FD8\u6CA1\u6709\u4FDD\u5B58\u7684\u8D26\u53F7","local.loadFailed":"\u8D26\u53F7\u5217\u8868\u6682\u65F6\u8BFB\u4E0D\u5230","quota.ai.title":"AI \u989D\u5EA6","quota.ai.desc":"\u4ECA\u65E5\u548C\u672C\u5468\u5404\u8FD8\u5269\u591A\u5C11\uFF1B\u7528\u5B8C\u540E\u53EF\u4EE5\u7528\u989D\u5EA6\u91CD\u7F6E\u5361\u6062\u590D","quota.resetDaily":"\u6BCF\u5929 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","quota.resetWeekly":"{date} 0:00 \u91CD\u7F6E\uFF08\u5317\u4EAC\u65F6\u95F4\uFF09","card.title":"\u989D\u5EA6\u91CD\u7F6E\u5361","card.desc":"\u628A\u4ECA\u65E5\u548C\u672C\u5468\u7684 AI \u989D\u5EA6\u6062\u590D\u5230 100%","card.owned":"\u6301\u6709 {n} \u5F20","card.use":"\u4F7F\u7528\u4E00\u5F20","card.useConfirm":"\u786E\u8BA4\u4F7F\u7528","card.used":"\u5DF2\u4F7F\u7528 1 \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","card.left":"\u8FD8\u5269 {n} \u5F20","card.noneHint":"\u6CA1\u6709\u989D\u5EA6\u91CD\u7F6E\u5361\u4E86\uFF0C\u53EF\u4EE5\u7528\u79EF\u5206\u5151\u6362\u3002","card.exchange":"\u7528\u79EF\u5206\u5151\u6362","card.price":"\u6BCF\u5F20 {price} \u79EF\u5206\uFF0C\u4E00\u6B21 1\u201350 \u5F20","card.count":"\u5151\u6362\u5F20\u6570","card.cost":"\u82B1\u8D39 {cost} \u79EF\u5206","card.countHint":"\u586B 1\u201350","card.exchangeButton":"\u5151\u6362","card.exchangeConfirm":"\u786E\u8BA4\u82B1\u8D39 {cost} \u79EF\u5206","card.exchanged":"\u5DF2\u5151\u6362 {n} \u5F20\u989D\u5EA6\u91CD\u7F6E\u5361","points.title":"\u79EF\u5206","points.desc":"\u79EF\u5206\u53EF\u4EE5\u5151\u6362\u989D\u5EA6\u91CD\u7F6E\u5361","points.balance":"\u4F59\u989D","points.balanceFailed":"\u4F59\u989D\u6682\u65F6\u62FF\u4E0D\u5230","points.recharge":"\u5145\u503C\u79EF\u5206","bg.title":"\u540E\u53F0\u989D\u5EA6","bg.desc":"Muse \u4E0E\u81EA\u52A8\u5316\u4F7F\u7528\uFF0C\u548C AI \u989D\u5EA6\u5206\u5F00\u8BA1\u7B97","bg.autoMain":"\u7528\u5B8C\u540E\u6539\u7528 AI \u989D\u5EA6\u7EE7\u7EED","bg.autoMainDesc":"\u5173\u7740\u65F6\uFF0C\u540E\u53F0\u989D\u5EA6\u7528\u5B8C\u540E Muse \u4E0E\u81EA\u52A8\u5316\u4F1A\u6682\u505C","bg.convert":"\u4ECE AI \u989D\u5EA6\u8F6C\u5165","bg.convertDesc":"\u6309 AI \u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B\u8F6C\u5165\uFF0C\u672C\u5468\u671F\u5185\u6709\u6548","bg.convertConfirm":"\u786E\u8BA4\u8F6C\u5165 {pct}%","bg.converted":"\u5DF2\u4ECE AI \u989D\u5EA6\u8F6C\u5165 {pct}%","invite.title":"\u9080\u8BF7\u4E0E\u5151\u6362","invite.desc":"\u9080\u8BF7\u597D\u53CB\u6CE8\u518C\uFF0C\u6216\u5151\u6362\u4F60\u6536\u5230\u7684\u7801","invite.myCode":"\u6211\u7684\u9080\u8BF7\u7801","invite.count":"\u5DF2\u9080\u8BF7 {n} \u4EBA","invite.copyCode":"\u590D\u5236\u9080\u8BF7\u7801","invite.copyLink":"\u590D\u5236\u9080\u8BF7\u94FE\u63A5","invite.loadFailed":"\u9080\u8BF7\u7801\u6682\u65F6\u62FF\u4E0D\u5230","invite.claim":"\u586B\u5199\u9080\u8BF7\u7801","invite.claimDesc":"\u6CE8\u518C\u540E 7 \u5929\u5185\uFF0C\u53EF\u4EE5\u8865\u586B\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimPlaceholder":"\u597D\u53CB\u7684\u9080\u8BF7\u7801","invite.claimSubmit":"\u63D0\u4EA4","invite.claimed":"\u9080\u8BF7\u7801\u5DF2\u751F\u6548","redeem.title":"\u5151\u6362\u7801","redeem.desc":"\u5151\u6362\u79EF\u5206\u3001\u4F1A\u5458\u6216\u5176\u4ED6\u5956\u52B1","redeem.placeholder":"\u8F93\u5165\u5151\u6362\u7801","redeem.submit":"\u5151\u6362","redeem.success":"\u5151\u6362\u6210\u529F","redeem.successWith":"\u5151\u6362\u6210\u529F\uFF1A{what}","redeem.gotPoints":"{n} \u79EF\u5206","redeem.gotMembership":"\u4F1A\u5458","sec.methods.title":"\u767B\u5F55\u65B9\u5F0F","sec.methods.desc":"\u624B\u673A\u548C\u90AE\u7BB1\u53EF\u4EE5\u7528\u6765\u767B\u5F55\u3001\u627E\u56DE\u5BC6\u7801","sec.bind":"\u7ED1\u5B9A","sec.change":"\u66F4\u6362","sec.phone":"\u624B\u673A\u53F7","sec.email":"\u90AE\u7BB1\u5730\u5740","sec.newPhone":"\u65B0\u624B\u673A\u53F7","sec.newEmail":"\u65B0\u90AE\u7BB1\u5730\u5740","sec.phonePlaceholder":"\u4E2D\u56FD\u5927\u9646\u53F7\u7801\u76F4\u63A5\u586B\uFF0C\u5176\u4ED6\u5730\u533A\u5E26 +\u533A\u53F7","sec.emailPlaceholder":"name@example.com","sec.code":"\u9A8C\u8BC1\u7801","sec.codePlaceholder":"\u8F93\u5165\u9A8C\u8BC1\u7801","sec.sendCode":"\u53D1\u9001\u9A8C\u8BC1\u7801","sec.resendIn":"{s} \u79D2\u540E\u91CD\u53D1","sec.codeSent":"\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001","sec.bindSubmit":"\u786E\u8BA4\u7ED1\u5B9A","sec.phoneBound":"\u624B\u673A\u5DF2\u7ED1\u5B9A","sec.emailBound":"\u90AE\u7BB1\u5DF2\u7ED1\u5B9A","sec.devices.title":"\u767B\u5F55\u8BBE\u5907","sec.devices.desc":"\u62C5\u5FC3\u8D26\u53F7\u88AB\u522B\u4EBA\u7528\u4E86\uFF0C\u53EF\u4EE5\u8BA9\u6240\u6709\u8BBE\u5907\u91CD\u65B0\u767B\u5F55","sec.logoutAll":"\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDesc":"\u5305\u62EC\u8FD9\u53F0\u7535\u8111\uFF0C\u6240\u6709\u8BBE\u5907\u90FD\u8981\u91CD\u65B0\u767B\u5F55","sec.logoutAllConfirm":"\u786E\u8BA4\u9000\u51FA\u6240\u6709\u8BBE\u5907","sec.logoutAllDone":"\u5DF2\u9000\u51FA\u6240\u6709\u8BBE\u5907","pw.title":"\u5BC6\u7801","pw.desc":"{min}\u2013{max} \u4F4D\uFF0C\u542B\u5C0F\u5199\u5B57\u6BCD\u3001\u5927\u5199\u5B57\u6BCD\u548C\u7279\u6B8A\u5B57\u7B26\uFF0C\u4E0D\u80FD\u6709\u7A7A\u683C","pw.change":"\u4FEE\u6539\u5BC6\u7801","pw.modeLabel":"\u4FEE\u6539\u65B9\u5F0F","pw.mode.current":"\u7528\u5F53\u524D\u5BC6\u7801","pw.mode.code":"\u7528\u9A8C\u8BC1\u7801","pw.current":"\u5F53\u524D\u5BC6\u7801","pw.currentRequired":"\u8BF7\u8F93\u5165\u5F53\u524D\u5BC6\u7801","pw.new":"\u65B0\u5BC6\u7801","pw.confirm":"\u518D\u8F93\u4E00\u6B21\u65B0\u5BC6\u7801","pw.mismatch":"\u4E24\u6B21\u8F93\u5165\u7684\u65B0\u5BC6\u7801\u4E0D\u4E00\u81F4","pw.submit":"\u4FEE\u6539\u5BC6\u7801","pw.submitReset":"\u8BBE\u7F6E\u65B0\u5BC6\u7801","pw.changed":"\u5BC6\u7801\u5DF2\u66F4\u65B0","pw.noPasswordYet":"\u8FD9\u4E2A\u8D26\u53F7\u8FD8\u6CA1\u6709\u8BBE\u7F6E\u5BC6\u7801\uFF0C\u8BF7\u6539\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u3002","pw.codeNeedsContact":"\u7ED1\u5B9A\u624B\u673A\u6216\u90AE\u7BB1\u540E\uFF0C\u624D\u80FD\u7528\u9A8C\u8BC1\u7801\u8BBE\u7F6E\u5BC6\u7801\u3002","pw.via":"\u9A8C\u8BC1\u7801\u53D1\u5230","pw.codeTo":"\u9A8C\u8BC1\u7801\u4F1A\u53D1\u5230 {target}","pw.rulesLabel":"\u5BC6\u7801\u89C4\u5219","pw.req.length":"{min}\u2013{max} \u4F4D","pw.req.lower":"\u542B\u5C0F\u5199\u5B57\u6BCD","pw.req.upper":"\u542B\u5927\u5199\u5B57\u6BCD","pw.req.special":"\u542B\u7279\u6B8A\u5B57\u7B26","pw.req.space":"\u4E0D\u542B\u7A7A\u683C","pw.rule.format":"\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E","pw.rule.min":"\u5BC6\u7801\u81F3\u5C11 8 \u4F4D","pw.rule.max":"\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D","pw.rule.space":"\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C","pw.rule.lower":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD","pw.rule.upper":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD","pw.rule.special":"\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26","del.title":"\u6CE8\u9500\u8D26\u53F7","del.desc":"\u6C38\u4E45\u5220\u9664\u8D26\u53F7\u548C\u5168\u90E8\u6570\u636E\uFF0C\u65E0\u6CD5\u6062\u590D","del.start":"\u6CE8\u9500\u8D26\u53F7","del.warn":"\u6CE8\u9500\u540E\uFF0C\u8D26\u53F7\u3001\u79EF\u5206\u3001\u4F1A\u5458\u3001\u4E91\u7A7A\u95F4\u548C\u5168\u90E8\u6570\u636E\u90FD\u4F1A\u88AB\u5220\u9664\uFF0C\u65E0\u6CD5\u627E\u56DE\u3002","del.methodLabel":"\u9A8C\u8BC1\u65B9\u5F0F","del.byCode":"\u9A8C\u8BC1\u7801","del.byPassword":"\u5BC6\u7801","del.codeLabel":"\u53D1\u5230 {target} \u7684\u9A8C\u8BC1\u7801","del.passwordLabel":"\u8D26\u53F7\u5BC6\u7801","del.submit":"\u6CE8\u9500\u8D26\u53F7","del.confirm":"\u786E\u8BA4\u6C38\u4E45\u6CE8\u9500","del.done":"\u8D26\u53F7\u5DF2\u6CE8\u9500","usage.overview.title":"\u7528\u91CF\u6982\u89C8","usage.overview.desc":"\u6240\u9009\u65F6\u95F4\u6BB5\u5185\u7684\u8BF7\u6C42\u4E0E AI \u989D\u5EA6\u6D88\u8017","usage.range":"\u65F6\u95F4\u8303\u56F4","usage.days":"{n} \u5929","usage.requests":"\u8BF7\u6C42\u6B21\u6570","usage.successRate":"\u6210\u529F\u7387","usage.consumption":"AI \u989D\u5EA6\u6D88\u8017","usage.ofToday":"\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650","usage.unlimitedNote":"\u4F60\u7684 AI \u989D\u5EA6\u4E0D\u9650\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.noLimitNote":"\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u4E3A 0 \u6216\u6682\u65F6\u62FF\u4E0D\u5230\uFF0C\u6D88\u8017\u65E0\u6CD5\u6298\u7B97\u6210\u767E\u5206\u6BD4\u3002","usage.byModel.title":"\u6309\u6A21\u578B","usage.byModel.desc":"\u5404\u6A21\u578B\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.byApp.title":"\u6309\u5E94\u7528","usage.byApp.desc":"\u5404\u5E94\u7528\u7684\u8BF7\u6C42\u6570\u4E0E\u989D\u5EA6\u6D88\u8017","usage.col.model":"\u6A21\u578B","usage.col.app":"\u5E94\u7528","usage.col.requests":"\u8BF7\u6C42","usage.col.consumption":"\u989D\u5EA6\u6D88\u8017","usage.empty":"\u8FD9\u6BB5\u65F6\u95F4\u6CA1\u6709\u7528\u91CF","usage.appUnknown":"\u5176\u4ED6","usage.recent.title":"\u6700\u8FD1\u6D88\u8017","usage.recent.desc":"\u6BCF\u6B21\u8C03\u7528\u5360\u4ECA\u65E5\u989D\u5EA6\u4E0A\u9650\u7684\u6BD4\u4F8B","usage.recentEmpty":"\u8FD8\u6CA1\u6709\u6D88\u8017\u8BB0\u5F55","usage.failed":"\u5931\u8D25","usage.shown":"\u5DF2\u663E\u793A {shown} / {total} \u6761","fb.list.title":"\u6211\u7684\u53CD\u9988","fb.list.desc":"\u63D0\u4EA4\u8FC7\u7684\u95EE\u9898\u548C\u5EFA\u8BAE\uFF0C\u56DE\u590D\u4F1A\u663E\u793A\u5728\u8FD9\u91CC","fb.new":"\u65B0\u5EFA\u53CD\u9988","fb.empty":"\u8FD8\u6CA1\u6709\u53CD\u9988","fb.untitled":"\u672A\u547D\u540D\u53CD\u9988","fb.unread":"\u6709\u65B0\u56DE\u590D","fb.shown":"\u5DF2\u663E\u793A {n} \u6761","fb.submitted":"\u5DF2\u63D0\u4EA4\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D","fb.descLabel":"\u63CF\u8FF0\u95EE\u9898\u6216\u5EFA\u8BAE","fb.descPlaceholder":"\u53D1\u751F\u4E86\u4EC0\u4E48\uFF0C\u4F60\u671F\u671B\u600E\u6837\u2026\u2026","fb.imagesHint":"\u6700\u591A\u9644 {n} \u5F20\u622A\u56FE\uFF08\u6BCF\u5F20\u4E0D\u8D85\u8FC7 5MB\uFF09\uFF0C\u53EF\u4EE5\u7C98\u8D34\u6216\u62D6\u8FDB\u6765\u3002","fb.addImages":"\u6DFB\u52A0\u622A\u56FE","fb.removeImage":"\u79FB\u9664\u8FD9\u5F20\u56FE","fb.submit":"\u63D0\u4EA4","fb.back":"\u8FD4\u56DE\u5217\u8868","fb.you":"\u4F60","fb.support":"Forsion \u56E2\u961F","fb.attachment":"\u9644\u4EF6","fb.imagePreview":"\u67E5\u770B\u5927\u56FE","fb.closedNote":"\u8FD9\u4E2A\u5DE5\u5355\u5DF2\u5173\u95ED\uFF0C\u4E0D\u80FD\u518D\u56DE\u590D\u3002\u6709\u65B0\u95EE\u9898\u8BF7\u65B0\u5EFA\u53CD\u9988\u3002","fb.replyPlaceholder":"\u56DE\u590D\u2026","fb.replySend":"\u53D1\u9001\u56DE\u590D","fb.replySent":"\u56DE\u590D\u5DF2\u53D1\u9001","fb.status.open":"\u5F85\u5904\u7406","fb.status.in_progress":"\u5904\u7406\u4E2D","fb.status.resolved":"\u5DF2\u89E3\u51B3","fb.status.closed":"\u5DF2\u5173\u95ED","err.accountGone":"\u8FD9\u4E2A\u8D26\u53F7\u5DF2\u9000\u51FA\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.adminCannotDelete":"\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500","err.avatarInvalid":"\u8FD9\u5F20\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765\uFF0C\u6362\u4E00\u5F20\u8BD5\u8BD5","err.avatarTooLarge":"\u56FE\u7247\u592A\u5927\u4E86\uFF0C\u6362\u4E00\u5F20\u5C0F\u4E00\u70B9\u7684","err.backgroundUnavailable":"\u540E\u53F0\u989D\u5EA6\u6682\u65F6\u4E0D\u53EF\u7528","err.captcha":"\u9700\u8981\u5728\u6D4F\u89C8\u5668\u4E2D\u5B8C\u6210\u4EBA\u673A\u9A8C\u8BC1","err.codeCooldown":"\u53D1\u9001\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.codeInvalid":"\u9A8C\u8BC1\u7801\u4E0D\u5BF9\u6216\u5DF2\u8FC7\u671F","err.codeRequired":"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801","err.codeSendFailed":"\u9A8C\u8BC1\u7801\u6CA1\u53D1\u51FA\u53BB\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.currentPasswordWrong":"\u5F53\u524D\u5BC6\u7801\u4E0D\u5BF9","err.deleteTargetInvalid":"\u9A8C\u8BC1\u7801\u53EA\u80FD\u53D1\u5230\u8D26\u53F7\u7ED1\u5B9A\u7684\u624B\u673A\u6216\u90AE\u7BB1","err.deleteVerifyFailed":"\u9A8C\u8BC1\u6CA1\u901A\u8FC7\uFF0C\u8D26\u53F7\u6CA1\u6709\u6CE8\u9500","err.emailInUse":"\u8FD9\u4E2A\u90AE\u7BB1\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.emailInvalid":"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.featureDisabled":"\u8FD9\u9879\u529F\u80FD\u6682\u65F6\u5173\u95ED\u4E86","err.feedbackEmpty":"\u8BF7\u5199\u4E00\u4E0B\u95EE\u9898\u6216\u5EFA\u8BAE","err.feedbackTooLong":"\u63CF\u8FF0\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.generic":"\u64CD\u4F5C\u6CA1\u6709\u6210\u529F\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.imageRead":"\u56FE\u7247\u8BFB\u4E0D\u51FA\u6765","err.imageTooLarge":"\u6BCF\u5F20\u56FE\u7247\u4E0D\u80FD\u8D85\u8FC7 5MB","err.imageType":"\u53EA\u80FD\u6DFB\u52A0\u56FE\u7247","err.insufficientMainQuota":"AI \u989D\u5EA6\u5DF2\u7528\u5B8C\uFF0C\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6","err.insufficientPoints":"\u79EF\u5206\u4E0D\u591F","err.priceChanged":"\u91CD\u7F6E\u5361\u5355\u4EF7\u521A\u521A\u8C03\u6574\u8FC7\uFF0C\u8BF7\u770B\u4E00\u4E0B\u65B0\u4EF7\u683C\uFF0C\u518D\u786E\u8BA4\u5151\u6362\u3002","err.invalidCount":"\u5F20\u6570\u8981\u5728 1\u201350 \u4E4B\u95F4","err.invalidInviteCode":"\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548","err.inviteAlreadyUsed":"\u4F60\u5DF2\u7ECF\u7528\u8FC7\u9080\u8BF7\u7801\u4E86","err.inviteEmpty":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","err.inviteOwnCode":"\u4E0D\u80FD\u586B\u81EA\u5DF1\u7684\u9080\u8BF7\u7801","err.inviteWindowExpired":"\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F","err.loginCodeExpired":"\u767B\u5F55\u7801\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.loginInProgress":"\u6B63\u5728\u767B\u5F55\u4E2D","err.loginTimeout":"\u767B\u5F55\u8D85\u65F6\uFF0C\u8BF7\u91CD\u8BD5","err.loginUnsupported":"\u8FD9\u4E2A\u4E91\u7AEF\u4E0D\u652F\u6301\u684C\u9762\u7AEF\u767B\u5F55","err.network":"\u7F51\u7EDC\u8FDE\u63A5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u540E\u91CD\u8BD5","err.noCloudUrl":"\u8BF7\u5148\u5728\u300C\u8FDE\u63A5\u300D\u91CC\u586B\u5199\u4E91\u7AEF\u5730\u5740","err.noResetCard":"\u6CA1\u6709\u53EF\u7528\u7684\u989D\u5EA6\u91CD\u7F6E\u5361","err.openFailed":"\u6CA1\u80FD\u6253\u5F00\u6D4F\u89C8\u5668","err.passwordRequired":"\u8BF7\u586B\u5199\u5F53\u524D\u5BC6\u7801\u548C\u65B0\u5BC6\u7801","err.phoneInUse":"\u8FD9\u4E2A\u624B\u673A\u53F7\u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528","err.phoneInvalid":"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u5BF9\uFF08\u5176\u4ED6\u5730\u533A\u8BF7\u5E26 +\u533A\u53F7\uFF09","err.redeemEmpty":"\u8BF7\u8F93\u5165\u5151\u6362\u7801","err.redeemExpired":"\u5151\u6362\u7801\u5DF2\u8FC7\u671F","err.redeemInactive":"\u5151\u6362\u7801\u5DF2\u505C\u7528","err.redeemNotFound":"\u5151\u6362\u7801\u4E0D\u5B58\u5728","err.redeemUsedUp":"\u5151\u6362\u7801\u5DF2\u88AB\u7528\u5B8C","err.redeemUserLimit":"\u4F60\u5DF2\u7ECF\u5151\u6362\u8FC7\u8FD9\u4E2A\u7801\u4E86","err.replyEmpty":"\u8BF7\u8F93\u5165\u56DE\u590D\u5185\u5BB9","err.replyTooLong":"\u56DE\u590D\u592A\u957F\u4E86\uFF08\u6700\u591A 10000 \u5B57\uFF09","err.server":"\u670D\u52A1\u5668\u51FA\u9519\u4E86\uFF08{status}\uFF09\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.session":"\u767B\u5F55\u72B6\u6001\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55","err.signedOut":"\u8BF7\u5148\u767B\u5F55 Forsion","err.targetInvalid":"\u624B\u673A\u53F7\u6216\u90AE\u7BB1\u683C\u5F0F\u4E0D\u5BF9","err.ticketNotFound":"\u8FD9\u6761\u53CD\u9988\u4E0D\u5B58\u5728\u6216\u5DF2\u5220\u9664","err.tooFrequent":"\u64CD\u4F5C\u592A\u9891\u7E41\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5","err.tooManyImages":"\u6700\u591A\u6DFB\u52A0 5 \u5F20\u56FE\u7247","err.unavailable":"\u8FD9\u4E2A\u7248\u672C\u7684\u684C\u9762\u7AEF\u8FD8\u4E0D\u652F\u6301\u8FD9\u4E2A\u64CD\u4F5C\uFF0C\u8BF7\u66F4\u65B0 Forsion"},vc={"page.account":"Account","page.quota":"Quota & points","page.backpack":"Backpack","page.security":"Security","page.usage":"Usage","page.feedback":"Feedback","backpack.desc":"View the items you have collected. Select a slot for details.","backpack.refresh":"Refresh","backpack.total":"{n} items","backpack.grid":"Backpack items","backpack.slot":"{name}, quantity {n}","backpack.item":"Item","backpack.empty":"Your backpack is empty","backpack.emptyHint":"Items you redeem or receive will appear here.","backpack.select":"Select an item to view details","backpack.details":"Item details","backpack.quantity":"Quantity","backpack.acquired":"Acquired","backpack.source":"Received through","backpack.source.points":"Points exchange","backpack.source.admin":"Gift","backpack.source.reward":"Reward","backpack.source.other":"Cloud account","backpack.consumable":"Consumable","backpack.voucher":"Voucher","backpack.getCards":"Redeem reset cards","backpack.manageCards":"Use or redeem","backpack.reveal":"Reveal key","backpack.copyKey":"Copy key","backpack.noKey":"This item has no key.","backpack.use":"Use","backpack.confirmUse":"Confirm use","backpack.consumeConfirm":"Using this item consumes one copy.","backpack.collectible":"Collectible","backpack.effect.points":"+{n} points","backpack.effect.cards":"+{n} reset cards","backpack.effect.quota":"Reset daily and weekly quota","backpack.rarity.common":"Common","backpack.rarity.rare":"Rare","backpack.rarity.epic":"Epic","backpack.rarity.legendary":"Legendary","backpack.unavailable":"This item is no longer available. Refresh your backpack.","backpack.notUsable":"This item cannot be used.","backpack.quotaUnavailable":"Use cloud AI to initialize your quota before using this item.","common.cancel":"Cancel","common.copied":"Copied","common.copyFailed":"Couldn't copy","common.done":"Done","common.loadFailed":"Couldn't load","common.loadMore":"Load more","common.loading":"Loading\u2026","common.openInBrowser":"Open in browser","common.retry":"Retry","common.save":"Save","common.thisWeek":"This week","common.today":"Today","common.unlimited":"Unlimited","ann.eyebrow":"FORSION \xB7 Announcement","ann.close":"Close","ann.ok":"Got it","signin.button":"Sign in to Forsion","signin.desc":"Sign in to your Forsion account to manage your account, quota, security and feedback here.","signin.pending":"Waiting for you to finish in your browser\u2026","signin.deviceHint":"Your browser opens the sign-in page on its own. If it doesn't, scan the code with your phone or open the link below, and check that the code matches.","signin.code":"Code","signin.openLink":"Open sign-in page","signin.copyLink":"Copy link","signin.qrLabel":"Sign-in QR code","account.profile.title":"Profile","account.profile.desc":"Your photo and nickname, plus the phone and email linked to your account","account.avatar.change":"Change photo","account.avatar.saved":"Photo updated","account.nickname.edit":"Edit nickname","account.nickname.label":"Nickname","account.nickname.saved":"Nickname updated","account.role.admin":"Admin","account.username":"Username {name}","account.contact.phone":"Phone","account.contact.email":"Email","account.contact.unbound":"Not linked","account.contact.manage":"Manage in Security","account.web.open":"Open the account center in your browser","account.web.desc":"Cloud storage, AI Brain, submissions and themes are managed in the web account center.","member.title":"Membership","member.desc":"Your tier, plan and expiry date","member.upgrade":"Upgrade membership","member.renew":"Renew","member.freeName":"Free plan","member.freeHint":"Upgrade to get more AI quota","member.expires":"Expires {date}","member.noExpiry":"No expiry","member.loadFailed":"Couldn't load your membership.","local.title":"Accounts on this computer","local.desc":"Switch between accounts you've signed in with","local.current":"Current","local.switch":"Switch","local.add":"Sign in to another account","local.signOut":"Sign out","local.empty":"No saved accounts yet","local.loadFailed":"Couldn't read the account list","quota.ai.title":"AI quota","quota.ai.desc":"What's left today and this week; a quota reset card restores it","quota.resetDaily":"Resets daily at 0:00 (Beijing time)","quota.resetWeekly":"Resets {date} at 0:00 (Beijing time)","card.title":"Quota reset card","card.desc":"Restores today's and this week's AI quota to 100%","card.owned":"You have {n}","card.use":"Use one","card.useConfirm":"Confirm","card.used":"Used 1 quota reset card","card.left":"{n} left","card.noneHint":"You have no quota reset cards left. You can exchange points for more.","card.exchange":"Exchange points","card.price":"{price} points each, 1\u201350 at a time","card.count":"Number of cards","card.cost":"Costs {cost} points","card.countHint":"Enter 1\u201350","card.exchangeButton":"Exchange","card.exchangeConfirm":"Spend {cost} points","card.exchanged":"Quota reset cards added: {n}","points.title":"Points","points.desc":"Use points to get quota reset cards","points.balance":"Balance","points.balanceFailed":"Couldn't load your balance","points.recharge":"Buy points","bg.title":"Background quota","bg.desc":"Used by Muse and automations, counted separately from your AI quota","bg.autoMain":"Continue with AI quota when used up","bg.autoMainDesc":"When off, Muse and automations pause once the background quota runs out","bg.convert":"Move from AI quota","bg.convertDesc":"Moves a share of your AI quota limit, valid for the current period","bg.convertConfirm":"Move {pct}%","bg.converted":"Moved {pct}% from your AI quota","invite.title":"Invites & codes","invite.desc":"Invite friends to join, or redeem a code you received","invite.myCode":"My invite code","invite.count":"{n} invited","invite.copyCode":"Copy code","invite.copyLink":"Copy invite link","invite.loadFailed":"Couldn't load your invite code","invite.claim":"Enter an invite code","invite.claimDesc":"Within 7 days of signing up, you can enter a friend's invite code","invite.claimPlaceholder":"Friend's invite code","invite.claimSubmit":"Submit","invite.claimed":"Invite code applied","redeem.title":"Redemption code","redeem.desc":"Redeem points, membership or other rewards","redeem.placeholder":"Enter a code","redeem.submit":"Redeem","redeem.success":"Redeemed","redeem.successWith":"Redeemed: {what}","redeem.gotPoints":"{n} points","redeem.gotMembership":"membership","sec.methods.title":"Sign-in methods","sec.methods.desc":"Your phone and email can be used to sign in and reset your password","sec.bind":"Link","sec.change":"Change","sec.phone":"Phone number","sec.email":"Email address","sec.newPhone":"New phone number","sec.newEmail":"New email address","sec.phonePlaceholder":"Mainland China numbers as is; others with +country code","sec.emailPlaceholder":"name@example.com","sec.code":"Verification code","sec.codePlaceholder":"Enter the code","sec.sendCode":"Send code","sec.resendIn":"Resend in {s}s","sec.codeSent":"Code sent","sec.bindSubmit":"Link","sec.phoneBound":"Phone linked","sec.emailBound":"Email linked","sec.devices.title":"Signed-in devices","sec.devices.desc":"If you think someone else is using your account, sign out on every device","sec.logoutAll":"Sign out everywhere","sec.logoutAllDesc":"Including this computer: every device has to sign in again","sec.logoutAllConfirm":"Confirm sign out everywhere","sec.logoutAllDone":"Signed out everywhere","pw.title":"Password","pw.desc":"{min}\u2013{max} characters, with a lowercase letter, an uppercase letter and a special character, and no spaces","pw.change":"Change password","pw.modeLabel":"How to change it","pw.mode.current":"With current password","pw.mode.code":"With a verification code","pw.current":"Current password","pw.currentRequired":"Enter your current password","pw.new":"New password","pw.confirm":"Confirm new password","pw.mismatch":"The new passwords don't match","pw.submit":"Change password","pw.submitReset":"Set new password","pw.changed":"Password updated","pw.noPasswordYet":"This account doesn't have a password yet. Set one with a verification code instead.","pw.codeNeedsContact":"Link a phone or email first to set a password with a verification code.","pw.via":"Send the code to","pw.codeTo":"The code goes to {target}","pw.rulesLabel":"Password rules","pw.req.length":"{min}\u2013{max} characters","pw.req.lower":"A lowercase letter","pw.req.upper":"An uppercase letter","pw.req.special":"A special character","pw.req.space":"No spaces","pw.rule.format":"Invalid password","pw.rule.min":"Password must be at least 8 characters","pw.rule.max":"Password can't be longer than 64 characters","pw.rule.space":"Password can't contain spaces","pw.rule.lower":"Password needs a lowercase letter","pw.rule.upper":"Password needs an uppercase letter","pw.rule.special":"Password needs a special character","del.title":"Delete account","del.desc":"Permanently delete your account and all its data. This can't be undone","del.start":"Delete account","del.warn":"Deleting your account removes your account, points, membership, cloud storage and all other data for good.","del.methodLabel":"Verify with","del.byCode":"Verification code","del.byPassword":"Password","del.codeLabel":"Code sent to {target}","del.passwordLabel":"Account password","del.submit":"Delete account","del.confirm":"Delete permanently","del.done":"Account deleted","usage.overview.title":"Overview","usage.overview.desc":"Requests and AI quota used in the selected period","usage.range":"Time range","usage.days":"{n} days","usage.requests":"Requests","usage.successRate":"Success rate","usage.consumption":"AI quota used","usage.ofToday":"Of your daily limit","usage.unlimitedNote":"Your AI quota is unlimited, so usage isn't shown as a percentage.","usage.noLimitNote":"Your daily limit is 0 or unavailable right now, so usage isn't shown as a percentage.","usage.byModel.title":"By model","usage.byModel.desc":"Requests and quota used per model","usage.byApp.title":"By app","usage.byApp.desc":"Requests and quota used per app","usage.col.model":"Model","usage.col.app":"App","usage.col.requests":"Requests","usage.col.consumption":"Quota used","usage.empty":"No usage in this period","usage.appUnknown":"Other","usage.recent.title":"Recent usage","usage.recent.desc":"Each call as a share of your daily limit","usage.recentEmpty":"No usage yet","usage.failed":"Failed","usage.shown":"Showing {shown} of {total}","fb.list.title":"My feedback","fb.list.desc":"Issues and suggestions you've sent; replies show up here","fb.new":"New feedback","fb.empty":"No feedback yet","fb.untitled":"Untitled feedback","fb.unread":"New reply","fb.shown":"Showing {n}","fb.submitted":"Sent. We'll reply as soon as we can","fb.descLabel":"Describe the issue or suggestion","fb.descPlaceholder":"What happened, and what did you expect?","fb.imagesHint":"Attach up to {n} screenshots (5 MB each). You can paste or drop them here.","fb.addImages":"Add screenshots","fb.removeImage":"Remove this image","fb.submit":"Send","fb.back":"Back to list","fb.you":"You","fb.support":"Forsion team","fb.attachment":"Attachment","fb.imagePreview":"View image","fb.closedNote":"This ticket is closed and can't take replies. Send new feedback for a new issue.","fb.replyPlaceholder":"Reply\u2026","fb.replySend":"Send reply","fb.replySent":"Reply sent","fb.status.open":"Open","fb.status.in_progress":"In progress","fb.status.resolved":"Resolved","fb.status.closed":"Closed","err.accountGone":"This account is signed out. Sign in again","err.adminCannotDelete":"Admin accounts can't be deleted here","err.avatarInvalid":"Couldn't read this image. Try another one","err.avatarTooLarge":"This image is too large. Try a smaller one","err.backgroundUnavailable":"Background quota is unavailable right now","err.captcha":"You need to finish a verification check in your browser","err.codeCooldown":"Too many codes requested. Try again shortly","err.codeInvalid":"The code is wrong or has expired","err.codeRequired":"Enter the verification code","err.codeSendFailed":"Couldn't send the code. Try again later","err.currentPasswordWrong":"Your current password is incorrect","err.deleteTargetInvalid":"Codes can only go to the phone or email linked to your account","err.deleteVerifyFailed":"Verification failed, so your account wasn't deleted","err.emailInUse":"This email is already used by another account","err.emailInvalid":"Enter a valid email address","err.featureDisabled":"This feature is turned off for now","err.feedbackEmpty":"Describe the issue or suggestion first","err.feedbackTooLong":"The description is too long (10,000 characters max)","err.generic":"That didn't work. Try again later","err.imageRead":"Couldn't read the image","err.imageTooLarge":"Each image must be 5 MB or less","err.imageType":"Only images can be added","err.insufficientMainQuota":"Your AI quota is used up, so there's nothing to move","err.insufficientPoints":"Not enough points","err.priceChanged":"The reset card price just changed. Check the new price, then confirm the exchange again.","err.invalidCount":"Choose between 1 and 50 cards","err.invalidInviteCode":"This invite code is invalid or has expired","err.inviteAlreadyUsed":"You've already used an invite code","err.inviteEmpty":"Enter an invite code","err.inviteOwnCode":"You can't use your own invite code","err.inviteWindowExpired":"The 7-day window after sign-up has passed","err.loginCodeExpired":"The sign-in code expired. Sign in again","err.loginInProgress":"A sign-in is already in progress","err.loginTimeout":"Sign-in timed out. Try again","err.loginUnsupported":"This cloud doesn't support desktop sign-in","err.network":"Network error. Check your connection and try again","err.noCloudUrl":"Set the cloud address under Connection first","err.noResetCard":"You have no quota reset cards","err.openFailed":"Couldn't open the browser","err.passwordRequired":"Enter your current and new password","err.phoneInUse":"This phone number is already used by another account","err.phoneInvalid":"Enter a valid phone number (with +country code outside mainland China)","err.redeemEmpty":"Enter a code","err.redeemExpired":"This code has expired","err.redeemInactive":"This code is no longer active","err.redeemNotFound":"This code doesn't exist","err.redeemUsedUp":"This code has been used up","err.redeemUserLimit":"You've already redeemed this code","err.replyEmpty":"Write a reply first","err.replyTooLong":"The reply is too long (10,000 characters max)","err.server":"Server error ({status}). Try again later","err.session":"You've been signed out. Sign in again","err.signedOut":"Sign in to Forsion first","err.targetInvalid":"Enter a valid phone number or email","err.ticketNotFound":"This feedback doesn't exist or was deleted","err.tooFrequent":"Too many attempts. Try again shortly","err.tooManyImages":"You can add up to 5 images","err.unavailable":"This version of the desktop app can't do that yet. Update Forsion"},jo={zh:yc,en:vc},$e=t=>t==="en"?"en":"zh";function Ur(t,e,n){let r=jo[t][e]??jo.zh[e]??e;return n?r.replace(/\{(\w+)\}/g,(a,o)=>o in n?String(n[o]):a):r}var zn=t=>(e,n)=>Ur(t,e,n),Ue=(t,e)=>"raw"in t?t.raw:e(t.key,t.vars);var Vo=`
|
|
70
70
|
.fx-acct { color: var(--text); }
|
|
71
71
|
.fx-acct .fx-panel > .settings-panel-head:last-child { border-bottom-color: transparent; }
|
|
72
72
|
.fx-acct .fx-panel > .fx-block + .fx-block,
|
|
@@ -235,6 +235,56 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
|
|
|
235
235
|
.fx-acct .fx-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: var(--overlay-scrim); cursor: zoom-out; }
|
|
236
236
|
.fx-acct .fx-lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius-md); }
|
|
237
237
|
|
|
238
|
+
.fx-acct .fx-backpack { padding: 14px 15px 16px; container: fx-backpack / inline-size; }
|
|
239
|
+
.fx-acct .fx-backpack-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; color: var(--text-muted); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
240
|
+
.fx-acct .fx-backpack-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: start; gap: 16px; }
|
|
241
|
+
.fx-acct .fx-backpack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
|
|
242
|
+
.fx-acct .fx-backpack-slot { position: relative; min-width: 0; aspect-ratio: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; padding: 14px 6px 8px; border: var(--border-width) solid transparent; border-radius: var(--radius-md); background: var(--overlay-light); color: var(--text); font-family: var(--font-ui); cursor: pointer; transition: background var(--duration-fast); }
|
|
243
|
+
.fx-acct .fx-backpack-slot:hover { background: var(--overlay-medium); }
|
|
244
|
+
.fx-acct .fx-backpack-slot[aria-pressed='true'] { border-color: var(--accent); box-shadow: 0 0 0 0.5px var(--accent); background: var(--accent-light); }
|
|
245
|
+
.fx-acct .fx-backpack-slot:focus-visible { outline: var(--focus-ring) solid var(--accent-ink); outline-offset: 2px; }
|
|
246
|
+
.fx-acct .fx-backpack-slot.is-empty { background: var(--overlay-subtle); cursor: default; }
|
|
247
|
+
.fx-acct .fx-backpack-icon { display: grid; place-items: center; color: var(--text-muted); }
|
|
248
|
+
.fx-acct .fx-backpack-slot.is-card .fx-backpack-icon { color: var(--accent-ink); }
|
|
249
|
+
.fx-acct .fx-backpack-slot[data-rarity='rare'] { border-color: var(--accent-light); }
|
|
250
|
+
.fx-acct .fx-backpack-slot[data-rarity='epic'] { border-color: var(--accent); }
|
|
251
|
+
.fx-acct .fx-backpack-slot[data-rarity='legendary'] { border-color: var(--warning); }
|
|
252
|
+
.fx-acct .fx-backpack-slot[aria-pressed='true'][data-rarity] { border-color: var(--accent); }
|
|
253
|
+
.fx-acct .fx-backpack-emoji { font-size: 2em; line-height: 1; }
|
|
254
|
+
.fx-acct .fx-backpack-effects { display: grid; gap: 5px; color: var(--accent-ink); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
255
|
+
.fx-acct .fx-backpack-use-actions { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
256
|
+
.fx-acct .fx-backpack-used { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px; border-radius: var(--radius-md); background: var(--accent-light); color: var(--accent-ink); font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
257
|
+
.fx-acct .fx-backpack-used strong { display: block; }
|
|
258
|
+
.fx-acct .fx-backpack-pulse { animation: fx-item-pulse 500ms ease-out; }
|
|
259
|
+
.fx-acct .fx-backpack-sparkle > svg { animation: fx-item-sparkle 800ms ease-out; }
|
|
260
|
+
@keyframes fx-item-pulse { from { opacity: 0; scale: 0.98; } to { opacity: 1; scale: 1; } }
|
|
261
|
+
@keyframes fx-item-sparkle { 0% { scale: 0.5; rotate: -20deg; opacity: 0; } 50% { scale: 1.25; } 100% { scale: 1; rotate: 0deg; opacity: 1; } }
|
|
262
|
+
@media (prefers-reduced-motion: reduce) {
|
|
263
|
+
.fx-acct .fx-backpack-pulse, .fx-acct .fx-backpack-sparkle > svg { animation: none; }
|
|
264
|
+
}
|
|
265
|
+
.fx-acct .fx-backpack-name { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); text-align: center; overflow-wrap: anywhere; }
|
|
266
|
+
.fx-acct .fx-backpack-count { position: absolute; top: 5px; right: 6px; color: var(--accent-ink); font-size: var(--ui-font-caption); line-height: var(--ui-line-caption); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
267
|
+
.fx-acct .fx-backpack-empty { margin: 12px 0 0; color: var(--text-muted); font-size: var(--ui-font-body); line-height: var(--ui-line-body); }
|
|
268
|
+
.fx-acct .fx-backpack-detail { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 15px; border-radius: var(--radius-md); background: var(--overlay-subtle); overflow-wrap: anywhere; }
|
|
269
|
+
.fx-acct .fx-backpack-detail h3 { margin: 0; font-size: var(--ui-font-heading); line-height: var(--ui-line-heading); font-weight: 600; }
|
|
270
|
+
.fx-acct .fx-backpack-detail-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--overlay-light); color: var(--text-muted); }
|
|
271
|
+
.fx-acct .fx-backpack-detail-icon.is-card { color: var(--accent-ink); background: var(--accent-light); }
|
|
272
|
+
.fx-acct .fx-backpack-prompt { min-height: 190px; justify-content: center; align-items: center; color: var(--text-faint); text-align: center; }
|
|
273
|
+
.fx-acct .fx-backpack-facts { width: 100%; display: grid; gap: 8px; margin: 0; font-size: var(--ui-font-meta); line-height: var(--ui-line-meta); }
|
|
274
|
+
.fx-acct .fx-backpack-facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
|
|
275
|
+
.fx-acct .fx-backpack-facts dt { color: var(--text-faint); }
|
|
276
|
+
.fx-acct .fx-backpack-facts dd { margin: 0; }
|
|
277
|
+
.fx-acct .fx-backpack-reveal { width: 100%; display: grid; gap: 10px; }
|
|
278
|
+
.fx-acct .fx-backpack-reveal code { display: block; padding: 10px; border-radius: var(--radius-sm); background: var(--overlay-light); font-family: var(--font-mono); font-size: var(--ui-font-body); line-height: var(--ui-line-body); overflow-wrap: anywhere; user-select: all; }
|
|
279
|
+
@container fx-backpack (max-width: 600px) {
|
|
280
|
+
.fx-acct .fx-backpack-layout { grid-template-columns: minmax(0, 1fr); }
|
|
281
|
+
.fx-acct .fx-backpack-grid { max-height: 280px; overflow-y: auto; padding: 4px; }
|
|
282
|
+
.fx-acct .fx-backpack-prompt { min-height: 100px; }
|
|
283
|
+
}
|
|
284
|
+
@container fx-backpack (max-width: 320px) {
|
|
285
|
+
.fx-acct .fx-backpack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
286
|
+
}
|
|
287
|
+
|
|
238
288
|
@media (max-width: 560px) {
|
|
239
289
|
.fx-acct .fx-stats { grid-template-columns: minmax(0, 1fr); }
|
|
240
290
|
.fx-acct .fx-stat + .fx-stat { border-left-color: transparent; border-top: var(--border-width) solid var(--border); }
|
|
@@ -244,7 +294,7 @@ Please report this to https://github.com/markedjs/marked.`,t){let r="<p>An error
|
|
|
244
294
|
.fx-acct .fx-skel { animation: none; }
|
|
245
295
|
.fx-acct .fx-bar > span { transition: none; }
|
|
246
296
|
}
|
|
247
|
-
`,
|
|
297
|
+
`,Go=`
|
|
248
298
|
.fx-ann-backdrop { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); animation: fx-ann-fade 300ms ease-out both; }
|
|
249
299
|
.fx-ann { position: relative; display: flex; flex-direction: column; width: min(100%, 560px); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px 28px 22px; border: var(--border-width) solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--card-shadow); color: var(--text); font-family: var(--font-ui); text-align: left; animation: fx-ann-enter 480ms cubic-bezier(.2,.75,.15,1) both; }
|
|
250
300
|
.fx-ann:focus { outline: none; }
|
|
@@ -271,7 +321,7 @@ html[data-glass='off'] .fx-ann-backdrop { backdrop-filter: none; background: var
|
|
|
271
321
|
@media (prefers-reduced-motion: reduce) {
|
|
272
322
|
.fx-ann-backdrop, .fx-ann, .fx-ann-eyebrow, .fx-ann-title, .fx-ann-body, .fx-ann-ok { animation: none; }
|
|
273
323
|
}
|
|
274
|
-
`,
|
|
324
|
+
`,Ko=`
|
|
275
325
|
:host { display: block; color: var(--text); font-family: var(--font-body, var(--font-ui)); font-size: var(--ui-font-body); line-height: 1.65; overflow-wrap: anywhere; }
|
|
276
326
|
.doc > :first-child { margin-top: 0; }
|
|
277
327
|
.doc > :last-child { margin-bottom: 0; }
|
|
@@ -295,5 +345,5 @@ img { border-radius: var(--radius-sm); }
|
|
|
295
345
|
hr { margin: 16px 0; border: 0; border-top: var(--border-width) solid var(--border); }
|
|
296
346
|
a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
|
|
297
347
|
strong, b { font-weight: 650; }
|
|
298
|
-
`;var ut=t=>typeof t=="string"?t:"";function vc(t){if(!t||typeof t!="object")return null;let e=t,n=typeof e.id=="string"?e.id.trim():typeof e.id=="number"&&Number.isFinite(e.id)?String(e.id):"",r=ut(e.titleZh),o=ut(e.bodyZh);return!n||!r.trim()&&!o.trim()?null:{id:n,titleZh:r,titleEn:ut(e.titleEn).trim()?ut(e.titleEn):null,bodyZh:o,bodyEn:ut(e.bodyEn).trim()?ut(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:ut(e.publishedAt)||null}}function wc(t,e){return e==="en"&&t.bodyEn?{lang:"en",title:t.titleEn??t.titleZh,body:t.bodyEn}:{lang:"zh",title:t.titleZh,body:t.bodyZh}}var kc=new Rr({gfm:!0,breaks:!0}),_c=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Sc=/^(?:https?:|mailto:|#)/i;function Zi(t){return br.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:_c,ALLOWED_URI_REGEXP:Sc})}function Ac(t,e){let n=e==="markdown"?kc.parse(t,{async:!1}):t;return Zi(n)}var On=null;function Tc(){if(On===null)try{let t=Zi('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');On=br.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{On=!1}return On}function Ec(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Cc="http://www.w3.org/1999/xlink";function zn(t){let e=t.target,n=e&&typeof e.closest=="function"?e.closest("a, area"):null;if(!n||(t.preventDefault(),t.type!=="click"))return;let r=Ec(n.getAttribute("href")??n.getAttributeNS(Cc,"href"));if(r)try{j().openExternal?.(r)?.catch(()=>{})}catch{}}function Ji(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Rc(t){let{ctx:e,ann:n}=t,[r,o]=E(()=>Be(e.getLocale?.()));X(()=>{o(Be(e.getLocale?.()));let f=e.subscribeLocale?.(g=>o(Be(g)));return()=>{typeof f=="function"&&f()}},[e]);let i=Je(()=>Nn(r),[r]),s=wc(n,r),l=ee(null),u=ee(null),d=ee(null),p=ee(null),m=ee(t.onClose);return m.current=t.onClose,X(()=>{let f=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let g=v=>{if(v.key==="Escape"){v.preventDefault(),v.stopPropagation(),m.current();return}if(v.key!=="Tab")return;let k=u.current,T=d.current,x=l.current;if(!k||!T||!x)return;let _=document.activeElement;if(!_||!x.contains(_)){v.preventDefault(),(v.shiftKey?T:k).focus();return}v.shiftKey&&(_===k||_===x)?(v.preventDefault(),T.focus()):!v.shiftKey&&_===T&&(v.preventDefault(),k.focus())},b=v=>{let k=l.current;k&&v.target instanceof Node&&!k.contains(v.target)&&k.focus()};return window.addEventListener("keydown",g,!0),document.addEventListener("focusin",b,!0),()=>{window.removeEventListener("keydown",g,!0),document.removeEventListener("focusin",b,!0),f?.isConnected&&f.focus()}},[]),X(()=>{let f=p.current;if(!f)return;let g=Ji(f);return g.addEventListener("click",zn),g.addEventListener("auxclick",zn),()=>{g.removeEventListener("click",zn),g.removeEventListener("auxclick",zn)}},[]),X(()=>{let f=p.current;if(!f)return;let g=document.createElement("style");g.textContent=Yi;let b=document.createElement("div");b.className="doc",b.appendChild(Ac(s.body,n.format)),Ji(f).replaceChildren(g,b)},[s.body,n.format]),a("div",{class:"fx-ann-backdrop",children:[a("style",{children:Gi}),a("section",{ref:l,class:"fx-ann",role:"dialog","aria-modal":"true","aria-labelledby":"fx-ann-title","aria-describedby":"fx-ann-body",tabIndex:-1,lang:s.lang==="zh"?"zh-CN":"en","data-announcement-id":n.id,children:[a("button",{ref:u,type:"button",class:"fx-ann-close","aria-label":i("ann.close"),onClick:()=>m.current(),children:a(q,{name:"x",size:16})}),a("div",{class:"fx-ann-eyebrow",children:i("ann.eyebrow")}),a("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),a("div",{class:"fx-ann-body",children:a("div",{ref:p,id:"fx-ann-body",class:"fx-ann-doc"})}),a("div",{class:"fx-ann-footer",children:a("button",{ref:d,type:"button",class:"fx-ann-ok",onClick:()=>m.current(),children:i("ann.ok")})})]})]})}function Pc(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function Mc(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let o=()=>{i.disconnect(),clearTimeout(s),r()},i=new MutationObserver(()=>{n.isConnected||o()});i.observe(n.parentNode,{childList:!0});let s=setTimeout(o,e)}):Promise.resolve()}function Ki(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Pc(e.location?.search))return null;let r=0,o=!1,i=null,s=Promise.resolve(),l=p=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let f=!1,g=b=>{f||(f=!0,i?.id===p.id&&(i=null),Pt(null,m),m.remove(),b&&(s=M(`/announcements/${encodeURIComponent(p.id)}/seen`,{method:"POST"})))};i={id:p.id,finish:g},Pt(a(Rc,{ctx:t,ann:p,onClose:()=>g(!0)}),m)},u=async()=>{let p=++r;await s;let m=await M("/announcements/pending");if(o||p!==r||!m.ok)return;let f=vc(m.data?.announcement);!f||i||Tc()&&(await Mc(),!(o||p!==r||i)&&l(f))},d=n.onAuthChanged?.(p=>{i?.finish(!1),p?.loggedIn?u():r++});return u(),{check:u,dispose(){o=!0,r++,typeof d=="function"&&d(),i?.finish(!1)}}}function Qi(t){return typeof t!="string"?{ok:!1,rule:"format"}:t.length<8?{ok:!1,rule:"min"}:t.length>64?{ok:!1,rule:"max"}:/\s/.test(t)?{ok:!1,rule:"space"}:/[a-z]/.test(t)?/[A-Z]/.test(t)?/[^A-Za-z0-9]/.test(t)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function ea(t){return{length:t.length>=8&&t.length<=64,lower:/[a-z]/.test(t),upper:/[A-Z]/.test(t),special:/[^A-Za-z0-9]/.test(t),space:t.length>0&&!/\s/.test(t)}}var ta={\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E:"format","\u5BC6\u7801\u81F3\u5C11 8 \u4F4D":"min","\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D":"max",\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C:"space",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD:"lower",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD:"upper",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26:"special"};var na={no_reset_card:"err.noResetCard",invalid_type:"err.generic",invalid_count:"err.invalidCount",insufficient_points:"err.insufficientPoints",price_changed:"err.priceChanged",insufficient_main_quota:"err.insufficientMainQuota",background_unavailable:"err.backgroundUnavailable",invalid_percent:"err.generic",invalid_request:"err.generic",invalid_invite_code:"err.invalidInviteCode",already_used:"err.inviteAlreadyUsed",window_expired:"err.inviteWindowExpired",FEATURE_DISABLED:"err.featureDisabled",CAPTCHA_FAILED:"err.captcha"},ra={"Current password is incorrect":"err.currentPasswordWrong","Current and new password are required":"err.passwordRequired",\u9A8C\u8BC1\u7801\u65E0\u6548\u6216\u5DF2\u8FC7\u671F:"err.codeInvalid","Invalid or expired verification code":"err.codeInvalid",\u8D26\u53F7\u6216\u9A8C\u8BC1\u7801\u9519\u8BEF:"err.codeInvalid",\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801:"err.codeRequired","Email already in use":"err.emailInUse","Phone number already in use":"err.phoneInUse","Invalid email format":"err.emailInvalid","Email is required":"err.emailInvalid","Invalid phone number format":"err.phoneInvalid","Phone number is required":"err.phoneInvalid","Invalid phone number or email format":"err.targetInvalid","Please wait before requesting another code":"err.codeCooldown","Failed to send verification code":"err.codeSendFailed","Invalid target for account deletion":"err.deleteTargetInvalid","\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u65E0\u6CD5\u6CE8\u9500\u8D26\u6237":"err.deleteVerifyFailed",\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500:"err.adminCannotDelete",\u79EF\u5206\u4F59\u989D\u4E0D\u8DB3:"err.insufficientPoints","\u5151\u6362\u5F20\u6570\u9700\u4E3A 1-50 \u7684\u6574\u6570":"err.invalidCount",\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u7F6E\u5361:"err.noResetCard","\u4E3B\u989D\u5EA6\u5DF2\u7528\u5B8C,\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6":"err.insufficientMainQuota",\u540E\u53F0\u989D\u5EA6\u6682\u4E0D\u53EF\u7528:"err.backgroundUnavailable",\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548:"err.invalidInviteCode","\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F":"err.inviteWindowExpired",\u4F60\u5DF2\u4F7F\u7528\u8FC7\u9080\u8BF7\u7801:"err.inviteAlreadyUsed","You have already used an invite code":"err.inviteAlreadyUsed","Cannot use your own invite code":"err.inviteOwnCode","Invite code is required":"err.inviteEmpty","code is required":"err.redeemEmpty","Redemption code not found":"err.redeemNotFound","Redemption code is not active":"err.redeemInactive","Redemption code has expired":"err.redeemExpired","Redemption code has reached maximum uses":"err.redeemUsedUp","You have already used this code the maximum number of times":"err.redeemUserLimit",avatar_too_large:"err.avatarTooLarge","description is required":"err.feedbackEmpty","description too long (max 10000 chars)":"err.feedbackTooLong","content is required":"err.replyEmpty","content too long (max 10000 chars)":"err.replyTooLong","Ticket not found":"err.ticketNotFound","Too many attachments (max 5)":"err.tooManyImages","Attachment type not allowed (image / json / text only)":"err.imageType","\u4EBA\u673A\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":"err.captcha"},qr={format:"pw.rule.format",min:"pw.rule.min",max:"pw.rule.max",space:"pw.rule.space",lower:"pw.rule.lower",upper:"pw.rule.upper",special:"pw.rule.special"};function Lc(t){if(t.code&&na[t.code])return na[t.code];if(t.detail){if(ra[t.detail])return ra[t.detail];let e=ta[t.detail];if(e)return qr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function _e(t){let e=Lc(t);return e?{key:e}:Ln(t)?{key:"err.signedOut"}:t.status===0?{key:"err.network"}:t.status===401?{key:"err.session"}:t.status===429?{key:"err.tooFrequent"}:t.detail?{raw:t.detail}:t.status>=500?{key:"err.server",vars:{status:t.status}}:{key:"err.generic"}}function Gt(t){let e=t.trim();return e?/cancelled\.?$/i.test(e)?null:e==="A sign-in is already in progress."?{key:"err.loginInProgress"}:e.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:e.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:e.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:e.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:e.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:e.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:e}:{key:"err.generic"}}var Hr=Li(null);function F(){let t=qi(Hr);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var Qe=()=>F().t;function et(){let t=ee(!0);return X(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var oa={pending:!1,error:null,success:null,captcha:!1};function B(){let t=et(),[e,n]=E(oa),r=ee(!1),o=Ze(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let l;try{l=await s()}catch(u){l={error:{raw:String(u?.message||u)}}}r.current=!1,t.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),i=Ze(()=>{r.current||n(oa)},[]);return{...e,run:o,clear:i}}var de=t=>({error:_e(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function ia(){let[t,e]=E(0),n=ee(null);X(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=Ze((i=60)=>{n.current&&clearInterval(n.current),e(i),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),o=Ze(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:o}}function De(t){let[e,n]=E({state:"loading"}),r=ee(0),o=ee(t);o.current=t;let i=Ze((u=!1)=>{let d=++r.current;u||n({state:"loading"}),(async()=>{let p;try{p=await o.current()}catch(m){p={ok:!1,status:0,code:null,detail:null,transport:String(m?.message||m)}}d===r.current&&(p.ok?n({state:"ready",data:p.data,gen:d}):Ln(p)?n({state:"signedOut"}):(p.status===401&&j().authStatus?.().catch(()=>{}),n({state:"error",fail:p})))})()},[]);X(()=>{i();let u=j().onAuthChanged?.(()=>i());return()=>{r.current++,u?.()}},[i]);let s=Ze(()=>i(),[i]),l=Ze(()=>i(!0),[i]);switch(e.state){case"ready":{let u=e.gen,d=p=>n(m=>m.state==="ready"&&m.gen===u?{...m,data:p(m.data)}:m);return{state:"ready",data:e.data,reload:l,update:d}}case"error":return{state:"error",error:_e(e.fail),retry:s};default:return e}}function Fn(t){let e=String(t||"").trim();if(!e)return"";let n=e.startsWith("+")?4:3;return e.length<=n+4?`${e.slice(0,2)}***`:`${e.slice(0,n)}****${e.slice(-4)}`}function Bn(t){let e=String(t||"").trim(),n=e.lastIndexOf("@");if(n<=0)return e?`${e.slice(0,1)}***`:"";let r=e.slice(0,n);return`${r.slice(0,r.length<=2?1:2)}***${e.slice(n)}`}function aa(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var Ic=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function sa(t,e){let n=String(t||"").trim(),r,o,i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(i)r=Number(i[2]),o=Number(i[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(l.find(u=>u.type==="month")?.value),o=Number(l.find(u=>u.type==="day")?.value)}return!(r>=1&&r<=12)||!(o>=1&&o<=31)?null:e==="zh"?`${r}\u6708${o}\u65E5`:`${Ic[r-1]} ${o}`}var Wr=t=>t==="zh"?"zh-CN":"en-US";function la(t){if(t==null||t==="")return null;let e=new Date(typeof t=="string"&&/^\d+$/.test(t)?Number(t):t);return Number.isNaN(e.getTime())?null:e}function ca(t,e){let n=la(t);return n?new Intl.DateTimeFormat(Wr(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function Lt(t,e){let n=la(t);return n?new Intl.DateTimeFormat(Wr(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function he(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(Wr(e),{maximumFractionDigits:2}).format(n):"\u2014"}var dt=class extends Error{};async function ua(t,e=256){if(t.size>20971520)throw new dt;let n=URL.createObjectURL(t);try{let r=new Image;await new Promise((p,m)=>{r.onload=()=>p(),r.onerror=()=>m(new Error("image decode failed")),r.src=n});let o=r.naturalWidth,i=r.naturalHeight;if(!o||!i)throw new Error("empty image");if(o*i>5e7)throw new dt;let s=Math.min(1,e/Math.max(o,i)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(o*s)),l.height=Math.max(1,Math.round(i*s));let u=l.getContext("2d");if(!u)throw new Error("canvas unavailable");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height),u.drawImage(r,0,0,l.width,l.height);let d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new dt;return d}finally{URL.revokeObjectURL(n)}}function da(t){let e=String(t||"").trim();if(!e)return"?";let n=Array.from(e)[0];return/[㐀-鿿]/.test(n)?n:Array.from(e).slice(0,2).join("").toUpperCase()}var ft=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(ft||{}),Dc=[0,1],pa=[1,0],ma=[2,3],ha=[3,2],Nc={L:Dc,M:pa,Q:ma,H:ha},Oc=/^\d*$/,zc=/^[A-Z0-9 $%*+./:-]*$/,Xr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Yr=1,Jr=40,fa=3,Fc=3,$n=40,Bc=10,ga=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],ba=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],jr=class{constructor(e,n,r,o){if(this.version=e,this.ecc=n,e<Yr||e>Jr)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),o===-1){let l=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);let d=this.getPenaltyScore();d<l&&(o=u,l=d),this.applyMask(u)}}this.mask=o,this.applyMask(o),this.drawFormatBits(o)}size;mask;modules=[];types=[];getModule(e,n){return e>=0&&e<this.size&&n>=0&&n<this.size&&this.modules[n][e]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,ft.Timing),this.setFunctionModule(r,6,r%2===0,ft.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),n=e.length;for(let r=0;r<n;r++)for(let o=0;o<n;o++)r===0&&o===0||r===0&&o===n-1||r===n-1&&o===0||this.drawAlignmentPattern(e[r],e[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,r=n;for(let i=0;i<10;i++)r=r<<1^(r>>>9)*1335;let o=(n<<10|r)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,Ue(o,i));this.setFunctionModule(8,7,Ue(o,6)),this.setFunctionModule(8,8,Ue(o,7)),this.setFunctionModule(7,8,Ue(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,Ue(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,Ue(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,Ue(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let n=this.version<<12|e;for(let r=0;r<18;r++){let o=Ue(n,r),i=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(i,s,o),this.setFunctionModule(s,i,o)}}drawFinderPattern(e,n){for(let r=-4;r<=4;r++)for(let o=-4;o<=4;o++){let i=Math.max(Math.abs(o),Math.abs(r)),s=e+o,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,i!==2&&i!==4,ft.Position)}}drawAlignmentPattern(e,n){for(let r=-2;r<=2;r++)for(let o=-2;o<=2;o++)this.setFunctionModule(e+o,n+r,Math.max(Math.abs(o),Math.abs(r))!==1,ft.Alignment)}setFunctionModule(e,n,r,o=ft.Function){this.modules[n][e]=r,this.types[n][e]=o}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==Un(n,r))throw new RangeError("Invalid argument");let o=ba[r[0]][n],i=ga[r[0]][n],s=Math.floor(Vr(n)/8),l=o-s%o,u=Math.floor(s/o),d=[],p=Gc(i);for(let f=0,g=0;f<o;f++){let b=e.slice(g,g+u-i+(f<l?0:1));g+=b.length;let v=Yc(b,p);f<l&&b.push(0),d.push(b.concat(v))}let m=[];for(let f=0;f<d[0].length;f++)d.forEach((g,b)=>{(f!==u-i||b>=l)&&m.push(g[f])});return m}drawCodewords(e){if(e.length!==Math.floor(Vr(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){let s=r-i,u=(r+1&2)===0?this.size-1-o:o;!this.types[u][s]&&n<e.length*8&&(this.modules[u][s]=Ue(e[n>>>3],7-(n&7)),n++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let o;switch(e){case 0:o=(r+n)%2===0;break;case 1:o=n%2===0;break;case 2:o=r%3===0;break;case 3:o=(r+n)%3===0;break;case 4:o=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:o=r*n%2+r*n%3===0;break;case 6:o=(r*n%2+r*n%3)%2===0;break;case 7:o=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&o&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let e=0;for(let i=0;i<this.size;i++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]===s?(l++,l===5?e+=fa:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*$n),s=this.modules[i][d],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*$n}for(let i=0;i<this.size;i++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]===s?(l++,l===5?e+=fa:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*$n),s=this.modules[d][i],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*$n}for(let i=0;i<this.size-1;i++)for(let s=0;s<this.size-1;s++){let l=this.modules[i][s];l===this.modules[i][s+1]&&l===this.modules[i+1][s]&&l===this.modules[i+1][s+1]&&(e+=Fc)}let n=0;for(let i of this.modules)n=i.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,o=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=o*Bc,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let o=this.size-7;r.length<e;o-=n)r.splice(1,0,o);return r}}finderPenaltyCountPatterns(e){let n=e[1],r=n>0&&e[2]===n&&e[3]===n*3&&e[4]===n&&e[5]===n;return(r&&e[0]>=n*4&&e[6]>=n?1:0)+(r&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,r){return e&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,n){n[0]===0&&(e+=this.size),n.pop(),n.unshift(e)}};function qe(t,e,n){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)n.push(t>>>r&1)}function Ue(t,e){return(t>>>e&1)!==0}var Yt=class{constructor(e,n,r){if(this.mode=e,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}},$c=[1,10,12,14],Uc=[2,9,11,13],qc=[4,8,16,16];function xa(t,e){return t[Math.floor((e+7)/17)+1]}function ya(t){let e=[];for(let n of t)qe(n,8,e);return new Yt(qc,t.length,e)}function Hc(t){if(!va(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let n=0;n<t.length;){let r=Math.min(t.length-n,3);qe(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new Yt($c,t.length,e)}function Wc(t){if(!wa(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e=[],n;for(n=0;n+2<=t.length;n+=2){let r=Xr.indexOf(t.charAt(n))*45;r+=Xr.indexOf(t.charAt(n+1)),qe(r,11,e)}return n<t.length&&qe(Xr.indexOf(t.charAt(n)),6,e),new Yt(Uc,t.length,e)}function Xc(t){return t===""?[]:va(t)?[Hc(t)]:wa(t)?[Wc(t)]:[ya(Vc(t))]}function va(t){return Oc.test(t)}function wa(t){return zc.test(t)}function jc(t,e){let n=0;for(let r of t){let o=xa(r.mode,e);if(r.numChars>=1<<o)return Number.POSITIVE_INFINITY;n+=4+o+r.bitData.length}return n}function Vc(t){t=encodeURI(t);let e=[];for(let n=0;n<t.length;n++)t.charAt(n)!=="%"?e.push(t.charCodeAt(n)):(e.push(Number.parseInt(t.substring(n+1,n+3),16)),n+=2);return e}function Vr(t){if(t<Yr||t>Jr)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){let n=Math.floor(t/7)+2;e-=(25*n-10)*n-55,t>=7&&(e-=36)}return e}function Un(t,e){return Math.floor(Vr(t)/8)-ga[e[0]][t]*ba[e[0]][t]}function Gc(t){if(t<1||t>255)throw new RangeError("Degree out of range");let e=[];for(let r=0;r<t-1;r++)e.push(0);e.push(1);let n=1;for(let r=0;r<t;r++){for(let o=0;o<e.length;o++)e[o]=Gr(e[o],n),o+1<e.length&&(e[o]^=e[o+1]);n=Gr(n,2)}return e}function Yc(t,e){let n=e.map(r=>0);for(let r of t){let o=r^n.shift();n.push(0),e.forEach((i,s)=>n[s]^=Gr(i,o))}return n}function Gr(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(e>>>r&1)*t;return n}function Jc(t,e,n=1,r=40,o=-1,i=!0){if(!(Yr<=n&&n<=r&&r<=Jr)||o<-1||o>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let m=Un(s,e)*8,f=jc(t,s);if(f<=m){l=f;break}if(s>=r)throw new RangeError("Data too long")}for(let m of[pa,ma,ha])i&&l<=Un(s,m)*8&&(e=m);let u=[];for(let m of t){qe(m.mode[0],4,u),qe(m.numChars,xa(m.mode,s),u);for(let f of m.getData())u.push(f)}let d=Un(s,e)*8;qe(0,Math.min(4,d-u.length),u),qe(0,(8-u.length%8)%8,u);for(let m=236;u.length<d;m^=253)qe(m,8,u);let p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new jr(s,e,p,o)}function ka(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:o=1,maxVersion:i=40,maskPattern:s=-1,border:l=1}=e||{},u=typeof t=="string"?Xc(t):Array.isArray(t)?[ya(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=Jc(u,Nc[n],o,i,s,r),p=Zc({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},l);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function Zc(t,e=1){if(!e)return t;let{size:n}=t,r=n+e*2;t.size=r,t.data.forEach(i=>{for(let s=0;s<e;s++)i.unshift(!1),i.push(!1)});for(let i=0;i<e;i++)t.data.unshift(Array.from({length:r},s=>!1)),t.data.push(Array.from({length:r},s=>!1));let o=ft.Border;t.types.forEach(i=>{for(let s=0;s<e;s++)i.unshift(o),i.push(o)});for(let i=0;i<e;i++)t.types.unshift(Array.from({length:r},s=>o)),t.types.push(Array.from({length:r},s=>o));return t}function ne(t){return a("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[a("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&a("span",{class:"settings-panel-icon",children:a(q,{name:t.icon,size:16})}),a("div",{children:[a("strong",{children:t.title}),t.desc&&a("p",{children:t.desc})]}),t.actions&&a("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function xe(t){return a("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[a("div",{class:"settings-control-copy",children:a("span",{children:[a("strong",{children:t.label}),t.desc&&a("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&a("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function se(t){return a("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function _a(t){return a("button",{type:"button",role:"switch","aria-checked":t.checked,"aria-label":t.label,class:`settings-switch${t.checked?" active":""}`,disabled:t.disabled,onClick:()=>t.onChange(!t.checked),children:a("span",{})})}function I(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return a("button",{type:t.submit?"submit":"button",class:n,disabled:t.disabled||t.pending,"aria-busy":t.pending||void 0,"aria-label":t.label,title:t.title,"data-armed":t.armed?"true":void 0,onClick:t.onClick,children:[t.pending&&a(Vt,{}),t.children]})}var Kc=5e3;function pt(t){let[e,n]=E(!1),r=ee(null),o=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};X(()=>()=>{r.current&&clearTimeout(r.current)},[]),X(()=>{(t.pending||t.disabled)&&o()},[t.pending,t.disabled]);let i=()=>{if(!e){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},Kc);return}o(),t.onConfirm()},s=t.variant??"ghost";return a(I,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:i,children:e?t.confirmLabel:t.label})}function $(t){let e=Qe(),{a:n}=t;return n.error?a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:$e(n.error,e)}),n.captcha&&a("button",{type:"button",class:"fx-link",onClick:()=>void Dn(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",a(q,{name:"external",size:12})]})]}):n.success?a("div",{class:"fx-msg is-ok",role:"status",children:$e(n.success,e)}):null}function ge(t){return a("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function tt(t){return a("div",{class:"settings-empty-row fx-block",children:t.children})}function Jt(t){let e=Qe(),n=t.display;return a("div",{class:`fx-quota${n.low?" is-low":""}`,children:[a("div",{class:"fx-quota-top",children:[a("span",{class:"fx-quota-label",children:t.label}),a("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),a("div",{class:"fx-bar",role:"progressbar","aria-label":t.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?e("common.unlimited"):n.text,children:a("span",{style:{width:`${n.pct}%`}})}),t.note&&a("div",{class:"fx-quota-note",children:t.note})]})}function mt(t){return a("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>a("button",{type:"button",role:"radio","aria-checked":e.value===t.value,class:e.value===t.value?"active":"",onClick:()=>{e.value!==t.value&&t.onChange(e.value)},children:e.label}))})}async function Qc(t){try{return await navigator.clipboard.writeText(t),!0}catch{try{let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let n=document.execCommand("copy");return e.remove(),n}catch{return!1}}}function qn(t){let e=Qe(),[n,r]=E("idle"),o=ee(null);X(()=>()=>{o.current&&clearTimeout(o.current)},[]);let i=async()=>{let s=await Qc(t.text);r(s?"copied":"failed"),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>r("idle"),1800)};return a(I,{disabled:t.disabled||!t.text,onClick:()=>void i(),children:[a(q,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function eu(t){let e=Je(()=>{try{return ka(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((o,i)=>o.forEach((s,l)=>{s&&(n+=`M${l} ${i}h1v1h-1z`)}));let r=t.size??148;return a("svg",{class:"fx-qr",width:r,height:r,viewBox:`0 0 ${e.size} ${e.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":t.label,children:[a("rect",{width:e.size,height:e.size,fill:"#fff"}),a("path",{d:n,fill:"#000"})]})}function Zr(t){let e=Qe(),{device:n}=t;return a("div",{class:"fx-device",children:[a(eu,{value:n.url,label:e("signin.qrLabel")}),a("div",{class:"fx-device-copy",children:[a("p",{children:e("signin.deviceHint")}),n.userCode&&a("div",{class:"fx-device-code",children:[a("span",{children:e("signin.code")}),a("code",{children:n.userCode})]}),a("div",{class:"fx-inline",children:[a("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",a(q,{name:"external",size:12})]}),a(qn,{text:n.url,label:e("signin.copyLink")})]})]})]})}function Ne(){let t=Qe(),e=B(),[n,r]=E(null);X(()=>j().onAuthDevice?.(i=>r(i)),[]);let o=()=>void e.run(async()=>{let i=j().forsionLogin;if(!i)return{error:{key:"err.unavailable"}};try{await i()}catch(s){r(null);let l=Gt(Ke(s));return l?{error:l}:void 0}});return a("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:a("div",{class:"settings-state fx-signin-body",children:[a("span",{class:"settings-state-icon",children:a(q,{name:"user",size:18})}),a("p",{class:"fx-signin-lead",children:t("signin.desc")}),a("div",{class:"settings-state-actions",children:a(I,{variant:"primary",pending:e.pending,onClick:o,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&a(Zr,{device:n}),a($,{a:e})]})})}function Ce(t){let e=Qe(),n=t.panels??2,r=t.rows??2;return a("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(o,i)=>a("section",{class:"settings-panel fx-panel",children:[a("div",{class:"settings-panel-head",children:[a("span",{class:"fx-skel fx-skel--icon"}),a("div",{children:[a("span",{class:"fx-skel fx-skel--title"}),a("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,l)=>a("div",{class:"settings-control-row",children:a("span",{class:"fx-skel fx-skel--row"})},l))]},i))})}function Re(t){let e=Qe();return a("section",{class:"settings-panel fx-panel",children:a("div",{class:"settings-state fx-error-state",role:"alert",children:[a("span",{class:"settings-state-icon",children:a(q,{name:"alert",size:18})}),a("strong",{children:e("common.loadFailed")}),a("p",{children:$e(t.error,e)}),a("div",{class:"settings-state-actions",children:a(I,{variant:"primary",onClick:t.onRetry,children:[a(q,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}function Aa(){let t=De(async()=>{let[n,r,o]=await Promise.all([M("/auth/me"),M("/membership/my"),M("/features")]);return n.ok?{ok:!0,status:n.status,data:{me:n.data,membership:r.ok?r.data?.membership??null:null,membershipFailed:!r.ok,features:o.ok&&o.data&&typeof o.data=="object"?o.data:{}}}:n});if(t.state==="loading")return a(Ce,{panels:3});if(t.state==="signedOut")return a(Ne,{});if(t.state==="error")return a(Re,{error:t.error,onRetry:t.retry});let{data:e}=t;return a(V,{children:[a(tu,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),a(nu,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),a(ru,{}),a(iu,{})]})}function tu(t){let{t:e}=F(),{me:n}=t,r=B(),o=B(),[i,s]=E(!1),[l,u]=E(""),d=ee(null),p=n.nickname||n.username,m=b=>{b&&r.run(async()=>{let v;try{v=await ua(b)}catch(T){return{error:{key:T instanceof dt?"err.avatarTooLarge":"err.avatarInvalid"}}}let k=await M("/settings",{method:"PUT",body:{avatar:v}});return k.ok?(t.onPatch({avatar:v}),{success:{key:"account.avatar.saved"}}):{error:_e(k)}})},f=()=>{o.clear(),u(p||""),s(!0)},g=()=>{let b=l.trim();if(!b||b===p){s(!1);return}o.run(async()=>{let v=await M("/settings",{method:"PUT",body:{nickname:b}});return v.ok?(t.onPatch({nickname:b}),s(!1),{success:{key:"account.nickname.saved"}}):{error:_e(v)}})};return a(ne,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[a("div",{class:"fx-identity fx-block",children:[a("button",{type:"button",class:"fx-avatar",disabled:r.pending,onClick:()=>d.current?.click(),"aria-label":e("account.avatar.change"),title:e("account.avatar.change"),children:[n.avatar?a("img",{src:n.avatar,alt:""}):a("span",{class:"fx-avatar-initial",children:da(p)}),a("span",{class:"fx-avatar-mask",children:r.pending?a(Vt,{size:14}):a(q,{name:"pencil",size:14})})]}),a("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:b=>{let v=b.currentTarget;m(v.files?.[0]),v.value=""}}),a("div",{class:"fx-identity-main",children:[i?a("form",{class:"fx-inline",onSubmit:b=>{b.preventDefault(),g()},children:[a("input",{class:"fx-input fx-input--name",value:l,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:b=>u(b.currentTarget.value),onKeyDown:b=>{b.key==="Escape"&&(b.preventDefault(),s(!1))}}),a(I,{variant:"primary",submit:!0,pending:o.pending,children:e("common.save")}),a(I,{disabled:o.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):a("div",{class:"fx-name-row",children:[a("span",{class:"fx-name",children:p}),a("button",{type:"button",class:"fx-icon-btn",onClick:f,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:a(q,{name:"pencil",size:13})}),n.role==="ADMIN"&&a("span",{class:"fx-tag",children:e("account.role.admin")})]}),a("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),a($,{a:o}),a($,{a:r})]})]}),a(Sa,{kind:"phone",value:n.phone}),a(Sa,{kind:"email",value:n.email})]})}function Sa(t){let{t:e,goTo:n}=F(),r=!!t.value,o=r?t.kind==="phone"?Fn(t.value):Bn(t.value):e("account.contact.unbound"),i=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return a(xe,{label:i,children:n?a("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[a("span",{children:o}),a(q,{name:"chevron",size:12})]}):a("span",{class:`fx-value${r?"":" is-empty"}`,children:o})})}function nu(t){let{t:e,locale:n}=F(),r=B(),o=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,i=aa(o?.tier),s=i==="Free",l=s?"free":i.toLowerCase()==="pro"?"pro":"paid",u=()=>void r.run(async()=>await In("membership")?void 0:{error:{key:"err.openFailed"}});return a(ne,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?a(I,{variant:"primary",pending:r.pending,onClick:u,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&a("div",{class:"fx-member fx-block",children:[a("span",{class:`fx-tier fx-tier--${l}`,children:i}),a("div",{class:"fx-member-copy",children:[a("strong",{children:s?e("member.freeName"):o?.plan?.name||i}),a("span",{class:"fx-muted",children:s?e("member.freeHint"):o?.expiresAt?e("member.expires",{date:ca(o.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&a("div",{class:"fx-sub",children:a(ge,{tone:"warn",children:[e("member.loadFailed")," ",a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&a("div",{class:"fx-sub fx-sub--tight",children:a($,{a:r})})]})}function ru(){let{t}=F(),e=et(),[n,r]=E(null),[o,i]=E(!1),[s,l]=E(null),[u,d]=E(null),p=B(),m=B(),f=B(),g=!!j().authAccounts;X(()=>{let x=0,_=()=>{let N=j().authAccounts;if(!N)return;let G=++x;i(!1),N().then(z=>{G===x&&r(Array.isArray(z)?z:[])}).catch(()=>{G===x&&i(!0)})};_();let A=j().onAuthChanged?.(_),R=j().onAuthDevice?.(N=>d(N));return()=>{x++,A?.(),R?.()}},[]);let b=x=>{l(x),p.run(async()=>{let _=j().forsionSwitchAccount;if(!_)return{error:{key:"err.unavailable"}};try{await _(x)}catch(A){let R=Gt(Ke(A));return R?{error:R}:void 0}finally{e.current&&l(null)}})},v=()=>void m.run(async()=>{let x=j().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(_){e.current&&d(null);let A=Gt(Ke(_));return A?{error:A}:void 0}}),k=()=>void f.run(async()=>{let x=j().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(_){return{error:{raw:Ke(_)||t("err.generic")}}}}),T=p.pending||m.pending||f.pending;return a(ne,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[g&&n===null&&!o&&a(tt,{children:[a(Vt,{})," ",t("common.loading")]}),o&&a("div",{class:"fx-sub",children:a(ge,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&a(tt,{children:t("local.empty")}),n&&n.length>0&&a("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>a("div",{class:"fx-list-row",role:"listitem",children:[a("span",{class:"fx-list-icon",children:a(q,{name:"user",size:14})}),a("span",{class:"fx-list-main",children:[a("strong",{children:x.nickname||x.username||"Forsion"}),a("small",{children:[x.username&&x.nickname?x.username:null,ou(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?a("span",{class:"fx-tag fx-tag--accent",children:[a(q,{name:"check",size:11})," ",t("local.current")]}):a(I,{pending:s===x.id,disabled:T&&s!==x.id,onClick:()=>b(x.id),children:t("local.switch")})]},x.id))}),m.pending&&u&&a("div",{class:"fx-sub",children:a(Zr,{device:u})}),a("div",{class:"settings-panel-footer fx-footer",children:[a(I,{pending:m.pending,disabled:T&&!m.pending,onClick:v,children:[a(q,{name:"plus",size:12})," ",m.pending?t("signin.pending"):t("local.add")]}),a(I,{pending:f.pending,disabled:T&&!f.pending,onClick:k,children:[a(q,{name:"logout",size:12})," ",t("local.signOut")]})]}),(p.error||m.error||f.error)&&a("div",{class:"fx-sub fx-sub--tight",children:[a($,{a:p}),a($,{a:m}),a($,{a:f})]})]})}function ou(t){try{return new URL(t).host}catch{return t}}function iu(){let{t}=F(),e=B();return a("div",{class:"fx-page-foot",children:[a("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await Dn()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",a(q,{name:"external",size:12})]}),a("span",{class:"fx-muted",children:t("account.web.desc")}),a($,{a:e})]})}function K(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function au(t,e){let n=K(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,K(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var su=15;function ht(t,e){let n=au(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,K(t)??0),o=n===0&&r>0&&(K(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:o,low:n<=su}}function Hn(t,e){let n=K(e);if(n===null||n<=0)return null;let r=K(t);if(r===null)return null;let o=Math.max(0,r);if(o===0)return"0%";let i=o/n*100;if(i<.1)return"<0.1%";let s=Math.round(i*10)/10;return s<10?`${s}%`:`${Math.round(i).toLocaleString("en-US")}%`}var lu=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Ea(){let t=De(async()=>{let[s,l,u,d]=await Promise.all([M("/token-quota/my"),M("/credits/balance"),M("/features"),M("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?K(l.data?.balance):null,balanceFailed:!l.ok,features:u.ok&&u.data&&typeof u.data=="object"?u.data:{},invite:d.ok?d.data:null,inviteState:lu(d)}}:s});if(t.state==="loading")return a(Ce,{panels:3,rows:2});if(t.state==="signedOut")return a(Ne,{});if(t.state==="error")return a(Re,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,r=e.quota.background,o=e.features.redemption_codes!==!1,i=e.features.payment!==!1;return a(V,{children:[a(uu,{data:e,update:n,onFailed:t.reload}),a(fu,{data:e,payment:i,onRetry:t.reload}),r?.modelId?a(mu,{bg:r,update:n}):null,(e.inviteState!=="hidden"||o)&&a(hu,{data:e,update:n,redeemEnabled:o,onRedeemed:t.reload})]})}var Ta=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function cu(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function uu(t){let{t:e,locale:n,ctx:r}=F(),o=t.data.quota,i=ht(o.dailyRemaining,o.dailyLimit),s=ht(o.weeklyRemaining,o.weeklyLimit),l=sa(o.weeklyResetAt,n),u=Math.max(0,K(o.resetCards)??0),d=K(o.resetCardPricePoints)??100,p=B(),m=B(),[f,g]=E(null),[b,v]=E("1"),k=/^\d+$/.test(b.trim())?Number(b.trim()):NaN,T=Number.isInteger(k)&&k>=1&&k<=50,x=T?k*d:null,_=t.data.balance,A=x!==null&&_!==null&&_<x,R=()=>void p.run(async()=>{let z={daily:i,weekly:s},H=Ta(o);g(null);let re=j(),pe=await Mn(re.accountUseResetCard?()=>re.accountUseResetCard("both"):null,()=>M("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!pe.ok)return t.onFailed(),de(pe);let Pe=pe.data?.quota,Oe=K(pe.data?.resetCards);return t.update(gt=>({...gt,quota:{...gt.quota,...Pe??{},resetCards:Oe??gt.quota.resetCards}})),Pe&&!cu(r.app,{before:H,after:Ta(Pe),remainingCards:Oe??void 0})&&g({before:z,after:{daily:ht(Pe.dailyRemaining,Pe.dailyLimit),weekly:ht(Pe.weeklyRemaining,Pe.weeklyLimit)},cards:Oe}),{success:{key:"card.used"}}}),N=()=>void m.run(async()=>{if(!T)return{error:{key:"err.invalidCount"}};let z=await M("/points/exchange-reset-cards",{method:"POST",body:{count:k,expectedPricePerCard:d}});return z.ok?(t.update(H=>({...H,quota:{...H.quota,resetCards:K(z.data?.resetCards)??H.quota.resetCards},balance:K(z.data?.newPointsBalance)??H.balance})),v("1"),{success:{key:"card.exchanged",vars:{n:K(z.data?.cardsGranted)??k}}}):(t.onFailed(),de(z))}),G=z=>z.unlimited?e("common.unlimited"):z.text;return a(ne,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[a("div",{class:"fx-quota-list fx-block",children:[a(Jt,{label:e("common.today"),display:i,note:i.unlimited?null:e("quota.resetDaily")}),a(Jt,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),a(xe,{label:e("card.title"),desc:e("card.desc"),children:[a("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:u})}),a(pt,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:p.pending,disabled:u<=0,onConfirm:R})]}),u<=0&&!p.success&&a(se,{children:a(ge,{children:e("card.noneHint")})}),(p.error||p.success)&&a(se,{children:[a($,{a:p}),p.success&&f&&a("div",{class:"fx-ceremony",role:"status",children:[a("span",{children:[e("common.today")," ",a("b",{children:G(f.before.daily)})," \u2192 ",a("b",{children:G(f.after.daily)})]}),a("span",{children:[e("common.thisWeek")," ",a("b",{children:G(f.before.weekly)})," \u2192 ",a("b",{children:G(f.after.weekly)})]}),f.cards!==null&&a("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),a(xe,{label:e("card.exchange"),desc:e("card.price",{price:he(d,n)}),class:"fx-row--wide",children:[a("input",{class:"fx-input fx-input--count",type:"number",inputMode:"numeric",min:1,max:50,step:1,value:b,"aria-label":e("card.count"),onInput:z=>{v(z.currentTarget.value),m.clear()}}),a("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:he(x,n)}):e("card.countHint")}),a(pt,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?he(x,n):"\u2014"}),pending:m.pending,disabled:!T||A,onConfirm:N})]}),(A||m.error||m.success)&&a(se,{children:[A&&!m.error&&a(ge,{tone:"warn",children:e("err.insufficientPoints")}),a($,{a:m})]})]})}function du(t,e,n){let r=B(),[o,i]=E(null);return{checked:o??t,toggle:l=>{i(l),r.run(async()=>{let u=await e(l);if(i(null),!u.ok)return de(u);n(l)})},action:r}}function fu(t){let{t:e,locale:n}=F(),r=B(),o=()=>void r.run(async()=>await In("credits")?void 0:{error:{key:"err.openFailed"}});return a(ne,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?a(I,{variant:"primary",pending:r.pending,onClick:o,children:e("points.recharge")}):void 0,children:[a(xe,{label:e("points.balance"),children:t.data.balance!==null?a("span",{class:"fx-big","data-testid":"points-balance",children:he(t.data.balance,n)}):a("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&a(se,{children:a($,{a:r})})]})}var pu=[5,10,20];function mu(t){let{t:e}=F(),{bg:n}=t,r=ht(n.dailyRemaining,n.dailyLimit),o=ht(n.weeklyRemaining,n.weeklyLimit),i=B(),[s,l]=E(null),u=du(!!n.autoMain,p=>{let m=j();return Mn(m.accountBgAutoMain?()=>m.accountBgAutoMain(p):null,()=>M("/token-quota/background/auto-main",{method:"POST",body:{enabled:p}}))},p=>t.update(m=>({...m,quota:{...m.quota,background:{...m.quota.background??{},autoMain:p}}}))),d=p=>{l(p),i.run(async()=>{let m=j(),f=await Mn(m.accountBgConvert?()=>m.accountBgConvert(p):null,()=>M("/token-quota/background/convert",{method:"POST",body:{percent:p}}));if(l(null),!f.ok)return de(f);let g=f.data?.quota;return g&&t.update(v=>({...v,quota:{...v.quota,...g,resetCards:v.quota.resetCards,resetCardPricePoints:v.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:p}}}})};return a(ne,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[a("div",{class:"fx-quota-list fx-block",children:[a(Jt,{label:e("common.today"),display:r}),a(Jt,{label:e("common.thisWeek"),display:o})]}),a(xe,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:a(_a,{checked:u.checked,disabled:u.action.pending,label:e("bg.autoMain"),onChange:u.toggle})}),a(xe,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:pu.map(p=>a(pt,{label:`${p}%`,confirmLabel:e("bg.convertConfirm",{pct:p}),pending:i.pending&&s===p,disabled:i.pending&&s!==p,onConfirm:()=>d(p)},p))}),(i.error||i.success||u.action.error)&&a(se,{children:[a($,{a:u.action}),a($,{a:i})]})]})}function hu(t){let{t:e,locale:n}=F(),{invite:r,inviteState:o}=t.data,[i,s]=E(null),[l,u]=E(""),[d,p]=E(""),m=B(),f=B(),g=B();X(()=>{let x=!0;return j().authStatus?.().then(_=>{x&&s(_?.cloudUrl?_.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let b=async()=>{let x=await M("/invite/my-code");return t.update(_=>({..._,invite:x.ok?x.data:_.invite,inviteState:x.ok?"ok":x.status===404?"hidden":_.inviteState})),x},v=()=>void m.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let _=await M("/invite/claim",{method:"POST",body:{code:x}});return _.ok?(u(""),b(),{success:{key:"invite.claimed"}}):de(_)}),k=()=>void f.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let _=await M("/redemption/redeem",{method:"POST",body:{code:x}});if(!_.ok)return de(_);p(""),t.onRedeemed();let A=[],R=K(_.data?.creditsAmount);R&&A.push(e("redeem.gotPoints",{n:he(R,n)})),_.data?.membershipPlanId&&A.push(e("redeem.gotMembership"));for(let N of Array.isArray(_.data?.items)?_.data.items:[]){let G=(n==="zh"?N?.label?.zh:N?.label?.en)||N?.label?.zh||N?.label?.en||N?.kind;G&&A.push(G)}return{success:A.length?{key:"redeem.successWith",vars:{what:A.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),T=r?.code&&i?`${i}/auth?invite=${encodeURIComponent(r.code)}`:"";return a(ne,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[o==="ok"&&r?.code&&a(xe,{label:e("invite.myCode"),desc:e("invite.count",{n:he(K(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[a("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),a(qn,{text:r.code,label:e("invite.copyCode")}),a(qn,{text:T,label:e("invite.copyLink"),disabled:!T})]}),o==="failed"&&a(se,{children:a(ge,{tone:"warn",children:[e("invite.loadFailed")," ",a("button",{type:"button",class:"fx-link",disabled:g.pending,onClick:()=>void g.run(async()=>{await b()}),children:e("common.retry")})]})}),o==="ok"&&r?.claim?.eligible&&a(xe,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:a("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),v()},children:[a("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>u(x.currentTarget.value)}),a(I,{submit:!0,pending:m.pending,children:e("invite.claimSubmit")})]})}),(m.error||m.success)&&a(se,{children:a($,{a:m})}),t.redeemEnabled&&a(xe,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:a("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),k()},children:[a("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>p(x.currentTarget.value)}),a(I,{submit:!0,pending:f.pending,children:e("redeem.submit")})]})}),(f.error||f.success)&&a(se,{children:a($,{a:f})})]})}var gu=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,bu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Ca=(t,e)=>t==="phone"?gu.test(e):bu.test(e),Zt=(t,e)=>t==="phone"?Fn(e):Bn(e);function Pa(){let t=De(()=>M("/auth/me"));if(t.state==="loading")return a(Ce,{panels:3,rows:2});if(t.state==="signedOut")return a(Ne,{});if(t.state==="error")return a(Re,{error:t.error,onRetry:t.retry});let e=t.data;return a(V,{children:[a(xu,{me:e,onBound:(n,r)=>t.update(o=>({...o,[n]:r}))}),a(wu,{me:e}),a(Su,{}),a(Au,{me:e})]})}function Qr(){let t=ia(),e=B();return{cd:t,a:e,send:(o,i,s)=>e.run(async()=>{let l=await M("/auth/send-code",{method:"POST",body:{target:o,type:i,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):de(l)}),reset:()=>{t.stop(),e.clear()}}}function xu(t){let{t:e}=F(),[n,r]=E(null),[o,i]=E(null);return a(ne,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return a(V,{children:[a(xe,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?Zt(s,l):e("account.contact.unbound"),children:a(I,{onClick:()=>{i(null),r(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&a(yu,{kind:s,current:l??null,onDone:u=>{t.onBound(s,u),r(null),i(s)}}),o===s&&n!==s&&a(se,{children:a("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function yu(t){let{t:e}=F(),{kind:n}=t,[r,o]=E(""),[i,s]=E(""),l=Qr(),u=B(),d=r.trim(),p=n==="phone"?"err.phoneInvalid":"err.emailInvalid",m=()=>{if(!Ca(n,d)){l.a.run(async()=>({error:{key:p}}));return}l.send(d,n,"bind")},f=()=>void u.run(async()=>{if(!Ca(n,d))return{error:{key:p}};if(!i.trim())return{error:{key:"err.codeRequired"}};let g=n==="phone"?{phone:d,verification_code:i.trim()}:{email:d,verification_code:i.trim()},b=await M(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:g});if(!b.ok)return de(b);t.onDone(d)});return a(se,{class:"fx-form",children:[a("label",{class:"fx-field",children:[a("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),a("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:g=>o(g.currentTarget.value)})]}),a(eo,{code:i,setCode:s,sender:l,onSend:m}),a("div",{class:"fx-inline",children:a(I,{variant:"primary",pending:u.pending,onClick:f,children:e("sec.bindSubmit")})}),a($,{a:u})]})}function eo(t){let{t:e}=F(),{cd:n,a:r}=t.sender;return a("div",{class:"fx-field",children:[a("span",{children:t.label??e("sec.code")}),a("div",{class:"fx-inline",children:[a("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:t.code,placeholder:e("sec.codePlaceholder"),"aria-label":t.label??e("sec.code"),onInput:o=>t.setCode(o.currentTarget.value)}),a(I,{pending:r.pending,disabled:n.left>0||t.disabled,onClick:t.onSend,children:n.left>0?e("sec.resendIn",{s:n.left}):e("sec.sendCode")})]}),a($,{a:r})]})}function vu(t){let{t:e}=F(),n=ea(t.value),r=t.value.length>0,o=[[n.length,e("pw.req.length",{min:8,max:64})],[n.lower,e("pw.req.lower")],[n.upper,e("pw.req.upper")],[n.special,e("pw.req.special")],[n.space,e("pw.req.space")]];return a("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:o.map(([i,s])=>a("li",{class:i?"is-ok":r?"is-bad":"",children:[i?a(q,{name:"check",size:11}):r?a(q,{name:"x",size:11}):a("span",{class:"fx-rule-dot","aria-hidden":"true"}),a("span",{children:s})]},s))})}function Ma(t,e){let n=Qi(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:qr[n.rule]}}}function wu(t){let{t:e}=F(),n=["phone","email"].filter(l=>!!t.me[l]),[r,o]=E("current"),[i,s]=E(!1);return a(ne,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:a(I,{onClick:()=>s(!i),children:e(i?"common.cancel":"pw.change")}),children:i&&a(se,{class:"fx-form",children:[a(mt,{label:e("pw.modeLabel"),value:r,onChange:o,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),r==="current"?a(ku,{onDone:()=>s(!1)}):n.length?a(_u,{me:t.me,targets:n,onDone:()=>s(!1)}):a(ge,{children:e("pw.codeNeedsContact")})]})})}function La(t){let{t:e}=F();return a(V,{children:[a("label",{class:"fx-field",children:[a("span",{children:e("pw.new")}),a("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),a(vu,{value:t.pw}),a("label",{class:"fx-field",children:[a("span",{children:e("pw.confirm")}),a("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function ku(t){let{t:e}=F(),[n,r]=E(""),[o,i]=E(""),[s,l]=E(""),u=B(),[d,p]=E(!1),m=()=>void u.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let f=Ma(o,s);if(f)return f;let g=await M("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:o}});return g.ok?(r(""),i(""),l(""),p(!0),{success:{key:"pw.changed"}}):g.status===404?{error:{key:"pw.noPasswordYet"}}:de(g)});return a(V,{children:[a("label",{class:"fx-field",children:[a("span",{children:e("pw.current")}),a("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:f=>r(f.currentTarget.value)})]}),a(La,{pw:o,setPw:i,confirm:s,setConfirm:l}),a("div",{class:"fx-inline",children:[a(I,{variant:"primary",pending:u.pending,onClick:m,children:e("pw.submit")}),d&&a(I,{onClick:t.onDone,children:e("common.done")})]}),a($,{a:u})]})}function _u(t){let{t:e}=F(),[n,r]=E(t.targets[0]),[o,i]=E(""),[s,l]=E(""),[u,d]=E(""),p=Qr(),m=B(),[f,g]=E(!1),b=t.me[n]||"",v=()=>void m.run(async()=>{if(!o.trim())return{error:{key:"err.codeRequired"}};let k=Ma(s,u);if(k)return k;let T=n==="phone"?{phone:b,code:o.trim(),newPassword:s}:{email:b,code:o.trim(),newPassword:s},x=await M("/auth/reset-password",{method:"POST",body:T});return x.ok?(i(""),l(""),d(""),g(!0),{success:{key:"pw.changed"}}):de(x)});return a(V,{children:[t.targets.length>1?a(mt,{label:e("pw.via"),value:n,onChange:k=>{r(k),i(""),p.reset()},options:t.targets.map(k=>({value:k,label:Zt(k,t.me[k])}))}):a(ge,{children:e("pw.codeTo",{target:Zt(n,b)})}),a(eo,{code:o,setCode:i,sender:p,onSend:()=>void p.send(b,n,"reset_password")}),a(La,{pw:s,setPw:l,confirm:u,setConfirm:d}),a("div",{class:"fx-inline",children:[a(I,{variant:"primary",pending:m.pending,onClick:v,children:e("pw.submitReset")}),f&&a(I,{onClick:t.onDone,children:e("common.done")})]}),a($,{a:m})]})}function Su(){let{t}=F(),e=B(),n=()=>void e.run(async()=>{let r=await M("/auth/logout-all",{method:"POST"});if(!r.ok)return de(r);try{await j().forsionLogout?.()}catch(o){return{error:{raw:Ke(o)}}}return{success:{key:"sec.logoutAllDone"}}});return a(ne,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[a(xe,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:a(pt,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&a(se,{children:a($,{a:e})})]})}function Au(t){let{t:e}=F(),n=["phone","email"].filter(T=>!!t.me[T]),[r,o]=E(!1),[i,s]=E(n.length?"code":"password"),[l,u]=E(n[0]??null),[d,p]=E(""),[m,f]=E(""),g=Qr(),b=B(),v=l&&t.me[l]||"",k=()=>void b.run(async()=>{if(i==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(i==="password"&&!m)return{error:{key:"pw.currentRequired"}};let T=await M("/auth/delete-account",{method:"POST",body:i==="code"?{verification_code:d.trim()}:{password:m}});if(!T.ok)return de(T);try{await j().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return a(ne,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:a(I,{variant:"danger",onClick:()=>{o(!r),b.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&a(se,{class:"fx-form",children:[a(ge,{tone:"error",children:e("del.warn")}),n.length>0&&a(mt,{label:e("del.methodLabel"),value:i,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),i==="code"&&l?a(V,{children:[n.length>1&&a(mt,{label:e("pw.via"),value:l,onChange:T=>{u(T),p(""),g.reset()},options:n.map(T=>({value:T,label:Zt(T,t.me[T])}))}),a(eo,{code:d,setCode:p,sender:g,label:e("del.codeLabel",{target:Zt(l,v)}),onSend:()=>void g.send(v,l,"delete_account")})]}):a("label",{class:"fx-field",children:[a("span",{children:e("del.passwordLabel")}),a("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:m,onInput:T=>f(T.currentTarget.value)})]}),a("div",{class:"fx-inline",children:a(pt,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:b.pending,onConfirm:k})}),a($,{a:b})]})})}var Da=20;function Na(){let t=De(async()=>{let[e,n]=await Promise.all([M("/token-quota/my"),M(`/token-quota/my/logs?limit=${Da}&offset=0`)]);if(!e.ok)return e;let r=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:e.status,data:{dailyLimit:K(e.data?.dailyLimit),logs:r,total:n.ok?K(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?a(Ce,{panels:3,rows:2}):t.state==="signedOut"?a(Ne,{}):t.state==="error"?a(Re,{error:t.error,onRetry:t.retry}):a(V,{children:[a(Tu,{dailyLimit:t.data.dailyLimit}),a(Cu,{base:t.data,onRetry:t.reload})]})}function Tu(t){let{t:e,locale:n}=F(),[r,o]=E(30),[i,s]=E({state:"loading"}),[l,u]=E(!1),[d,p]=E(0),m=ee(0);X(()=>{let _=++m.current;return u(!0),M(`/usage/stats?days=${r}`).then(A=>{_===m.current&&(u(!1),s(A.ok?{state:"ready",data:A.data??{}}:{state:"error",fail:A}))}),()=>{m.current++}},[r,d]);let f=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Hn(1,t.dailyLimit)===null?"usage.noLimitNote":null,g=_=>Hn(_,t.dailyLimit)??"\u2014",b=a(mt,{label:e("usage.range"),value:r,onChange:o,options:[{value:7,label:e("usage.days",{n:7})},{value:30,label:e("usage.days",{n:30})},{value:90,label:e("usage.days",{n:90})}]}),v=i.state==="ready"?i.data:null,k=(v?.byModel??[]).filter(Boolean),T=(v?.byProject??[]).filter(Boolean),x=K(v?.successRate);return a(V,{children:[a(ne,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:b,children:[i.state==="error"?a("div",{class:"fx-sub",children:a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:$e(_e(i.fail),e)}),a("button",{type:"button",class:"fx-link",onClick:()=>p(_=>_+1),children:e("common.retry")})]})}):a("div",{class:`fx-stats fx-block${l&&v?" is-refreshing":""}`,"aria-busy":l||void 0,children:[a(to,{label:e("usage.requests"),value:v?he(K(v.totalRequests)??0,n):null,testId:"usage-requests"}),a(to,{label:e("usage.successRate"),value:v?x===null?"\u2014":`${x.toFixed(1)}%`:null}),a(to,{label:e("usage.consumption"),value:v?g(v.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),f&&a("div",{class:"fx-sub fx-sub--tight",children:a(ge,{children:e(f)})})]}),i.state!=="error"&&a(V,{children:[a(ne,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:a(Ia,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:k.map(_=>[_.modelName||_.modelId||"\u2014",he(K(_.count)??0,n),g(_.pointsCost)])})}),a(ne,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:a(Ia,{loading:!v,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:T.map(_=>[Oa(_.projectSource,e("usage.appUnknown")),he(K(_.count)??0,n),g(_.pointsCost)])})})]})]})}var Eu={tangu:"Tangu","ai-studio":"Forsion AI Studio",desktop:"Forsion Desktop",amadeus:"Amadeus",notebase:"Notebase",calendar:"Forsion Calendar",chat:"Forsion Chat",desk:"Forsion Desk","photo-studio":"Photo Studio",connect:"Forsion Connect"},Oa=(t,e)=>!t||t==="unknown"?e:Eu[t]??t;function to(t){return a("div",{class:"fx-stat",children:[a("span",{class:"fx-stat-label",children:t.label}),t.value===null?a("span",{class:"fx-skel fx-skel--stat"}):a("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&a("span",{class:"fx-stat-sub",children:t.sub})]})}function Ia(t){return t.loading?a("div",{class:"fx-sub",children:[a("span",{class:"fx-skel fx-skel--row"}),a("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?a("div",{class:"fx-table-wrap fx-block",children:a("table",{class:"fx-table",children:[a("thead",{children:a("tr",{children:t.head.map((e,n)=>a("th",{class:n?"is-num":"",children:e},n))})}),a("tbody",{children:t.rows.map((e,n)=>a("tr",{children:e.map((r,o)=>a("td",{class:o?"is-num":"",children:r},o))},n))})]})}):a(tt,{children:t.empty})}function Cu(t){let{t:e,locale:n}=F(),r=et(),[o,i]=E(t.base.logs??[]),[s,l]=E(t.base.total),u=B();X(()=>{i(t.base.logs??[]),l(t.base.total)},[t.base]);let d=()=>void u.run(async()=>{let m=await M(`/token-quota/my/logs?limit=${Da}&offset=${o.length}`);if(!m.ok)return{error:_e(m)};let f=Array.isArray(m.data?.logs)?m.data.logs:[];r.current&&(i(g=>[...g,...f]),l(g=>f.length?K(m.data?.total)??g:o.length))}),p=t.base.dailyLimit;return a(ne,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?a("div",{class:"fx-sub",children:a("div",{class:"fx-msg is-error",role:"alert",children:[a("span",{children:$e(_e(t.base.logsFail),e)}),a("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):o.length===0?a(tt,{children:e("usage.recentEmpty")}):a("div",{class:"fx-list fx-block",role:"list",children:o.map((m,f)=>a("div",{class:"fx-list-row",role:"listitem",children:[a("span",{class:"fx-list-main",children:[a("strong",{children:[m.modelName||m.modelId||"\u2014",m.success===!1&&a("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),a("small",{children:[Lt(m.createdAt,n),Oa(m.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),a("span",{class:"fx-value",children:Hn(m.pointsCost,p)??"\u2014"})]},m.id??f))}),o.length>0&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:e("usage.shown",{shown:he(o.length,n),total:he(Math.max(s,o.length),n)})}),o.length<s&&a(I,{pending:u.pending,onClick:d,children:e("common.loadMore")})]}),u.error&&a("div",{class:"fx-sub fx-sub--tight",children:a($,{a:u})})]})}var Kt=20,Wn=5,Ru=5*1024*1024,Xn=1e4,Pu={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function Fa(t){let{t:e}=F(),n=t.status||"open",r=Pu[n];return a("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Ba(){let[t,e]=E(null),n=De(async()=>{let r=await M(`/feedback?limit=${Kt}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?a(Ce,{panels:1,rows:3}):n.state==="signedOut"?a(Ne,{}):n.state==="error"?a(Re,{error:n.error,onRetry:n.retry}):t?a(Nu,{id:t,onBack:()=>{e(null),n.reload()}}):a(Mu,{first:n.data,onOpen:e,onChanged:n.reload})}function Mu(t){let{t:e,locale:n}=F(),r=et(),[o,i]=E(t.first),[s,l]=E(t.first.length===Kt),[u,d]=E(!1),[p,m]=E(!1),f=B();X(()=>{i(t.first),l(t.first.length===Kt)},[t.first]);let g=()=>void f.run(async()=>{let b=await M(`/feedback?limit=${Kt}&offset=${o.length}`);if(!b.ok)return{error:_e(b)};let v=Array.isArray(b.data?.tickets)?b.data.tickets:[];r.current&&(i(k=>{let T=new Set(k.map(x=>x.id));return[...k,...v.filter(x=>!T.has(x.id))]}),l(v.length===Kt))});return a(ne,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:u?void 0:a(I,{variant:"primary",onClick:()=>{m(!1),d(!0)},children:[a(q,{name:"plus",size:12})," ",e("fb.new")]}),children:[u&&a(Du,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),m(!0),t.onChanged()}}),p&&!u&&a(se,{children:a("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),o.length===0?a(tt,{children:e("fb.empty")}):a("div",{class:"fx-list fx-block",role:"list",children:o.map(b=>a("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(b.id),children:[a("span",{class:`fx-dot${b.user_unread?" is-on":""}`,"aria-label":b.user_unread?e("fb.unread"):void 0}),a("span",{class:"fx-list-main",children:[a("strong",{children:b.title||(b.description||"").slice(0,60)||e("fb.untitled")}),a("small",{children:Lt(b.updated_at||b.created_at,n)})]}),a(Fa,{status:b.status}),a(q,{name:"chevron",size:12})]},b.id))}),o.length>0&&(s||f.error)&&a("div",{class:"settings-panel-footer fx-footer",children:[a("span",{class:"fx-muted",children:e("fb.shown",{n:he(o.length,n)})}),s&&a(I,{pending:f.pending,onClick:g,children:e("common.loadMore")})]}),f.error&&a(se,{children:a($,{a:f})})]})}function Lu(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(r.error||new Error("read failed")),r.readAsDataURL(t)})}var Iu=0;function Du(t){let{t:e}=F(),n=et(),[r,o]=E(""),[i,s]=E([]),[l,u]=E(null),[d,p]=E(!1),m=ee(null),f=B(),[g,b]=E(0),v=ee(0);v.current=i.length;let k=async x=>{u(null);for(let _ of Array.from(x||[])){if(!_.type||!_.type.startsWith("image/")){u({key:"err.imageType"});continue}if(_.size>Ru){u({key:"err.imageTooLarge"});continue}if(v.current>=Wn){u({key:"err.tooManyImages"});break}v.current++,b(A=>A+1);try{let A=await Lu(_);if(!n.current)return;let R={id:`img-${++Iu}`,filename:_.name||"image",mime_type:_.type,size:_.size,data_base64:A.replace(/^data:[^;]+;base64,/,""),url:A};s(N=>N.length>=Wn?N:[...N,R])}catch{v.current--,u({key:"err.imageRead"})}finally{n.current&&b(A=>A-1)}}},T=()=>void f.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>Xn)return{error:{key:"err.feedbackTooLong"}};let _=i.map(({filename:R,mime_type:N,size:G,data_base64:z})=>({filename:R,mime_type:N,size:G,data_base64:z})),A=await M("/feedback",{method:"POST",body:{description:x,attachments:_},timeoutMs:12e4});if(!A.ok)return de(A);t.onSubmitted()});return a("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let _=Array.from(x.clipboardData?.items||[]).filter(A=>A.kind==="file").map(A=>A.getAsFile()).filter(Boolean);_.length&&(x.preventDefault(),k(_))},onDragOver:x=>{x.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:x=>{x.preventDefault(),p(!1),k(x.dataTransfer?.files)},children:[a("label",{class:"fx-field",children:[a("span",{children:e("fb.descLabel")}),a("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:Xn,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>o(x.currentTarget.value)})]}),a("p",{class:"fx-note",children:e("fb.imagesHint",{n:Wn})}),i.length>0&&a("div",{class:"fx-thumbs",children:i.map(x=>a("span",{class:"fx-thumb",children:[a("img",{src:x.url,alt:x.filename}),a("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(_=>_.filter(A=>A.id!==x.id)),u(null)},children:a(q,{name:"x",size:11})})]},x.id))}),l&&a("div",{class:"fx-msg is-error",role:"alert",children:$e(l,e)}),a("input",{ref:m,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let _=x.currentTarget;k(_.files),_.value=""}}),a("div",{class:"fx-inline",children:[a(I,{disabled:i.length>=Wn||f.pending,onClick:()=>m.current?.click(),children:[a(q,{name:"image",size:12})," ",e("fb.addImages")]}),a("span",{class:"fx-grow"}),a(I,{disabled:f.pending,onClick:t.onCancel,children:e("common.cancel")}),a(I,{variant:"primary",pending:f.pending,disabled:g>0,onClick:T,children:e("fb.submit")})]}),a($,{a:f})]})}function Nu(t){let{t:e,locale:n}=F(),[r,o]=E({state:"loading"}),[i,s]=E(0),[l,u]=E(""),[d,p]=E(null),m=B(),f=ee(0);X(()=>{let A=++f.current;return M(`/feedback/${encodeURIComponent(t.id)}`).then(R=>{if(A===f.current){if(!R.ok){o({state:"error",fail:R});return}o({state:"ready",data:{ticket:R.data.ticket,replies:R.data.replies??[],attachments:R.data.attachments??[]}}),M(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{f.current++}},[t.id,i]),X(()=>{if(!d)return;let A=R=>{R.key==="Escape"&&p(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[d]);let g=a("div",{class:"fx-back",children:a(I,{onClick:t.onBack,children:[a(q,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return a(V,{children:[g,a(Ce,{panels:1,rows:3})]});if(r.state==="error")return a(V,{children:[g,a(Re,{error:_e(r.fail),onRetry:()=>{o({state:"loading"}),s(A=>A+1)}})]});let{ticket:b,replies:v,attachments:k}=r.data,T=b.status==="closed",x=A=>k.filter(R=>(R.reply_id??null)===A),_=()=>void m.run(async()=>{let A=l.trim();if(!A)return{error:{key:"err.replyEmpty"}};if(A.length>Xn)return{error:{key:"err.replyTooLong"}};let R=await M(`/feedback/${encodeURIComponent(b.id)}/replies`,{method:"POST",body:{content:A},timeoutMs:6e4});return R.ok?(u(""),s(N=>N+1),{success:{key:"fb.replySent"}}):de(R)});return a(V,{children:[g,a(ne,{icon:"message",title:b.title||e("fb.untitled"),actions:a(Fa,{status:b.status}),desc:`#${String(b.id).slice(0,8)} \xB7 ${Lt(b.created_at,n)}`,children:[a("div",{class:"fx-thread fx-block",children:[a(za,{who:"user",when:b.created_at,text:b.description||"",files:x(null),onZoom:p}),v.map((A,R)=>a(za,{who:A.author_role==="user"?"user":"admin",when:A.created_at,text:A.content||"",files:A.id?x(A.id):[],onZoom:p},A.id??R))]}),T?a(se,{children:a(ge,{children:e("fb.closedNote")})}):a(se,{class:"fx-form",children:[a("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:Xn,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:A=>{u(A.currentTarget.value),m.success&&m.clear()}}),a("div",{class:"fx-inline",children:[a("span",{class:"fx-grow"}),a(I,{variant:"primary",pending:m.pending,onClick:_,children:e("fb.replySend")})]}),a($,{a:m})]})]}),d&&a("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>p(null),children:a("img",{src:d,alt:""})})]})}function za(t){let{t:e,locale:n}=F();return a("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[a("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",Lt(t.when,n)]}),a("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&a("div",{class:"fx-thumbs",children:t.files.map((r,o)=>{let i=r.mime_type||"";if(i.startsWith("image/")&&r.data_base64){let s=`data:${i};base64,${r.data_base64}`;return a("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:a("img",{src:s,alt:r.filename||""})},r.id??o)}return a("span",{class:"fx-tag",children:[a(q,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??o)})})]})}var Ou="forsion-extend",$a=[{id:"account",titleKey:"page.account",Component:Aa},{id:"quota",titleKey:"page.quota",Component:Ea},{id:"security",titleKey:"page.security",Component:Pa},{id:"usage",titleKey:"page.usage",Component:Na},{id:"feedback",titleKey:"page.feedback",Component:Ba}],zu=t=>`forsion/fx:${Ou}:${t}`;function Fu(t){let{ctx:e,page:n}=t,[r,o]=E(()=>Be(e.getLocale?.()));X(()=>{o(Be(e.getLocale?.()));let l=e.subscribeLocale?.(u=>o(Be(u)));return()=>{typeof l=="function"&&l()}},[e]);let i=Je(()=>{let l=e.app?.openSettings;return{ctx:e,locale:r,t:Nn(r),goTo:typeof l=="function"?u=>l.call(e.app,zu(u)):null}},[e,r]),s=n.Component;return a(Hr.Provider,{value:i,children:a("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[a("style",{children:Vi}),a(s,{})]})})}function Ua(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerSettingsView!="function")return 0;for(let r of $a)t.registerSettingsView({id:r.id,category:"forsion",title:()=>Ur(Be(t.getLocale?.()),r.titleKey),mount(o){return Pt(a(Fu,{ctx:t,page:r}),o),()=>{Pt(null,o)}}});return $a.length}var qa;if(typeof ctx<"u"){Ua(ctx);let t=Ki(ctx);t&&(qa=()=>t.dispose())}return ks(Bu);})();
|
|
348
|
+
`;var dt=t=>typeof t=="string"?t:"";function wc(t){if(!t||typeof t!="object")return null;let e=t,n=typeof e.id=="string"?e.id.trim():typeof e.id=="number"&&Number.isFinite(e.id)?String(e.id):"",r=dt(e.titleZh),a=dt(e.bodyZh);return!n||!r.trim()&&!a.trim()?null:{id:n,titleZh:r,titleEn:dt(e.titleEn).trim()?dt(e.titleEn):null,bodyZh:a,bodyEn:dt(e.bodyEn).trim()?dt(e.bodyEn):null,format:e.format==="html"?"html":"markdown",publishedAt:dt(e.publishedAt)||null}}function _c(t,e){return e==="en"&&t.bodyEn?{lang:"en",title:t.titleEn??t.titleZh,body:t.bodyEn}:{lang:"zh",title:t.titleZh,body:t.bodyZh}}var Sc=new Rr({gfm:!0,breaks:!0}),Ac=["script","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","option","button","link","meta","base","noscript"],Tc=/^(?:https?:|mailto:|#)/i;function Jo(t){return br.sanitize(t,{FORCE_BODY:!0,RETURN_DOM_FRAGMENT:!0,FORBID_TAGS:Ac,ALLOWED_URI_REGEXP:Tc})}function Ec(t,e){let n=e==="markdown"?Sc.parse(t,{async:!1}):t;return Jo(n)}var On=null;function Cc(){if(On===null)try{let t=Jo('<p onclick="1"><a href="javascript:void 0">a</a></p><script>1<\/script><iframe></iframe>');On=br.isSupported&&!t.querySelector("script, iframe, [onclick], a[href]")}catch{On=!1}return On}function Rc(t){try{let e=new URL(String(t??"").trim());return e.protocol==="http:"||e.protocol==="https:"?e.href:null}catch{return null}}var Pc="http://www.w3.org/1999/xlink";function Fn(t){let e=t.target,n=e&&typeof e.closest=="function"?e.closest("a, area"):null;if(!n||(t.preventDefault(),t.type!=="click"))return;let r=Rc(n.getAttribute("href")??n.getAttributeNS(Pc,"href"));if(r)try{V().openExternal?.(r)?.catch(()=>{})}catch{}}function Yo(t){return t.shadowRoot??t.attachShadow({mode:"open"})}function Ic(t){let{ctx:e,ann:n}=t,[r,a]=E(()=>$e(e.getLocale?.()));j(()=>{a($e(e.getLocale?.()));let f=e.subscribeLocale?.(b=>a($e(b)));return()=>{typeof f=="function"&&f()}},[e]);let o=Je(()=>zn(r),[r]),s=_c(n,r),l=te(null),u=te(null),d=te(null),p=te(null),m=te(t.onClose);return m.current=t.onClose,j(()=>{let f=document.activeElement instanceof HTMLElement?document.activeElement:null;l.current?.focus();let b=k=>{if(k.key==="Escape"){k.preventDefault(),k.stopPropagation(),m.current();return}if(k.key!=="Tab")return;let y=u.current,A=d.current,x=l.current;if(!y||!A||!x)return;let _=document.activeElement;if(!_||!x.contains(_)){k.preventDefault(),(k.shiftKey?A:y).focus();return}k.shiftKey&&(_===y||_===x)?(k.preventDefault(),A.focus()):!k.shiftKey&&_===A&&(k.preventDefault(),y.focus())},g=k=>{let y=l.current;y&&k.target instanceof Node&&!y.contains(k.target)&&y.focus()};return window.addEventListener("keydown",b,!0),document.addEventListener("focusin",g,!0),()=>{window.removeEventListener("keydown",b,!0),document.removeEventListener("focusin",g,!0),f?.isConnected&&f.focus()}},[]),j(()=>{let f=p.current;if(!f)return;let b=Yo(f);return b.addEventListener("click",Fn),b.addEventListener("auxclick",Fn),()=>{b.removeEventListener("click",Fn),b.removeEventListener("auxclick",Fn)}},[]),j(()=>{let f=p.current;if(!f)return;let b=document.createElement("style");b.textContent=Ko;let g=document.createElement("div");g.className="doc",g.appendChild(Ec(s.body,n.format)),Yo(f).replaceChildren(b,g)},[s.body,n.format]),i("div",{class:"fx-ann-backdrop",children:[i("style",{children:Go}),i("section",{ref:l,class:"fx-ann",role:"dialog","aria-modal":"true","aria-labelledby":"fx-ann-title","aria-describedby":"fx-ann-body",tabIndex:-1,lang:s.lang==="zh"?"zh-CN":"en","data-announcement-id":n.id,children:[i("button",{ref:u,type:"button",class:"fx-ann-close","aria-label":o("ann.close"),onClick:()=>m.current(),children:i(D,{name:"x",size:16})}),i("div",{class:"fx-ann-eyebrow",children:o("ann.eyebrow")}),i("h2",{id:"fx-ann-title",class:"fx-ann-title",children:s.title}),i("div",{class:"fx-ann-body",children:i("div",{ref:p,id:"fx-ann-body",class:"fx-ann-doc"})}),i("div",{class:"fx-ann-footer",children:i("button",{ref:d,type:"button",class:"fx-ann-ok",onClick:()=>m.current(),children:o("ann.ok")})})]})]})}function Mc(t){try{return new URLSearchParams(t||"").has("window")}catch{return!1}}function Lc(t=document,e=12e3){let n=t.getElementById("tangu-splash");return n?.parentNode?new Promise(r=>{let a=()=>{o.disconnect(),clearTimeout(s),r()},o=new MutationObserver(()=>{n.isConnected||a()});o.observe(n.parentNode,{childList:!0});let s=setTimeout(a,e)}):Promise.resolve()}function Zo(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||n.unitPage||Mc(e.location?.search))return null;let r=0,a=!1,o=null,s=Promise.resolve(),l=p=>{let m=document.createElement("div");m.className="fx-ann-root",document.body.appendChild(m);let f=!1,b=g=>{f||(f=!0,o?.id===p.id&&(o=null),It(null,m),m.remove(),g&&(s=P(`/announcements/${encodeURIComponent(p.id)}/seen`,{method:"POST"})))};o={id:p.id,finish:b},It(i(Ic,{ctx:t,ann:p,onClose:()=>b(!0)}),m)},u=async()=>{let p=++r;await s;let m=await P("/announcements/pending");if(a||p!==r||!m.ok)return;let f=wc(m.data?.announcement);!f||o||Cc()&&(await Lc(),!(a||p!==r||o)&&l(f))},d=n.onAuthChanged?.(p=>{o?.finish(!1),p?.loggedIn?u():r++});return u(),{check:u,dispose(){a=!0,r++,typeof d=="function"&&d(),o?.finish(!1)}}}function Qo(t){return typeof t!="string"?{ok:!1,rule:"format"}:t.length<8?{ok:!1,rule:"min"}:t.length>64?{ok:!1,rule:"max"}:/\s/.test(t)?{ok:!1,rule:"space"}:/[a-z]/.test(t)?/[A-Z]/.test(t)?/[^A-Za-z0-9]/.test(t)?{ok:!0}:{ok:!1,rule:"special"}:{ok:!1,rule:"upper"}:{ok:!1,rule:"lower"}}function ei(t){return{length:t.length>=8&&t.length<=64,lower:/[a-z]/.test(t),upper:/[A-Z]/.test(t),special:/[^A-Za-z0-9]/.test(t),space:t.length>0&&!/\s/.test(t)}}var ti={\u5BC6\u7801\u683C\u5F0F\u4E0D\u6B63\u786E:"format","\u5BC6\u7801\u81F3\u5C11 8 \u4F4D":"min","\u5BC6\u7801\u4E0D\u80FD\u8D85\u8FC7 64 \u4F4D":"max",\u5BC6\u7801\u4E0D\u80FD\u5305\u542B\u7A7A\u683C:"space",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5C0F\u5199\u5B57\u6BCD:"lower",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u5927\u5199\u5B57\u6BCD:"upper",\u5BC6\u7801\u5FC5\u987B\u5305\u542B\u7279\u6B8A\u5B57\u7B26:"special"};var ni={no_reset_card:"err.noResetCard",invalid_type:"err.generic",invalid_count:"err.invalidCount",insufficient_points:"err.insufficientPoints",price_changed:"err.priceChanged",insufficient_main_quota:"err.insufficientMainQuota",background_unavailable:"err.backgroundUnavailable",invalid_percent:"err.generic",invalid_request:"err.generic",invalid_invite_code:"err.invalidInviteCode",already_used:"err.inviteAlreadyUsed",window_expired:"err.inviteWindowExpired",ITEM_NOT_FOUND:"backpack.unavailable",ITEM_NOT_ACTIVE:"backpack.unavailable",ITEM_NOT_USABLE:"backpack.notUsable",ITEM_EFFECT_UNAVAILABLE:"backpack.quotaUnavailable",FEATURE_DISABLED:"err.featureDisabled",CAPTCHA_FAILED:"err.captcha"},ri={"Current password is incorrect":"err.currentPasswordWrong","Current and new password are required":"err.passwordRequired",\u9A8C\u8BC1\u7801\u65E0\u6548\u6216\u5DF2\u8FC7\u671F:"err.codeInvalid","Invalid or expired verification code":"err.codeInvalid",\u8D26\u53F7\u6216\u9A8C\u8BC1\u7801\u9519\u8BEF:"err.codeInvalid",\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801:"err.codeRequired","Email already in use":"err.emailInUse","Phone number already in use":"err.phoneInUse","Invalid email format":"err.emailInvalid","Email is required":"err.emailInvalid","Invalid phone number format":"err.phoneInvalid","Phone number is required":"err.phoneInvalid","Invalid phone number or email format":"err.targetInvalid","Please wait before requesting another code":"err.codeCooldown","Failed to send verification code":"err.codeSendFailed","Invalid target for account deletion":"err.deleteTargetInvalid","\u8EAB\u4EFD\u9A8C\u8BC1\u5931\u8D25\uFF0C\u65E0\u6CD5\u6CE8\u9500\u8D26\u6237":"err.deleteVerifyFailed",\u7BA1\u7406\u5458\u8D26\u53F7\u4E0D\u80FD\u81EA\u52A9\u6CE8\u9500:"err.adminCannotDelete",\u79EF\u5206\u4F59\u989D\u4E0D\u8DB3:"err.insufficientPoints","\u5151\u6362\u5F20\u6570\u9700\u4E3A 1-50 \u7684\u6574\u6570":"err.invalidCount",\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u7F6E\u5361:"err.noResetCard","\u4E3B\u989D\u5EA6\u5DF2\u7528\u5B8C,\u6CA1\u6709\u53EF\u8F6C\u5165\u7684\u989D\u5EA6":"err.insufficientMainQuota",\u540E\u53F0\u989D\u5EA6\u6682\u4E0D\u53EF\u7528:"err.backgroundUnavailable",\u9080\u8BF7\u7801\u65E0\u6548\u6216\u5DF2\u5931\u6548:"err.invalidInviteCode","\u5DF2\u8D85\u8FC7\u6CE8\u518C\u540E 7 \u5929\u7684\u8865\u586B\u671F":"err.inviteWindowExpired",\u4F60\u5DF2\u4F7F\u7528\u8FC7\u9080\u8BF7\u7801:"err.inviteAlreadyUsed","You have already used an invite code":"err.inviteAlreadyUsed","Cannot use your own invite code":"err.inviteOwnCode","Invite code is required":"err.inviteEmpty","code is required":"err.redeemEmpty","Redemption code not found":"err.redeemNotFound","Redemption code is not active":"err.redeemInactive","Redemption code has expired":"err.redeemExpired","Redemption code has reached maximum uses":"err.redeemUsedUp","You have already used this code the maximum number of times":"err.redeemUserLimit",avatar_too_large:"err.avatarTooLarge","description is required":"err.feedbackEmpty","description too long (max 10000 chars)":"err.feedbackTooLong","content is required":"err.replyEmpty","content too long (max 10000 chars)":"err.replyTooLong","Ticket not found":"err.ticketNotFound","Too many attachments (max 5)":"err.tooManyImages","Attachment type not allowed (image / json / text only)":"err.imageType","\u4EBA\u673A\u9A8C\u8BC1\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5":"err.captcha"},qr={format:"pw.rule.format",min:"pw.rule.min",max:"pw.rule.max",space:"pw.rule.space",lower:"pw.rule.lower",upper:"pw.rule.upper",special:"pw.rule.special"};function Dc(t){if(t.code&&ni[t.code])return ni[t.code];if(t.detail){if(ri[t.detail])return ri[t.detail];let e=ti[t.detail];if(e)return qr[e];if(t.detail.startsWith("Attachment exceeds 5MB"))return"err.imageTooLarge"}return null}function _e(t){let e=Dc(t);return e?{key:e}:Ln(t)?{key:"err.signedOut"}:t.status===0?{key:"err.network"}:t.status===401?{key:"err.session"}:t.status===429?{key:"err.tooFrequent"}:t.detail?{raw:t.detail}:t.status>=500?{key:"err.server",vars:{status:t.status}}:{key:"err.generic"}}function Kt(t){let e=t.trim();return e?/cancelled\.?$/i.test(e)?null:e==="A sign-in is already in progress."?{key:"err.loginInProgress"}:e.startsWith("\u767B\u5F55\u8D85\u65F6")?{key:"err.loginTimeout"}:e.startsWith("\u767B\u5F55\u7801\u5DF2\u8FC7\u671F")?{key:"err.loginCodeExpired"}:e.startsWith("\u65E0\u6CD5\u8FDE\u63A5")?{key:"err.network"}:e.startsWith("\u4E91\u7AEF\u4E0D\u652F\u6301 CLI \u767B\u5F55")?{key:"err.loginUnsupported"}:e.startsWith("\u8BF7\u5148\u586B\u5199 Forsion \u4E91\u7AEF\u5730\u5740")?{key:"err.noCloudUrl"}:e.startsWith("Account is no longer signed in")?{key:"err.accountGone"}:{raw:e}:{key:"err.generic"}}var Hr=Mo(null);function N(){let t=qo(Hr);if(!t)throw new Error("forsion-extend: page rendered outside its host root");return t}var et=()=>N().t;function Me(){let t=te(!0);return j(()=>(t.current=!0,()=>{t.current=!1}),[]),t}var ai={pending:!1,error:null,success:null,captcha:!1};function z(){let t=Me(),[e,n]=E(ai),r=te(!1),a=Ze(async s=>{if(r.current)return;r.current=!0,n({pending:!0,error:null,success:null,captcha:!1});let l;try{l=await s()}catch(u){l={error:{raw:String(u?.message||u)}}}r.current=!1,t.current&&n({pending:!1,error:l?.error??null,success:l?.success??null,captcha:!!l?.captcha})},[]),o=Ze(()=>{r.current||n(ai)},[]);return{...e,run:a,clear:o}}var ce=t=>({error:_e(t),captcha:t.status===403&&t.code==="CAPTCHA_FAILED"});function oi(){let[t,e]=E(0),n=te(null);j(()=>()=>{n.current&&clearInterval(n.current)},[]);let r=Ze((o=60)=>{n.current&&clearInterval(n.current),e(o),n.current=setInterval(()=>{e(s=>s<=1?(n.current&&clearInterval(n.current),n.current=null,0):s-1)},1e3)},[]),a=Ze(()=>{n.current&&clearInterval(n.current),n.current=null,e(0)},[]);return{left:t,start:r,stop:a}}function Ce(t){let[e,n]=E({state:"loading"}),r=te(0),a=te(t);a.current=t;let o=Ze((u=!1)=>{let d=++r.current;u||n({state:"loading"}),(async()=>{let p;try{p=await a.current()}catch(m){p={ok:!1,status:0,code:null,detail:null,transport:String(m?.message||m)}}d===r.current&&(p.ok?n({state:"ready",data:p.data,gen:d}):Ln(p)?n({state:"signedOut"}):(p.status===401&&V().authStatus?.().catch(()=>{}),n({state:"error",fail:p})))})()},[]);j(()=>{o();let u=V().onAuthChanged?.(()=>o());return()=>{r.current++,u?.()}},[o]);let s=Ze(()=>o(),[o]),l=Ze(()=>o(!0),[o]);switch(e.state){case"ready":{let u=e.gen,d=p=>n(m=>m.state==="ready"&&m.gen===u?{...m,data:p(m.data)}:m);return{state:"ready",data:e.data,reload:l,update:d}}case"error":return{state:"error",error:_e(e.fail),retry:s};default:return e}}function Bn(t){let e=String(t||"").trim();if(!e)return"";let n=e.startsWith("+")?4:3;return e.length<=n+4?`${e.slice(0,2)}***`:`${e.slice(0,n)}****${e.slice(-4)}`}function $n(t){let e=String(t||"").trim(),n=e.lastIndexOf("@");if(n<=0)return e?`${e.slice(0,1)}***`:"";let r=e.slice(0,n);return`${r.slice(0,r.length<=2?1:2)}***${e.slice(n)}`}function ii(t){let e=String(t||"").trim().toLowerCase()||"free";return e.charAt(0).toUpperCase()+e.slice(1)}var Nc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function si(t,e){let n=String(t||"").trim(),r,a,o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(o)r=Number(o[2]),a=Number(o[3]);else{let s=new Date(n);if(!n||Number.isNaN(s.getTime()))return null;let l=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Shanghai",month:"numeric",day:"numeric"}).formatToParts(s);r=Number(l.find(u=>u.type==="month")?.value),a=Number(l.find(u=>u.type==="day")?.value)}return!(r>=1&&r<=12)||!(a>=1&&a<=31)?null:e==="zh"?`${r}\u6708${a}\u65E5`:`${Nc[r-1]} ${a}`}var Wr=t=>t==="zh"?"zh-CN":"en-US";function li(t){if(t==null||t==="")return null;let e=new Date(typeof t=="string"&&/^\d+$/.test(t)?Number(t):t);return Number.isNaN(e.getTime())?null:e}function ci(t,e){let n=li(t);return n?new Intl.DateTimeFormat(Wr(e),{year:"numeric",month:"short",day:"numeric"}).format(n):"\u2014"}function tt(t,e){let n=li(t);return n?new Intl.DateTimeFormat(Wr(e),{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).format(n):"\u2014"}function oe(t,e){let n=typeof t=="number"?t:Number(t);return Number.isFinite(n)?new Intl.NumberFormat(Wr(e),{maximumFractionDigits:2}).format(n):"\u2014"}var ft=class extends Error{};async function ui(t,e=256){if(t.size>20971520)throw new ft;let n=URL.createObjectURL(t);try{let r=new Image;await new Promise((p,m)=>{r.onload=()=>p(),r.onerror=()=>m(new Error("image decode failed")),r.src=n});let a=r.naturalWidth,o=r.naturalHeight;if(!a||!o)throw new Error("empty image");if(a*o>5e7)throw new ft;let s=Math.min(1,e/Math.max(a,o)),l=document.createElement("canvas");l.width=Math.max(1,Math.round(a*s)),l.height=Math.max(1,Math.round(o*s));let u=l.getContext("2d");if(!u)throw new Error("canvas unavailable");u.fillStyle="#fff",u.fillRect(0,0,l.width,l.height),u.drawImage(r,0,0,l.width,l.height);let d=l.toDataURL("image/jpeg",.85);if(d.length>262144)throw new ft;return d}finally{URL.revokeObjectURL(n)}}function di(t){let e=String(t||"").trim();if(!e)return"?";let n=Array.from(e)[0];return/[㐀-鿿]/.test(n)?n:Array.from(e).slice(0,2).join("").toUpperCase()}var pt=(t=>(t[t.Border=-1]="Border",t[t.Data=0]="Data",t[t.Function=1]="Function",t[t.Position=2]="Position",t[t.Timing=3]="Timing",t[t.Alignment=4]="Alignment",t))(pt||{}),zc=[0,1],pi=[1,0],mi=[2,3],hi=[3,2],Oc={L:zc,M:pi,Q:mi,H:hi},Fc=/^\d*$/,Bc=/^[A-Z0-9 $%*+./:-]*$/,Xr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Kr=1,Yr=40,fi=3,$c=3,Un=40,Uc=10,gi=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],bi=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],jr=class{constructor(e,n,r,a){if(this.version=e,this.ecc=n,e<Kr||e>Yr)throw new RangeError("Version value out of range");if(a<-1||a>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let o=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(o.slice()),this.types.push(o.map(()=>0));this.drawFunctionPatterns();let s=this.addEccAndInterleave(r);if(this.drawCodewords(s),a===-1){let l=1e9;for(let u=0;u<8;u++){this.applyMask(u),this.drawFormatBits(u);let d=this.getPenaltyScore();d<l&&(a=u,l=d),this.applyMask(u)}}this.mask=a,this.applyMask(a),this.drawFormatBits(a)}size;mask;modules=[];types=[];getModule(e,n){return e>=0&&e<this.size&&n>=0&&n<this.size&&this.modules[n][e]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,pt.Timing),this.setFunctionModule(r,6,r%2===0,pt.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),n=e.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||this.drawAlignmentPattern(e[r],e[a]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let n=this.ecc[1]<<3|e,r=n;for(let o=0;o<10;o++)r=r<<1^(r>>>9)*1335;let a=(n<<10|r)^21522;for(let o=0;o<=5;o++)this.setFunctionModule(8,o,qe(a,o));this.setFunctionModule(8,7,qe(a,6)),this.setFunctionModule(8,8,qe(a,7)),this.setFunctionModule(7,8,qe(a,8));for(let o=9;o<15;o++)this.setFunctionModule(14-o,8,qe(a,o));for(let o=0;o<8;o++)this.setFunctionModule(this.size-1-o,8,qe(a,o));for(let o=8;o<15;o++)this.setFunctionModule(8,this.size-15+o,qe(a,o));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let r=0;r<12;r++)e=e<<1^(e>>>11)*7973;let n=this.version<<12|e;for(let r=0;r<18;r++){let a=qe(n,r),o=this.size-11+r%3,s=Math.floor(r/3);this.setFunctionModule(o,s,a),this.setFunctionModule(s,o,a)}}drawFinderPattern(e,n){for(let r=-4;r<=4;r++)for(let a=-4;a<=4;a++){let o=Math.max(Math.abs(a),Math.abs(r)),s=e+a,l=n+r;s>=0&&s<this.size&&l>=0&&l<this.size&&this.setFunctionModule(s,l,o!==2&&o!==4,pt.Position)}}drawAlignmentPattern(e,n){for(let r=-2;r<=2;r++)for(let a=-2;a<=2;a++)this.setFunctionModule(e+a,n+r,Math.max(Math.abs(a),Math.abs(r))!==1,pt.Alignment)}setFunctionModule(e,n,r,a=pt.Function){this.modules[n][e]=r,this.types[n][e]=a}addEccAndInterleave(e){let n=this.version,r=this.ecc;if(e.length!==qn(n,r))throw new RangeError("Invalid argument");let a=bi[r[0]][n],o=gi[r[0]][n],s=Math.floor(Vr(n)/8),l=a-s%a,u=Math.floor(s/a),d=[],p=Yc(o);for(let f=0,b=0;f<a;f++){let g=e.slice(b,b+u-o+(f<l?0:1));b+=g.length;let k=Jc(g,p);f<l&&g.push(0),d.push(g.concat(k))}let m=[];for(let f=0;f<d[0].length;f++)d.forEach((b,g)=>{(f!==u-o||g>=l)&&m.push(b[f])});return m}drawCodewords(e){if(e.length!==Math.floor(Vr(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let a=0;a<this.size;a++)for(let o=0;o<2;o++){let s=r-o,u=(r+1&2)===0?this.size-1-a:a;!this.types[u][s]&&n<e.length*8&&(this.modules[u][s]=qe(e[n>>>3],7-(n&7)),n++)}}}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let r=0;r<this.size;r++){let a;switch(e){case 0:a=(r+n)%2===0;break;case 1:a=n%2===0;break;case 2:a=r%3===0;break;case 3:a=(r+n)%3===0;break;case 4:a=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:a=r*n%2+r*n%3===0;break;case 6:a=(r*n%2+r*n%3)%2===0;break;case 7:a=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&a&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let e=0;for(let o=0;o<this.size;o++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[o][d]===s?(l++,l===5?e+=fi:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*Un),s=this.modules[o][d],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*Un}for(let o=0;o<this.size;o++){let s=!1,l=0,u=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][o]===s?(l++,l===5?e+=fi:l>5&&e++):(this.finderPenaltyAddHistory(l,u),s||(e+=this.finderPenaltyCountPatterns(u)*Un),s=this.modules[d][o],l=1);e+=this.finderPenaltyTerminateAndCount(s,l,u)*Un}for(let o=0;o<this.size-1;o++)for(let s=0;s<this.size-1;s++){let l=this.modules[o][s];l===this.modules[o][s+1]&&l===this.modules[o+1][s]&&l===this.modules[o+1][s+1]&&(e+=$c)}let n=0;for(let o of this.modules)n=o.reduce((s,l)=>s+(l?1:0),n);let r=this.size*this.size,a=Math.ceil(Math.abs(n*20-r*10)/r)-1;return e+=a*Uc,e}getAlignmentPatternPositions(){if(this.version===1)return[];{let e=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,r=[6];for(let a=this.size-7;r.length<e;a-=n)r.splice(1,0,a);return r}}finderPenaltyCountPatterns(e){let n=e[1],r=n>0&&e[2]===n&&e[3]===n*3&&e[4]===n&&e[5]===n;return(r&&e[0]>=n*4&&e[6]>=n?1:0)+(r&&e[6]>=n*4&&e[0]>=n?1:0)}finderPenaltyTerminateAndCount(e,n,r){return e&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,n){n[0]===0&&(e+=this.size),n.pop(),n.unshift(e)}};function He(t,e,n){if(e<0||e>31||t>>>e)throw new RangeError("Value out of range");for(let r=e-1;r>=0;r--)n.push(t>>>r&1)}function qe(t,e){return(t>>>e&1)!==0}var Yt=class{constructor(e,n,r){if(this.mode=e,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}},qc=[1,10,12,14],Hc=[2,9,11,13],Wc=[4,8,16,16];function xi(t,e){return t[Math.floor((e+7)/17)+1]}function ki(t){let e=[];for(let n of t)He(n,8,e);return new Yt(Wc,t.length,e)}function Xc(t){if(!yi(t))throw new RangeError("String contains non-numeric characters");let e=[];for(let n=0;n<t.length;){let r=Math.min(t.length-n,3);He(Number.parseInt(t.substring(n,n+r),10),r*3+1,e),n+=r}return new Yt(qc,t.length,e)}function jc(t){if(!vi(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let e=[],n;for(n=0;n+2<=t.length;n+=2){let r=Xr.indexOf(t.charAt(n))*45;r+=Xr.indexOf(t.charAt(n+1)),He(r,11,e)}return n<t.length&&He(Xr.indexOf(t.charAt(n)),6,e),new Yt(Hc,t.length,e)}function Vc(t){return t===""?[]:yi(t)?[Xc(t)]:vi(t)?[jc(t)]:[ki(Kc(t))]}function yi(t){return Fc.test(t)}function vi(t){return Bc.test(t)}function Gc(t,e){let n=0;for(let r of t){let a=xi(r.mode,e);if(r.numChars>=1<<a)return Number.POSITIVE_INFINITY;n+=4+a+r.bitData.length}return n}function Kc(t){t=encodeURI(t);let e=[];for(let n=0;n<t.length;n++)t.charAt(n)!=="%"?e.push(t.charCodeAt(n)):(e.push(Number.parseInt(t.substring(n+1,n+3),16)),n+=2);return e}function Vr(t){if(t<Kr||t>Yr)throw new RangeError("Version number out of range");let e=(16*t+128)*t+64;if(t>=2){let n=Math.floor(t/7)+2;e-=(25*n-10)*n-55,t>=7&&(e-=36)}return e}function qn(t,e){return Math.floor(Vr(t)/8)-gi[e[0]][t]*bi[e[0]][t]}function Yc(t){if(t<1||t>255)throw new RangeError("Degree out of range");let e=[];for(let r=0;r<t-1;r++)e.push(0);e.push(1);let n=1;for(let r=0;r<t;r++){for(let a=0;a<e.length;a++)e[a]=Gr(e[a],n),a+1<e.length&&(e[a]^=e[a+1]);n=Gr(n,2)}return e}function Jc(t,e){let n=e.map(r=>0);for(let r of t){let a=r^n.shift();n.push(0),e.forEach((o,s)=>n[s]^=Gr(o,a))}return n}function Gr(t,e){if(t>>>8||e>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(e>>>r&1)*t;return n}function Zc(t,e,n=1,r=40,a=-1,o=!0){if(!(Kr<=n&&n<=r&&r<=Yr)||a<-1||a>7)throw new RangeError("Invalid value");let s,l;for(s=n;;s++){let m=qn(s,e)*8,f=Gc(t,s);if(f<=m){l=f;break}if(s>=r)throw new RangeError("Data too long")}for(let m of[pi,mi,hi])o&&l<=qn(s,m)*8&&(e=m);let u=[];for(let m of t){He(m.mode[0],4,u),He(m.numChars,xi(m.mode,s),u);for(let f of m.getData())u.push(f)}let d=qn(s,e)*8;He(0,Math.min(4,d-u.length),u),He(0,(8-u.length%8)%8,u);for(let m=236;u.length<d;m^=253)He(m,8,u);let p=Array.from({length:Math.ceil(u.length/8)},()=>0);return u.forEach((m,f)=>p[f>>>3]|=m<<7-(f&7)),new jr(s,e,p,a)}function wi(t,e){let{ecc:n="L",boostEcc:r=!1,minVersion:a=1,maxVersion:o=40,maskPattern:s=-1,border:l=1}=e||{},u=typeof t=="string"?Vc(t):Array.isArray(t)?[ki(t)]:void 0;if(!u)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof t}`);let d=Zc(u,Oc[n],a,o,s,r),p=Qc({version:d.version,maskPattern:d.mask,size:d.size,data:d.modules,types:d.types},l);return e?.invert&&(p.data=p.data.map(m=>m.map(f=>!f))),e?.onEncoded?.(p),p}function Qc(t,e=1){if(!e)return t;let{size:n}=t,r=n+e*2;t.size=r,t.data.forEach(o=>{for(let s=0;s<e;s++)o.unshift(!1),o.push(!1)});for(let o=0;o<e;o++)t.data.unshift(Array.from({length:r},s=>!1)),t.data.push(Array.from({length:r},s=>!1));let a=pt.Border;t.types.forEach(o=>{for(let s=0;s<e;s++)o.unshift(a),o.push(a)});for(let o=0;o<e;o++)t.types.unshift(Array.from({length:r},s=>a)),t.types.push(Array.from({length:r},s=>a));return t}function Z(t){return i("section",{class:`settings-panel fx-panel${t.danger?" fx-panel--danger":""}`,"aria-label":t.label,children:[i("div",{class:`settings-panel-head${t.actions?" settings-panel-head--actions":""}`,children:[t.icon&&i("span",{class:"settings-panel-icon",children:i(D,{name:t.icon,size:16})}),i("div",{children:[i("strong",{children:t.title}),t.desc&&i("p",{children:t.desc})]}),t.actions&&i("div",{class:"settings-panel-actions settings-panel-actions--wide",children:t.actions})]}),t.children]})}function xe(t){return i("div",{class:`settings-control-row settings-setting-row fx-row fx-block${t.class?` ${t.class}`:""}`,children:[i("div",{class:"settings-control-copy",children:i("span",{children:[i("strong",{children:t.label}),t.desc&&i("small",{children:t.desc})]})}),t.children!==void 0&&t.children!==null&&i("div",{class:"settings-row-control fx-row-control",children:t.children})]})}function ue(t){return i("div",{class:`fx-sub${t.class?` ${t.class}`:""}`,children:t.children})}function _i(t){return i("button",{type:"button",role:"switch","aria-checked":t.checked,"aria-label":t.label,class:`settings-switch${t.checked?" active":""}`,disabled:t.disabled,onClick:()=>t.onChange(!t.checked),children:i("span",{})})}function M(t){let e=t.variant??"ghost",n=e==="danger-solid"?"btn sm danger fx-danger-solid":`btn sm ${e}`;return i("button",{type:t.submit?"submit":"button",class:n,disabled:t.disabled||t.pending,"aria-busy":t.pending||void 0,"aria-label":t.label,title:t.title,"data-armed":t.armed?"true":void 0,onClick:t.onClick,children:[t.pending&&i(Gt,{}),t.children]})}var eu=5e3;function mt(t){let[e,n]=E(!1),r=te(null),a=()=>{r.current&&clearTimeout(r.current),r.current=null,n(!1)};j(()=>()=>{r.current&&clearTimeout(r.current)},[]),j(()=>{(t.pending||t.disabled)&&a()},[t.pending,t.disabled]);let o=()=>{if(!e){n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{r.current=null,n(!1)},eu);return}a(),t.onConfirm()},s=t.variant??"ghost";return i(M,{variant:e?s==="danger"||s==="danger-solid"?"danger-solid":"primary":s,armed:e,pending:t.pending,disabled:t.disabled,onClick:o,children:e?t.confirmLabel:t.label})}function $(t){let e=et(),{a:n}=t;return n.error?i("div",{class:"fx-msg is-error",role:"alert",children:[i("span",{children:Ue(n.error,e)}),n.captcha&&i("button",{type:"button",class:"fx-link",onClick:()=>void Nn(t.captchaSection??"security"),children:[e("common.openInBrowser")," ",i(D,{name:"external",size:12})]})]}):n.success?i("div",{class:"fx-msg is-ok",role:"status",children:Ue(n.success,e)}):null}function ie(t){return i("p",{class:`fx-note${t.tone?` is-${t.tone}`:""}`,children:t.children})}function nt(t){return i("div",{class:"settings-empty-row fx-block",children:t.children})}function Jt(t){let e=et(),n=t.display;return i("div",{class:`fx-quota${n.low?" is-low":""}`,children:[i("div",{class:"fx-quota-top",children:[i("span",{class:"fx-quota-label",children:t.label}),i("span",{class:"fx-quota-value",children:n.unlimited?e("common.unlimited"):n.text})]}),i("div",{class:"fx-bar",role:"progressbar","aria-label":t.label,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n.pct,"aria-valuetext":n.unlimited?e("common.unlimited"):n.text,children:i("span",{style:{width:`${n.pct}%`}})}),t.note&&i("div",{class:"fx-quota-note",children:t.note})]})}function ht(t){return i("div",{class:"seg fx-seg",role:"radiogroup","aria-label":t.label,children:t.options.map(e=>i("button",{type:"button",role:"radio","aria-checked":e.value===t.value,class:e.value===t.value?"active":"",onClick:()=>{e.value!==t.value&&t.onChange(e.value)},children:e.label}))})}async function tu(t){try{return await navigator.clipboard.writeText(t),!0}catch{try{let e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let n=document.execCommand("copy");return e.remove(),n}catch{return!1}}}function Lt(t){let e=et(),[n,r]=E("idle"),a=te(null);j(()=>()=>{a.current&&clearTimeout(a.current)},[]);let o=async()=>{let s=await tu(t.text);r(s?"copied":"failed"),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>r("idle"),1800)};return i(M,{disabled:t.disabled||!t.text,onClick:()=>void o(),children:[i(D,{name:n==="copied"?"check":"copy",size:12}),n==="copied"?e("common.copied"):n==="failed"?e("common.copyFailed"):t.label]})}function nu(t){let e=Je(()=>{try{return wi(t.value,{ecc:"M",border:2})}catch{return null}},[t.value]);if(!e)return null;let n="";e.data.forEach((a,o)=>a.forEach((s,l)=>{s&&(n+=`M${l} ${o}h1v1h-1z`)}));let r=t.size??148;return i("svg",{class:"fx-qr",width:r,height:r,viewBox:`0 0 ${e.size} ${e.size}`,"shape-rendering":"crispEdges",role:"img","aria-label":t.label,children:[i("rect",{width:e.size,height:e.size,fill:"#fff"}),i("path",{d:n,fill:"#000"})]})}function Jr(t){let e=et(),{device:n}=t;return i("div",{class:"fx-device",children:[i(nu,{value:n.url,label:e("signin.qrLabel")}),i("div",{class:"fx-device-copy",children:[i("p",{children:e("signin.deviceHint")}),n.userCode&&i("div",{class:"fx-device-code",children:[i("span",{children:e("signin.code")}),i("code",{children:n.userCode})]}),i("div",{class:"fx-inline",children:[i("button",{type:"button",class:"fx-link",onClick:()=>window.open(n.url,"_blank"),children:[e("signin.openLink")," ",i(D,{name:"external",size:12})]}),i(Lt,{text:n.url,label:e("signin.copyLink")})]})]})]})}function Re(){let t=et(),e=z(),[n,r]=E(null);j(()=>V().onAuthDevice?.(o=>r(o)),[]);let a=()=>void e.run(async()=>{let o=V().forsionLogin;if(!o)return{error:{key:"err.unavailable"}};try{await o()}catch(s){r(null);let l=Kt(Qe(s));return l?{error:l}:void 0}});return i("section",{class:"settings-panel fx-panel fx-signin","aria-label":t("signin.button"),children:i("div",{class:"settings-state fx-signin-body",children:[i("span",{class:"settings-state-icon",children:i(D,{name:"user",size:18})}),i("p",{class:"fx-signin-lead",children:t("signin.desc")}),i("div",{class:"settings-state-actions",children:i(M,{variant:"primary",pending:e.pending,onClick:a,children:e.pending?t("signin.pending"):t("signin.button")})}),n&&i(Jr,{device:n}),i($,{a:e})]})})}function Se(t){let e=et(),n=t.panels??2,r=t.rows??2;return i("div",{class:"fx-skeleton","aria-busy":"true","aria-label":e("common.loading"),children:Array.from({length:n},(a,o)=>i("section",{class:"settings-panel fx-panel",children:[i("div",{class:"settings-panel-head",children:[i("span",{class:"fx-skel fx-skel--icon"}),i("div",{children:[i("span",{class:"fx-skel fx-skel--title"}),i("span",{class:"fx-skel fx-skel--line"})]})]}),Array.from({length:r},(s,l)=>i("div",{class:"settings-control-row",children:i("span",{class:"fx-skel fx-skel--row"})},l))]},o))})}function Ae(t){let e=et();return i("section",{class:"settings-panel fx-panel",children:i("div",{class:"settings-state fx-error-state",role:"alert",children:[i("span",{class:"settings-state-icon",children:i(D,{name:"alert",size:18})}),i("strong",{children:e("common.loadFailed")}),i("p",{children:Ue(t.error,e)}),i("div",{class:"settings-state-actions",children:i(M,{variant:"primary",onClick:t.onRetry,children:[i(D,{name:"refresh",size:12})," ",e("common.retry")]})})]})})}function Ai(){let t=Ce(async()=>{let[n,r,a]=await Promise.all([P("/auth/me"),P("/membership/my"),P("/features")]);return n.ok?{ok:!0,status:n.status,data:{me:n.data,membership:r.ok?r.data?.membership??null:null,membershipFailed:!r.ok,features:a.ok&&a.data&&typeof a.data=="object"?a.data:{}}}:n});if(t.state==="loading")return i(Se,{panels:3});if(t.state==="signedOut")return i(Re,{});if(t.state==="error")return i(Ae,{error:t.error,onRetry:t.retry});let{data:e}=t;return i(q,{children:[i(ru,{me:e.me,onPatch:n=>t.update(r=>({...r,me:{...r.me,...n}}))}),i(au,{membership:e.membership,failed:e.membershipFailed,payment:e.features.payment!==!1,onRetry:t.reload}),i(ou,{}),i(su,{})]})}function ru(t){let{t:e}=N(),{me:n}=t,r=z(),a=z(),[o,s]=E(!1),[l,u]=E(""),d=te(null),p=n.nickname||n.username,m=g=>{g&&r.run(async()=>{let k;try{k=await ui(g)}catch(A){return{error:{key:A instanceof ft?"err.avatarTooLarge":"err.avatarInvalid"}}}let y=await P("/settings",{method:"PUT",body:{avatar:k}});return y.ok?(t.onPatch({avatar:k}),{success:{key:"account.avatar.saved"}}):{error:_e(y)}})},f=()=>{a.clear(),u(p||""),s(!0)},b=()=>{let g=l.trim();if(!g||g===p){s(!1);return}a.run(async()=>{let k=await P("/settings",{method:"PUT",body:{nickname:g}});return k.ok?(t.onPatch({nickname:g}),s(!1),{success:{key:"account.nickname.saved"}}):{error:_e(k)}})};return i(Z,{icon:"user",title:e("account.profile.title"),desc:e("account.profile.desc"),children:[i("div",{class:"fx-identity fx-block",children:[i("button",{type:"button",class:"fx-avatar",disabled:r.pending,onClick:()=>d.current?.click(),"aria-label":e("account.avatar.change"),title:e("account.avatar.change"),children:[n.avatar?i("img",{src:n.avatar,alt:""}):i("span",{class:"fx-avatar-initial",children:di(p)}),i("span",{class:"fx-avatar-mask",children:r.pending?i(Gt,{size:14}):i(D,{name:"pencil",size:14})})]}),i("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif,image/avif",hidden:!0,onChange:g=>{let k=g.currentTarget;m(k.files?.[0]),k.value=""}}),i("div",{class:"fx-identity-main",children:[o?i("form",{class:"fx-inline",onSubmit:g=>{g.preventDefault(),b()},children:[i("input",{class:"fx-input fx-input--name",value:l,maxLength:40,autoFocus:!0,"aria-label":e("account.nickname.label"),onInput:g=>u(g.currentTarget.value),onKeyDown:g=>{g.key==="Escape"&&(g.preventDefault(),s(!1))}}),i(M,{variant:"primary",submit:!0,pending:a.pending,children:e("common.save")}),i(M,{disabled:a.pending,onClick:()=>s(!1),children:e("common.cancel")})]}):i("div",{class:"fx-name-row",children:[i("span",{class:"fx-name",children:p}),i("button",{type:"button",class:"fx-icon-btn",onClick:f,"aria-label":e("account.nickname.edit"),title:e("account.nickname.edit"),children:i(D,{name:"pencil",size:13})}),n.role==="ADMIN"&&i("span",{class:"fx-tag",children:e("account.role.admin")})]}),i("div",{class:"fx-muted",children:e("account.username",{name:n.username})}),i($,{a}),i($,{a:r})]})]}),i(Si,{kind:"phone",value:n.phone}),i(Si,{kind:"email",value:n.email})]})}function Si(t){let{t:e,goTo:n}=N(),r=!!t.value,a=r?t.kind==="phone"?Bn(t.value):$n(t.value):e("account.contact.unbound"),o=t.kind==="phone"?e("account.contact.phone"):e("account.contact.email");return i(xe,{label:o,children:n?i("button",{type:"button",class:`fx-link-row${r?"":" is-empty"}`,onClick:()=>n("security"),title:e("account.contact.manage"),children:[i("span",{children:a}),i(D,{name:"chevron",size:12})]}):i("span",{class:`fx-value${r?"":" is-empty"}`,children:a})})}function au(t){let{t:e,locale:n}=N(),r=z(),a=t.membership&&(t.membership.status===void 0||t.membership.status==="active")?t.membership:null,o=ii(a?.tier),s=o==="Free",l=s?"free":o.toLowerCase()==="pro"?"pro":"paid",u=()=>void r.run(async()=>await Dn("membership")?void 0:{error:{key:"err.openFailed"}});return i(Z,{icon:"card",title:e("member.title"),desc:e("member.desc"),actions:t.payment&&!t.failed?i(M,{variant:"primary",pending:r.pending,onClick:u,children:e(s?"member.upgrade":"member.renew")}):void 0,children:[!t.failed&&i("div",{class:"fx-member fx-block",children:[i("span",{class:`fx-tier fx-tier--${l}`,children:o}),i("div",{class:"fx-member-copy",children:[i("strong",{children:s?e("member.freeName"):a?.plan?.name||o}),i("span",{class:"fx-muted",children:s?e("member.freeHint"):a?.expiresAt?e("member.expires",{date:ci(a.expiresAt,n)}):e("member.noExpiry")})]})]}),t.failed&&i("div",{class:"fx-sub",children:i(ie,{tone:"warn",children:[e("member.loadFailed")," ",i("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&i("div",{class:"fx-sub fx-sub--tight",children:i($,{a:r})})]})}function ou(){let{t}=N(),e=Me(),[n,r]=E(null),[a,o]=E(!1),[s,l]=E(null),[u,d]=E(null),p=z(),m=z(),f=z(),b=!!V().authAccounts;j(()=>{let x=0,_=()=>{let F=V().authAccounts;if(!F)return;let G=++x;o(!1),F().then(U=>{G===x&&r(Array.isArray(U)?U:[])}).catch(()=>{G===x&&o(!0)})};_();let T=V().onAuthChanged?.(_),R=V().onAuthDevice?.(F=>d(F));return()=>{x++,T?.(),R?.()}},[]);let g=x=>{l(x),p.run(async()=>{let _=V().forsionSwitchAccount;if(!_)return{error:{key:"err.unavailable"}};try{await _(x)}catch(T){let R=Kt(Qe(T));return R?{error:R}:void 0}finally{e.current&&l(null)}})},k=()=>void m.run(async()=>{let x=V().forsionLogin;if(!x)return{error:{key:"err.unavailable"}};d(null);try{await x()}catch(_){e.current&&d(null);let T=Kt(Qe(_));return T?{error:T}:void 0}}),y=()=>void f.run(async()=>{let x=V().forsionLogout;if(!x)return{error:{key:"err.unavailable"}};try{await x()}catch(_){return{error:{raw:Qe(_)||t("err.generic")}}}}),A=p.pending||m.pending||f.pending;return i(Z,{icon:"laptop",title:t("local.title"),desc:t("local.desc"),children:[b&&n===null&&!a&&i(nt,{children:[i(Gt,{})," ",t("common.loading")]}),a&&i("div",{class:"fx-sub",children:i(ie,{tone:"warn",children:t("local.loadFailed")})}),n&&n.length===0&&i(nt,{children:t("local.empty")}),n&&n.length>0&&i("div",{class:"fx-list fx-block",role:"list",children:n.map(x=>i("div",{class:"fx-list-row",role:"listitem",children:[i("span",{class:"fx-list-icon",children:i(D,{name:"user",size:14})}),i("span",{class:"fx-list-main",children:[i("strong",{children:x.nickname||x.username||"Forsion"}),i("small",{children:[x.username&&x.nickname?x.username:null,iu(x.cloudUrl)].filter(Boolean).join(" \xB7 ")})]}),x.active?i("span",{class:"fx-tag fx-tag--accent",children:[i(D,{name:"check",size:11})," ",t("local.current")]}):i(M,{pending:s===x.id,disabled:A&&s!==x.id,onClick:()=>g(x.id),children:t("local.switch")})]},x.id))}),m.pending&&u&&i("div",{class:"fx-sub",children:i(Jr,{device:u})}),i("div",{class:"settings-panel-footer fx-footer",children:[i(M,{pending:m.pending,disabled:A&&!m.pending,onClick:k,children:[i(D,{name:"plus",size:12})," ",m.pending?t("signin.pending"):t("local.add")]}),i(M,{pending:f.pending,disabled:A&&!f.pending,onClick:y,children:[i(D,{name:"logout",size:12})," ",t("local.signOut")]})]}),(p.error||m.error||f.error)&&i("div",{class:"fx-sub fx-sub--tight",children:[i($,{a:p}),i($,{a:m}),i($,{a:f})]})]})}function iu(t){try{return new URL(t).host}catch{return t}}function su(){let{t}=N(),e=z();return i("div",{class:"fx-page-foot",children:[i("button",{type:"button",class:"fx-link",disabled:e.pending,onClick:()=>void e.run(async()=>await Nn()?void 0:{error:{key:"err.openFailed"}}),children:[t("account.web.open")," ",i(D,{name:"external",size:12})]}),i("span",{class:"fx-muted",children:t("account.web.desc")}),i($,{a:e})]})}function Q(t){if(typeof t=="number")return Number.isFinite(t)?t:null;if(typeof t=="string"&&t.trim()!==""){let e=Number(t);return Number.isFinite(e)?e:null}return null}function lu(t,e){let n=Q(e);if(n===null||n<0)return null;if(n===0)return 0;let r=Math.max(0,Q(t)??0);return Math.min(100,Math.max(0,Math.floor(r/n*100)))}var cu=15;function gt(t,e){let n=lu(t,e);if(n===null)return{unlimited:!0,pct:100,text:null,low:!1};let r=Math.max(0,Q(t)??0),a=n===0&&r>0&&(Q(e)??0)>0?"<1%":`${n}%`;return{unlimited:!1,pct:n,text:a,low:n<=cu}}function Hn(t,e){let n=Q(e);if(n===null||n<=0)return null;let r=Q(t);if(r===null)return null;let a=Math.max(0,r);if(a===0)return"0%";let o=a/n*100;if(o<.1)return"<0.1%";let s=Math.round(o*10)/10;return s<10?`${s}%`:`${Math.round(o).toLocaleString("en-US")}%`}var uu=t=>t.ok?"ok":t.status===404?"hidden":"failed";function Ei(){let t=Ce(async()=>{let[s,l,u,d]=await Promise.all([P("/token-quota/my"),P("/credits/balance"),P("/features"),P("/invite/my-code")]);return s.ok?{ok:!0,status:s.status,data:{quota:s.data??{},balance:l.ok?Q(l.data?.balance):null,balanceFailed:!l.ok,features:u.ok&&u.data&&typeof u.data=="object"?u.data:{},invite:d.ok?d.data:null,inviteState:uu(d)}}:s});if(t.state==="loading")return i(Se,{panels:3,rows:2});if(t.state==="signedOut")return i(Re,{});if(t.state==="error")return i(Ae,{error:t.error,onRetry:t.retry});let{data:e,update:n}=t,r=e.quota.background,a=e.features.redemption_codes!==!1,o=e.features.payment!==!1;return i(q,{children:[i(fu,{data:e,update:n,onFailed:t.reload}),i(mu,{data:e,payment:o,onRetry:t.reload}),r?.modelId?i(gu,{bg:r,update:n}):null,(e.inviteState!=="hidden"||a)&&i(bu,{data:e,update:n,redeemEnabled:a,onRedeemed:t.reload})]})}var Ti=t=>({dailyLimit:t.dailyLimit,dailyRemaining:t.dailyRemaining,weeklyLimit:t.weeklyLimit,weeklyRemaining:t.weeklyRemaining});function du(t,e){if(typeof t?.showResetCardCeremony!="function")return!1;try{return t.showResetCardCeremony(e),!0}catch{return!1}}function fu(t){let{t:e,locale:n,ctx:r}=N(),a=t.data.quota,o=gt(a.dailyRemaining,a.dailyLimit),s=gt(a.weeklyRemaining,a.weeklyLimit),l=si(a.weeklyResetAt,n),u=Math.max(0,Q(a.resetCards)??0),d=Q(a.resetCardPricePoints)??100,p=z(),m=z(),[f,b]=E(null),[g,k]=E("1"),y=/^\d+$/.test(g.trim())?Number(g.trim()):NaN,A=Number.isInteger(y)&&y>=1&&y<=50,x=A?y*d:null,_=t.data.balance,T=x!==null&&_!==null&&_<x,R=()=>void p.run(async()=>{let U={daily:o,weekly:s},W=Ti(a);b(null);let re=V(),he=await Mn(re.accountUseResetCard?()=>re.accountUseResetCard("both"):null,()=>P("/token-quota/reset-card/use",{method:"POST",body:{type:"both"}}));if(!he.ok)return t.onFailed(),ce(he);let Le=he.data?.quota,Oe=Q(he.data?.resetCards);return t.update(bt=>({...bt,quota:{...bt.quota,...Le??{},resetCards:Oe??bt.quota.resetCards}})),Le&&!du(r.app,{before:W,after:Ti(Le),remainingCards:Oe??void 0})&&b({before:U,after:{daily:gt(Le.dailyRemaining,Le.dailyLimit),weekly:gt(Le.weeklyRemaining,Le.weeklyLimit)},cards:Oe}),{success:{key:"card.used"}}}),F=()=>void m.run(async()=>{if(!A)return{error:{key:"err.invalidCount"}};let U=await P("/points/exchange-reset-cards",{method:"POST",body:{count:y,expectedPricePerCard:d}});return U.ok?(t.update(W=>({...W,quota:{...W.quota,resetCards:Q(U.data?.resetCards)??W.quota.resetCards},balance:Q(U.data?.newPointsBalance)??W.balance})),k("1"),{success:{key:"card.exchanged",vars:{n:Q(U.data?.cardsGranted)??y}}}):(t.onFailed(),ce(U))}),G=U=>U.unlimited?e("common.unlimited"):U.text;return i(Z,{icon:"gauge",title:e("quota.ai.title"),desc:e("quota.ai.desc"),children:[i("div",{class:"fx-quota-list fx-block",children:[i(Jt,{label:e("common.today"),display:o,note:o.unlimited?null:e("quota.resetDaily")}),i(Jt,{label:e("common.thisWeek"),display:s,note:s.unlimited||!l?null:e("quota.resetWeekly",{date:l})})]}),i(xe,{label:e("card.title"),desc:e("card.desc"),children:[i("span",{class:"fx-value","data-testid":"reset-card-count",children:e("card.owned",{n:u})}),i(mt,{label:e("card.use"),confirmLabel:e("card.useConfirm"),pending:p.pending,disabled:u<=0,onConfirm:R})]}),u<=0&&!p.success&&i(ue,{children:i(ie,{children:e("card.noneHint")})}),(p.error||p.success)&&i(ue,{children:[i($,{a:p}),p.success&&f&&i("div",{class:"fx-ceremony",role:"status",children:[i("span",{children:[e("common.today")," ",i("b",{children:G(f.before.daily)})," \u2192 ",i("b",{children:G(f.after.daily)})]}),i("span",{children:[e("common.thisWeek")," ",i("b",{children:G(f.before.weekly)})," \u2192 ",i("b",{children:G(f.after.weekly)})]}),f.cards!==null&&i("span",{class:"fx-muted",children:e("card.left",{n:f.cards})})]})]}),i(xe,{label:e("card.exchange"),desc:e("card.price",{price:oe(d,n)}),class:"fx-row--wide",children:[i("input",{class:"fx-input fx-input--count",type:"number",inputMode:"numeric",min:1,max:50,step:1,value:g,"aria-label":e("card.count"),onInput:U=>{k(U.currentTarget.value),m.clear()}}),i("span",{class:"fx-muted fx-cost",children:x!==null?e("card.cost",{cost:oe(x,n)}):e("card.countHint")}),i(mt,{label:e("card.exchangeButton"),confirmLabel:e("card.exchangeConfirm",{cost:x!==null?oe(x,n):"\u2014"}),pending:m.pending,disabled:!A||T,onConfirm:F})]}),(T||m.error||m.success)&&i(ue,{children:[T&&!m.error&&i(ie,{tone:"warn",children:e("err.insufficientPoints")}),i($,{a:m})]})]})}function pu(t,e,n){let r=z(),[a,o]=E(null);return{checked:a??t,toggle:l=>{o(l),r.run(async()=>{let u=await e(l);if(o(null),!u.ok)return ce(u);n(l)})},action:r}}function mu(t){let{t:e,locale:n}=N(),r=z(),a=()=>void r.run(async()=>await Dn("credits")?void 0:{error:{key:"err.openFailed"}});return i(Z,{icon:"coins",title:e("points.title"),desc:e("points.desc"),actions:t.payment?i(M,{variant:"primary",pending:r.pending,onClick:a,children:e("points.recharge")}):void 0,children:[i(xe,{label:e("points.balance"),children:t.data.balance!==null?i("span",{class:"fx-big","data-testid":"points-balance",children:oe(t.data.balance,n)}):i("span",{class:"fx-value is-empty",children:[e("points.balanceFailed")," ",i("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}),r.error&&i(ue,{children:i($,{a:r})})]})}var hu=[5,10,20];function gu(t){let{t:e}=N(),{bg:n}=t,r=gt(n.dailyRemaining,n.dailyLimit),a=gt(n.weeklyRemaining,n.weeklyLimit),o=z(),[s,l]=E(null),u=pu(!!n.autoMain,p=>{let m=V();return Mn(m.accountBgAutoMain?()=>m.accountBgAutoMain(p):null,()=>P("/token-quota/background/auto-main",{method:"POST",body:{enabled:p}}))},p=>t.update(m=>({...m,quota:{...m.quota,background:{...m.quota.background??{},autoMain:p}}}))),d=p=>{l(p),o.run(async()=>{let m=V(),f=await Mn(m.accountBgConvert?()=>m.accountBgConvert(p):null,()=>P("/token-quota/background/convert",{method:"POST",body:{percent:p}}));if(l(null),!f.ok)return ce(f);let b=f.data?.quota;return b&&t.update(k=>({...k,quota:{...k.quota,...b,resetCards:k.quota.resetCards,resetCardPricePoints:k.quota.resetCardPricePoints}})),{success:{key:"bg.converted",vars:{pct:p}}}})};return i(Z,{icon:"clock",title:e("bg.title"),desc:e("bg.desc"),children:[i("div",{class:"fx-quota-list fx-block",children:[i(Jt,{label:e("common.today"),display:r}),i(Jt,{label:e("common.thisWeek"),display:a})]}),i(xe,{label:e("bg.autoMain"),desc:e("bg.autoMainDesc"),children:i(_i,{checked:u.checked,disabled:u.action.pending,label:e("bg.autoMain"),onChange:u.toggle})}),i(xe,{label:e("bg.convert"),desc:e("bg.convertDesc"),class:"fx-row--wide",children:hu.map(p=>i(mt,{label:`${p}%`,confirmLabel:e("bg.convertConfirm",{pct:p}),pending:o.pending&&s===p,disabled:o.pending&&s!==p,onConfirm:()=>d(p)},p))}),(o.error||o.success||u.action.error)&&i(ue,{children:[i($,{a:u.action}),i($,{a:o})]})]})}function bu(t){let{t:e,locale:n}=N(),{invite:r,inviteState:a}=t.data,[o,s]=E(null),[l,u]=E(""),[d,p]=E(""),m=z(),f=z(),b=z();j(()=>{let x=!0;return V().authStatus?.().then(_=>{x&&s(_?.cloudUrl?_.cloudUrl.replace(/\/+$/,""):null)}).catch(()=>{}),()=>{x=!1}},[]);let g=async()=>{let x=await P("/invite/my-code");return t.update(_=>({..._,invite:x.ok?x.data:_.invite,inviteState:x.ok?"ok":x.status===404?"hidden":_.inviteState})),x},k=()=>void m.run(async()=>{let x=l.trim();if(!x)return{error:{key:"err.inviteEmpty"}};let _=await P("/invite/claim",{method:"POST",body:{code:x}});return _.ok?(u(""),g(),{success:{key:"invite.claimed"}}):ce(_)}),y=()=>void f.run(async()=>{let x=d.trim();if(!x)return{error:{key:"err.redeemEmpty"}};let _=await P("/redemption/redeem",{method:"POST",body:{code:x}});if(!_.ok)return ce(_);p(""),t.onRedeemed();let T=[],R=Q(_.data?.creditsAmount);R&&T.push(e("redeem.gotPoints",{n:oe(R,n)})),_.data?.membershipPlanId&&T.push(e("redeem.gotMembership"));for(let F of Array.isArray(_.data?.items)?_.data.items:[]){let G=(n==="zh"?F?.label?.zh:F?.label?.en)||F?.label?.zh||F?.label?.en||F?.kind;G&&T.push(G)}return{success:T.length?{key:"redeem.successWith",vars:{what:T.join(n==="zh"?"\u3001":", ")}}:{key:"redeem.success"}}}),A=r?.code&&o?`${o}/auth?invite=${encodeURIComponent(r.code)}`:"";return i(Z,{icon:"gift",title:e("invite.title"),desc:e("invite.desc"),children:[a==="ok"&&r?.code&&i(xe,{label:e("invite.myCode"),desc:e("invite.count",{n:oe(Q(r.invitedCount)??0,n)}),class:"fx-row--wide",children:[i("code",{class:"fx-code","data-testid":"invite-code",children:r.code}),i(Lt,{text:r.code,label:e("invite.copyCode")}),i(Lt,{text:A,label:e("invite.copyLink"),disabled:!A})]}),a==="failed"&&i(ue,{children:i(ie,{tone:"warn",children:[e("invite.loadFailed")," ",i("button",{type:"button",class:"fx-link",disabled:b.pending,onClick:()=>void b.run(async()=>{await g()}),children:e("common.retry")})]})}),a==="ok"&&r?.claim?.eligible&&i(xe,{label:e("invite.claim"),desc:e("invite.claimDesc"),class:"fx-row--wide",children:i("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),k()},children:[i("input",{class:"fx-input",value:l,placeholder:e("invite.claimPlaceholder"),"aria-label":e("invite.claim"),onInput:x=>u(x.currentTarget.value)}),i(M,{submit:!0,pending:m.pending,children:e("invite.claimSubmit")})]})}),(m.error||m.success)&&i(ue,{children:i($,{a:m})}),t.redeemEnabled&&i(xe,{label:e("redeem.title"),desc:e("redeem.desc"),class:"fx-row--wide",children:i("form",{class:"fx-inline",onSubmit:x=>{x.preventDefault(),y()},children:[i("input",{class:"fx-input",value:d,placeholder:e("redeem.placeholder"),"aria-label":e("redeem.title"),onInput:x=>p(x.currentTarget.value)}),i(M,{submit:!0,pending:f.pending,children:e("redeem.submit")})]})}),(f.error||f.success)&&i(ue,{children:i($,{a:f})})]})}function xu(t){let e=[],n,r=new Map;for(let a of t)if(a.itemType==="reset_card")n||(n={id:"reset_card",items:[],resetCard:!0},e.push(n)),n.items.push(a);else if(a.itemType==="custom_item"&&a.itemDefinition?.stackable){let o=`${a.productId||a.id}:${JSON.stringify(a.itemDefinition)}`,s=r.get(o);s||(s={id:`custom:${o}`,items:[],resetCard:!1},r.set(o,s),e.push(s)),s.items.push(a)}else e.push({id:a.id,items:[a],resetCard:!1});return e}function Ci(){let t=Ce(()=>P("/shop/inventory"));return t.state==="loading"?i(Se,{panels:1,rows:4}):t.state==="signedOut"?i(Re,{}):t.state==="error"?i(Ae,{error:t.error,onRetry:t.retry}):i(ku,{items:t.data??[],onRefresh:t.reload,onUsed:e=>{t.update(n=>n.filter(r=>r.id!==e.itemId)),t.reload()}})}function ku(t){let{t:e,locale:n,goTo:r}=N(),[a,o]=E(null),[s,l]=E(null),u=Me(),d=xu(t.items),p=d.find(g=>g.id===a),m=Math.max(24,Math.ceil(d.length/6)*6)-d.length,f=g=>g.resetCard?e("card.title"):g.items[0].itemDefinition?.name[n]||g.items[0].displayName||e("backpack.item"),b=g=>{u.current&&(l(g),t.onUsed(g))};return i(Z,{icon:"backpack",title:e("page.backpack"),desc:e("backpack.desc"),actions:i(M,{onClick:t.onRefresh,children:[i(D,{name:"refresh",size:13}),e("backpack.refresh")]}),children:i("div",{class:"fx-backpack fx-block",children:[i("div",{class:"fx-backpack-summary",children:[i("span",{children:e("backpack.total",{n:oe(t.items.length,n)})}),r&&i("button",{class:"fx-link",type:"button",onClick:()=>r("quota"),children:e("backpack.getCards")})]}),s&&i("div",{class:`fx-backpack-used fx-backpack-${s.animation}`,role:"status",children:[i(D,{name:"gift",size:20}),i("div",{children:[i("strong",{children:s.message[n]}),i("div",{children:s.effects.map(g=>Ri(g,e,n)).join(" \xB7 ")})]})]},s.itemId),i("div",{class:"fx-backpack-layout",children:[i("div",{children:[i("div",{class:"fx-backpack-grid",role:"group","aria-label":e("backpack.grid"),children:[d.map(g=>{let k=f(g);return i("button",{type:"button",class:`fx-backpack-slot${g.resetCard?" is-card":""}`,"data-rarity":g.items[0].itemDefinition?.rarity,"aria-pressed":p?.id===g.id,"aria-label":e("backpack.slot",{name:k,n:g.items.length}),title:k,onClick:()=>o(g.id),children:[i("span",{class:"fx-backpack-icon",children:g.items[0].itemDefinition?.icon?i("span",{class:"fx-backpack-emoji",children:g.items[0].itemDefinition.icon}):i(D,{name:g.resetCard?"card":"gift",size:30})}),i("span",{class:"fx-backpack-name",children:k}),(g.resetCard||g.items[0].itemDefinition?.stackable)&&i("span",{class:"fx-backpack-count",children:["\xD7",oe(g.items.length,n)]})]},g.id)}),Array.from({length:m},(g,k)=>i("div",{class:"fx-backpack-slot is-empty","aria-hidden":"true"},`empty:${k}`))]}),!d.length&&i("p",{class:"fx-backpack-empty",children:e("backpack.empty")})]}),p?i(yu,{slot:p,name:f(p),onUsed:b},`${p.id}:${p.items[0].id}`):i("div",{class:"fx-backpack-detail fx-backpack-prompt",children:[i(D,{name:"backpack",size:30}),i(ie,{children:e(d.length?"backpack.select":"backpack.emptyHint")})]})]})]})})}function Ri(t,e,n){return t.type==="points"?e("backpack.effect.points",{n:oe(t.amount,n)}):t.type==="reset_card"?e("backpack.effect.cards",{n:oe(t.count,n)}):e("backpack.effect.quota")}function yu(t){let{t:e,locale:n,goTo:r}=N(),a=t.slot.items[0],[o,s]=E(null),l=z(),u=z(),[d,p]=E(!1),m=a.itemDefinition,f=Me(),b=a.source==="points"?e("backpack.source.points"):a.source==="admin"?e("backpack.source.admin"):a.source==="reward"?e("backpack.source.reward"):e("backpack.source.other"),g=()=>void l.run(async()=>{let y=await P(`/shop/inventory/${encodeURIComponent(a.id)}`);if(f.current){if(!y.ok)return ce(y);s(y.data)}}),k=()=>void u.run(async()=>{let y=await P(`/shop/inventory/${encodeURIComponent(a.id)}/use`,{method:"POST"});if(!y.ok)return ce(y);t.onUsed(y.data)});return i("section",{class:"fx-backpack-detail","aria-label":e("backpack.details"),children:[i("span",{class:`fx-backpack-detail-icon${t.slot.resetCard?" is-card":""}`,children:m?.icon?i("span",{class:"fx-backpack-emoji",children:m.icon}):i(D,{name:t.slot.resetCard?"card":"gift",size:32})}),i("h3",{children:t.name}),i("span",{class:"fx-tag",children:[e(t.slot.resetCard||m?.use?"backpack.consumable":m?"backpack.collectible":"backpack.voucher"),m&&` \xB7 ${e(`backpack.rarity.${m.rarity}`)}`]}),i("dl",{class:"fx-backpack-facts",children:[i("div",{children:[i("dt",{children:e("backpack.quantity")}),i("dd",{children:oe(t.slot.items.length,n)})]}),i("div",{children:[i("dt",{children:e("backpack.acquired")}),i("dd",{children:tt(a.acquiredAt,n)})]}),!t.slot.resetCard&&i("div",{children:[i("dt",{children:e("backpack.source")}),i("dd",{children:b})]})]}),m?i(q,{children:[m.description&&i(ie,{children:m.description[n]}),m.use&&i(q,{children:[i("div",{class:"fx-backpack-effects",children:m.use.effects.map((y,A)=>i("div",{children:Ri(y,e,n)},A))}),d?i(q,{children:[i(ie,{children:e("backpack.consumeConfirm")}),i("div",{class:"fx-backpack-use-actions",children:[i(M,{variant:"primary",pending:u.pending,onClick:k,children:e("backpack.confirmUse")}),i(M,{disabled:u.pending,onClick:()=>p(!1),children:e("common.cancel")})]})]}):i(M,{variant:"primary",onClick:()=>p(!0),children:m.use.label?.[n]||e("backpack.use")}),i($,{a:u,captchaSection:"backpack"})]})]}):t.slot.resetCard?i(q,{children:[i(ie,{children:e("card.desc")}),r&&i(M,{variant:"primary",onClick:()=>r("quota"),children:e("backpack.manageCards")})]}):o?i("div",{class:"fx-backpack-reveal",children:[o.codeName&&i("div",{class:"fx-muted",children:o.codeName}),o.key?i(q,{children:[i("code",{children:o.key}),i(Lt,{text:o.key,label:e("backpack.copyKey")})]}):i(ie,{children:e("backpack.noKey")})]}):i(M,{pending:l.pending,onClick:g,children:[i(D,{name:"key",size:14}),e("backpack.reveal")]}),i($,{a:l,captchaSection:"backpack"})]})}var vu=/^1[3-9]\d{9}$|^\+[1-9]\d{6,14}$/,wu=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Pi=(t,e)=>t==="phone"?vu.test(e):wu.test(e),Zt=(t,e)=>t==="phone"?Bn(e):$n(e);function Mi(){let t=Ce(()=>P("/auth/me"));if(t.state==="loading")return i(Se,{panels:3,rows:2});if(t.state==="signedOut")return i(Re,{});if(t.state==="error")return i(Ae,{error:t.error,onRetry:t.retry});let e=t.data;return i(q,{children:[i(_u,{me:e,onBound:(n,r)=>t.update(a=>({...a,[n]:r}))}),i(Tu,{me:e}),i(Ru,{}),i(Pu,{me:e})]})}function Qr(){let t=oi(),e=z();return{cd:t,a:e,send:(a,o,s)=>e.run(async()=>{let l=await P("/auth/send-code",{method:"POST",body:{target:a,type:o,purpose:s}});return l.ok?(t.start(60),{success:{key:"sec.codeSent"}}):ce(l)}),reset:()=>{t.stop(),e.clear()}}}function _u(t){let{t:e}=N(),[n,r]=E(null),[a,o]=E(null);return i(Z,{icon:"key",title:e("sec.methods.title"),desc:e("sec.methods.desc"),children:["phone","email"].map(s=>{let l=t.me[s];return i(q,{children:[i(xe,{label:e(s==="phone"?"account.contact.phone":"account.contact.email"),desc:l?Zt(s,l):e("account.contact.unbound"),children:i(M,{onClick:()=>{o(null),r(n===s?null:s)},children:e(n===s?"common.cancel":l?"sec.change":"sec.bind")})}),n===s&&i(Su,{kind:s,current:l??null,onDone:u=>{t.onBound(s,u),r(null),o(s)}}),a===s&&n!==s&&i(ue,{children:i("div",{class:"fx-msg is-ok",role:"status",children:e(s==="phone"?"sec.phoneBound":"sec.emailBound")})})]},s)})})}function Su(t){let{t:e}=N(),{kind:n}=t,[r,a]=E(""),[o,s]=E(""),l=Qr(),u=z(),d=r.trim(),p=n==="phone"?"err.phoneInvalid":"err.emailInvalid",m=()=>{if(!Pi(n,d)){l.a.run(async()=>({error:{key:p}}));return}l.send(d,n,"bind")},f=()=>void u.run(async()=>{if(!Pi(n,d))return{error:{key:p}};if(!o.trim())return{error:{key:"err.codeRequired"}};let b=n==="phone"?{phone:d,verification_code:o.trim()}:{email:d,verification_code:o.trim()},g=await P(n==="phone"?"/auth/bind-phone":"/auth/bind-email",{method:"POST",body:b});if(!g.ok)return ce(g);t.onDone(d)});return i(ue,{class:"fx-form",children:[i("label",{class:"fx-field",children:[i("span",{children:t.current?e(n==="phone"?"sec.newPhone":"sec.newEmail"):e(n==="phone"?"sec.phone":"sec.email")}),i("input",{class:"fx-input",type:n==="phone"?"tel":"email",value:r,autoComplete:"off",placeholder:e(n==="phone"?"sec.phonePlaceholder":"sec.emailPlaceholder"),onInput:b=>a(b.currentTarget.value)})]}),i(ea,{code:o,setCode:s,sender:l,onSend:m}),i("div",{class:"fx-inline",children:i(M,{variant:"primary",pending:u.pending,onClick:f,children:e("sec.bindSubmit")})}),i($,{a:u})]})}function ea(t){let{t:e}=N(),{cd:n,a:r}=t.sender;return i("div",{class:"fx-field",children:[i("span",{children:t.label??e("sec.code")}),i("div",{class:"fx-inline",children:[i("input",{class:"fx-input fx-input--code",inputMode:"numeric",autoComplete:"one-time-code",value:t.code,placeholder:e("sec.codePlaceholder"),"aria-label":t.label??e("sec.code"),onInput:a=>t.setCode(a.currentTarget.value)}),i(M,{pending:r.pending,disabled:n.left>0||t.disabled,onClick:t.onSend,children:n.left>0?e("sec.resendIn",{s:n.left}):e("sec.sendCode")})]}),i($,{a:r})]})}function Au(t){let{t:e}=N(),n=ei(t.value),r=t.value.length>0,a=[[n.length,e("pw.req.length",{min:8,max:64})],[n.lower,e("pw.req.lower")],[n.upper,e("pw.req.upper")],[n.special,e("pw.req.special")],[n.space,e("pw.req.space")]];return i("ul",{class:"fx-rules","aria-label":e("pw.rulesLabel"),children:a.map(([o,s])=>i("li",{class:o?"is-ok":r?"is-bad":"",children:[o?i(D,{name:"check",size:11}):r?i(D,{name:"x",size:11}):i("span",{class:"fx-rule-dot","aria-hidden":"true"}),i("span",{children:s})]},s))})}function Li(t,e){let n=Qo(t);return n.ok?t!==e?{error:{key:"pw.mismatch"}}:null:{error:{key:qr[n.rule]}}}function Tu(t){let{t:e}=N(),n=["phone","email"].filter(l=>!!t.me[l]),[r,a]=E("current"),[o,s]=E(!1);return i(Z,{icon:"shield",title:e("pw.title"),desc:e("pw.desc",{min:8,max:64}),actions:i(M,{onClick:()=>s(!o),children:e(o?"common.cancel":"pw.change")}),children:o&&i(ue,{class:"fx-form",children:[i(ht,{label:e("pw.modeLabel"),value:r,onChange:a,options:[{value:"current",label:e("pw.mode.current")},{value:"code",label:e("pw.mode.code")}]}),r==="current"?i(Eu,{onDone:()=>s(!1)}):n.length?i(Cu,{me:t.me,targets:n,onDone:()=>s(!1)}):i(ie,{children:e("pw.codeNeedsContact")})]})})}function Di(t){let{t:e}=N();return i(q,{children:[i("label",{class:"fx-field",children:[i("span",{children:e("pw.new")}),i("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.pw,maxLength:72,onInput:n=>t.setPw(n.currentTarget.value)})]}),i(Au,{value:t.pw}),i("label",{class:"fx-field",children:[i("span",{children:e("pw.confirm")}),i("input",{class:"fx-input",type:"password",autoComplete:"new-password",value:t.confirm,onInput:n=>t.setConfirm(n.currentTarget.value)})]})]})}function Eu(t){let{t:e}=N(),[n,r]=E(""),[a,o]=E(""),[s,l]=E(""),u=z(),[d,p]=E(!1),m=()=>void u.run(async()=>{if(!n)return{error:{key:"pw.currentRequired"}};let f=Li(a,s);if(f)return f;let b=await P("/auth/password",{method:"PUT",body:{currentPassword:n,newPassword:a}});return b.ok?(r(""),o(""),l(""),p(!0),{success:{key:"pw.changed"}}):b.status===404?{error:{key:"pw.noPasswordYet"}}:ce(b)});return i(q,{children:[i("label",{class:"fx-field",children:[i("span",{children:e("pw.current")}),i("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:n,onInput:f=>r(f.currentTarget.value)})]}),i(Di,{pw:a,setPw:o,confirm:s,setConfirm:l}),i("div",{class:"fx-inline",children:[i(M,{variant:"primary",pending:u.pending,onClick:m,children:e("pw.submit")}),d&&i(M,{onClick:t.onDone,children:e("common.done")})]}),i($,{a:u})]})}function Cu(t){let{t:e}=N(),[n,r]=E(t.targets[0]),[a,o]=E(""),[s,l]=E(""),[u,d]=E(""),p=Qr(),m=z(),[f,b]=E(!1),g=t.me[n]||"",k=()=>void m.run(async()=>{if(!a.trim())return{error:{key:"err.codeRequired"}};let y=Li(s,u);if(y)return y;let A=n==="phone"?{phone:g,code:a.trim(),newPassword:s}:{email:g,code:a.trim(),newPassword:s},x=await P("/auth/reset-password",{method:"POST",body:A});return x.ok?(o(""),l(""),d(""),b(!0),{success:{key:"pw.changed"}}):ce(x)});return i(q,{children:[t.targets.length>1?i(ht,{label:e("pw.via"),value:n,onChange:y=>{r(y),o(""),p.reset()},options:t.targets.map(y=>({value:y,label:Zt(y,t.me[y])}))}):i(ie,{children:e("pw.codeTo",{target:Zt(n,g)})}),i(ea,{code:a,setCode:o,sender:p,onSend:()=>void p.send(g,n,"reset_password")}),i(Di,{pw:s,setPw:l,confirm:u,setConfirm:d}),i("div",{class:"fx-inline",children:[i(M,{variant:"primary",pending:m.pending,onClick:k,children:e("pw.submitReset")}),f&&i(M,{onClick:t.onDone,children:e("common.done")})]}),i($,{a:m})]})}function Ru(){let{t}=N(),e=z(),n=()=>void e.run(async()=>{let r=await P("/auth/logout-all",{method:"POST"});if(!r.ok)return ce(r);try{await V().forsionLogout?.()}catch(a){return{error:{raw:Qe(a)}}}return{success:{key:"sec.logoutAllDone"}}});return i(Z,{icon:"laptop",title:t("sec.devices.title"),desc:t("sec.devices.desc"),children:[i(xe,{label:t("sec.logoutAll"),desc:t("sec.logoutAllDesc"),children:i(mt,{label:t("sec.logoutAll"),confirmLabel:t("sec.logoutAllConfirm"),pending:e.pending,onConfirm:n})}),(e.error||e.success)&&i(ue,{children:i($,{a:e})})]})}function Pu(t){let{t:e}=N(),n=["phone","email"].filter(A=>!!t.me[A]),[r,a]=E(!1),[o,s]=E(n.length?"code":"password"),[l,u]=E(n[0]??null),[d,p]=E(""),[m,f]=E(""),b=Qr(),g=z(),k=l&&t.me[l]||"",y=()=>void g.run(async()=>{if(o==="code"&&!d.trim())return{error:{key:"err.codeRequired"}};if(o==="password"&&!m)return{error:{key:"pw.currentRequired"}};let A=await P("/auth/delete-account",{method:"POST",body:o==="code"?{verification_code:d.trim()}:{password:m}});if(!A.ok)return ce(A);try{await V().forsionLogout?.()}catch{}return{success:{key:"del.done"}}});return i(Z,{icon:"alert",danger:!0,title:e("del.title"),desc:e("del.desc"),actions:i(M,{variant:"danger",onClick:()=>{a(!r),g.clear()},children:e(r?"common.cancel":"del.start")}),children:r&&i(ue,{class:"fx-form",children:[i(ie,{tone:"error",children:e("del.warn")}),n.length>0&&i(ht,{label:e("del.methodLabel"),value:o,onChange:s,options:[{value:"code",label:e("del.byCode")},{value:"password",label:e("del.byPassword")}]}),o==="code"&&l?i(q,{children:[n.length>1&&i(ht,{label:e("pw.via"),value:l,onChange:A=>{u(A),p(""),b.reset()},options:n.map(A=>({value:A,label:Zt(A,t.me[A])}))}),i(ea,{code:d,setCode:p,sender:b,label:e("del.codeLabel",{target:Zt(l,k)}),onSend:()=>void b.send(k,l,"delete_account")})]}):i("label",{class:"fx-field",children:[i("span",{children:e("del.passwordLabel")}),i("input",{class:"fx-input",type:"password",autoComplete:"current-password",value:m,onInput:A=>f(A.currentTarget.value)})]}),i("div",{class:"fx-inline",children:i(mt,{variant:"danger",label:e("del.submit"),confirmLabel:e("del.confirm"),pending:g.pending,onConfirm:y})}),i($,{a:g})]})})}var zi=20;function Oi(){let t=Ce(async()=>{let[e,n]=await Promise.all([P("/token-quota/my"),P(`/token-quota/my/logs?limit=${zi}&offset=0`)]);if(!e.ok)return e;let r=n.ok&&Array.isArray(n.data?.logs)?n.data.logs:null;return{ok:!0,status:e.status,data:{dailyLimit:Q(e.data?.dailyLimit),logs:r,total:n.ok?Q(n.data?.total)??r?.length??0:0,logsFail:n.ok?null:n}}});return t.state==="loading"?i(Se,{panels:3,rows:2}):t.state==="signedOut"?i(Re,{}):t.state==="error"?i(Ae,{error:t.error,onRetry:t.retry}):i(q,{children:[i(Iu,{dailyLimit:t.data.dailyLimit}),i(Lu,{base:t.data,onRetry:t.reload})]})}function Iu(t){let{t:e,locale:n}=N(),[r,a]=E(30),[o,s]=E({state:"loading"}),[l,u]=E(!1),[d,p]=E(0),m=te(0);j(()=>{let _=++m.current;return u(!0),P(`/usage/stats?days=${r}`).then(T=>{_===m.current&&(u(!1),s(T.ok?{state:"ready",data:T.data??{}}:{state:"error",fail:T}))}),()=>{m.current++}},[r,d]);let f=t.dailyLimit!==null&&t.dailyLimit<0?"usage.unlimitedNote":Hn(1,t.dailyLimit)===null?"usage.noLimitNote":null,b=_=>Hn(_,t.dailyLimit)??"\u2014",g=i(ht,{label:e("usage.range"),value:r,onChange:a,options:[{value:7,label:e("usage.days",{n:7})},{value:30,label:e("usage.days",{n:30})},{value:90,label:e("usage.days",{n:90})}]}),k=o.state==="ready"?o.data:null,y=(k?.byModel??[]).filter(Boolean),A=(k?.byProject??[]).filter(Boolean),x=Q(k?.successRate);return i(q,{children:[i(Z,{icon:"chart",title:e("usage.overview.title"),desc:e("usage.overview.desc"),actions:g,children:[o.state==="error"?i("div",{class:"fx-sub",children:i("div",{class:"fx-msg is-error",role:"alert",children:[i("span",{children:Ue(_e(o.fail),e)}),i("button",{type:"button",class:"fx-link",onClick:()=>p(_=>_+1),children:e("common.retry")})]})}):i("div",{class:`fx-stats fx-block${l&&k?" is-refreshing":""}`,"aria-busy":l||void 0,children:[i(ta,{label:e("usage.requests"),value:k?oe(Q(k.totalRequests)??0,n):null,testId:"usage-requests"}),i(ta,{label:e("usage.successRate"),value:k?x===null?"\u2014":`${x.toFixed(1)}%`:null}),i(ta,{label:e("usage.consumption"),value:k?b(k.totalPointsCost):null,sub:e("usage.ofToday"),testId:"usage-consumption"})]}),f&&i("div",{class:"fx-sub fx-sub--tight",children:i(ie,{children:e(f)})})]}),o.state!=="error"&&i(q,{children:[i(Z,{icon:"gauge",title:e("usage.byModel.title"),desc:e("usage.byModel.desc"),children:i(Ni,{loading:!k,empty:e("usage.empty"),head:[e("usage.col.model"),e("usage.col.requests"),e("usage.col.consumption")],rows:y.map(_=>[_.modelName||_.modelId||"\u2014",oe(Q(_.count)??0,n),b(_.pointsCost)])})}),i(Z,{icon:"laptop",title:e("usage.byApp.title"),desc:e("usage.byApp.desc"),children:i(Ni,{loading:!k,empty:e("usage.empty"),head:[e("usage.col.app"),e("usage.col.requests"),e("usage.col.consumption")],rows:A.map(_=>[Fi(_.projectSource,e("usage.appUnknown")),oe(Q(_.count)??0,n),b(_.pointsCost)])})})]})]})}var Mu={tangu:"Tangu","ai-studio":"Forsion AI Studio",desktop:"Forsion Desktop",amadeus:"Amadeus",notebase:"Notebase",calendar:"Forsion Calendar",chat:"Forsion Chat",desk:"Forsion Desk","photo-studio":"Photo Studio",connect:"Forsion Connect"},Fi=(t,e)=>!t||t==="unknown"?e:Mu[t]??t;function ta(t){return i("div",{class:"fx-stat",children:[i("span",{class:"fx-stat-label",children:t.label}),t.value===null?i("span",{class:"fx-skel fx-skel--stat"}):i("strong",{class:"fx-stat-value","data-testid":t.testId,children:t.value}),t.sub&&i("span",{class:"fx-stat-sub",children:t.sub})]})}function Ni(t){return t.loading?i("div",{class:"fx-sub",children:[i("span",{class:"fx-skel fx-skel--row"}),i("span",{class:"fx-skel fx-skel--row"})]}):t.rows.length?i("div",{class:"fx-table-wrap fx-block",children:i("table",{class:"fx-table",children:[i("thead",{children:i("tr",{children:t.head.map((e,n)=>i("th",{class:n?"is-num":"",children:e},n))})}),i("tbody",{children:t.rows.map((e,n)=>i("tr",{children:e.map((r,a)=>i("td",{class:a?"is-num":"",children:r},a))},n))})]})}):i(nt,{children:t.empty})}function Lu(t){let{t:e,locale:n}=N(),r=Me(),[a,o]=E(t.base.logs??[]),[s,l]=E(t.base.total),u=z();j(()=>{o(t.base.logs??[]),l(t.base.total)},[t.base]);let d=()=>void u.run(async()=>{let m=await P(`/token-quota/my/logs?limit=${zi}&offset=${a.length}`);if(!m.ok)return{error:_e(m)};let f=Array.isArray(m.data?.logs)?m.data.logs:[];r.current&&(o(b=>[...b,...f]),l(b=>f.length?Q(m.data?.total)??b:a.length))}),p=t.base.dailyLimit;return i(Z,{icon:"clock",title:e("usage.recent.title"),desc:e("usage.recent.desc"),children:[t.base.logsFail?i("div",{class:"fx-sub",children:i("div",{class:"fx-msg is-error",role:"alert",children:[i("span",{children:Ue(_e(t.base.logsFail),e)}),i("button",{type:"button",class:"fx-link",onClick:t.onRetry,children:e("common.retry")})]})}):a.length===0?i(nt,{children:e("usage.recentEmpty")}):i("div",{class:"fx-list fx-block",role:"list",children:a.map((m,f)=>i("div",{class:"fx-list-row",role:"listitem",children:[i("span",{class:"fx-list-main",children:[i("strong",{children:[m.modelName||m.modelId||"\u2014",m.success===!1&&i("span",{class:"fx-tag fx-tag--danger",children:e("usage.failed")})]}),i("small",{children:[tt(m.createdAt,n),Fi(m.projectSource,e("usage.appUnknown"))].join(" \xB7 ")})]}),i("span",{class:"fx-value",children:Hn(m.pointsCost,p)??"\u2014"})]},m.id??f))}),a.length>0&&i("div",{class:"settings-panel-footer fx-footer",children:[i("span",{class:"fx-muted",children:e("usage.shown",{shown:oe(a.length,n),total:oe(Math.max(s,a.length),n)})}),a.length<s&&i(M,{pending:u.pending,onClick:d,children:e("common.loadMore")})]}),u.error&&i("div",{class:"fx-sub fx-sub--tight",children:i($,{a:u})})]})}var Qt=20,Wn=5,Du=5*1024*1024,Xn=1e4,Nu={open:"fb.status.open",in_progress:"fb.status.in_progress",resolved:"fb.status.resolved",closed:"fb.status.closed"};function $i(t){let{t:e}=N(),n=t.status||"open",r=Nu[n];return i("span",{class:`fx-tag fx-status fx-status--${n}`,children:r?e(r):n})}function Ui(){let[t,e]=E(null),n=Ce(async()=>{let r=await P(`/feedback?limit=${Qt}&offset=0`);return r.ok?{ok:!0,status:r.status,data:Array.isArray(r.data?.tickets)?r.data.tickets:[]}:r});return n.state==="loading"?i(Se,{panels:1,rows:3}):n.state==="signedOut"?i(Re,{}):n.state==="error"?i(Ae,{error:n.error,onRetry:n.retry}):t?i($u,{id:t,onBack:()=>{e(null),n.reload()}}):i(zu,{first:n.data,onOpen:e,onChanged:n.reload})}function zu(t){let{t:e,locale:n}=N(),r=Me(),[a,o]=E(t.first),[s,l]=E(t.first.length===Qt),[u,d]=E(!1),[p,m]=E(!1),f=z();j(()=>{o(t.first),l(t.first.length===Qt)},[t.first]);let b=()=>void f.run(async()=>{let g=await P(`/feedback?limit=${Qt}&offset=${a.length}`);if(!g.ok)return{error:_e(g)};let k=Array.isArray(g.data?.tickets)?g.data.tickets:[];r.current&&(o(y=>{let A=new Set(y.map(x=>x.id));return[...y,...k.filter(x=>!A.has(x.id))]}),l(k.length===Qt))});return i(Z,{icon:"message",title:e("fb.list.title"),desc:e("fb.list.desc"),actions:u?void 0:i(M,{variant:"primary",onClick:()=>{m(!1),d(!0)},children:[i(D,{name:"plus",size:12})," ",e("fb.new")]}),children:[u&&i(Bu,{onCancel:()=>d(!1),onSubmitted:()=>{d(!1),m(!0),t.onChanged()}}),p&&!u&&i(ue,{children:i("div",{class:"fx-msg is-ok",role:"status",children:e("fb.submitted")})}),a.length===0?i(nt,{children:e("fb.empty")}):i("div",{class:"fx-list fx-block",role:"list",children:a.map(g=>i("button",{type:"button",class:"fx-list-row fx-list-row--button",role:"listitem",onClick:()=>t.onOpen(g.id),children:[i("span",{class:`fx-dot${g.user_unread?" is-on":""}`,"aria-label":g.user_unread?e("fb.unread"):void 0}),i("span",{class:"fx-list-main",children:[i("strong",{children:g.title||(g.description||"").slice(0,60)||e("fb.untitled")}),i("small",{children:tt(g.updated_at||g.created_at,n)})]}),i($i,{status:g.status}),i(D,{name:"chevron",size:12})]},g.id))}),a.length>0&&(s||f.error)&&i("div",{class:"settings-panel-footer fx-footer",children:[i("span",{class:"fx-muted",children:e("fb.shown",{n:oe(a.length,n)})}),s&&i(M,{pending:f.pending,onClick:b,children:e("common.loadMore")})]}),f.error&&i(ue,{children:i($,{a:f})})]})}function Ou(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(r.error||new Error("read failed")),r.readAsDataURL(t)})}var Fu=0;function Bu(t){let{t:e}=N(),n=Me(),[r,a]=E(""),[o,s]=E([]),[l,u]=E(null),[d,p]=E(!1),m=te(null),f=z(),[b,g]=E(0),k=te(0);k.current=o.length;let y=async x=>{u(null);for(let _ of Array.from(x||[])){if(!_.type||!_.type.startsWith("image/")){u({key:"err.imageType"});continue}if(_.size>Du){u({key:"err.imageTooLarge"});continue}if(k.current>=Wn){u({key:"err.tooManyImages"});break}k.current++,g(T=>T+1);try{let T=await Ou(_);if(!n.current)return;let R={id:`img-${++Fu}`,filename:_.name||"image",mime_type:_.type,size:_.size,data_base64:T.replace(/^data:[^;]+;base64,/,""),url:T};s(F=>F.length>=Wn?F:[...F,R])}catch{k.current--,u({key:"err.imageRead"})}finally{n.current&&g(T=>T-1)}}},A=()=>void f.run(async()=>{let x=r.trim();if(!x)return{error:{key:"err.feedbackEmpty"}};if(x.length>Xn)return{error:{key:"err.feedbackTooLong"}};let _=o.map(({filename:R,mime_type:F,size:G,data_base64:U})=>({filename:R,mime_type:F,size:G,data_base64:U})),T=await P("/feedback",{method:"POST",body:{description:x,attachments:_},timeoutMs:12e4});if(!T.ok)return ce(T);t.onSubmitted()});return i("div",{class:`fx-sub fx-form fx-composer${d?" is-drag":""}`,onPaste:x=>{let _=Array.from(x.clipboardData?.items||[]).filter(T=>T.kind==="file").map(T=>T.getAsFile()).filter(Boolean);_.length&&(x.preventDefault(),y(_))},onDragOver:x=>{x.preventDefault(),p(!0)},onDragLeave:()=>p(!1),onDrop:x=>{x.preventDefault(),p(!1),y(x.dataTransfer?.files)},children:[i("label",{class:"fx-field",children:[i("span",{children:e("fb.descLabel")}),i("textarea",{class:"fx-input fx-textarea",rows:5,value:r,maxLength:Xn,autoFocus:!0,placeholder:e("fb.descPlaceholder"),onInput:x=>a(x.currentTarget.value)})]}),i("p",{class:"fx-note",children:e("fb.imagesHint",{n:Wn})}),o.length>0&&i("div",{class:"fx-thumbs",children:o.map(x=>i("span",{class:"fx-thumb",children:[i("img",{src:x.url,alt:x.filename}),i("button",{type:"button","aria-label":e("fb.removeImage"),title:e("fb.removeImage"),onClick:()=>{s(_=>_.filter(T=>T.id!==x.id)),u(null)},children:i(D,{name:"x",size:11})})]},x.id))}),l&&i("div",{class:"fx-msg is-error",role:"alert",children:Ue(l,e)}),i("input",{ref:m,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:x=>{let _=x.currentTarget;y(_.files),_.value=""}}),i("div",{class:"fx-inline",children:[i(M,{disabled:o.length>=Wn||f.pending,onClick:()=>m.current?.click(),children:[i(D,{name:"image",size:12})," ",e("fb.addImages")]}),i("span",{class:"fx-grow"}),i(M,{disabled:f.pending,onClick:t.onCancel,children:e("common.cancel")}),i(M,{variant:"primary",pending:f.pending,disabled:b>0,onClick:A,children:e("fb.submit")})]}),i($,{a:f})]})}function $u(t){let{t:e,locale:n}=N(),[r,a]=E({state:"loading"}),[o,s]=E(0),[l,u]=E(""),[d,p]=E(null),m=z(),f=te(0);j(()=>{let T=++f.current;return P(`/feedback/${encodeURIComponent(t.id)}`).then(R=>{if(T===f.current){if(!R.ok){a({state:"error",fail:R});return}a({state:"ready",data:{ticket:R.data.ticket,replies:R.data.replies??[],attachments:R.data.attachments??[]}}),P(`/feedback/${encodeURIComponent(t.id)}/read`,{method:"POST"})}}),()=>{f.current++}},[t.id,o]),j(()=>{if(!d)return;let T=R=>{R.key==="Escape"&&p(null)};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[d]);let b=i("div",{class:"fx-back",children:i(M,{onClick:t.onBack,children:[i(D,{name:"back",size:12})," ",e("fb.back")]})});if(r.state==="loading")return i(q,{children:[b,i(Se,{panels:1,rows:3})]});if(r.state==="error")return i(q,{children:[b,i(Ae,{error:_e(r.fail),onRetry:()=>{a({state:"loading"}),s(T=>T+1)}})]});let{ticket:g,replies:k,attachments:y}=r.data,A=g.status==="closed",x=T=>y.filter(R=>(R.reply_id??null)===T),_=()=>void m.run(async()=>{let T=l.trim();if(!T)return{error:{key:"err.replyEmpty"}};if(T.length>Xn)return{error:{key:"err.replyTooLong"}};let R=await P(`/feedback/${encodeURIComponent(g.id)}/replies`,{method:"POST",body:{content:T},timeoutMs:6e4});return R.ok?(u(""),s(F=>F+1),{success:{key:"fb.replySent"}}):ce(R)});return i(q,{children:[b,i(Z,{icon:"message",title:g.title||e("fb.untitled"),actions:i($i,{status:g.status}),desc:`#${String(g.id).slice(0,8)} \xB7 ${tt(g.created_at,n)}`,children:[i("div",{class:"fx-thread fx-block",children:[i(Bi,{who:"user",when:g.created_at,text:g.description||"",files:x(null),onZoom:p}),k.map((T,R)=>i(Bi,{who:T.author_role==="user"?"user":"admin",when:T.created_at,text:T.content||"",files:T.id?x(T.id):[],onZoom:p},T.id??R))]}),A?i(ue,{children:i(ie,{children:e("fb.closedNote")})}):i(ue,{class:"fx-form",children:[i("textarea",{class:"fx-input fx-textarea",rows:3,value:l,maxLength:Xn,placeholder:e("fb.replyPlaceholder"),"aria-label":e("fb.replyPlaceholder"),onInput:T=>{u(T.currentTarget.value),m.success&&m.clear()}}),i("div",{class:"fx-inline",children:[i("span",{class:"fx-grow"}),i(M,{variant:"primary",pending:m.pending,onClick:_,children:e("fb.replySend")})]}),i($,{a:m})]})]}),d&&i("div",{class:"fx-lightbox",role:"dialog","aria-label":e("fb.imagePreview"),onClick:()=>p(null),children:i("img",{src:d,alt:""})})]})}function Bi(t){let{t:e,locale:n}=N();return i("div",{class:`fx-bubble fx-bubble--${t.who}`,children:[i("div",{class:"fx-bubble-meta",children:[t.who==="user"?e("fb.you"):e("fb.support")," \xB7 ",tt(t.when,n)]}),i("div",{class:"fx-bubble-text",children:t.text}),t.files.length>0&&i("div",{class:"fx-thumbs",children:t.files.map((r,a)=>{let o=r.mime_type||"";if(o.startsWith("image/")&&r.data_base64){let s=`data:${o};base64,${r.data_base64}`;return i("button",{type:"button",class:"fx-thumb",onClick:()=>t.onZoom(s),"aria-label":e("fb.imagePreview"),children:i("img",{src:s,alt:r.filename||""})},r.id??a)}return i("span",{class:"fx-tag",children:[i(D,{name:"card",size:11})," ",r.filename||e("fb.attachment")]},r.id??a)})})]})}var Uu="forsion-extend",qi=[{id:"account",titleKey:"page.account",Component:Ai},{id:"quota",titleKey:"page.quota",Component:Ei},{id:"backpack",titleKey:"page.backpack",Component:Ci},{id:"security",titleKey:"page.security",Component:Mi},{id:"usage",titleKey:"page.usage",Component:Oi},{id:"feedback",titleKey:"page.feedback",Component:Ui}],qu=t=>`forsion/fx:${Uu}:${t}`;function Hu(t){let{ctx:e,page:n}=t,[r,a]=E(()=>$e(e.getLocale?.()));j(()=>{a($e(e.getLocale?.()));let l=e.subscribeLocale?.(u=>a($e(u)));return()=>{typeof l=="function"&&l()}},[e]);let o=Je(()=>{let l=e.app?.openSettings;return{ctx:e,locale:r,t:zn(r),goTo:typeof l=="function"?u=>l.call(e.app,qu(u)):null}},[e,r]),s=n.Component;return i(Hr.Provider,{value:o,children:i("div",{class:"fx-acct","data-fx-page":n.id,lang:r==="zh"?"zh-CN":"en",children:[i("style",{children:Vo}),i(s,{})]})})}function Hi(t,e=window){let n=e?.tangu;if(!t||!n?.cloudFetch||!n.cloudInvoke||n.unitPage||typeof t.registerSettingsView!="function")return 0;for(let r of qi)t.registerSettingsView({id:r.id,category:"forsion",title:()=>Ur($e(t.getLocale?.()),r.titleKey),mount(a){return It(i(Hu,{ctx:t,page:r}),a),()=>{It(null,a)}}});return qi.length}var Wi;if(typeof ctx<"u"){Hi(ctx);let t=Zo(ctx);t&&(Wi=()=>t.dispose())}return Ss(Wu);})();
|
|
299
349
|
return __fxExtend.dispose;
|