@crownpeak/dqm-react-component 1.2.1 → 1.2.2
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 +19 -0
- package/dist/DQMSidebar.d.ts.map +1 -1
- package/dist/context/ai/useAITranslation.d.ts.map +1 -1
- package/dist/dqm-widget.esm.js +21 -21
- package/dist/dqm-widget.iife.js +5 -5
- package/dist/index.cjs +38 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3777 -3740
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const In=require("react/jsx-runtime"),D=require("react"),P=require("@mui/material"),gt=require("@mui/icons-material"),xi=require("@mui/system"),$y=require("@emotion/styled");require("@emotion/react");function yh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const es=yh(In),We=yh(D);function By(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Fy(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var jy=(function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Fy(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=By(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Mt="-ms-",Ia="-moz-",He="-webkit-",bh="comm",Ou="rule",Iu="decl",zy="@import",wh="@keyframes",Uy="@layer",qy=Math.abs,el=String.fromCharCode,Hy=Object.assign;function Vy(e,t){return Nt(e,0)^45?(((t<<2^Nt(e,0))<<2^Nt(e,1))<<2^Nt(e,2))<<2^Nt(e,3):0}function _h(e){return e.trim()}function Wy(e,t){return(e=t.exec(e))?e[0]:e}function Ve(e,t,n){return e.replace(t,n)}function Uc(e,t){return e.indexOf(t)}function Nt(e,t){return e.charCodeAt(t)|0}function ts(e,t,n){return e.slice(t,n)}function Kn(e){return e.length}function Pu(e){return e.length}function Vs(e,t){return t.push(e),e}function Ky(e,t){return e.map(t).join("")}var tl=1,Zi=1,vh=0,Yt=0,xt=0,lo="";function nl(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:tl,column:Zi,length:s,return:""}}function Eo(e,t){return Hy(nl("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gy(){return xt}function Qy(){return xt=Yt>0?Nt(lo,--Yt):0,Zi--,xt===10&&(Zi=1,tl--),xt}function on(){return xt=Yt<vh?Nt(lo,Yt++):0,Zi++,xt===10&&(Zi=1,tl++),xt}function Jn(){return Nt(lo,Yt)}function _a(){return Yt}function gs(e,t){return ts(lo,e,t)}function ns(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Sh(e){return tl=Zi=1,vh=Kn(lo=e),Yt=0,[]}function Eh(e){return lo="",e}function va(e){return _h(gs(Yt-1,qc(e===91?e+2:e===40?e+1:e)))}function Yy(e){for(;(xt=Jn())&&xt<33;)on();return ns(e)>2||ns(xt)>3?"":" "}function Jy(e,t){for(;--t&&on()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return gs(e,_a()+(t<6&&Jn()==32&&on()==32))}function qc(e){for(;on();)switch(xt){case e:return Yt;case 34:case 39:e!==34&&e!==39&&qc(xt);break;case 40:e===41&&qc(e);break;case 92:on();break}return Yt}function Xy(e,t){for(;on()&&e+xt!==57;)if(e+xt===84&&Jn()===47)break;return"/*"+gs(t,Yt-1)+"*"+el(e===47?e:on())}function Zy(e){for(;!ns(Jn());)on();return gs(e,Yt)}function e0(e){return Eh(Sa("",null,null,null,[""],e=Sh(e),0,[0],e))}function Sa(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,f=s,p=0,b=0,h=0,g=1,m=1,E=1,A=0,_="",x=i,d=o,w=r,S=_;m;)switch(h=A,A=on()){case 40:if(h!=108&&Nt(S,f-1)==58){Uc(S+=Ve(va(A),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:S+=va(A);break;case 9:case 10:case 13:case 32:S+=Yy(h);break;case 92:S+=Jy(_a()-1,7);continue;case 47:switch(Jn()){case 42:case 47:Vs(t0(Xy(on(),_a()),t,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Kn(S)*E;case 125*g:case 59:case 0:switch(A){case 0:case 125:m=0;case 59+u:E==-1&&(S=Ve(S,/\f/g,"")),b>0&&Kn(S)-f&&Vs(b>32?xd(S+";",r,n,f-1):xd(Ve(S," ","")+";",r,n,f-2),l);break;case 59:S+=";";default:if(Vs(w=Ed(S,t,n,c,u,i,a,_,x=[],d=[],f),o),A===123)if(u===0)Sa(S,t,w,w,x,o,f,a,d);else switch(p===99&&Nt(S,3)===110?100:p){case 100:case 108:case 109:case 115:Sa(e,w,w,r&&Vs(Ed(e,w,w,0,0,i,a,_,i,x=[],f),d),i,d,f,a,r?x:d);break;default:Sa(S,w,w,w,[""],d,0,a,d)}}c=u=b=0,g=E=1,_=S="",f=s;break;case 58:f=1+Kn(S),b=h;default:if(g<1){if(A==123)--g;else if(A==125&&g++==0&&Qy()==125)continue}switch(S+=el(A),A*g){case 38:E=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Kn(S)-1)*E,E=1;break;case 64:Jn()===45&&(S+=va(on())),p=Jn(),u=f=Kn(_=S+=Zy(_a())),A++;break;case 45:h===45&&Kn(S)==2&&(g=0)}}return o}function Ed(e,t,n,r,i,o,s,a,l,c,u){for(var f=i-1,p=i===0?o:[""],b=Pu(p),h=0,g=0,m=0;h<r;++h)for(var E=0,A=ts(e,f+1,f=qy(g=s[h])),_=e;E<b;++E)(_=_h(g>0?p[E]+" "+A:Ve(A,/&\f/g,p[E])))&&(l[m++]=_);return nl(e,t,n,i===0?Ou:a,l,c,u)}function t0(e,t,n){return nl(e,t,n,bh,el(Gy()),ts(e,2,-2),0)}function xd(e,t,n,r){return nl(e,t,n,Iu,ts(e,0,r),ts(e,r+1,-1),r)}function Ji(e,t){for(var n="",r=Pu(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function n0(e,t,n,r){switch(e.type){case Uy:if(e.children.length)break;case zy:case Iu:return e.return=e.return||e.value;case bh:return"";case wh:return e.return=e.value+"{"+Ji(e.children,r)+"}";case Ou:e.value=e.props.join(",")}return Kn(n=Ji(e.children,r))?e.return=e.value+"{"+n+"}":""}function r0(e){var t=Pu(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function i0(e){return function(t){t.root||(t=t.return)&&e(t)}}function o0(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var s0=function(t,n,r){for(var i=0,o=0;i=o,o=Jn(),i===38&&o===12&&(n[r]=1),!ns(o);)on();return gs(t,Yt)},a0=function(t,n){var r=-1,i=44;do switch(ns(i)){case 0:i===38&&Jn()===12&&(n[r]=1),t[r]+=s0(Yt-1,n,r);break;case 2:t[r]+=va(i);break;case 4:if(i===44){t[++r]=Jn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=el(i)}while(i=on());return t},l0=function(t,n){return Eh(a0(Sh(t),n))},Cd=new WeakMap,c0=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Cd.get(r))&&!i){Cd.set(t,!0);for(var o=[],s=l0(n,o),a=r.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=o[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},u0=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xh(e,t){switch(Vy(e,t)){case 5103:return He+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return He+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return He+e+Ia+e+Mt+e+e;case 6828:case 4268:return He+e+Mt+e+e;case 6165:return He+e+Mt+"flex-"+e+e;case 5187:return He+e+Ve(e,/(\w+).+(:[^]+)/,He+"box-$1$2"+Mt+"flex-$1$2")+e;case 5443:return He+e+Mt+"flex-item-"+Ve(e,/flex-|-self/,"")+e;case 4675:return He+e+Mt+"flex-line-pack"+Ve(e,/align-content|flex-|-self/,"")+e;case 5548:return He+e+Mt+Ve(e,"shrink","negative")+e;case 5292:return He+e+Mt+Ve(e,"basis","preferred-size")+e;case 6060:return He+"box-"+Ve(e,"-grow","")+He+e+Mt+Ve(e,"grow","positive")+e;case 4554:return He+Ve(e,/([^-])(transform)/g,"$1"+He+"$2")+e;case 6187:return Ve(Ve(Ve(e,/(zoom-|grab)/,He+"$1"),/(image-set)/,He+"$1"),e,"")+e;case 5495:case 3959:return Ve(e,/(image-set\([^]*)/,He+"$1$`$1");case 4968:return Ve(Ve(e,/(.+:)(flex-)?(.*)/,He+"box-pack:$3"+Mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+He+e+e;case 4095:case 3583:case 4068:case 2532:return Ve(e,/(.+)-inline(.+)/,He+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Kn(e)-1-t>6)switch(Nt(e,t+1)){case 109:if(Nt(e,t+4)!==45)break;case 102:return Ve(e,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+Ia+(Nt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Uc(e,"stretch")?xh(Ve(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Nt(e,t+1)!==115)break;case 6444:switch(Nt(e,Kn(e)-3-(~Uc(e,"!important")&&10))){case 107:return Ve(e,":",":"+He)+e;case 101:return Ve(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+He+(Nt(e,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+Mt+"$2box$3")+e}break;case 5936:switch(Nt(e,t+11)){case 114:return He+e+Mt+Ve(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return He+e+Mt+Ve(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return He+e+Mt+Ve(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return He+e+Mt+e+e}return e}var d0=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Iu:t.return=xh(t.value,t.length);break;case wh:return Ji([Eo(t,{value:Ve(t.value,"@","@"+He)})],i);case Ou:if(t.length)return Ky(t.props,function(o){switch(Wy(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ji([Eo(t,{props:[Ve(o,/:(read-\w+)/,":"+Ia+"$1")]})],i);case"::placeholder":return Ji([Eo(t,{props:[Ve(o,/:(plac\w+)/,":"+He+"input-$1")]}),Eo(t,{props:[Ve(o,/:(plac\w+)/,":"+Ia+"$1")]}),Eo(t,{props:[Ve(o,/:(plac\w+)/,Mt+"input-$1")]})],i)}return""})}},f0=[d0],p0=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||f0,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),E=1;E<m.length;E++)o[m[E]]=!0;a.push(g)});var l,c=[c0,u0];{var u,f=[n0,i0(function(g){u.insert(g)})],p=r0(c.concat(i,f)),b=function(m){return Ji(e0(m),p)};l=function(m,E,A,_){u=A,b(m?m+"{"+E.styles+"}":E.styles),_&&(h.inserted[E.name]=!0)}}var h={key:n,sheet:new jy({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return h.sheet.hydrate(a),h},Ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ks={exports:{}},Ge={};var Td;function h0(){if(Td)return Ge;Td=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(d){if(typeof d=="object"&&d!==null){var w=d.$$typeof;switch(w){case t:switch(d=d.type,d){case l:case c:case r:case o:case i:case f:return d;default:switch(d=d&&d.$$typeof,d){case a:case u:case h:case b:case s:return d;default:return w}}case n:return w}}}function x(d){return _(d)===c}return Ge.AsyncMode=l,Ge.ConcurrentMode=c,Ge.ContextConsumer=a,Ge.ContextProvider=s,Ge.Element=t,Ge.ForwardRef=u,Ge.Fragment=r,Ge.Lazy=h,Ge.Memo=b,Ge.Portal=n,Ge.Profiler=o,Ge.StrictMode=i,Ge.Suspense=f,Ge.isAsyncMode=function(d){return x(d)||_(d)===l},Ge.isConcurrentMode=x,Ge.isContextConsumer=function(d){return _(d)===a},Ge.isContextProvider=function(d){return _(d)===s},Ge.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Ge.isForwardRef=function(d){return _(d)===u},Ge.isFragment=function(d){return _(d)===r},Ge.isLazy=function(d){return _(d)===h},Ge.isMemo=function(d){return _(d)===b},Ge.isPortal=function(d){return _(d)===n},Ge.isProfiler=function(d){return _(d)===o},Ge.isStrictMode=function(d){return _(d)===i},Ge.isSuspense=function(d){return _(d)===f},Ge.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===c||d===o||d===i||d===f||d===p||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===b||d.$$typeof===s||d.$$typeof===a||d.$$typeof===u||d.$$typeof===m||d.$$typeof===E||d.$$typeof===A||d.$$typeof===g)},Ge.typeOf=_,Ge}var Qe={};var Ad;function g0(){return Ad||(Ad=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===o||B===i||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===b||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===m||B.$$typeof===E||B.$$typeof===A||B.$$typeof===g)}function x(B){if(typeof B=="object"&&B!==null){var me=B.$$typeof;switch(me){case t:var Ee=B.type;switch(Ee){case l:case c:case r:case o:case i:case f:return Ee;default:var be=Ee&&Ee.$$typeof;switch(be){case a:case u:case h:case b:case s:return be;default:return me}}case n:return me}}}var d=l,w=c,S=a,C=s,R=t,k=u,T=r,y=h,I=b,O=n,L=o,U=i,Z=f,V=!1;function Q(B){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(B)||x(B)===l}function F(B){return x(B)===c}function z(B){return x(B)===a}function se(B){return x(B)===s}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return x(B)===u}function oe(B){return x(B)===r}function le(B){return x(B)===h}function q(B){return x(B)===b}function re(B){return x(B)===n}function Y(B){return x(B)===o}function W(B){return x(B)===i}function ce(B){return x(B)===f}Qe.AsyncMode=d,Qe.ConcurrentMode=w,Qe.ContextConsumer=S,Qe.ContextProvider=C,Qe.Element=R,Qe.ForwardRef=k,Qe.Fragment=T,Qe.Lazy=y,Qe.Memo=I,Qe.Portal=O,Qe.Profiler=L,Qe.StrictMode=U,Qe.Suspense=Z,Qe.isAsyncMode=Q,Qe.isConcurrentMode=F,Qe.isContextConsumer=z,Qe.isContextProvider=se,Qe.isElement=te,Qe.isForwardRef=J,Qe.isFragment=oe,Qe.isLazy=le,Qe.isMemo=q,Qe.isPortal=re,Qe.isProfiler=Y,Qe.isStrictMode=W,Qe.isSuspense=ce,Qe.isValidElementType=_,Qe.typeOf=x})()),Qe}var kd;function m0(){return kd||(kd=1,process.env.NODE_ENV==="production"?Ks.exports=h0():Ks.exports=g0()),Ks.exports}var Hl,Rd;function y0(){if(Rd)return Hl;Rd=1;var e=m0(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function s(h){return e.isMemo(h)?i:o[h.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function b(h,g,m){if(typeof g!="string"){if(p){var E=f(g);E&&E!==p&&b(h,E,m)}var A=l(g);c&&(A=A.concat(c(g)));for(var _=s(h),x=s(g),d=0;d<A.length;++d){var w=A[d];if(!n[w]&&!(m&&m[w])&&!(x&&x[w])&&!(_&&_[w])){var S=u(g,w);try{a(h,w,S)}catch{}}}}return h}return Hl=b,Hl}y0();var b0=!0;function w0(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Ch=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||b0===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},_0=function(t,n,r){Ch(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function v0(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var S0={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},E0=/[A-Z]|^ms/g,x0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Th=function(t){return t.charCodeAt(1)===45},Od=function(t){return t!=null&&typeof t!="boolean"},Vl=o0(function(e){return Th(e)?e:e.replace(E0,"-$&").toLowerCase()}),Id=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(x0,function(r,i,o){return Gn={name:i,styles:o,next:Gn},i})}return S0[t]!==1&&!Th(t)&&typeof n=="number"&&n!==0?n+"px":n};function rs(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Gn={name:i.name,styles:i.styles,next:Gn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Gn={name:s.name,styles:s.styles,next:Gn},s=s.next;var a=o.styles+";";return a}return C0(e,t,n)}case"function":{if(e!==void 0){var l=Gn,c=n(e);return Gn=l,rs(e,t,c)}break}}var u=n;return u}function C0(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=rs(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;Od(a)&&(r+=Vl(o)+":"+Id(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Od(s[l])&&(r+=Vl(o)+":"+Id(o,s[l])+";");else{var c=rs(e,t,s);switch(o){case"animation":case"animationName":{r+=Vl(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var Pd=/label:\s*([^\s;{]+)\s*(;|$)/g,Gn;function Ah(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Gn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=rs(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=rs(n,t,e[a]),r){var l=o;i+=l[a]}Pd.lastIndex=0;for(var c="",u;(u=Pd.exec(i))!==null;)c+="-"+u[1];var f=v0(i)+c;return{name:f,styles:i,next:Gn}}var T0=function(t){return t()},A0=We.useInsertionEffect?We.useInsertionEffect:!1,k0=A0||T0,kh=We.createContext(typeof HTMLElement<"u"?p0({key:"css"}):null);kh.Provider;var R0=function(t){return D.forwardRef(function(n,r){var i=D.useContext(kh);return t(n,i,r)})},O0=We.createContext({}),rl={}.hasOwnProperty,Hc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Rh=function(t,n){var r={};for(var i in n)rl.call(n,i)&&(r[i]=n[i]);return r[Hc]=t,r},I0=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Ch(n,r,i),k0(function(){return _0(n,r,i)}),null},P0=R0(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Hc],o=[r],s="";typeof e.className=="string"?s=w0(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var a=Ah(o,void 0,We.useContext(O0));s+=t.key+"-"+a.name;var l={};for(var c in e)rl.call(e,c)&&c!=="css"&&c!==Hc&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),We.createElement(We.Fragment,null,We.createElement(I0,{cache:t,serialized:a,isStringTag:typeof i=="string"}),We.createElement(i,l))}),Oh=P0,zr=es.Fragment,M=function(t,n,r){return rl.call(n,"css")?es.jsx(Oh,Rh(t,n),r):es.jsx(t,n,r)},ne=function(t,n,r){return rl.call(n,"css")?es.jsxs(Oh,Rh(t,n),r):es.jsxs(t,n,r)};const mn={DEBUG:0,INFO:1,WARN:2,ERROR:3},Ih={level:process.env.NODE_ENV==="production"?mn.WARN:mn.DEBUG,prefix:"[DQM]",timestamps:!1};let tn={...Ih};const Vc="dqm_debug";function Ph(){try{return localStorage.getItem(Vc)==="true"}catch{return!1}}function Tn(){return Ph()?mn.DEBUG:tn.level}function Gs(e,t){const n=[];return tn.timestamps&&n.push(`[${new Date().toISOString()}]`),n.push(tn.prefix),n.push(`[${e}]`),[...n,...t]}const fe={debug(...e){Tn()<=mn.DEBUG&&console.debug(...Gs("DEBUG",e))},info(...e){Tn()<=mn.INFO&&console.info(...Gs("INFO",e))},warn(...e){Tn()<=mn.WARN&&console.warn(...Gs("WARN",e))},error(...e){Tn()<=mn.ERROR&&console.error(...Gs("ERROR",e))},log(e,...t){Tn()<=e},group(e){Tn()<=mn.DEBUG&&console.groupCollapsed(`${tn.prefix} ${e}`)},groupEnd(){Tn()<=mn.DEBUG&&console.groupEnd()},table(e,t){Tn()<=mn.DEBUG&&console.table(e,t)},time(e){Tn()<=mn.DEBUG&&console.time(`${tn.prefix} ${e}`)},timeEnd(e){Tn()<=mn.DEBUG&&console.timeEnd(`${tn.prefix} ${e}`)},configure(e){tn={...tn,...e}},reset(){tn={...Ih}},enableDebug(){try{localStorage.setItem(Vc,"true"),console.info(`${tn.prefix} Debug mode enabled`)}catch{console.warn(`${tn.prefix} Could not persist debug mode to localStorage`)}},disableDebug(){try{localStorage.removeItem(Vc),console.info(`${tn.prefix} Debug mode disabled`)}catch{}},isDebugEnabled:Ph,getLevel(){return Tn()},setLevel(e){tn.level=e}},N0=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);gi(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Nd={},Wc=(e,t,n,r)=>{gi(n)&&Nd[n]||(gi(n)&&(Nd[n]=new Date),N0(e,t,n,r))},Nh=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Kc=(e,t,n)=>{e.loadNamespaces(t,Nh(e,n))},Md=(e,t,n,r)=>{if(gi(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Kc(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,Nh(e,r))},M0=(e,t,n={})=>!t.languages||!t.languages.length?(Wc(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),gi=e=>typeof e=="string",D0=e=>typeof e=="object"&&e!==null,L0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},B0=e=>$0[e],F0=e=>e.replace(L0,B0);let Gc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:F0};const j0=(e={})=>{Gc={...Gc,...e}},z0=()=>Gc;let Mh;const U0=e=>{Mh=e},q0=()=>Mh,H0={type:"3rdParty",init(e){j0(e.options.react),U0(e)}},Dh=D.createContext();class V0{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const W0=(e,t)=>{const n=D.useRef();return D.useEffect(()=>{n.current=e},[e,t]),n.current},Lh=(e,t,n,r)=>e.getFixedT(t,n,r),K0=(e,t,n,r)=>D.useCallback(Lh(e,t,n,r),[e,t,n,r]),kr=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=D.useContext(Dh)||{},o=n||r||q0();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new V0),!o){Wc(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const x=(w,S)=>gi(S)?S:D0(S)&&gi(S.defaultValue)?S.defaultValue:Array.isArray(w)?w[w.length-1]:w,d=[x,{},!1];return d.t=x,d.i18n={},d.ready=!1,d}o.options.react?.wait&&Wc(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...z0(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=e||i||o.options?.defaultNS;c=gi(c)?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces?.(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(x=>M0(x,o,s)),f=K0(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),p=()=>f,b=()=>Lh(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,g]=D.useState(p);let m=c.join();t.lng&&(m=`${t.lng}${m}`);const E=W0(m),A=D.useRef(!0);D.useEffect(()=>{const{bindI18n:x,bindI18nStore:d}=s;A.current=!0,!u&&!a&&(t.lng?Md(o,t.lng,c,()=>{A.current&&g(b)}):Kc(o,c,()=>{A.current&&g(b)})),u&&E&&E!==m&&A.current&&g(b);const w=()=>{A.current&&g(b)};return x&&o?.on(x,w),d&&o?.store.on(d,w),()=>{A.current=!1,o&&x&&x?.split(" ").forEach(S=>o.off(S,w)),d&&o&&d.split(" ").forEach(S=>o.store.off(S,w))}},[o,m]),D.useEffect(()=>{A.current&&u&&g(p)},[o,l,u]);const _=[h,o,u];if(_.t=h,_.i18n=o,_.ready=u,u||!u&&!a)return _;throw new Promise(x=>{t.lng?Md(o,t.lng,c,()=>x()):Kc(o,c,()=>x())})};function G0({i18n:e,defaultNS:t,children:n}){const r=D.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return D.createElement(Dh.Provider,{value:r},n)}var Qs={exports:{}},Wl={};var Dd;function Q0(){if(Dd)return Wl;Dd=1;var e=D;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,a=e.useDebugValue;return Wl.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var b=i(null);if(b.current===null){var h={hasValue:!1,value:null};b.current=h}else h=b.current;b=s(function(){function m(d){if(!E){if(E=!0,A=d,d=f(d),p!==void 0&&h.hasValue){var w=h.value;if(p(w,d))return _=w}return _=d}if(w=_,n(A,d))return w;var S=f(d);return p!==void 0&&p(w,S)?(A=d,w):(A=d,_=S)}var E=!1,A,_,x=u===void 0?null:u;return[function(){return m(c())},x===null?void 0:function(){return m(x())}]},[c,u,f,p]);var g=r(l,b[0],b[1]);return o(function(){h.hasValue=!0,h.value=g},[g]),a(g),g},Wl}var Kl={};var Ld;function Y0(){return Ld||(Ld=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=D,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,s=t.useMemo,a=t.useDebugValue;Kl.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var b=i(null);if(b.current===null){var h={hasValue:!1,value:null};b.current=h}else h=b.current;b=s(function(){function m(d){if(!E){if(E=!0,A=d,d=f(d),p!==void 0&&h.hasValue){var w=h.value;if(p(w,d))return _=w}return _=d}if(w=_,n(A,d))return w;var S=f(d);return p!==void 0&&p(w,S)?(A=d,w):(A=d,_=S)}var E=!1,A,_,x=u===void 0?null:u;return[function(){return m(c())},x===null?void 0:function(){return m(x())}]},[c,u,f,p]);var g=r(l,b[0],b[1]);return o(function(){h.hasValue=!0,h.value=g},[g]),a(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kl}var $d;function J0(){return $d||($d=1,process.env.NODE_ENV==="production"?Qs.exports=Q0():Qs.exports=Y0()),Qs.exports}var X0=J0();function $h(e){e()}function Z0(){let e=null,t=null;return{clear(){e=null,t=null},notify(){$h(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Bd={notify(){},get:()=>[]};function eb(e,t){let n,r=Bd,i=0,o=!1;function s(g){u();const m=r.subscribe(g);let E=!1;return()=>{E||(E=!0,m(),f())}}function a(){r.notify()}function l(){h.onStateChange&&h.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=Z0())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Bd)}function p(){o||(o=!0,u())}function b(){o&&(o=!1,f())}const h={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:b,getListeners:()=>r};return h}var tb=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nb=tb(),rb=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ib=rb(),ob=()=>nb||ib?We.useLayoutEffect:We.useEffect,sb=ob();function Fd(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Go(e,t){if(Fd(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Fd(e[n[i]],t[n[i]]))return!1;return!0}var ab=Symbol.for("react-redux-context"),lb=typeof globalThis<"u"?globalThis:{};function cb(){if(!We.createContext)return{};const e=lb[ab]??=new Map;let t=e.get(We.createContext);return t||(t=We.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(We.createContext,t)),t}var xr=cb();function ub(e){const{children:t,context:n,serverState:r,store:i}=e,o=We.useMemo(()=>{const l=eb(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,r]),s=We.useMemo(()=>i.getState(),[i]);sb(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const a=n||xr;return We.createElement(a.Provider,{value:o},t)}var db=ub;function Mu(e=xr){return function(){const n=We.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var Bh=Mu();function Fh(e=xr){const t=e===xr?Bh:Mu(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var jh=Fh();function fb(e=xr){const t=e===xr?jh:Fh(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var zh=fb(),pb=(e,t)=>e===t;function hb(e=xr){const t=e===xr?Bh:Mu(e),n=(r,i={})=>{const{equalityFn:o=pb}=typeof i=="function"?{equalityFn:i}:i;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof o!="function")throw new Error("You must pass a function as an equality function to useSelector")}const s=t(),{store:a,subscription:l,getServerState:c}=s,u=We.useRef(!0),f=We.useCallback({[r.name](b){const h=r(b);if(process.env.NODE_ENV!=="production"){const{devModeChecks:g={}}=typeof i=="function"?{}:i,{identityFunctionCheck:m,stabilityCheck:E}=s,{identityFunctionCheck:A,stabilityCheck:_}={stabilityCheck:E,identityFunctionCheck:m,...g};if(_==="always"||_==="once"&&u.current){const x=r(b);if(!o(h,x)){let d;try{throw new Error}catch(w){({stack:d}=w)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react/jsx-runtime"),D=require("react"),P=require("@mui/material"),mt=require("@mui/icons-material"),Si=require("@mui/system"),$y=require("@emotion/styled");require("@emotion/react");function yh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ns=yh(On),Ke=yh(D);function By(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Fy(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var jy=(function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Fy(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=By(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Mt="-ms-",Oa="-moz-",Ve="-webkit-",bh="comm",Ou="rule",Iu="decl",zy="@import",wh="@keyframes",Uy="@layer",qy=Math.abs,Za=String.fromCharCode,Hy=Object.assign;function Vy(e,t){return Pt(e,0)^45?(((t<<2^Pt(e,0))<<2^Pt(e,1))<<2^Pt(e,2))<<2^Pt(e,3):0}function _h(e){return e.trim()}function Wy(e,t){return(e=t.exec(e))?e[0]:e}function We(e,t,n){return e.replace(t,n)}function Uc(e,t){return e.indexOf(t)}function Pt(e,t){return e.charCodeAt(t)|0}function rs(e,t,n){return e.slice(t,n)}function Qn(e){return e.length}function Pu(e){return e.length}function Hs(e,t){return t.push(e),e}function Ky(e,t){return e.map(t).join("")}var el=1,eo=1,vh=0,Jt=0,xt=0,co="";function tl(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:el,column:eo,length:s,return:""}}function Co(e,t){return Hy(tl("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gy(){return xt}function Qy(){return xt=Jt>0?Pt(co,--Jt):0,eo--,xt===10&&(eo=1,el--),xt}function on(){return xt=Jt<vh?Pt(co,Jt++):0,eo++,xt===10&&(eo=1,el++),xt}function Zn(){return Pt(co,Jt)}function wa(){return Jt}function ys(e,t){return rs(co,e,t)}function is(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Sh(e){return el=eo=1,vh=Qn(co=e),Jt=0,[]}function Eh(e){return co="",e}function _a(e){return _h(ys(Jt-1,qc(e===91?e+2:e===40?e+1:e)))}function Yy(e){for(;(xt=Zn())&&xt<33;)on();return is(e)>2||is(xt)>3?"":" "}function Jy(e,t){for(;--t&&on()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return ys(e,wa()+(t<6&&Zn()==32&&on()==32))}function qc(e){for(;on();)switch(xt){case e:return Jt;case 34:case 39:e!==34&&e!==39&&qc(xt);break;case 40:e===41&&qc(e);break;case 92:on();break}return Jt}function Xy(e,t){for(;on()&&e+xt!==57;)if(e+xt===84&&Zn()===47)break;return"/*"+ys(t,Jt-1)+"*"+Za(e===47?e:on())}function Zy(e){for(;!is(Zn());)on();return ys(e,Jt)}function e0(e){return Eh(va("",null,null,null,[""],e=Sh(e),0,[0],e))}function va(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,f=s,p=0,b=0,h=0,g=1,m=1,E=1,A=0,_="",x=i,d=o,w=r,S=_;m;)switch(h=A,A=on()){case 40:if(h!=108&&Pt(S,f-1)==58){Uc(S+=We(_a(A),"&","&\f"),"&\f")!=-1&&(E=-1);break}case 34:case 39:case 91:S+=_a(A);break;case 9:case 10:case 13:case 32:S+=Yy(h);break;case 92:S+=Jy(wa()-1,7);continue;case 47:switch(Zn()){case 42:case 47:Hs(t0(Xy(on(),wa()),t,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Qn(S)*E;case 125*g:case 59:case 0:switch(A){case 0:case 125:m=0;case 59+u:E==-1&&(S=We(S,/\f/g,"")),b>0&&Qn(S)-f&&Hs(b>32?xd(S+";",r,n,f-1):xd(We(S," ","")+";",r,n,f-2),l);break;case 59:S+=";";default:if(Hs(w=Ed(S,t,n,c,u,i,a,_,x=[],d=[],f),o),A===123)if(u===0)va(S,t,w,w,x,o,f,a,d);else switch(p===99&&Pt(S,3)===110?100:p){case 100:case 108:case 109:case 115:va(e,w,w,r&&Hs(Ed(e,w,w,0,0,i,a,_,i,x=[],f),d),i,d,f,a,r?x:d);break;default:va(S,w,w,w,[""],d,0,a,d)}}c=u=b=0,g=E=1,_=S="",f=s;break;case 58:f=1+Qn(S),b=h;default:if(g<1){if(A==123)--g;else if(A==125&&g++==0&&Qy()==125)continue}switch(S+=Za(A),A*g){case 38:E=u>0?1:(S+="\f",-1);break;case 44:a[c++]=(Qn(S)-1)*E,E=1;break;case 64:Zn()===45&&(S+=_a(on())),p=Zn(),u=f=Qn(_=S+=Zy(wa())),A++;break;case 45:h===45&&Qn(S)==2&&(g=0)}}return o}function Ed(e,t,n,r,i,o,s,a,l,c,u){for(var f=i-1,p=i===0?o:[""],b=Pu(p),h=0,g=0,m=0;h<r;++h)for(var E=0,A=rs(e,f+1,f=qy(g=s[h])),_=e;E<b;++E)(_=_h(g>0?p[E]+" "+A:We(A,/&\f/g,p[E])))&&(l[m++]=_);return tl(e,t,n,i===0?Ou:a,l,c,u)}function t0(e,t,n){return tl(e,t,n,bh,Za(Gy()),rs(e,2,-2),0)}function xd(e,t,n,r){return tl(e,t,n,Iu,rs(e,0,r),rs(e,r+1,-1),r)}function Xi(e,t){for(var n="",r=Pu(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function n0(e,t,n,r){switch(e.type){case Uy:if(e.children.length)break;case zy:case Iu:return e.return=e.return||e.value;case bh:return"";case wh:return e.return=e.value+"{"+Xi(e.children,r)+"}";case Ou:e.value=e.props.join(",")}return Qn(n=Xi(e.children,r))?e.return=e.value+"{"+n+"}":""}function r0(e){var t=Pu(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function i0(e){return function(t){t.root||(t=t.return)&&e(t)}}function o0(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var s0=function(t,n,r){for(var i=0,o=0;i=o,o=Zn(),i===38&&o===12&&(n[r]=1),!is(o);)on();return ys(t,Jt)},a0=function(t,n){var r=-1,i=44;do switch(is(i)){case 0:i===38&&Zn()===12&&(n[r]=1),t[r]+=s0(Jt-1,n,r);break;case 2:t[r]+=_a(i);break;case 4:if(i===44){t[++r]=Zn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Za(i)}while(i=on());return t},l0=function(t,n){return Eh(a0(Sh(t),n))},Cd=new WeakMap,c0=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Cd.get(r))&&!i){Cd.set(t,!0);for(var o=[],s=l0(n,o),a=r.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)t.props[c]=o[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},u0=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xh(e,t){switch(Vy(e,t)){case 5103:return Ve+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ve+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ve+e+Oa+e+Mt+e+e;case 6828:case 4268:return Ve+e+Mt+e+e;case 6165:return Ve+e+Mt+"flex-"+e+e;case 5187:return Ve+e+We(e,/(\w+).+(:[^]+)/,Ve+"box-$1$2"+Mt+"flex-$1$2")+e;case 5443:return Ve+e+Mt+"flex-item-"+We(e,/flex-|-self/,"")+e;case 4675:return Ve+e+Mt+"flex-line-pack"+We(e,/align-content|flex-|-self/,"")+e;case 5548:return Ve+e+Mt+We(e,"shrink","negative")+e;case 5292:return Ve+e+Mt+We(e,"basis","preferred-size")+e;case 6060:return Ve+"box-"+We(e,"-grow","")+Ve+e+Mt+We(e,"grow","positive")+e;case 4554:return Ve+We(e,/([^-])(transform)/g,"$1"+Ve+"$2")+e;case 6187:return We(We(We(e,/(zoom-|grab)/,Ve+"$1"),/(image-set)/,Ve+"$1"),e,"")+e;case 5495:case 3959:return We(e,/(image-set\([^]*)/,Ve+"$1$`$1");case 4968:return We(We(e,/(.+:)(flex-)?(.*)/,Ve+"box-pack:$3"+Mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ve+e+e;case 4095:case 3583:case 4068:case 2532:return We(e,/(.+)-inline(.+)/,Ve+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qn(e)-1-t>6)switch(Pt(e,t+1)){case 109:if(Pt(e,t+4)!==45)break;case 102:return We(e,/(.+:)(.+)-([^]+)/,"$1"+Ve+"$2-$3$1"+Oa+(Pt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Uc(e,"stretch")?xh(We(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pt(e,t+1)!==115)break;case 6444:switch(Pt(e,Qn(e)-3-(~Uc(e,"!important")&&10))){case 107:return We(e,":",":"+Ve)+e;case 101:return We(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ve+(Pt(e,14)===45?"inline-":"")+"box$3$1"+Ve+"$2$3$1"+Mt+"$2box$3")+e}break;case 5936:switch(Pt(e,t+11)){case 114:return Ve+e+Mt+We(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ve+e+Mt+We(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ve+e+Mt+We(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ve+e+Mt+e+e}return e}var d0=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Iu:t.return=xh(t.value,t.length);break;case wh:return Xi([Co(t,{value:We(t.value,"@","@"+Ve)})],i);case Ou:if(t.length)return Ky(t.props,function(o){switch(Wy(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Xi([Co(t,{props:[We(o,/:(read-\w+)/,":"+Oa+"$1")]})],i);case"::placeholder":return Xi([Co(t,{props:[We(o,/:(plac\w+)/,":"+Ve+"input-$1")]}),Co(t,{props:[We(o,/:(plac\w+)/,":"+Oa+"$1")]}),Co(t,{props:[We(o,/:(plac\w+)/,Mt+"input-$1")]})],i)}return""})}},f0=[d0],p0=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||f0,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),E=1;E<m.length;E++)o[m[E]]=!0;a.push(g)});var l,c=[c0,u0];{var u,f=[n0,i0(function(g){u.insert(g)})],p=r0(c.concat(i,f)),b=function(m){return Xi(e0(m),p)};l=function(m,E,A,_){u=A,b(m?m+"{"+E.styles+"}":E.styles),_&&(h.inserted[E.name]=!0)}}var h={key:n,sheet:new jy({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return h.sheet.hydrate(a),h},Vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ws={exports:{}},Ye={};var Td;function h0(){if(Td)return Ye;Td=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(d){if(typeof d=="object"&&d!==null){var w=d.$$typeof;switch(w){case t:switch(d=d.type,d){case l:case c:case r:case o:case i:case f:return d;default:switch(d=d&&d.$$typeof,d){case a:case u:case h:case b:case s:return d;default:return w}}case n:return w}}}function x(d){return _(d)===c}return Ye.AsyncMode=l,Ye.ConcurrentMode=c,Ye.ContextConsumer=a,Ye.ContextProvider=s,Ye.Element=t,Ye.ForwardRef=u,Ye.Fragment=r,Ye.Lazy=h,Ye.Memo=b,Ye.Portal=n,Ye.Profiler=o,Ye.StrictMode=i,Ye.Suspense=f,Ye.isAsyncMode=function(d){return x(d)||_(d)===l},Ye.isConcurrentMode=x,Ye.isContextConsumer=function(d){return _(d)===a},Ye.isContextProvider=function(d){return _(d)===s},Ye.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Ye.isForwardRef=function(d){return _(d)===u},Ye.isFragment=function(d){return _(d)===r},Ye.isLazy=function(d){return _(d)===h},Ye.isMemo=function(d){return _(d)===b},Ye.isPortal=function(d){return _(d)===n},Ye.isProfiler=function(d){return _(d)===o},Ye.isStrictMode=function(d){return _(d)===i},Ye.isSuspense=function(d){return _(d)===f},Ye.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===c||d===o||d===i||d===f||d===p||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===b||d.$$typeof===s||d.$$typeof===a||d.$$typeof===u||d.$$typeof===m||d.$$typeof===E||d.$$typeof===A||d.$$typeof===g)},Ye.typeOf=_,Ye}var Je={};var Ad;function g0(){return Ad||(Ad=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===o||B===i||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===b||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===m||B.$$typeof===E||B.$$typeof===A||B.$$typeof===g)}function x(B){if(typeof B=="object"&&B!==null){var we=B.$$typeof;switch(we){case t:var be=B.type;switch(be){case l:case c:case r:case o:case i:case f:return be;default:var Ce=be&&be.$$typeof;switch(Ce){case a:case u:case h:case b:case s:return Ce;default:return we}}case n:return we}}}var d=l,w=c,S=a,C=s,R=t,k=u,T=r,y=h,I=b,O=n,L=o,z=i,X=f,H=!1;function Q(B){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(B)||x(B)===l}function F(B){return x(B)===c}function U(B){return x(B)===a}function ae(B){return x(B)===s}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return x(B)===u}function oe(B){return x(B)===r}function ce(B){return x(B)===h}function q(B){return x(B)===b}function re(B){return x(B)===n}function Y(B){return x(B)===o}function W(B){return x(B)===i}function fe(B){return x(B)===f}Je.AsyncMode=d,Je.ConcurrentMode=w,Je.ContextConsumer=S,Je.ContextProvider=C,Je.Element=R,Je.ForwardRef=k,Je.Fragment=T,Je.Lazy=y,Je.Memo=I,Je.Portal=O,Je.Profiler=L,Je.StrictMode=z,Je.Suspense=X,Je.isAsyncMode=Q,Je.isConcurrentMode=F,Je.isContextConsumer=U,Je.isContextProvider=ae,Je.isElement=te,Je.isForwardRef=J,Je.isFragment=oe,Je.isLazy=ce,Je.isMemo=q,Je.isPortal=re,Je.isProfiler=Y,Je.isStrictMode=W,Je.isSuspense=fe,Je.isValidElementType=_,Je.typeOf=x})()),Je}var kd;function m0(){return kd||(kd=1,process.env.NODE_ENV==="production"?Ws.exports=h0():Ws.exports=g0()),Ws.exports}var Hl,Rd;function y0(){if(Rd)return Hl;Rd=1;var e=m0(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function s(h){return e.isMemo(h)?i:o[h.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function b(h,g,m){if(typeof g!="string"){if(p){var E=f(g);E&&E!==p&&b(h,E,m)}var A=l(g);c&&(A=A.concat(c(g)));for(var _=s(h),x=s(g),d=0;d<A.length;++d){var w=A[d];if(!n[w]&&!(m&&m[w])&&!(x&&x[w])&&!(_&&_[w])){var S=u(g,w);try{a(h,w,S)}catch{}}}}return h}return Hl=b,Hl}y0();var b0=!0;function w0(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Ch=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||b0===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},_0=function(t,n,r){Ch(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function v0(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var S0={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},E0=/[A-Z]|^ms/g,x0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Th=function(t){return t.charCodeAt(1)===45},Od=function(t){return t!=null&&typeof t!="boolean"},Vl=o0(function(e){return Th(e)?e:e.replace(E0,"-$&").toLowerCase()}),Id=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(x0,function(r,i,o){return Yn={name:i,styles:o,next:Yn},i})}return S0[t]!==1&&!Th(t)&&typeof n=="number"&&n!==0?n+"px":n};function os(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return Yn={name:i.name,styles:i.styles,next:Yn},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Yn={name:s.name,styles:s.styles,next:Yn},s=s.next;var a=o.styles+";";return a}return C0(e,t,n)}case"function":{if(e!==void 0){var l=Yn,c=n(e);return Yn=l,os(e,t,c)}break}}var u=n;return u}function C0(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=os(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;Od(a)&&(r+=Vl(o)+":"+Id(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)Od(s[l])&&(r+=Vl(o)+":"+Id(o,s[l])+";");else{var c=os(e,t,s);switch(o){case"animation":case"animationName":{r+=Vl(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var Pd=/label:\s*([^\s;{]+)\s*(;|$)/g,Yn;function Ah(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";Yn=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=os(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=os(n,t,e[a]),r){var l=o;i+=l[a]}Pd.lastIndex=0;for(var c="",u;(u=Pd.exec(i))!==null;)c+="-"+u[1];var f=v0(i)+c;return{name:f,styles:i,next:Yn}}var T0=function(t){return t()},A0=Ke.useInsertionEffect?Ke.useInsertionEffect:!1,k0=A0||T0,kh=Ke.createContext(typeof HTMLElement<"u"?p0({key:"css"}):null);kh.Provider;var R0=function(t){return D.forwardRef(function(n,r){var i=D.useContext(kh);return t(n,i,r)})},O0=Ke.createContext({}),nl={}.hasOwnProperty,Hc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Rh=function(t,n){var r={};for(var i in n)nl.call(n,i)&&(r[i]=n[i]);return r[Hc]=t,r},I0=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Ch(n,r,i),k0(function(){return _0(n,r,i)}),null},P0=R0(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Hc],o=[r],s="";typeof e.className=="string"?s=w0(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var a=Ah(o,void 0,Ke.useContext(O0));s+=t.key+"-"+a.name;var l={};for(var c in e)nl.call(e,c)&&c!=="css"&&c!==Hc&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),Ke.createElement(Ke.Fragment,null,Ke.createElement(I0,{cache:t,serialized:a,isStringTag:typeof i=="string"}),Ke.createElement(i,l))}),Oh=P0,Ur=ns.Fragment,M=function(t,n,r){return nl.call(n,"css")?ns.jsx(Oh,Rh(t,n),r):ns.jsx(t,n,r)},ne=function(t,n,r){return nl.call(n,"css")?ns.jsxs(Oh,Rh(t,n),r):ns.jsxs(t,n,r)};const gn={DEBUG:0,INFO:1,WARN:2,ERROR:3},Ih={level:process.env.NODE_ENV==="production"?gn.WARN:gn.DEBUG,prefix:"[DQM]",timestamps:!1};let tn={...Ih};const Vc="dqm_debug";function Ph(){try{return localStorage.getItem(Vc)==="true"}catch{return!1}}function Cn(){return Ph()?gn.DEBUG:tn.level}function Ks(e,t){const n=[];return tn.timestamps&&n.push(`[${new Date().toISOString()}]`),n.push(tn.prefix),n.push(`[${e}]`),[...n,...t]}const le={debug(...e){Cn()<=gn.DEBUG&&console.debug(...Ks("DEBUG",e))},info(...e){Cn()<=gn.INFO&&console.info(...Ks("INFO",e))},warn(...e){Cn()<=gn.WARN&&console.warn(...Ks("WARN",e))},error(...e){Cn()<=gn.ERROR&&console.error(...Ks("ERROR",e))},log(e,...t){Cn()<=e},group(e){Cn()<=gn.DEBUG&&console.groupCollapsed(`${tn.prefix} ${e}`)},groupEnd(){Cn()<=gn.DEBUG&&console.groupEnd()},table(e,t){Cn()<=gn.DEBUG&&console.table(e,t)},time(e){Cn()<=gn.DEBUG&&console.time(`${tn.prefix} ${e}`)},timeEnd(e){Cn()<=gn.DEBUG&&console.timeEnd(`${tn.prefix} ${e}`)},configure(e){tn={...tn,...e}},reset(){tn={...Ih}},enableDebug(){try{localStorage.setItem(Vc,"true"),console.info(`${tn.prefix} Debug mode enabled`)}catch{console.warn(`${tn.prefix} Could not persist debug mode to localStorage`)}},disableDebug(){try{localStorage.removeItem(Vc),console.info(`${tn.prefix} Debug mode disabled`)}catch{}},isDebugEnabled:Ph,getLevel(){return Cn()},setLevel(e){tn.level=e}},N0=(e,t,n,r)=>{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);pi(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Nd={},Wc=(e,t,n,r)=>{pi(n)&&Nd[n]||(pi(n)&&(Nd[n]=new Date),N0(e,t,n,r))},Nh=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Kc=(e,t,n)=>{e.loadNamespaces(t,Nh(e,n))},Md=(e,t,n,r)=>{if(pi(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Kc(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,Nh(e,r))},M0=(e,t,n={})=>!t.languages||!t.languages.length?(Wc(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),pi=e=>typeof e=="string",D0=e=>typeof e=="object"&&e!==null,L0=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,$0={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},B0=e=>$0[e],F0=e=>e.replace(L0,B0);let Gc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:F0};const j0=(e={})=>{Gc={...Gc,...e}},z0=()=>Gc;let Mh;const U0=e=>{Mh=e},q0=()=>Mh,H0={type:"3rdParty",init(e){j0(e.options.react),U0(e)}},Dh=D.createContext();class V0{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const W0=(e,t)=>{const n=D.useRef();return D.useEffect(()=>{n.current=e},[e,t]),n.current},Lh=(e,t,n,r)=>e.getFixedT(t,n,r),K0=(e,t,n,r)=>D.useCallback(Lh(e,t,n,r),[e,t,n,r]),Rr=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=D.useContext(Dh)||{},o=n||r||q0();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new V0),!o){Wc(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const x=(w,S)=>pi(S)?S:D0(S)&&pi(S.defaultValue)?S.defaultValue:Array.isArray(w)?w[w.length-1]:w,d=[x,{},!1];return d.t=x,d.i18n={},d.ready=!1,d}o.options.react?.wait&&Wc(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...z0(),...o.options.react,...t},{useSuspense:a,keyPrefix:l}=s;let c=e||i||o.options?.defaultNS;c=pi(c)?[c]:c||["translation"],o.reportNamespaces.addUsedNamespaces?.(c);const u=(o.isInitialized||o.initializedStoreOnce)&&c.every(x=>M0(x,o,s)),f=K0(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),p=()=>f,b=()=>Lh(o,t.lng||null,s.nsMode==="fallback"?c:c[0],l),[h,g]=D.useState(p);let m=c.join();t.lng&&(m=`${t.lng}${m}`);const E=W0(m),A=D.useRef(!0);D.useEffect(()=>{const{bindI18n:x,bindI18nStore:d}=s;A.current=!0,!u&&!a&&(t.lng?Md(o,t.lng,c,()=>{A.current&&g(b)}):Kc(o,c,()=>{A.current&&g(b)})),u&&E&&E!==m&&A.current&&g(b);const w=()=>{A.current&&g(b)};return x&&o?.on(x,w),d&&o?.store.on(d,w),()=>{A.current=!1,o&&x&&x?.split(" ").forEach(S=>o.off(S,w)),d&&o&&d.split(" ").forEach(S=>o.store.off(S,w))}},[o,m]),D.useEffect(()=>{A.current&&u&&g(p)},[o,l,u]);const _=[h,o,u];if(_.t=h,_.i18n=o,_.ready=u,u||!u&&!a)return _;throw new Promise(x=>{t.lng?Md(o,t.lng,c,()=>x()):Kc(o,c,()=>x())})};function G0({i18n:e,defaultNS:t,children:n}){const r=D.useMemo(()=>({i18n:e,defaultNS:t}),[e,t]);return D.createElement(Dh.Provider,{value:r},n)}var Gs={exports:{}},Wl={};var Dd;function Q0(){if(Dd)return Wl;Dd=1;var e=D;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,a=e.useDebugValue;return Wl.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var b=i(null);if(b.current===null){var h={hasValue:!1,value:null};b.current=h}else h=b.current;b=s(function(){function m(d){if(!E){if(E=!0,A=d,d=f(d),p!==void 0&&h.hasValue){var w=h.value;if(p(w,d))return _=w}return _=d}if(w=_,n(A,d))return w;var S=f(d);return p!==void 0&&p(w,S)?(A=d,w):(A=d,_=S)}var E=!1,A,_,x=u===void 0?null:u;return[function(){return m(c())},x===null?void 0:function(){return m(x())}]},[c,u,f,p]);var g=r(l,b[0],b[1]);return o(function(){h.hasValue=!0,h.value=g},[g]),a(g),g},Wl}var Kl={};var Ld;function Y0(){return Ld||(Ld=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=D,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,s=t.useMemo,a=t.useDebugValue;Kl.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var b=i(null);if(b.current===null){var h={hasValue:!1,value:null};b.current=h}else h=b.current;b=s(function(){function m(d){if(!E){if(E=!0,A=d,d=f(d),p!==void 0&&h.hasValue){var w=h.value;if(p(w,d))return _=w}return _=d}if(w=_,n(A,d))return w;var S=f(d);return p!==void 0&&p(w,S)?(A=d,w):(A=d,_=S)}var E=!1,A,_,x=u===void 0?null:u;return[function(){return m(c())},x===null?void 0:function(){return m(x())}]},[c,u,f,p]);var g=r(l,b[0],b[1]);return o(function(){h.hasValue=!0,h.value=g},[g]),a(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kl}var $d;function J0(){return $d||($d=1,process.env.NODE_ENV==="production"?Gs.exports=Q0():Gs.exports=Y0()),Gs.exports}var X0=J0();function $h(e){e()}function Z0(){let e=null,t=null;return{clear(){e=null,t=null},notify(){$h(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Bd={notify(){},get:()=>[]};function eb(e,t){let n,r=Bd,i=0,o=!1;function s(g){u();const m=r.subscribe(g);let E=!1;return()=>{E||(E=!0,m(),f())}}function a(){r.notify()}function l(){h.onStateChange&&h.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=Z0())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Bd)}function p(){o||(o=!0,u())}function b(){o&&(o=!1,f())}const h={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:b,getListeners:()=>r};return h}var tb=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nb=tb(),rb=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ib=rb(),ob=()=>nb||ib?Ke.useLayoutEffect:Ke.useEffect,sb=ob();function Fd(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Yo(e,t){if(Fd(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Fd(e[n[i]],t[n[i]]))return!1;return!0}var ab=Symbol.for("react-redux-context"),lb=typeof globalThis<"u"?globalThis:{};function cb(){if(!Ke.createContext)return{};const e=lb[ab]??=new Map;let t=e.get(Ke.createContext);return t||(t=Ke.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(Ke.createContext,t)),t}var Cr=cb();function ub(e){const{children:t,context:n,serverState:r,store:i}=e,o=Ke.useMemo(()=>{const l=eb(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,r]),s=Ke.useMemo(()=>i.getState(),[i]);sb(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const a=n||Cr;return Ke.createElement(a.Provider,{value:o},t)}var db=ub;function Mu(e=Cr){return function(){const n=Ke.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var Bh=Mu();function Fh(e=Cr){const t=e===Cr?Bh:Mu(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var jh=Fh();function fb(e=Cr){const t=e===Cr?jh:Fh(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var zh=fb(),pb=(e,t)=>e===t;function hb(e=Cr){const t=e===Cr?Bh:Mu(e),n=(r,i={})=>{const{equalityFn:o=pb}=typeof i=="function"?{equalityFn:i}:i;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof o!="function")throw new Error("You must pass a function as an equality function to useSelector")}const s=t(),{store:a,subscription:l,getServerState:c}=s,u=Ke.useRef(!0),f=Ke.useCallback({[r.name](b){const h=r(b);if(process.env.NODE_ENV!=="production"){const{devModeChecks:g={}}=typeof i=="function"?{}:i,{identityFunctionCheck:m,stabilityCheck:E}=s,{identityFunctionCheck:A,stabilityCheck:_}={stabilityCheck:E,identityFunctionCheck:m,...g};if(_==="always"||_==="once"&&u.current){const x=r(b);if(!o(h,x)){let d;try{throw new Error}catch(w){({stack:d}=w)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
2
2
|
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:b,selected:h,selected2:x,stack:d})}}if((A==="always"||A==="once"&&u.current)&&h===b){let x;try{throw new Error}catch(d){({stack:x}=d)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
|
|
3
|
-
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}u.current&&(u.current=!1)}return h}}[r.name],[r]),p=X0.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,f,o);return We.useDebugValue(p),p};return Object.assign(n,{withTypes:()=>n}),n}var gb=hb(),mb=$h;function Uh(e,t){return function(){return e.apply(t,arguments)}}const{toString:yb}=Object.prototype,{getPrototypeOf:Du}=Object,{iterator:il,toStringTag:qh}=Symbol,ol=(e=>t=>{const n=yb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ln=e=>(e=e.toLowerCase(),t=>ol(t)===e),sl=e=>t=>typeof t===e,{isArray:co}=Array,eo=sl("undefined");function ms(e){return e!==null&&!eo(e)&&e.constructor!==null&&!eo(e.constructor)&&Gt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hh=Ln("ArrayBuffer");function bb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hh(e.buffer),t}const wb=sl("string"),Gt=sl("function"),Vh=sl("number"),ys=e=>e!==null&&typeof e=="object",_b=e=>e===!0||e===!1,Ea=e=>{if(ol(e)!=="object")return!1;const t=Du(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qh in e)&&!(il in e)},vb=e=>{if(!ys(e)||ms(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Sb=Ln("Date"),Eb=Ln("File"),xb=Ln("Blob"),Cb=Ln("FileList"),Tb=e=>ys(e)&&Gt(e.pipe),Ab=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Gt(e.append)&&((t=ol(e))==="formdata"||t==="object"&&Gt(e.toString)&&e.toString()==="[object FormData]"))},kb=Ln("URLSearchParams"),[Rb,Ob,Ib,Pb]=["ReadableStream","Request","Response","Headers"].map(Ln),Nb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),co(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ms(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function Wh(e,t){if(ms(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kh=e=>!eo(e)&&e!==pi;function Qc(){const{caseless:e,skipUndefined:t}=Kh(this)&&this||{},n={},r=(i,o)=>{const s=e&&Wh(n,o)||o;Ea(n[s])&&Ea(i)?n[s]=Qc(n[s],i):Ea(i)?n[s]=Qc({},i):co(i)?n[s]=i.slice():(!t||!eo(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&bs(arguments[i],r);return n}const Mb=(e,t,n,{allOwnKeys:r}={})=>(bs(t,(i,o)=>{n&&Gt(i)?e[o]=Uh(i,n):e[o]=i},{allOwnKeys:r}),e),Db=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lb=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},$b=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Du(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Bb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Fb=e=>{if(!e)return null;if(co(e))return e;let t=e.length;if(!Vh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Du(Uint8Array)),zb=(e,t)=>{const r=(e&&e[il]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ub=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},qb=Ln("HTMLFormElement"),Hb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vb=Ln("RegExp"),Gh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bs(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Wb=e=>{Gh(e,(t,n)=>{if(Gt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Gt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Kb=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return co(e)?r(e):r(String(e).split(t)),n},Gb=()=>{},Qb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yb(e){return!!(e&&Gt(e.append)&&e[qh]==="FormData"&&e[il])}const Jb=e=>{const t=new Array(10),n=(r,i)=>{if(ys(r)){if(t.indexOf(r)>=0)return;if(ms(r))return r;if(!("toJSON"in r)){t[i]=r;const o=co(r)?[]:{};return bs(r,(s,a)=>{const l=n(s,i+1);!eo(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},Xb=Ln("AsyncFunction"),Zb=e=>e&&(ys(e)||Gt(e))&&Gt(e.then)&&Gt(e.catch),Qh=((e,t)=>e?setImmediate:t?((n,r)=>(pi.addEventListener("message",({source:i,data:o})=>{i===pi&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),pi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Gt(pi.postMessage)),e1=typeof queueMicrotask<"u"?queueMicrotask.bind(pi):typeof process<"u"&&process.nextTick||Qh,t1=e=>e!=null&&Gt(e[il]),H={isArray:co,isArrayBuffer:Hh,isBuffer:ms,isFormData:Ab,isArrayBufferView:bb,isString:wb,isNumber:Vh,isBoolean:_b,isObject:ys,isPlainObject:Ea,isEmptyObject:vb,isReadableStream:Rb,isRequest:Ob,isResponse:Ib,isHeaders:Pb,isUndefined:eo,isDate:Sb,isFile:Eb,isBlob:xb,isRegExp:Vb,isFunction:Gt,isStream:Tb,isURLSearchParams:kb,isTypedArray:jb,isFileList:Cb,forEach:bs,merge:Qc,extend:Mb,trim:Nb,stripBOM:Db,inherits:Lb,toFlatObject:$b,kindOf:ol,kindOfTest:Ln,endsWith:Bb,toArray:Fb,forEachEntry:zb,matchAll:Ub,isHTMLForm:qb,hasOwnProperty:jd,hasOwnProp:jd,reduceDescriptors:Gh,freezeMethods:Wb,toObjectSet:Kb,toCamelCase:Hb,noop:Gb,toFiniteNumber:Qb,findKey:Wh,global:pi,isContextDefined:Kh,isSpecCompliantForm:Yb,toJSONObject:Jb,isAsyncFn:Xb,isThenable:Zb,setImmediate:Qh,asap:e1,isIterable:t1};function Oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}H.inherits(Oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Yh=Oe.prototype,Jh={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Jh[e]={value:e}});Object.defineProperties(Oe,Jh);Object.defineProperty(Yh,"isAxiosError",{value:!0});Oe.from=(e,t,n,r,i,o)=>{const s=Object.create(Yh);H.toFlatObject(e,s,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return Oe.call(s,a,l,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const n1=null;function Yc(e){return H.isPlainObject(e)||H.isArray(e)}function Xh(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function zd(e,t,n){return e?e.concat(t).map(function(i,o){return i=Xh(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function r1(e){return H.isArray(e)&&!e.some(Yc)}const i1=H.toFlatObject(H,{},null,function(t){return/^is[A-Z]/.test(t)});function al(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!H.isUndefined(m[g])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(H.isDate(h))return h.toISOString();if(H.isBoolean(h))return h.toString();if(!l&&H.isBlob(h))throw new Oe("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(h)||H.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,g,m){let E=h;if(h&&!m&&typeof h=="object"){if(H.endsWith(g,"{}"))g=r?g:g.slice(0,-2),h=JSON.stringify(h);else if(H.isArray(h)&&r1(h)||(H.isFileList(h)||H.endsWith(g,"[]"))&&(E=H.toArray(h)))return g=Xh(g),E.forEach(function(_,x){!(H.isUndefined(_)||_===null)&&t.append(s===!0?zd([g],x,o):s===null?g:g+"[]",c(_))}),!1}return Yc(h)?!0:(t.append(zd(m,g,o),c(h)),!1)}const f=[],p=Object.assign(i1,{defaultVisitor:u,convertValue:c,isVisitable:Yc});function b(h,g){if(!H.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(h),H.forEach(h,function(E,A){(!(H.isUndefined(E)||E===null)&&i.call(t,E,H.isString(A)?A.trim():A,g,p))===!0&&b(E,g?g.concat(A):[A])}),f.pop()}}if(!H.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ud(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Lu(e,t){this._pairs=[],e&&al(e,this,t)}const Zh=Lu.prototype;Zh.append=function(t,n){this._pairs.push([t,n])};Zh.toString=function(t){const n=t?function(r){return t.call(this,r,Ud)}:Ud;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function o1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eg(e,t,n){if(!t)return e;const r=n&&n.encode||o1;H.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=H.isURLSearchParams(t)?t.toString():new Lu(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class qd{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){H.forEach(this.handlers,function(r){r!==null&&t(r)})}}const tg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},s1=typeof URLSearchParams<"u"?URLSearchParams:Lu,a1=typeof FormData<"u"?FormData:null,l1=typeof Blob<"u"?Blob:null,c1={isBrowser:!0,classes:{URLSearchParams:s1,FormData:a1,Blob:l1},protocols:["http","https","file","blob","url","data"]},$u=typeof window<"u"&&typeof document<"u",Jc=typeof navigator=="object"&&navigator||void 0,u1=$u&&(!Jc||["ReactNative","NativeScript","NS"].indexOf(Jc.product)<0),d1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",f1=$u&&window.location.href||"http://localhost",p1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$u,hasStandardBrowserEnv:u1,hasStandardBrowserWebWorkerEnv:d1,navigator:Jc,origin:f1},Symbol.toStringTag,{value:"Module"})),Dt={...p1,...c1};function h1(e,t){return al(e,new Dt.classes.URLSearchParams,{visitor:function(n,r,i,o){return Dt.isNode&&H.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function g1(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function m1(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function ng(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&H.isArray(i)?i.length:s,l?(H.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!H.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&H.isArray(i[s])&&(i[s]=m1(i[s])),!a)}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(r,i)=>{t(g1(r),i,n,0)}),n}return null}function y1(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ws={transitional:tg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=H.isObject(t);if(o&&H.isHTMLForm(t)&&(t=new FormData(t)),H.isFormData(t))return i?JSON.stringify(ng(t)):t;if(H.isArrayBuffer(t)||H.isBuffer(t)||H.isStream(t)||H.isFile(t)||H.isBlob(t)||H.isReadableStream(t))return t;if(H.isArrayBufferView(t))return t.buffer;if(H.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return h1(t,this.formSerializer).toString();if((a=H.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return al(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),y1(t)):t}],transformResponse:[function(t){const n=this.transitional||ws.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(H.isResponse(t)||H.isReadableStream(t))return t;if(t&&H.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?Oe.from(a,Oe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dt.classes.FormData,Blob:Dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ws.headers[e]={}});const b1=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w1=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
4
|
-
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&b1[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Hd=Symbol("internals");function
|
|
5
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Hd]=this[Hd]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=xo(s);r[a]||(E1(i,s),r[a]=!0)}return H.isArray(t)?t.forEach(o):o(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Qt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});H.freezeMethods(Qt);function Ql(e,t){const n=this||ws,r=t||n,i=Qt.from(r.headers);let o=r.data;return H.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function rg(e){return!!(e&&e.__CANCEL__)}function uo(e,t,n){Oe.call(this,e??"canceled",Oe.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(uo,Oe,{__CANCEL__:!0});function ig(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Oe("Request failed with status code "+n.status,[Oe.ERR_BAD_REQUEST,Oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function x1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function C1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const b=u&&c-u;return b?Math.round(p*1e3/b):void 0}}function T1(e,t){let n=0,r=1e3/t,i,o;const s=(c,u=Date.now())=>{n=u,i=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Pa=(e,t,n=3)=>{let r=0;const i=C1(50,250);return T1(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},Vd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Wd=e=>(...t)=>H.asap(()=>e(...t)),A1=Dt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Dt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Dt.origin),Dt.navigator&&/(msie|trident)/i.test(Dt.navigator.userAgent)):()=>!0,k1=Dt.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];H.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),H.isString(r)&&a.push(`path=${r}`),H.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),H.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function R1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function O1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function og(e,t,n){let r=!R1(t);return e&&(r||n==!1)?O1(e,t):t}const Kd=e=>e instanceof Qt?{...e}:e;function _i(e,t){t=t||{};const n={};function r(c,u,f,p){return H.isPlainObject(c)&&H.isPlainObject(u)?H.merge.call({caseless:p},c,u):H.isPlainObject(u)?H.merge({},u):H.isArray(u)?u.slice():u}function i(c,u,f,p){if(H.isUndefined(u)){if(!H.isUndefined(c))return r(void 0,c,f,p)}else return r(c,u,f,p)}function o(c,u){if(!H.isUndefined(u))return r(void 0,u)}function s(c,u){if(H.isUndefined(u)){if(!H.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u,f)=>i(Kd(c),Kd(u),f,!0)};return H.forEach(Object.keys({...e,...t}),function(u){const f=l[u]||i,p=f(e[u],t[u],u);H.isUndefined(p)&&f!==a||(n[u]=p)}),n}const sg=e=>{const t=_i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Qt.from(s),t.url=eg(og(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),H.isFormData(n)){if(Dt.hasStandardBrowserEnv||Dt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(H.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,f])=>{c.includes(u.toLowerCase())&&s.set(u,f)})}}if(Dt.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||r!==!1&&A1(t.url))){const l=i&&o&&k1.read(o);l&&s.set(i,l)}return t},I1=typeof XMLHttpRequest<"u",P1=I1&&function(e){return new Promise(function(n,r){const i=sg(e);let o=i.data;const s=Qt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,p,b,h;function g(){b&&b(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function E(){if(!m)return;const _=Qt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),d={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:_,config:e,request:m};ig(function(S){n(S),g()},function(S){r(S),g()},d),m=null}"onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(E)},m.onabort=function(){m&&(r(new Oe("Request aborted",Oe.ECONNABORTED,e,m)),m=null)},m.onerror=function(x){const d=x&&x.message?x.message:"Network Error",w=new Oe(d,Oe.ERR_NETWORK,e,m);w.event=x||null,r(w),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const d=i.transitional||tg;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new Oe(x,d.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&H.forEach(s.toJSON(),function(x,d){m.setRequestHeader(d,x)}),H.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),c&&([p,h]=Pa(c,!0),m.addEventListener("progress",p)),l&&m.upload&&([f,b]=Pa(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(u=_=>{m&&(r(!_||_.type?new uo(null,e,m):_),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const A=x1(i.url);if(A&&Dt.protocols.indexOf(A)===-1){r(new Oe("Unsupported protocol "+A+":",Oe.ERR_BAD_REQUEST,e));return}m.send(o||null)})},N1=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Oe?u:new uo(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new Oe(`timeout ${t} of ms exceeded`,Oe.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>H.asap(a),l}},M1=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},D1=async function*(e,t){for await(const n of L1(e))yield*M1(n,t)},L1=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Gd=(e,t,n,r)=>{const i=D1(e,t);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let p=o+=f;n(p)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Qd=64*1024,{isFunction:Ys}=H,$1=(({Request:e,Response:t})=>({Request:e,Response:t}))(H.global),{ReadableStream:Yd,TextEncoder:Jd}=H.global,Xd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},B1=e=>{e=H.merge.call({skipUndefined:!0},$1,e);const{fetch:t,Request:n,Response:r}=e,i=t?Ys(t):typeof fetch=="function",o=Ys(n),s=Ys(r);if(!i)return!1;const a=i&&Ys(Yd),l=i&&(typeof Jd=="function"?(h=>g=>h.encode(g))(new Jd):async h=>new Uint8Array(await new n(h).arrayBuffer())),c=o&&a&&Xd(()=>{let h=!1;const g=new n(Dt.origin,{body:new Yd,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!g}),u=s&&a&&Xd(()=>H.isReadableStream(new r("").body)),f={stream:u&&(h=>h.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!f[h]&&(f[h]=(g,m)=>{let E=g&&g[h];if(E)return E.call(g);throw new Oe(`Response type '${h}' is not supported`,Oe.ERR_NOT_SUPPORT,m)})});const p=async h=>{if(h==null)return 0;if(H.isBlob(h))return h.size;if(H.isSpecCompliantForm(h))return(await new n(Dt.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(H.isArrayBufferView(h)||H.isArrayBuffer(h))return h.byteLength;if(H.isURLSearchParams(h)&&(h=h+""),H.isString(h))return(await l(h)).byteLength},b=async(h,g)=>{const m=H.toFiniteNumber(h.getContentLength());return m??p(g)};return async h=>{let{url:g,method:m,data:E,signal:A,cancelToken:_,timeout:x,onDownloadProgress:d,onUploadProgress:w,responseType:S,headers:C,withCredentials:R="same-origin",fetchOptions:k}=sg(h),T=t||fetch;S=S?(S+"").toLowerCase():"text";let y=N1([A,_&&_.toAbortSignal()],x),I=null;const O=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let L;try{if(w&&c&&m!=="get"&&m!=="head"&&(L=await b(C,E))!==0){let z=new n(g,{method:"POST",body:E,duplex:"half"}),se;if(H.isFormData(E)&&(se=z.headers.get("content-type"))&&C.setContentType(se),z.body){const[te,J]=Vd(L,Pa(Wd(w)));E=Gd(z.body,Qd,te,J)}}H.isString(R)||(R=R?"include":"omit");const U=o&&"credentials"in n.prototype,Z={...k,signal:y,method:m.toUpperCase(),headers:C.normalize().toJSON(),body:E,duplex:"half",credentials:U?R:void 0};I=o&&new n(g,Z);let V=await(o?T(I,k):T(g,Z));const Q=u&&(S==="stream"||S==="response");if(u&&(d||Q&&O)){const z={};["status","statusText","headers"].forEach(oe=>{z[oe]=V[oe]});const se=H.toFiniteNumber(V.headers.get("content-length")),[te,J]=d&&Vd(se,Pa(Wd(d),!0))||[];V=new r(Gd(V.body,Qd,te,()=>{J&&J(),O&&O()}),z)}S=S||"text";let F=await f[H.findKey(f,S)||"text"](V,h);return!Q&&O&&O(),await new Promise((z,se)=>{ig(z,se,{data:F,headers:Qt.from(V.headers),status:V.status,statusText:V.statusText,config:h,request:I})})}catch(U){throw O&&O(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new Oe("Network Error",Oe.ERR_NETWORK,h,I),{cause:U.cause||U}):Oe.from(U,U&&U.code,h,I)}}},F1=new Map,ag=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,a=s,l,c,u=F1;for(;a--;)l=o[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:B1(t)),u=c;return c};ag();const Bu={http:n1,xhr:P1,fetch:{get:ag}};H.forEach(Bu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Zd=e=>`- ${e}`,j1=e=>H.isFunction(e)||e===null||e===!1;function z1(e,t){e=H.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let a;if(i=r,!j1(r)&&(i=Bu[(a=String(r)).toLowerCase()],i===void 0))throw new Oe(`Unknown adapter '${a}'`);if(i&&(H.isFunction(i)||(i=i.get(t))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
|
3
|
+
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}u.current&&(u.current=!1)}return h}}[r.name],[r]),p=X0.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,f,o);return Ke.useDebugValue(p),p};return Object.assign(n,{withTypes:()=>n}),n}var gb=hb(),mb=$h;function Uh(e,t){return function(){return e.apply(t,arguments)}}const{toString:yb}=Object.prototype,{getPrototypeOf:Du}=Object,{iterator:rl,toStringTag:qh}=Symbol,il=(e=>t=>{const n=yb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Dn=e=>(e=e.toLowerCase(),t=>il(t)===e),ol=e=>t=>typeof t===e,{isArray:uo}=Array,to=ol("undefined");function bs(e){return e!==null&&!to(e)&&e.constructor!==null&&!to(e.constructor)&&Qt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hh=Dn("ArrayBuffer");function bb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hh(e.buffer),t}const wb=ol("string"),Qt=ol("function"),Vh=ol("number"),ws=e=>e!==null&&typeof e=="object",_b=e=>e===!0||e===!1,Sa=e=>{if(il(e)!=="object")return!1;const t=Du(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qh in e)&&!(rl in e)},vb=e=>{if(!ws(e)||bs(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Sb=Dn("Date"),Eb=Dn("File"),xb=Dn("Blob"),Cb=Dn("FileList"),Tb=e=>ws(e)&&Qt(e.pipe),Ab=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qt(e.append)&&((t=il(e))==="formdata"||t==="object"&&Qt(e.toString)&&e.toString()==="[object FormData]"))},kb=Dn("URLSearchParams"),[Rb,Ob,Ib,Pb]=["ReadableStream","Request","Response","Headers"].map(Dn),Nb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _s(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),uo(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(bs(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function Wh(e,t){if(bs(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const di=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Kh=e=>!to(e)&&e!==di;function Qc(){const{caseless:e,skipUndefined:t}=Kh(this)&&this||{},n={},r=(i,o)=>{const s=e&&Wh(n,o)||o;Sa(n[s])&&Sa(i)?n[s]=Qc(n[s],i):Sa(i)?n[s]=Qc({},i):uo(i)?n[s]=i.slice():(!t||!to(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&_s(arguments[i],r);return n}const Mb=(e,t,n,{allOwnKeys:r}={})=>(_s(t,(i,o)=>{n&&Qt(i)?e[o]=Uh(i,n):e[o]=i},{allOwnKeys:r}),e),Db=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Lb=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},$b=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Du(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Bb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Fb=e=>{if(!e)return null;if(uo(e))return e;let t=e.length;if(!Vh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},jb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Du(Uint8Array)),zb=(e,t)=>{const r=(e&&e[rl]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},Ub=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},qb=Dn("HTMLFormElement"),Hb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Vb=Dn("RegExp"),Gh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_s(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},Wb=e=>{Gh(e,(t,n)=>{if(Qt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Qt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Kb=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return uo(e)?r(e):r(String(e).split(t)),n},Gb=()=>{},Qb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yb(e){return!!(e&&Qt(e.append)&&e[qh]==="FormData"&&e[rl])}const Jb=e=>{const t=new Array(10),n=(r,i)=>{if(ws(r)){if(t.indexOf(r)>=0)return;if(bs(r))return r;if(!("toJSON"in r)){t[i]=r;const o=uo(r)?[]:{};return _s(r,(s,a)=>{const l=n(s,i+1);!to(l)&&(o[a]=l)}),t[i]=void 0,o}}return r};return n(e,0)},Xb=Dn("AsyncFunction"),Zb=e=>e&&(ws(e)||Qt(e))&&Qt(e.then)&&Qt(e.catch),Qh=((e,t)=>e?setImmediate:t?((n,r)=>(di.addEventListener("message",({source:i,data:o})=>{i===di&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),di.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Qt(di.postMessage)),e1=typeof queueMicrotask<"u"?queueMicrotask.bind(di):typeof process<"u"&&process.nextTick||Qh,t1=e=>e!=null&&Qt(e[rl]),V={isArray:uo,isArrayBuffer:Hh,isBuffer:bs,isFormData:Ab,isArrayBufferView:bb,isString:wb,isNumber:Vh,isBoolean:_b,isObject:ws,isPlainObject:Sa,isEmptyObject:vb,isReadableStream:Rb,isRequest:Ob,isResponse:Ib,isHeaders:Pb,isUndefined:to,isDate:Sb,isFile:Eb,isBlob:xb,isRegExp:Vb,isFunction:Qt,isStream:Tb,isURLSearchParams:kb,isTypedArray:jb,isFileList:Cb,forEach:_s,merge:Qc,extend:Mb,trim:Nb,stripBOM:Db,inherits:Lb,toFlatObject:$b,kindOf:il,kindOfTest:Dn,endsWith:Bb,toArray:Fb,forEachEntry:zb,matchAll:Ub,isHTMLForm:qb,hasOwnProperty:jd,hasOwnProp:jd,reduceDescriptors:Gh,freezeMethods:Wb,toObjectSet:Kb,toCamelCase:Hb,noop:Gb,toFiniteNumber:Qb,findKey:Wh,global:di,isContextDefined:Kh,isSpecCompliantForm:Yb,toJSONObject:Jb,isAsyncFn:Xb,isThenable:Zb,setImmediate:Qh,asap:e1,isIterable:t1};function Oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}V.inherits(Oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.status}}});const Yh=Oe.prototype,Jh={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Jh[e]={value:e}});Object.defineProperties(Oe,Jh);Object.defineProperty(Yh,"isAxiosError",{value:!0});Oe.from=(e,t,n,r,i,o)=>{const s=Object.create(Yh);V.toFlatObject(e,s,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return Oe.call(s,a,l,n,r,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const n1=null;function Yc(e){return V.isPlainObject(e)||V.isArray(e)}function Xh(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function zd(e,t,n){return e?e.concat(t).map(function(i,o){return i=Xh(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function r1(e){return V.isArray(e)&&!e.some(Yc)}const i1=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function sl(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!V.isUndefined(m[g])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(V.isDate(h))return h.toISOString();if(V.isBoolean(h))return h.toString();if(!l&&V.isBlob(h))throw new Oe("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(h)||V.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,g,m){let E=h;if(h&&!m&&typeof h=="object"){if(V.endsWith(g,"{}"))g=r?g:g.slice(0,-2),h=JSON.stringify(h);else if(V.isArray(h)&&r1(h)||(V.isFileList(h)||V.endsWith(g,"[]"))&&(E=V.toArray(h)))return g=Xh(g),E.forEach(function(_,x){!(V.isUndefined(_)||_===null)&&t.append(s===!0?zd([g],x,o):s===null?g:g+"[]",c(_))}),!1}return Yc(h)?!0:(t.append(zd(m,g,o),c(h)),!1)}const f=[],p=Object.assign(i1,{defaultVisitor:u,convertValue:c,isVisitable:Yc});function b(h,g){if(!V.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(h),V.forEach(h,function(E,A){(!(V.isUndefined(E)||E===null)&&i.call(t,E,V.isString(A)?A.trim():A,g,p))===!0&&b(E,g?g.concat(A):[A])}),f.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ud(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Lu(e,t){this._pairs=[],e&&sl(e,this,t)}const Zh=Lu.prototype;Zh.append=function(t,n){this._pairs.push([t,n])};Zh.toString=function(t){const n=t?function(r){return t.call(this,r,Ud)}:Ud;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function o1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eg(e,t,n){if(!t)return e;const r=n&&n.encode||o1;V.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=V.isURLSearchParams(t)?t.toString():new Lu(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class qd{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(r){r!==null&&t(r)})}}const tg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},s1=typeof URLSearchParams<"u"?URLSearchParams:Lu,a1=typeof FormData<"u"?FormData:null,l1=typeof Blob<"u"?Blob:null,c1={isBrowser:!0,classes:{URLSearchParams:s1,FormData:a1,Blob:l1},protocols:["http","https","file","blob","url","data"]},$u=typeof window<"u"&&typeof document<"u",Jc=typeof navigator=="object"&&navigator||void 0,u1=$u&&(!Jc||["ReactNative","NativeScript","NS"].indexOf(Jc.product)<0),d1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",f1=$u&&window.location.href||"http://localhost",p1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$u,hasStandardBrowserEnv:u1,hasStandardBrowserWebWorkerEnv:d1,navigator:Jc,origin:f1},Symbol.toStringTag,{value:"Module"})),Dt={...p1,...c1};function h1(e,t){return sl(e,new Dt.classes.URLSearchParams,{visitor:function(n,r,i,o){return Dt.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function g1(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function m1(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function ng(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&V.isArray(i)?i.length:s,l?(V.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!V.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&V.isArray(i[s])&&(i[s]=m1(i[s])),!a)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,i)=>{t(g1(r),i,n,0)}),n}return null}function y1(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const vs={transitional:tg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=V.isObject(t);if(o&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return i?JSON.stringify(ng(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return h1(t,this.formSerializer).toString();if((a=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sl(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),y1(t)):t}],transformResponse:[function(t){const n=this.transitional||vs.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?Oe.from(a,Oe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dt.classes.FormData,Blob:Dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{vs.headers[e]={}});const b1=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),w1=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
4
|
+
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&b1[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Hd=Symbol("internals");function To(e){return e&&String(e).trim().toLowerCase()}function Ea(e){return e===!1||e==null?e:V.isArray(e)?e.map(Ea):String(e)}function _1(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const v1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Gl(e,t,n,r,i){if(V.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function S1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function E1(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let Yt=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,l,c){const u=To(l);if(!u)throw new Error("header name must be a non-empty string");const f=V.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Ea(a))}const s=(a,l)=>V.forEach(a,(c,u)=>o(c,u,l));if(V.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(V.isString(t)&&(t=t.trim())&&!v1(t))s(w1(t),n);else if(V.isObject(t)&&V.isIterable(t)){let a={},l,c;for(const u of t){if(!V.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?V.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}s(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=To(t),t){const r=V.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return _1(i);if(V.isFunction(n))return n.call(this,i,r);if(V.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=To(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Gl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=To(s),s){const a=V.findKey(r,s);a&&(!n||Gl(r,r[a],a,n))&&(delete r[a],i=!0)}}return V.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Gl(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return V.forEach(this,(i,o)=>{const s=V.findKey(r,o);if(s){n[s]=Ea(i),delete n[o];return}const a=t?S1(o):String(o).trim();a!==o&&delete n[o],n[a]=Ea(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
5
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Hd]=this[Hd]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=To(s);r[a]||(E1(i,s),r[a]=!0)}return V.isArray(t)?t.forEach(o):o(t),this}};Yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(Yt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});V.freezeMethods(Yt);function Ql(e,t){const n=this||vs,r=t||n,i=Yt.from(r.headers);let o=r.data;return V.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function rg(e){return!!(e&&e.__CANCEL__)}function fo(e,t,n){Oe.call(this,e??"canceled",Oe.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(fo,Oe,{__CANCEL__:!0});function ig(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Oe("Request failed with status code "+n.status,[Oe.ERR_BAD_REQUEST,Oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function x1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function C1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[o];s||(s=c),n[i]=l,r[i]=c;let f=o,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const b=u&&c-u;return b?Math.round(p*1e3/b):void 0}}function T1(e,t){let n=0,r=1e3/t,i,o;const s=(c,u=Date.now())=>{n=u,i=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Ia=(e,t,n=3)=>{let r=0;const i=C1(50,250);return T1(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-r,c=i(l),u=s<=a;r=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},Vd=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Wd=e=>(...t)=>V.asap(()=>e(...t)),A1=Dt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Dt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Dt.origin),Dt.navigator&&/(msie|trident)/i.test(Dt.navigator.userAgent)):()=>!0,k1=Dt.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&a.push(`path=${r}`),V.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),V.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function R1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function O1(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function og(e,t,n){let r=!R1(t);return e&&(r||n==!1)?O1(e,t):t}const Kd=e=>e instanceof Yt?{...e}:e;function bi(e,t){t=t||{};const n={};function r(c,u,f,p){return V.isPlainObject(c)&&V.isPlainObject(u)?V.merge.call({caseless:p},c,u):V.isPlainObject(u)?V.merge({},u):V.isArray(u)?u.slice():u}function i(c,u,f,p){if(V.isUndefined(u)){if(!V.isUndefined(c))return r(void 0,c,f,p)}else return r(c,u,f,p)}function o(c,u){if(!V.isUndefined(u))return r(void 0,u)}function s(c,u){if(V.isUndefined(u)){if(!V.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u,f)=>i(Kd(c),Kd(u),f,!0)};return V.forEach(Object.keys({...e,...t}),function(u){const f=l[u]||i,p=f(e[u],t[u],u);V.isUndefined(p)&&f!==a||(n[u]=p)}),n}const sg=e=>{const t=bi({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Yt.from(s),t.url=eg(og(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),V.isFormData(n)){if(Dt.hasStandardBrowserEnv||Dt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(V.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,f])=>{c.includes(u.toLowerCase())&&s.set(u,f)})}}if(Dt.hasStandardBrowserEnv&&(r&&V.isFunction(r)&&(r=r(t)),r||r!==!1&&A1(t.url))){const l=i&&o&&k1.read(o);l&&s.set(i,l)}return t},I1=typeof XMLHttpRequest<"u",P1=I1&&function(e){return new Promise(function(n,r){const i=sg(e);let o=i.data;const s=Yt.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,f,p,b,h;function g(){b&&b(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function E(){if(!m)return;const _=Yt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),d={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:_,config:e,request:m};ig(function(S){n(S),g()},function(S){r(S),g()},d),m=null}"onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(E)},m.onabort=function(){m&&(r(new Oe("Request aborted",Oe.ECONNABORTED,e,m)),m=null)},m.onerror=function(x){const d=x&&x.message?x.message:"Network Error",w=new Oe(d,Oe.ERR_NETWORK,e,m);w.event=x||null,r(w),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const d=i.transitional||tg;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new Oe(x,d.clarifyTimeoutError?Oe.ETIMEDOUT:Oe.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&V.forEach(s.toJSON(),function(x,d){m.setRequestHeader(d,x)}),V.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),c&&([p,h]=Ia(c,!0),m.addEventListener("progress",p)),l&&m.upload&&([f,b]=Ia(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(u=_=>{m&&(r(!_||_.type?new fo(null,e,m):_),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const A=x1(i.url);if(A&&Dt.protocols.indexOf(A)===-1){r(new Oe("Unsupported protocol "+A+":",Oe.ERR_BAD_REQUEST,e));return}m.send(o||null)})},N1=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof Oe?u:new fo(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new Oe(`timeout ${t} of ms exceeded`,Oe.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>V.asap(a),l}},M1=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},D1=async function*(e,t){for await(const n of L1(e))yield*M1(n,t)},L1=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Gd=(e,t,n,r)=>{const i=D1(e,t);let o=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let f=u.byteLength;if(n){let p=o+=f;n(p)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Qd=64*1024,{isFunction:Qs}=V,$1=(({Request:e,Response:t})=>({Request:e,Response:t}))(V.global),{ReadableStream:Yd,TextEncoder:Jd}=V.global,Xd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},B1=e=>{e=V.merge.call({skipUndefined:!0},$1,e);const{fetch:t,Request:n,Response:r}=e,i=t?Qs(t):typeof fetch=="function",o=Qs(n),s=Qs(r);if(!i)return!1;const a=i&&Qs(Yd),l=i&&(typeof Jd=="function"?(h=>g=>h.encode(g))(new Jd):async h=>new Uint8Array(await new n(h).arrayBuffer())),c=o&&a&&Xd(()=>{let h=!1;const g=new n(Dt.origin,{body:new Yd,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!g}),u=s&&a&&Xd(()=>V.isReadableStream(new r("").body)),f={stream:u&&(h=>h.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!f[h]&&(f[h]=(g,m)=>{let E=g&&g[h];if(E)return E.call(g);throw new Oe(`Response type '${h}' is not supported`,Oe.ERR_NOT_SUPPORT,m)})});const p=async h=>{if(h==null)return 0;if(V.isBlob(h))return h.size;if(V.isSpecCompliantForm(h))return(await new n(Dt.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(V.isArrayBufferView(h)||V.isArrayBuffer(h))return h.byteLength;if(V.isURLSearchParams(h)&&(h=h+""),V.isString(h))return(await l(h)).byteLength},b=async(h,g)=>{const m=V.toFiniteNumber(h.getContentLength());return m??p(g)};return async h=>{let{url:g,method:m,data:E,signal:A,cancelToken:_,timeout:x,onDownloadProgress:d,onUploadProgress:w,responseType:S,headers:C,withCredentials:R="same-origin",fetchOptions:k}=sg(h),T=t||fetch;S=S?(S+"").toLowerCase():"text";let y=N1([A,_&&_.toAbortSignal()],x),I=null;const O=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let L;try{if(w&&c&&m!=="get"&&m!=="head"&&(L=await b(C,E))!==0){let U=new n(g,{method:"POST",body:E,duplex:"half"}),ae;if(V.isFormData(E)&&(ae=U.headers.get("content-type"))&&C.setContentType(ae),U.body){const[te,J]=Vd(L,Ia(Wd(w)));E=Gd(U.body,Qd,te,J)}}V.isString(R)||(R=R?"include":"omit");const z=o&&"credentials"in n.prototype,X={...k,signal:y,method:m.toUpperCase(),headers:C.normalize().toJSON(),body:E,duplex:"half",credentials:z?R:void 0};I=o&&new n(g,X);let H=await(o?T(I,k):T(g,X));const Q=u&&(S==="stream"||S==="response");if(u&&(d||Q&&O)){const U={};["status","statusText","headers"].forEach(oe=>{U[oe]=H[oe]});const ae=V.toFiniteNumber(H.headers.get("content-length")),[te,J]=d&&Vd(ae,Ia(Wd(d),!0))||[];H=new r(Gd(H.body,Qd,te,()=>{J&&J(),O&&O()}),U)}S=S||"text";let F=await f[V.findKey(f,S)||"text"](H,h);return!Q&&O&&O(),await new Promise((U,ae)=>{ig(U,ae,{data:F,headers:Yt.from(H.headers),status:H.status,statusText:H.statusText,config:h,request:I})})}catch(z){throw O&&O(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new Oe("Network Error",Oe.ERR_NETWORK,h,I),{cause:z.cause||z}):Oe.from(z,z&&z.code,h,I)}}},F1=new Map,ag=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,a=s,l,c,u=F1;for(;a--;)l=o[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:B1(t)),u=c;return c};ag();const Bu={http:n1,xhr:P1,fetch:{get:ag}};V.forEach(Bu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Zd=e=>`- ${e}`,j1=e=>V.isFunction(e)||e===null||e===!1;function z1(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let a;if(i=r,!j1(r)&&(i=Bu[(a=String(r)).toLowerCase()],i===void 0))throw new Oe(`Unknown adapter '${a}'`);if(i&&(V.isFunction(i)||(i=i.get(t))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
|
|
6
6
|
`+s.map(Zd).join(`
|
|
7
|
-
`):" "+Zd(s[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const lg={getAdapter:z1,adapters:Bu};function Yl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new
|
|
8
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=_i(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ca.assertOptions(r,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean)},!1),i!=null&&(H.isFunction(i)?n.paramsSerializer={serialize:i}:Ca.assertOptions(i,{encode:Vn.function,serialize:Vn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ca.assertOptions(n,{baseUrl:Vn.spelling("baseURL"),withXsrfToken:Vn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&H.merge(o.common,o[n.method]);o&&H.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=Qt.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,f=0,p;if(!l){const h=[ef.bind(this),void 0];for(h.unshift(...a),h.push(...c),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=a.length;let b=n;for(;f<p;){const h=a[f++],g=a[f++];try{b=h(b)}catch(m){g.call(this,m);break}}try{u=ef.call(this,b)}catch(h){return Promise.reject(h)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=_i(this.defaults,t);const n=og(t.baseURL,t.url,t.allowAbsoluteUrls);return eg(n,t.params,t.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(t){mi.prototype[t]=function(n,r){return this.request(_i(r||{},{method:t,url:n,data:(r||{}).data}))}});H.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(_i(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}mi.prototype[t]=n(),mi.prototype[t+"Form"]=n(!0)});let q1=class ug{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new uo(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ug(function(i){t=i}),cancel:t}}};function H1(e){return function(n){return e.apply(null,n)}}function V1(e){return H.isObject(e)&&e.isAxiosError===!0}const Xc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Xc).forEach(([e,t])=>{Xc[t]=e});function dg(e){const t=new mi(e),n=Uh(mi.prototype.request,t);return H.extend(n,mi.prototype,t,{allOwnKeys:!0}),H.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dg(_i(e,i))},n}const Xe=dg(ws);Xe.Axios=mi;Xe.CanceledError=uo;Xe.CancelToken=q1;Xe.isCancel=rg;Xe.VERSION=cg;Xe.toFormData=al;Xe.AxiosError=Oe;Xe.Cancel=Xe.CanceledError;Xe.all=function(t){return Promise.all(t)};Xe.spread=H1;Xe.isAxiosError=V1;Xe.mergeConfig=_i;Xe.AxiosHeaders=Qt;Xe.formToJSON=e=>ng(H.isHTMLForm(e)?new FormData(e):e);Xe.getAdapter=lg.getAdapter;Xe.HttpStatusCode=Xc;Xe.default=Xe;const{Axios:d2,AxiosError:f2,CanceledError:p2,isCancel:h2,CancelToken:g2,VERSION:m2,all:y2,Cancel:b2,isAxiosError:w2,spread:_2,toFormData:v2,AxiosHeaders:S2,HttpStatusCode:E2,formToJSON:x2,getAdapter:C2,mergeConfig:T2}=Xe;var Js={exports:{}},Xs={exports:{}},Ye={};var nf;function W1(){if(nf)return Ye;nf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(d){if(typeof d=="object"&&d!==null){var w=d.$$typeof;switch(w){case t:switch(d=d.type,d){case l:case c:case r:case o:case i:case f:return d;default:switch(d=d&&d.$$typeof,d){case a:case u:case h:case b:case s:return d;default:return w}}case n:return w}}}function x(d){return _(d)===c}return Ye.AsyncMode=l,Ye.ConcurrentMode=c,Ye.ContextConsumer=a,Ye.ContextProvider=s,Ye.Element=t,Ye.ForwardRef=u,Ye.Fragment=r,Ye.Lazy=h,Ye.Memo=b,Ye.Portal=n,Ye.Profiler=o,Ye.StrictMode=i,Ye.Suspense=f,Ye.isAsyncMode=function(d){return x(d)||_(d)===l},Ye.isConcurrentMode=x,Ye.isContextConsumer=function(d){return _(d)===a},Ye.isContextProvider=function(d){return _(d)===s},Ye.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Ye.isForwardRef=function(d){return _(d)===u},Ye.isFragment=function(d){return _(d)===r},Ye.isLazy=function(d){return _(d)===h},Ye.isMemo=function(d){return _(d)===b},Ye.isPortal=function(d){return _(d)===n},Ye.isProfiler=function(d){return _(d)===o},Ye.isStrictMode=function(d){return _(d)===i},Ye.isSuspense=function(d){return _(d)===f},Ye.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===c||d===o||d===i||d===f||d===p||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===b||d.$$typeof===s||d.$$typeof===a||d.$$typeof===u||d.$$typeof===m||d.$$typeof===E||d.$$typeof===A||d.$$typeof===g)},Ye.typeOf=_,Ye}var Je={};var rf;function K1(){return rf||(rf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===o||B===i||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===b||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===m||B.$$typeof===E||B.$$typeof===A||B.$$typeof===g)}function x(B){if(typeof B=="object"&&B!==null){var me=B.$$typeof;switch(me){case t:var Ee=B.type;switch(Ee){case l:case c:case r:case o:case i:case f:return Ee;default:var be=Ee&&Ee.$$typeof;switch(be){case a:case u:case h:case b:case s:return be;default:return me}}case n:return me}}}var d=l,w=c,S=a,C=s,R=t,k=u,T=r,y=h,I=b,O=n,L=o,U=i,Z=f,V=!1;function Q(B){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(B)||x(B)===l}function F(B){return x(B)===c}function z(B){return x(B)===a}function se(B){return x(B)===s}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return x(B)===u}function oe(B){return x(B)===r}function le(B){return x(B)===h}function q(B){return x(B)===b}function re(B){return x(B)===n}function Y(B){return x(B)===o}function W(B){return x(B)===i}function ce(B){return x(B)===f}Je.AsyncMode=d,Je.ConcurrentMode=w,Je.ContextConsumer=S,Je.ContextProvider=C,Je.Element=R,Je.ForwardRef=k,Je.Fragment=T,Je.Lazy=y,Je.Memo=I,Je.Portal=O,Je.Profiler=L,Je.StrictMode=U,Je.Suspense=Z,Je.isAsyncMode=Q,Je.isConcurrentMode=F,Je.isContextConsumer=z,Je.isContextProvider=se,Je.isElement=te,Je.isForwardRef=J,Je.isFragment=oe,Je.isLazy=le,Je.isMemo=q,Je.isPortal=re,Je.isProfiler=Y,Je.isStrictMode=W,Je.isSuspense=ce,Je.isValidElementType=_,Je.typeOf=x})()),Je}var of;function fg(){return of||(of=1,process.env.NODE_ENV==="production"?Xs.exports=W1():Xs.exports=K1()),Xs.exports}var Jl,sf;function G1(){if(sf)return Jl;sf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jl=i()?Object.assign:function(o,s){for(var a,l=r(o),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var p=0;p<c.length;p++)n.call(a,c[p])&&(l[c[p]]=a[c[p]])}}return l},Jl}var Xl,af;function Fu(){if(af)return Xl;af=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xl=e,Xl}var Zl,lf;function pg(){return lf||(lf=1,Zl=Function.call.bind(Object.prototype.hasOwnProperty)),Zl}var ec,cf;function Q1(){if(cf)return ec;cf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fu(),n={},r=pg();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var f;try{if(typeof o[u]!="function"){var p=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=o[u](s,u,l,a,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var b=c?c():"";e("Failed "+a+" type: "+f.message+(b??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ec=i,ec}var tc,uf;function Y1(){if(uf)return tc;uf=1;var e=fg(),t=G1(),n=Fu(),r=pg(),i=Q1(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return tc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(F){var z=F&&(c&&F[c]||F[u]);if(typeof z=="function")return z}var p="<<anonymous>>",b={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:A(),arrayOf:_,element:x(),elementType:d(),instanceOf:w,node:k(),objectOf:C,oneOf:S,oneOfType:R,shape:y,exact:I};function h(F,z){return F===z?F!==0||1/F===1/z:F!==F&&z!==z}function g(F,z){this.message=F,this.data=z&&typeof z=="object"?z:{},this.stack=""}g.prototype=Error.prototype;function m(F){if(process.env.NODE_ENV!=="production")var z={},se=0;function te(oe,le,q,re,Y,W,ce){if(re=re||p,W=W||q,ce!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=re+":"+q;!z[me]&&se<3&&(o("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+re+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),z[me]=!0,se++)}}return le[q]==null?oe?le[q]===null?new g("The "+Y+" `"+W+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new g("The "+Y+" `"+W+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:F(le,q,re,Y,W)}var J=te.bind(null,!1);return J.isRequired=te.bind(null,!0),J}function E(F){function z(se,te,J,oe,le,q){var re=se[te],Y=U(re);if(Y!==F){var W=Z(re);return new g("Invalid "+oe+" `"+le+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return m(z)}function A(){return m(s)}function _(F){function z(se,te,J,oe,le){if(typeof F!="function")return new g("Property `"+le+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var q=se[te];if(!Array.isArray(q)){var re=U(q);return new g("Invalid "+oe+" `"+le+"` of type "+("`"+re+"` supplied to `"+J+"`, expected an array."))}for(var Y=0;Y<q.length;Y++){var W=F(q,Y,J,oe,le+"["+Y+"]",n);if(W instanceof Error)return W}return null}return m(z)}function x(){function F(z,se,te,J,oe){var le=z[se];if(!a(le)){var q=U(le);return new g("Invalid "+J+" `"+oe+"` of type "+("`"+q+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return m(F)}function d(){function F(z,se,te,J,oe){var le=z[se];if(!e.isValidElementType(le)){var q=U(le);return new g("Invalid "+J+" `"+oe+"` of type "+("`"+q+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return m(F)}function w(F){function z(se,te,J,oe,le){if(!(se[te]instanceof F)){var q=F.name||p,re=Q(se[te]);return new g("Invalid "+oe+" `"+le+"` of type "+("`"+re+"` supplied to `"+J+"`, expected ")+("instance of `"+q+"`."))}return null}return m(z)}function S(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function z(se,te,J,oe,le){for(var q=se[te],re=0;re<F.length;re++)if(h(q,F[re]))return null;var Y=JSON.stringify(F,function(ce,B){var me=Z(B);return me==="symbol"?String(B):B});return new g("Invalid "+oe+" `"+le+"` of value `"+String(q)+"` "+("supplied to `"+J+"`, expected one of "+Y+"."))}return m(z)}function C(F){function z(se,te,J,oe,le){if(typeof F!="function")return new g("Property `"+le+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var q=se[te],re=U(q);if(re!=="object")return new g("Invalid "+oe+" `"+le+"` of type "+("`"+re+"` supplied to `"+J+"`, expected an object."));for(var Y in q)if(r(q,Y)){var W=F(q,Y,J,oe,le+"."+Y,n);if(W instanceof Error)return W}return null}return m(z)}function R(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var z=0;z<F.length;z++){var se=F[z];if(typeof se!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(se)+" at index "+z+"."),s}function te(J,oe,le,q,re){for(var Y=[],W=0;W<F.length;W++){var ce=F[W],B=ce(J,oe,le,q,re,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var me=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new g("Invalid "+q+" `"+re+"` supplied to "+("`"+le+"`"+me+"."))}return m(te)}function k(){function F(z,se,te,J,oe){return O(z[se])?null:new g("Invalid "+J+" `"+oe+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return m(F)}function T(F,z,se,te,J){return new g((F||"React class")+": "+z+" type `"+se+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function y(F){function z(se,te,J,oe,le){var q=se[te],re=U(q);if(re!=="object")return new g("Invalid "+oe+" `"+le+"` of type `"+re+"` "+("supplied to `"+J+"`, expected `object`."));for(var Y in F){var W=F[Y];if(typeof W!="function")return T(J,oe,le,Y,Z(W));var ce=W(q,Y,J,oe,le+"."+Y,n);if(ce)return ce}return null}return m(z)}function I(F){function z(se,te,J,oe,le){var q=se[te],re=U(q);if(re!=="object")return new g("Invalid "+oe+" `"+le+"` of type `"+re+"` "+("supplied to `"+J+"`, expected `object`."));var Y=t({},se[te],F);for(var W in Y){var ce=F[W];if(r(F,W)&&typeof ce!="function")return T(J,oe,le,W,Z(ce));if(!ce)return new g("Invalid "+oe+" `"+le+"` key `"+W+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(se[te],null," ")+`
|
|
9
|
-
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var B=
|
|
10
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:
|
|
7
|
+
`):" "+Zd(s[0]):"as no adapter specified";throw new Oe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const lg={getAdapter:z1,adapters:Bu};function Yl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fo(null,e)}function ef(e){return Yl(e),e.headers=Yt.from(e.headers),e.data=Ql.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lg.getAdapter(e.adapter||vs.adapter,e)(e).then(function(r){return Yl(e),r.data=Ql.call(e,e.transformResponse,r),r.headers=Yt.from(r.headers),r},function(r){return rg(r)||(Yl(e),r&&r.response&&(r.response.data=Ql.call(e,e.transformResponse,r.response),r.response.headers=Yt.from(r.response.headers))),Promise.reject(r)})}const cg="1.13.2",al={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{al[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const tf={};al.transitional=function(t,n,r){function i(o,s){return"[Axios v"+cg+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new Oe(i(s," has been removed"+(n?" in "+n:"")),Oe.ERR_DEPRECATED);return n&&!tf[s]&&(tf[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};al.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function U1(e,t,n){if(typeof e!="object")throw new Oe("options must be an object",Oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new Oe("option "+o+" must be "+l,Oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Oe("Unknown option "+o,Oe.ERR_BAD_OPTION)}}const xa={assertOptions:U1,validators:al},Kn=xa.validators;let hi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new qd,response:new qd}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
8
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=bi(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&xa.assertOptions(r,{silentJSONParsing:Kn.transitional(Kn.boolean),forcedJSONParsing:Kn.transitional(Kn.boolean),clarifyTimeoutError:Kn.transitional(Kn.boolean)},!1),i!=null&&(V.isFunction(i)?n.paramsSerializer={serialize:i}:xa.assertOptions(i,{encode:Kn.function,serialize:Kn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),xa.assertOptions(n,{baseUrl:Kn.spelling("baseURL"),withXsrfToken:Kn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&V.merge(o.common,o[n.method]);o&&V.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=Yt.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,f=0,p;if(!l){const h=[ef.bind(this),void 0];for(h.unshift(...a),h.push(...c),p=h.length,u=Promise.resolve(n);f<p;)u=u.then(h[f++],h[f++]);return u}p=a.length;let b=n;for(;f<p;){const h=a[f++],g=a[f++];try{b=h(b)}catch(m){g.call(this,m);break}}try{u=ef.call(this,b)}catch(h){return Promise.reject(h)}for(f=0,p=c.length;f<p;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=bi(this.defaults,t);const n=og(t.baseURL,t.url,t.allowAbsoluteUrls);return eg(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){hi.prototype[t]=function(n,r){return this.request(bi(r||{},{method:t,url:n,data:(r||{}).data}))}});V.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(bi(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}hi.prototype[t]=n(),hi.prototype[t+"Form"]=n(!0)});let q1=class ug{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new fo(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ug(function(i){t=i}),cancel:t}}};function H1(e){return function(n){return e.apply(null,n)}}function V1(e){return V.isObject(e)&&e.isAxiosError===!0}const Xc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Xc).forEach(([e,t])=>{Xc[t]=e});function dg(e){const t=new hi(e),n=Uh(hi.prototype.request,t);return V.extend(n,hi.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dg(bi(e,i))},n}const et=dg(vs);et.Axios=hi;et.CanceledError=fo;et.CancelToken=q1;et.isCancel=rg;et.VERSION=cg;et.toFormData=sl;et.AxiosError=Oe;et.Cancel=et.CanceledError;et.all=function(t){return Promise.all(t)};et.spread=H1;et.isAxiosError=V1;et.mergeConfig=bi;et.AxiosHeaders=Yt;et.formToJSON=e=>ng(V.isHTMLForm(e)?new FormData(e):e);et.getAdapter=lg.getAdapter;et.HttpStatusCode=Xc;et.default=et;const{Axios:d2,AxiosError:f2,CanceledError:p2,isCancel:h2,CancelToken:g2,VERSION:m2,all:y2,Cancel:b2,isAxiosError:w2,spread:_2,toFormData:v2,AxiosHeaders:S2,HttpStatusCode:E2,formToJSON:x2,getAdapter:C2,mergeConfig:T2}=et;var Ys={exports:{}},Js={exports:{}},Xe={};var nf;function W1(){if(nf)return Xe;nf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(d){if(typeof d=="object"&&d!==null){var w=d.$$typeof;switch(w){case t:switch(d=d.type,d){case l:case c:case r:case o:case i:case f:return d;default:switch(d=d&&d.$$typeof,d){case a:case u:case h:case b:case s:return d;default:return w}}case n:return w}}}function x(d){return _(d)===c}return Xe.AsyncMode=l,Xe.ConcurrentMode=c,Xe.ContextConsumer=a,Xe.ContextProvider=s,Xe.Element=t,Xe.ForwardRef=u,Xe.Fragment=r,Xe.Lazy=h,Xe.Memo=b,Xe.Portal=n,Xe.Profiler=o,Xe.StrictMode=i,Xe.Suspense=f,Xe.isAsyncMode=function(d){return x(d)||_(d)===l},Xe.isConcurrentMode=x,Xe.isContextConsumer=function(d){return _(d)===a},Xe.isContextProvider=function(d){return _(d)===s},Xe.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},Xe.isForwardRef=function(d){return _(d)===u},Xe.isFragment=function(d){return _(d)===r},Xe.isLazy=function(d){return _(d)===h},Xe.isMemo=function(d){return _(d)===b},Xe.isPortal=function(d){return _(d)===n},Xe.isProfiler=function(d){return _(d)===o},Xe.isStrictMode=function(d){return _(d)===i},Xe.isSuspense=function(d){return _(d)===f},Xe.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===c||d===o||d===i||d===f||d===p||typeof d=="object"&&d!==null&&(d.$$typeof===h||d.$$typeof===b||d.$$typeof===s||d.$$typeof===a||d.$$typeof===u||d.$$typeof===m||d.$$typeof===E||d.$$typeof===A||d.$$typeof===g)},Xe.typeOf=_,Xe}var Ze={};var rf;function K1(){return rf||(rf=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,b=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,A=e?Symbol.for("react.scope"):60119;function _(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===o||B===i||B===f||B===p||typeof B=="object"&&B!==null&&(B.$$typeof===h||B.$$typeof===b||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===m||B.$$typeof===E||B.$$typeof===A||B.$$typeof===g)}function x(B){if(typeof B=="object"&&B!==null){var we=B.$$typeof;switch(we){case t:var be=B.type;switch(be){case l:case c:case r:case o:case i:case f:return be;default:var Ce=be&&be.$$typeof;switch(Ce){case a:case u:case h:case b:case s:return Ce;default:return we}}case n:return we}}}var d=l,w=c,S=a,C=s,R=t,k=u,T=r,y=h,I=b,O=n,L=o,z=i,X=f,H=!1;function Q(B){return H||(H=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(B)||x(B)===l}function F(B){return x(B)===c}function U(B){return x(B)===a}function ae(B){return x(B)===s}function te(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function J(B){return x(B)===u}function oe(B){return x(B)===r}function ce(B){return x(B)===h}function q(B){return x(B)===b}function re(B){return x(B)===n}function Y(B){return x(B)===o}function W(B){return x(B)===i}function fe(B){return x(B)===f}Ze.AsyncMode=d,Ze.ConcurrentMode=w,Ze.ContextConsumer=S,Ze.ContextProvider=C,Ze.Element=R,Ze.ForwardRef=k,Ze.Fragment=T,Ze.Lazy=y,Ze.Memo=I,Ze.Portal=O,Ze.Profiler=L,Ze.StrictMode=z,Ze.Suspense=X,Ze.isAsyncMode=Q,Ze.isConcurrentMode=F,Ze.isContextConsumer=U,Ze.isContextProvider=ae,Ze.isElement=te,Ze.isForwardRef=J,Ze.isFragment=oe,Ze.isLazy=ce,Ze.isMemo=q,Ze.isPortal=re,Ze.isProfiler=Y,Ze.isStrictMode=W,Ze.isSuspense=fe,Ze.isValidElementType=_,Ze.typeOf=x})()),Ze}var of;function fg(){return of||(of=1,process.env.NODE_ENV==="production"?Js.exports=W1():Js.exports=K1()),Js.exports}var Jl,sf;function G1(){if(sf)return Jl;sf=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jl=i()?Object.assign:function(o,s){for(var a,l=r(o),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var f in a)t.call(a,f)&&(l[f]=a[f]);if(e){c=e(a);for(var p=0;p<c.length;p++)n.call(a,c[p])&&(l[c[p]]=a[c[p]])}}return l},Jl}var Xl,af;function Fu(){if(af)return Xl;af=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xl=e,Xl}var Zl,lf;function pg(){return lf||(lf=1,Zl=Function.call.bind(Object.prototype.hasOwnProperty)),Zl}var ec,cf;function Q1(){if(cf)return ec;cf=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Fu(),n={},r=pg();e=function(o){var s="Warning: "+o;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(o,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in o)if(r(o,u)){var f;try{if(typeof o[u]!="function"){var p=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=o[u](s,u,l,a,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var b=c?c():"";e("Failed "+a+" type: "+f.message+(b??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ec=i,ec}var tc,uf;function Y1(){if(uf)return tc;uf=1;var e=fg(),t=G1(),n=Fu(),r=pg(),i=Q1(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return tc=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(F){var U=F&&(c&&F[c]||F[u]);if(typeof U=="function")return U}var p="<<anonymous>>",b={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:A(),arrayOf:_,element:x(),elementType:d(),instanceOf:w,node:k(),objectOf:C,oneOf:S,oneOfType:R,shape:y,exact:I};function h(F,U){return F===U?F!==0||1/F===1/U:F!==F&&U!==U}function g(F,U){this.message=F,this.data=U&&typeof U=="object"?U:{},this.stack=""}g.prototype=Error.prototype;function m(F){if(process.env.NODE_ENV!=="production")var U={},ae=0;function te(oe,ce,q,re,Y,W,fe){if(re=re||p,W=W||q,fe!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=re+":"+q;!U[we]&&ae<3&&(o("You are manually calling a React.PropTypes validation function for the `"+W+"` prop on `"+re+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),U[we]=!0,ae++)}}return ce[q]==null?oe?ce[q]===null?new g("The "+Y+" `"+W+"` is marked as required "+("in `"+re+"`, but its value is `null`.")):new g("The "+Y+" `"+W+"` is marked as required in "+("`"+re+"`, but its value is `undefined`.")):null:F(ce,q,re,Y,W)}var J=te.bind(null,!1);return J.isRequired=te.bind(null,!0),J}function E(F){function U(ae,te,J,oe,ce,q){var re=ae[te],Y=z(re);if(Y!==F){var W=X(re);return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+W+"` supplied to `"+J+"`, expected ")+("`"+F+"`."),{expectedType:F})}return null}return m(U)}function A(){return m(s)}function _(F){function U(ae,te,J,oe,ce){if(typeof F!="function")return new g("Property `"+ce+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var q=ae[te];if(!Array.isArray(q)){var re=z(q);return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+re+"` supplied to `"+J+"`, expected an array."))}for(var Y=0;Y<q.length;Y++){var W=F(q,Y,J,oe,ce+"["+Y+"]",n);if(W instanceof Error)return W}return null}return m(U)}function x(){function F(U,ae,te,J,oe){var ce=U[ae];if(!a(ce)){var q=z(ce);return new g("Invalid "+J+" `"+oe+"` of type "+("`"+q+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return m(F)}function d(){function F(U,ae,te,J,oe){var ce=U[ae];if(!e.isValidElementType(ce)){var q=z(ce);return new g("Invalid "+J+" `"+oe+"` of type "+("`"+q+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return m(F)}function w(F){function U(ae,te,J,oe,ce){if(!(ae[te]instanceof F)){var q=F.name||p,re=Q(ae[te]);return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+re+"` supplied to `"+J+"`, expected ")+("instance of `"+q+"`."))}return null}return m(U)}function S(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),s;function U(ae,te,J,oe,ce){for(var q=ae[te],re=0;re<F.length;re++)if(h(q,F[re]))return null;var Y=JSON.stringify(F,function(fe,B){var we=X(B);return we==="symbol"?String(B):B});return new g("Invalid "+oe+" `"+ce+"` of value `"+String(q)+"` "+("supplied to `"+J+"`, expected one of "+Y+"."))}return m(U)}function C(F){function U(ae,te,J,oe,ce){if(typeof F!="function")return new g("Property `"+ce+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var q=ae[te],re=z(q);if(re!=="object")return new g("Invalid "+oe+" `"+ce+"` of type "+("`"+re+"` supplied to `"+J+"`, expected an object."));for(var Y in q)if(r(q,Y)){var W=F(q,Y,J,oe,ce+"."+Y,n);if(W instanceof Error)return W}return null}return m(U)}function R(F){if(!Array.isArray(F))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var U=0;U<F.length;U++){var ae=F[U];if(typeof ae!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(ae)+" at index "+U+"."),s}function te(J,oe,ce,q,re){for(var Y=[],W=0;W<F.length;W++){var fe=F[W],B=fe(J,oe,ce,q,re,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var we=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new g("Invalid "+q+" `"+re+"` supplied to "+("`"+ce+"`"+we+"."))}return m(te)}function k(){function F(U,ae,te,J,oe){return O(U[ae])?null:new g("Invalid "+J+" `"+oe+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return m(F)}function T(F,U,ae,te,J){return new g((F||"React class")+": "+U+" type `"+ae+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function y(F){function U(ae,te,J,oe,ce){var q=ae[te],re=z(q);if(re!=="object")return new g("Invalid "+oe+" `"+ce+"` of type `"+re+"` "+("supplied to `"+J+"`, expected `object`."));for(var Y in F){var W=F[Y];if(typeof W!="function")return T(J,oe,ce,Y,X(W));var fe=W(q,Y,J,oe,ce+"."+Y,n);if(fe)return fe}return null}return m(U)}function I(F){function U(ae,te,J,oe,ce){var q=ae[te],re=z(q);if(re!=="object")return new g("Invalid "+oe+" `"+ce+"` of type `"+re+"` "+("supplied to `"+J+"`, expected `object`."));var Y=t({},ae[te],F);for(var W in Y){var fe=F[W];if(r(F,W)&&typeof fe!="function")return T(J,oe,ce,W,X(fe));if(!fe)return new g("Invalid "+oe+" `"+ce+"` key `"+W+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(ae[te],null," ")+`
|
|
9
|
+
Valid keys: `+JSON.stringify(Object.keys(F),null," "));var B=fe(q,W,J,oe,ce+"."+W,n);if(B)return B}return null}return m(U)}function O(F){switch(typeof F){case"number":case"string":case"undefined":return!0;case"boolean":return!F;case"object":if(Array.isArray(F))return F.every(O);if(F===null||a(F))return!0;var U=f(F);if(U){var ae=U.call(F),te;if(U!==F.entries){for(;!(te=ae.next()).done;)if(!O(te.value))return!1}else for(;!(te=ae.next()).done;){var J=te.value;if(J&&!O(J[1]))return!1}}else return!1;return!0;default:return!1}}function L(F,U){return F==="symbol"?!0:U?U["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&U instanceof Symbol:!1}function z(F){var U=typeof F;return Array.isArray(F)?"array":F instanceof RegExp?"object":L(U,F)?"symbol":U}function X(F){if(typeof F>"u"||F===null)return""+F;var U=z(F);if(U==="object"){if(F instanceof Date)return"date";if(F instanceof RegExp)return"regexp"}return U}function H(F){var U=X(F);switch(U){case"array":case"object":return"an "+U;case"boolean":case"date":case"regexp":return"a "+U;default:return U}}function Q(F){return!F.constructor||!F.constructor.name?p:F.constructor.name}return b.checkPropTypes=i,b.resetWarningCache=i.resetWarningCache,b.PropTypes=b,b},tc}var nc,df;function J1(){if(df)return nc;df=1;var e=Fu();function t(){}function n(){}return n.resetWarningCache=t,nc=function(){function r(s,a,l,c,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},nc}var ff;function X1(){if(ff)return Ys.exports;if(ff=1,process.env.NODE_ENV!=="production"){var e=fg(),t=!0;Ys.exports=Y1()(e.isElement,t)}else Ys.exports=J1()();return Ys.exports}var Z1=X1();const xe=Nu(Z1);function hg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=hg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ju(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hg(e))&&(r&&(r+=" "),r+=t);return r}function ew(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function gg(e,t,n=void 0){const r={};for(const i in e){const o=e[i];let s="",a=!0;for(let l=0;l<o.length;l+=1){const c=o[l];c&&(s+=(a===!0?"":" ")+t(c),a=!1,n&&n[c]&&(s+=" "+n[c]))}r[i]=s}return r}function qr(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function Nn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":qr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Xs={exports:{}},st={};var pf;function tw(){if(pf)return st;pf=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function h(g){if(typeof g=="object"&&g!==null){var m=g.$$typeof;switch(m){case e:switch(g=g.type,g){case n:case i:case r:case l:case c:case p:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case f:case u:return g;case o:return g;default:return m}}case t:return m}}}return st.ContextConsumer=o,st.ContextProvider=s,st.Element=e,st.ForwardRef=a,st.Fragment=n,st.Lazy=f,st.Memo=u,st.Portal=t,st.Profiler=i,st.StrictMode=r,st.Suspense=l,st.SuspenseList=c,st.isContextConsumer=function(g){return h(g)===o},st.isContextProvider=function(g){return h(g)===s},st.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},st.isForwardRef=function(g){return h(g)===a},st.isFragment=function(g){return h(g)===n},st.isLazy=function(g){return h(g)===f},st.isMemo=function(g){return h(g)===u},st.isPortal=function(g){return h(g)===t},st.isProfiler=function(g){return h(g)===i},st.isStrictMode=function(g){return h(g)===r},st.isSuspense=function(g){return h(g)===l},st.isSuspenseList=function(g){return h(g)===c},st.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===i||g===r||g===l||g===c||typeof g=="object"&&g!==null&&(g.$$typeof===f||g.$$typeof===u||g.$$typeof===s||g.$$typeof===o||g.$$typeof===a||g.$$typeof===b||g.getModuleId!==void 0)},st.typeOf=h,st}var at={};var hf;function nw(){return hf||(hf=1,process.env.NODE_ENV!=="production"&&(function(){function e(g){if(typeof g=="object"&&g!==null){var m=g.$$typeof;switch(m){case t:switch(g=g.type,g){case r:case o:case i:case c:case u:case b:return g;default:switch(g=g&&g.$$typeof,g){case a:case l:case p:case f:return g;case s:return g;default:return m}}case n:return m}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");at.ContextConsumer=s,at.ContextProvider=a,at.Element=t,at.ForwardRef=l,at.Fragment=r,at.Lazy=p,at.Memo=f,at.Portal=n,at.Profiler=o,at.StrictMode=i,at.Suspense=c,at.SuspenseList=u,at.isContextConsumer=function(g){return e(g)===s},at.isContextProvider=function(g){return e(g)===a},at.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===t},at.isForwardRef=function(g){return e(g)===l},at.isFragment=function(g){return e(g)===r},at.isLazy=function(g){return e(g)===p},at.isMemo=function(g){return e(g)===f},at.isPortal=function(g){return e(g)===n},at.isProfiler=function(g){return e(g)===o},at.isStrictMode=function(g){return e(g)===i},at.isSuspense=function(g){return e(g)===c},at.isSuspenseList=function(g){return e(g)===u},at.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===o||g===i||g===c||g===u||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===f||g.$$typeof===a||g.$$typeof===s||g.$$typeof===l||g.$$typeof===h||g.getModuleId!==void 0)},at.typeOf=e})()),at}var gf;function rw(){return gf||(gf=1,process.env.NODE_ENV==="production"?Xs.exports=tw():Xs.exports=nw()),Xs.exports}var Pa=rw();function br(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function mg(e){if(Ke.isValidElement(e)||Pa.isValidElementType(e)||!br(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=mg(e[n])}),t}function sn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return br(e)&&br(t)&&Object.keys(t).forEach(i=>{Ke.isValidElement(t[i])||Pa.isValidElementType(t[i])?r[i]=t[i]:br(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&br(e[i])?r[i]=sn(e[i],t[i],n):n.clone?r[i]=br(t[i])?mg(t[i]):t[i]:r[i]=t[i]}),r}function Jo(e,t){return t?sn(e,t,{clone:!1}):e}const Wr=process.env.NODE_ENV!=="production"?xe.oneOfType([xe.number,xe.string,xe.object,xe.array]):{};function mf(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{const o=/min-width:\s*([0-9.]+)/;return+(r.match(o)?.[1]||0)-+(i.match(o)?.[1]||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},{...t}):t}function iw(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function ow(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
10
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:qr(18,`(${t})`));return null}const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function sw(e){const t=(o,s)=>o.replace("@media",s?`@container ${s}`:"@container");function n(o,s){o.up=(...a)=>t(e.breakpoints.up(...a),s),o.down=(...a)=>t(e.breakpoints.down(...a),s),o.between=(...a)=>t(e.breakpoints.between(...a),s),o.only=(...a)=>t(e.breakpoints.only(...a),s),o.not=(...a)=>{const l=t(e.breakpoints.not(...a),s);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=o=>(n(r,o),r);return n(i),{...e,containerQueries:i}}const ll={xs:0,sm:600,md:900,lg:1200,xl:1536},yf={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ll[e]}px)`},aw={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ll[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Tr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||yf;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||yf;return Object.keys(t).reduce((s,a)=>{if(iw(o.keys,a)){const l=ow(r.containerQueries?r:aw,a);l&&(s[l]=n(t[a],a))}else if(Object.keys(o.values||ll).includes(a)){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function lw(e={}){return e.keys?.reduce((n,r)=>{const i=e.up(r);return n[i]={},n},{})||{}}function bf(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function cl(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Na(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=cl(e,n)||r,t&&(i=t(i,r,e)),i}function vt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,c=cl(l,r)||{};return Tr(s,a,f=>{let p=Na(c,i,f);return f===p&&typeof f=="string"&&(p=Na(c,i,`${t}${f==="default"?"":Nn(f)}`,f)),n===!1?p:{[n]:p}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:Wr}:{},o.filterProps=[t],o}function cw(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const uw={m:"margin",p:"padding"},dw={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},wf={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fw=cw(e=>{if(e.length>2)if(wf[e])e=wf[e];else return[e];const[t,n]=e.split(""),r=uw[t],i=dw[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),ul=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],dl=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],pw=[...ul,...dl];function Ss(e,t,n,r){const i=cl(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${o}.`),typeof i=="string"?i.startsWith("var(")&&o===0?0:i.startsWith("var(")&&o===1?i:`calc(${o} * ${i})`:i*o):Array.isArray(i)?o=>{if(typeof o=="string")return o;const s=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(s)?s>i.length-1&&console.error([`MUI: The value provided (${s}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${s} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
11
11
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
12
12
|
`)));const a=i[s];return o>=0?a:typeof a=="number"?-a:typeof a=="string"&&a.startsWith("var(")?`calc(-1 * ${a})`:`-${a}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
13
|
-
`)),()=>{})}function zu(e){return
|
|
14
|
-
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:
|
|
15
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:
|
|
13
|
+
`)),()=>{})}function zu(e){return Ss(e,"spacing",8,"spacing")}function Es(e,t){return typeof t=="string"||t==null?t:e(t)}function hw(e,t){return n=>e.reduce((r,i)=>(r[i]=Es(t,n),r),{})}function gw(e,t,n,r){if(!t.includes(n))return null;const i=fw(n),o=hw(i,r),s=e[n];return Tr(e,s,o)}function yg(e,t){const n=zu(e.theme);return Object.keys(e).map(r=>gw(e,t,r,n)).reduce(Jo,{})}function wt(e){return yg(e,ul)}wt.propTypes=process.env.NODE_ENV!=="production"?ul.reduce((e,t)=>(e[t]=Wr,e),{}):{};wt.filterProps=ul;function _t(e){return yg(e,dl)}_t.propTypes=process.env.NODE_ENV!=="production"?dl.reduce((e,t)=>(e[t]=Wr,e),{}):{};_t.filterProps=dl;process.env.NODE_ENV!=="production"&&pw.reduce((e,t)=>(e[t]=Wr,e),{});function fl(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Jo(i,t[o](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function mn(e){return typeof e!="number"?e:`${e}px solid`}function vn(e,t){return vt({prop:e,themeKey:"borders",transform:t})}const mw=vn("border",mn),yw=vn("borderTop",mn),bw=vn("borderRight",mn),ww=vn("borderBottom",mn),_w=vn("borderLeft",mn),vw=vn("borderColor"),Sw=vn("borderTopColor"),Ew=vn("borderRightColor"),xw=vn("borderBottomColor"),Cw=vn("borderLeftColor"),Tw=vn("outline",mn),Aw=vn("outlineColor"),pl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Ss(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Es(t,r)});return Tr(e,e.borderRadius,n)}return null};pl.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Wr}:{};pl.filterProps=["borderRadius"];fl(mw,yw,bw,ww,_w,vw,Sw,Ew,xw,Cw,pl,Tw,Aw);const hl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Ss(e.theme,"spacing",8,"gap"),n=r=>({gap:Es(t,r)});return Tr(e,e.gap,n)}return null};hl.propTypes=process.env.NODE_ENV!=="production"?{gap:Wr}:{};hl.filterProps=["gap"];const gl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Ss(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Es(t,r)});return Tr(e,e.columnGap,n)}return null};gl.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Wr}:{};gl.filterProps=["columnGap"];const ml=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Ss(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Es(t,r)});return Tr(e,e.rowGap,n)}return null};ml.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Wr}:{};ml.filterProps=["rowGap"];const kw=vt({prop:"gridColumn"}),Rw=vt({prop:"gridRow"}),Ow=vt({prop:"gridAutoFlow"}),Iw=vt({prop:"gridAutoColumns"}),Pw=vt({prop:"gridAutoRows"}),Nw=vt({prop:"gridTemplateColumns"}),Mw=vt({prop:"gridTemplateRows"}),Dw=vt({prop:"gridTemplateAreas"}),Lw=vt({prop:"gridArea"});fl(hl,gl,ml,kw,Rw,Ow,Iw,Pw,Nw,Mw,Dw,Lw);function Zi(e,t){return t==="grey"?t:e}const $w=vt({prop:"color",themeKey:"palette",transform:Zi}),Bw=vt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Zi}),Fw=vt({prop:"backgroundColor",themeKey:"palette",transform:Zi});fl($w,Bw,Fw);function nn(e){return e<=1&&e!==0?`${e*100}%`:e}const jw=vt({prop:"width",transform:nn}),Uu=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||ll[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:nn(n)}};return Tr(e,e.maxWidth,t)}return null};Uu.filterProps=["maxWidth"];const zw=vt({prop:"minWidth",transform:nn}),Uw=vt({prop:"height",transform:nn}),qw=vt({prop:"maxHeight",transform:nn}),Hw=vt({prop:"minHeight",transform:nn});vt({prop:"size",cssProperty:"width",transform:nn});vt({prop:"size",cssProperty:"height",transform:nn});const Vw=vt({prop:"boxSizing"});fl(jw,Uu,zw,Uw,qw,Hw,Vw);const yl={border:{themeKey:"borders",transform:mn},borderTop:{themeKey:"borders",transform:mn},borderRight:{themeKey:"borders",transform:mn},borderBottom:{themeKey:"borders",transform:mn},borderLeft:{themeKey:"borders",transform:mn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:pl},color:{themeKey:"palette",transform:Zi},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Zi},backgroundColor:{themeKey:"palette",transform:Zi},p:{style:_t},pt:{style:_t},pr:{style:_t},pb:{style:_t},pl:{style:_t},px:{style:_t},py:{style:_t},padding:{style:_t},paddingTop:{style:_t},paddingRight:{style:_t},paddingBottom:{style:_t},paddingLeft:{style:_t},paddingX:{style:_t},paddingY:{style:_t},paddingInline:{style:_t},paddingInlineStart:{style:_t},paddingInlineEnd:{style:_t},paddingBlock:{style:_t},paddingBlockStart:{style:_t},paddingBlockEnd:{style:_t},m:{style:wt},mt:{style:wt},mr:{style:wt},mb:{style:wt},ml:{style:wt},mx:{style:wt},my:{style:wt},margin:{style:wt},marginTop:{style:wt},marginRight:{style:wt},marginBottom:{style:wt},marginLeft:{style:wt},marginX:{style:wt},marginY:{style:wt},marginInline:{style:wt},marginInlineStart:{style:wt},marginInlineEnd:{style:wt},marginBlock:{style:wt},marginBlockStart:{style:wt},marginBlockEnd:{style:wt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:hl},rowGap:{style:ml},columnGap:{style:gl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:nn},maxWidth:{style:Uu},minWidth:{transform:nn},height:{transform:nn},maxHeight:{transform:nn},minHeight:{transform:nn},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Ww(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Kw(e,t){return typeof e=="function"?e(t):e}function Gw(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:f}=a;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const p=cl(i,c)||{};return f?f(s):Tr(s,r,h=>{let g=Na(p,u,h);return h===g&&typeof h=="string"&&(g=Na(p,u,`${n}${h==="default"?"":Nn(h)}`,h)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const s=i.unstable_sxConfig??yl;function a(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=lw(i.breakpoints),f=Object.keys(u);let p=u;return Object.keys(c).forEach(b=>{const h=Kw(c[b],i);if(h!=null)if(typeof h=="object")if(s[b])p=Jo(p,e(b,h,i,s));else{const g=Tr({theme:i},h,m=>({[b]:m}));Ww(g,h)?p[b]=t({sx:h,theme:i,nested:!0}):p=Jo(p,g)}else p=Jo(p,e(b,h,i,s))}),!o&&i.modularCssLayers?{"@layer sx":mf(i,bf(f,p))}:mf(i,bf(f,p))}return Array.isArray(r)?r.map(a):a(r)}return t}const no=Gw();no.filterProps=["sx"];function Qw(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function qu(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Qw(e,t,n)}function Yw(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Hr(e){if(e.type)return e;if(e.charAt(0)==="#")return Hr(Yw(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
14
|
+
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:qr(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
15
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:qr(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const Jw=e=>{const t=Hr(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},qo=(e,t)=>{try{return Jw(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function bl(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function bg(e){e=Hr(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),bl({type:a,values:l})}function Zc(e){e=Hr(e);let t=e.type==="hsl"||e.type==="hsla"?Hr(bg(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function _f(e,t){const n=Zc(e),r=Zc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wg(e,t){return e=Hr(e),t=qu(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,bl(e)}function ni(e,t,n){try{return wg(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function wl(e,t){if(e=Hr(e),t=qu(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return bl(e)}function rt(e,t,n){try{return wl(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function _l(e,t){if(e=Hr(e),t=qu(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return bl(e)}function it(e,t,n){try{return _l(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function Xw(e,t=.15){return Zc(e)>.5?wl(e,t):_l(e,t)}function Zs(e,t,n){try{return Xw(e,t)}catch{return e}}const ss={black:"#000",white:"#fff"},Zw={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ni={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Mi={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Ao={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Di={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Li={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},$i={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function _g(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ss.white,default:ss.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const vg=_g();function Sg(){return{text:{primary:ss.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ss.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const eu=Sg();function vf(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=_l(e.main,i):t==="dark"&&(e.dark=wl(e.main,o)))}function Sf(e,t,n,r,i){const o=i.light||i,s=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(o*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(s*100).toFixed(0)}%)`))}function e_(e="light"){return e==="dark"?{main:Di[200],light:Di[50],dark:Di[400]}:{main:Di[700],light:Di[400],dark:Di[800]}}function t_(e="light"){return e==="dark"?{main:Ni[200],light:Ni[50],dark:Ni[400]}:{main:Ni[500],light:Ni[300],dark:Ni[700]}}function n_(e="light"){return e==="dark"?{main:Mi[500],light:Mi[300],dark:Mi[700]}:{main:Mi[700],light:Mi[400],dark:Mi[800]}}function r_(e="light"){return e==="dark"?{main:Li[400],light:Li[300],dark:Li[700]}:{main:Li[700],light:Li[500],dark:Li[900]}}function i_(e="light"){return e==="dark"?{main:$i[400],light:$i[300],dark:$i[700]}:{main:$i[800],light:$i[500],dark:$i[900]}}function o_(e="light"){return e==="dark"?{main:Ao[400],light:Ao[300],dark:Ao[700]}:{main:"#ed6c02",light:Ao[500],dark:Ao[900]}}function s_(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Hu(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...o}=e,s=e.primary||e_(t),a=e.secondary||t_(t),l=e.error||n_(t),c=e.info||r_(t),u=e.success||i_(t),f=e.warning||o_(t);function p(m){if(i)return s_(m);const E=_f(m,eu.text.primary)>=n?eu.text.primary:vg.text.primary;if(process.env.NODE_ENV!=="production"){const A=_f(m,E);A<3&&console.error([`MUI: The contrast ratio of ${A}:1 for ${E} on ${m}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
16
16
|
`))}return E}const b=({color:m,name:E,mainShade:A=500,lightShade:_=300,darkShade:x=700})=>{if(m={...m},!m.main&&m[A]&&(m.main=m[A]),!m.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
|
|
17
|
-
The color object needs to have a \`main\` property or a \`${A}\` property.`:
|
|
17
|
+
The color object needs to have a \`main\` property or a \`${A}\` property.`:qr(11,E?` (${E})`:"",A));if(typeof m.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${E?` (${E})`:""} provided to augmentColor(color) is invalid.
|
|
18
18
|
\`color.main\` should be a string, but \`${JSON.stringify(m.main)}\` was provided instead.
|
|
19
19
|
|
|
20
20
|
Did you intend to use one of the following approaches?
|
|
@@ -27,18 +27,18 @@ const theme1 = createTheme({ palette: {
|
|
|
27
27
|
|
|
28
28
|
const theme2 = createTheme({ palette: {
|
|
29
29
|
primary: { main: green[500] },
|
|
30
|
-
} });`:
|
|
31
|
-
`)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function l_(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ef=[];function yi(e){return Ef[0]=e,Ah(Ef)}function tu(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],a=t[o];if(!a)r[o]=s||{};else if(!s)r[o]=a;else{r[o]={...a};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;r[o][c]=tu(s[c],a[c],n)}}}else o==="className"&&n&&t.className?r.className=ju(e?.className,t?.className):o==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[o]===void 0&&(r[o]=e[o])}return r}const c_=We.createContext(void 0);process.env.NODE_ENV!=="production"&&(Se.node,Se.object);function u_(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?tu(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?tu(i,r,t.components.mergeClassNameAndStyle):r}function d_({props:e,name:t}){const n=We.useContext(c_);return u_({props:e,name:t,theme:{components:n}})}const f_=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function p_(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=f_(t),s=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,b){const h=s.indexOf(b);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:b)-r/100}${n})`}function u(p){return s.indexOf(p)+1<s.length?c(p,s[s.indexOf(p)+1]):a(p)}function f(p){const b=s.indexOf(p);return b===0?a(s[1]):b===s.length-1?l(s[b]):c(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:a,down:l,between:c,only:u,not:f,unit:n,...i}}const h_={borderRadius:4};function g_(e=8,t=zu({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function m_(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Eg(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...s}=e,a=p_(n),l=g_(i);let c=sn({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...h_,...o}},s);return c=sw(c),c.applyStyles=m_,c=t.reduce((u,f)=>sn(u,f),c),c.unstable_sxConfig={...bl,...s?.unstable_sxConfig},c.unstable_sx=function(f){return to({sx:f,theme:this})},c}const xf=(e,t,n,r=[])=>{let i=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},y_=(e,t,n)=>{function r(i,o=[],s=[]){Object.entries(i).forEach(([a,l])=>{(!n||n&&!n([...o,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,a],Array.isArray(l)?[...s,a]:s):t([...o,a],l,s))})}r(e)},b_=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function rc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},s={};return y_(e,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const u=`--${n?`${n}-`:""}${a.join("-")}`,f=b_(a,l);Object.assign(i,{[u]:f}),xf(o,a,`var(${u})`,c),xf(s,a,`var(${u}, ${f})`,c)}},a=>a[0]==="vars"),{css:i,vars:o,varsWithDefaults:s}}function w_(e,t={}){const{getSelector:n=E,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:o}=t,{colorSchemes:s={},components:a,defaultColorScheme:l="light",...c}=e,{vars:u,css:f,varsWithDefaults:p}=rc(c,t);let b=p;const h={},{[l]:g,...m}=s;if(Object.entries(m||{}).forEach(([x,d])=>{const{vars:w,css:S,varsWithDefaults:C}=rc(d,t);b=sn(b,C),h[x]={css:S,vars:w}}),g){const{css:x,vars:d,varsWithDefaults:w}=rc(g,t);b=sn(b,w),h[l]={css:x,vars:d}}function E(x,d){let w=i;if(i==="class"&&(w=".%s"),i==="data"&&(w="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(w=`[${i}="%s"]`),x){if(w==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${s[x]?.palette?.mode||x})`]:{":root":d}};if(w)return e.defaultColorScheme===x?`:root, ${w.replace("%s",String(x))}`:w.replace("%s",String(x))}return":root"}return{vars:b,generateThemeVars:()=>{let x={...u};return Object.entries(h).forEach(([,{vars:d}])=>{x=sn(x,d)}),x},generateStyleSheets:()=>{const x=[],d=e.defaultColorScheme||"light";function w(R,k){Object.keys(k).length&&x.push(typeof R=="string"?{[R]:{...k}}:R)}w(n(void 0,{...f}),f);const{[d]:S,...C}=h;if(S){const{css:R}=S,k=s[d]?.palette?.mode,T=!r&&k?{colorScheme:k,...R}:{...R};w(n(d,{...T}),T)}return Object.entries(C).forEach(([R,{css:k}])=>{const T=s[R]?.palette?.mode,y=!r&&T?{colorScheme:T,...k}:{...k};w(n(R,{...y}),y)}),o&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function __(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function v_(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Cf=e=>e,S_=()=>{let e=Cf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Cf}}},E_=S_(),x_={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Sl(e,t,n="Mui"){const r=x_[t];return r?`${n}-${r}`:`${E_.generate(e)}-${t}`}function C_(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function T_(e){return Math.round(e*1e5)/1e5}const Tf={textTransform:"uppercase"},Af='"Roboto", "Helvetica", "Arial", sans-serif';function A_(e,t){const{fontFamily:n=Af,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,b=u||(m=>`${m/l*p}rem`),h=(m,E,A,_,x)=>({fontFamily:n,fontWeight:m,fontSize:b(E),lineHeight:A,...n===Af?{letterSpacing:`${T_(_/E)}em`}:{},...x,...c}),g={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(o,48,1.167,0),h4:h(o,34,1.235,.25),h5:h(o,24,1.334,0),h6:h(s,20,1.6,.15),subtitle1:h(o,16,1.75,.15),subtitle2:h(s,14,1.57,.1),body1:h(o,16,1.5,.15),body2:h(o,14,1.43,.15),button:h(s,14,1.75,.4,Tf),caption:h(o,12,1.66,.4),overline:h(o,12,2.66,1,Tf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return sn({htmlFontSize:l,pxToRem:b,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:a,...g},f,{clone:!1})}const k_=.2,R_=.14,O_=.12;function ht(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${k_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${R_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${O_})`].join(",")}const I_=["none",ht(0,2,1,-1,0,1,1,0,0,1,3,0),ht(0,3,1,-2,0,2,2,0,0,1,5,0),ht(0,3,3,-2,0,3,4,0,0,1,8,0),ht(0,2,4,-1,0,4,5,0,0,1,10,0),ht(0,3,5,-1,0,5,8,0,0,1,14,0),ht(0,3,5,-1,0,6,10,0,0,1,18,0),ht(0,4,5,-2,0,7,10,1,0,2,16,1),ht(0,5,5,-3,0,8,10,1,0,3,14,2),ht(0,5,6,-3,0,9,12,1,0,3,16,2),ht(0,6,6,-3,0,10,14,1,0,4,18,3),ht(0,6,7,-4,0,11,15,1,0,4,20,3),ht(0,7,8,-4,0,12,17,2,0,5,22,4),ht(0,7,8,-4,0,13,19,2,0,5,24,4),ht(0,7,9,-4,0,14,21,2,0,5,26,4),ht(0,8,9,-5,0,15,22,2,0,6,28,5),ht(0,8,10,-5,0,16,24,2,0,6,30,5),ht(0,8,11,-5,0,17,26,2,0,6,32,5),ht(0,9,11,-5,0,18,28,2,0,7,34,6),ht(0,9,12,-6,0,19,29,2,0,7,36,6),ht(0,10,13,-6,0,20,31,3,0,8,38,7),ht(0,10,13,-6,0,21,33,3,0,8,40,7),ht(0,10,14,-6,0,22,35,3,0,8,42,7),ht(0,11,14,-7,0,23,36,3,0,9,44,8),ht(0,11,15,-7,0,24,38,3,0,9,46,8)],P_={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},N_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kf(e){return`${Math.round(e)}ms`}function M_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function D_(e){const t={...P_,...e.easing},n={...N_,...e.duration};return{getAutoHeightDuration:M_,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0,...c}=o;if(process.env.NODE_ENV!=="production"){const u=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!u(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!u(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!f(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
32
|
-
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:kf(s)} ${a} ${typeof l=="string"?l:kf(l)}`).join(",")},...e,easing:t,duration:n}}const L_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function $_(e){return
|
|
30
|
+
} });`:qr(12,E?` (${E})`:"",JSON.stringify(m.main)));return i?(Sf(i,m,"light",_,r),Sf(i,m,"dark",x,r)):(vf(m,"light",_,r),vf(m,"dark",x,r)),m.contrastText||(m.contrastText=p(m.main)),m};let h;return t==="light"?h=_g():t==="dark"&&(h=Sg()),process.env.NODE_ENV!=="production"&&(h||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),sn({common:{...ss},mode:t,primary:b({color:s,name:"primary"}),secondary:b({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:b({color:l,name:"error"}),warning:b({color:f,name:"warning"}),info:b({color:c,name:"info"}),success:b({color:u,name:"success"}),grey:Zw,contrastThreshold:n,getContrastText:p,augmentColor:b,tonalOffset:r,...h},o)}function a_(e,t){const n=$y(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
31
|
+
`)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function l_(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ef=[];function gi(e){return Ef[0]=e,Ah(Ef)}function tu(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const s=e[o],a=t[o];if(!a)r[o]=s||{};else if(!s)r[o]=a;else{r[o]={...a};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;r[o][c]=tu(s[c],a[c],n)}}}else o==="className"&&n&&t.className?r.className=ju(e?.className,t?.className):o==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[o]===void 0&&(r[o]=e[o])}return r}const c_=Ke.createContext(void 0);process.env.NODE_ENV!=="production"&&(xe.node,xe.object);function u_(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?tu(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?tu(i,r,t.components.mergeClassNameAndStyle):r}function d_({props:e,name:t}){const n=Ke.useContext(c_);return u_({props:e,name:t,theme:{components:n}})}const f_=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function p_(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=f_(t),s=Object.keys(o);function a(p){return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n})`}function l(p){return`@media (max-width:${(typeof t[p]=="number"?t[p]:p)-r/100}${n})`}function c(p,b){const h=s.indexOf(b);return`@media (min-width:${typeof t[p]=="number"?t[p]:p}${n}) and (max-width:${(h!==-1&&typeof t[s[h]]=="number"?t[s[h]]:b)-r/100}${n})`}function u(p){return s.indexOf(p)+1<s.length?c(p,s[s.indexOf(p)+1]):a(p)}function f(p){const b=s.indexOf(p);return b===0?a(s[1]):b===s.length-1?l(s[b]):c(p,s[s.indexOf(p)+1]).replace("@media","@media not all and")}return{keys:s,values:o,up:a,down:l,between:c,only:u,not:f,unit:n,...i}}const h_={borderRadius:4};function g_(e=8,t=zu({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" "));return n.mui=!0,n}function m_(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Eg(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...s}=e,a=p_(n),l=g_(i);let c=sn({breakpoints:a,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...h_,...o}},s);return c=sw(c),c.applyStyles=m_,c=t.reduce((u,f)=>sn(u,f),c),c.unstable_sxConfig={...yl,...s?.unstable_sxConfig},c.unstable_sx=function(f){return no({sx:f,theme:this})},c}const xf=(e,t,n,r=[])=>{let i=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},y_=(e,t,n)=>{function r(i,o=[],s=[]){Object.entries(i).forEach(([a,l])=>{(!n||n&&!n([...o,a]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,a],Array.isArray(l)?[...s,a]:s):t([...o,a],l,s))})}r(e)},b_=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function rc(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},s={};return y_(e,(a,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(a,l))){const u=`--${n?`${n}-`:""}${a.join("-")}`,f=b_(a,l);Object.assign(i,{[u]:f}),xf(o,a,`var(${u})`,c),xf(s,a,`var(${u}, ${f})`,c)}},a=>a[0]==="vars"),{css:i,vars:o,varsWithDefaults:s}}function w_(e,t={}){const{getSelector:n=E,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:o}=t,{colorSchemes:s={},components:a,defaultColorScheme:l="light",...c}=e,{vars:u,css:f,varsWithDefaults:p}=rc(c,t);let b=p;const h={},{[l]:g,...m}=s;if(Object.entries(m||{}).forEach(([x,d])=>{const{vars:w,css:S,varsWithDefaults:C}=rc(d,t);b=sn(b,C),h[x]={css:S,vars:w}}),g){const{css:x,vars:d,varsWithDefaults:w}=rc(g,t);b=sn(b,w),h[l]={css:x,vars:d}}function E(x,d){let w=i;if(i==="class"&&(w=".%s"),i==="data"&&(w="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(w=`[${i}="%s"]`),x){if(w==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${s[x]?.palette?.mode||x})`]:{":root":d}};if(w)return e.defaultColorScheme===x?`:root, ${w.replace("%s",String(x))}`:w.replace("%s",String(x))}return":root"}return{vars:b,generateThemeVars:()=>{let x={...u};return Object.entries(h).forEach(([,{vars:d}])=>{x=sn(x,d)}),x},generateStyleSheets:()=>{const x=[],d=e.defaultColorScheme||"light";function w(R,k){Object.keys(k).length&&x.push(typeof R=="string"?{[R]:{...k}}:R)}w(n(void 0,{...f}),f);const{[d]:S,...C}=h;if(S){const{css:R}=S,k=s[d]?.palette?.mode,T=!r&&k?{colorScheme:k,...R}:{...R};w(n(d,{...T}),T)}return Object.entries(C).forEach(([R,{css:k}])=>{const T=s[R]?.palette?.mode,y=!r&&T?{colorScheme:T,...k}:{...k};w(n(R,{...y}),y)}),o&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function __(e){const t={};return Object.entries(e).forEach(r=>{const[i,o]=r;typeof o=="object"&&(t[i]=`${o.fontStyle?`${o.fontStyle} `:""}${o.fontVariant?`${o.fontVariant} `:""}${o.fontWeight?`${o.fontWeight} `:""}${o.fontStretch?`${o.fontStretch} `:""}${o.fontSize||""}${o.lineHeight?`/${o.lineHeight} `:""}${o.fontFamily||""}`)}),t}function v_(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const Cf=e=>e,S_=()=>{let e=Cf;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Cf}}},E_=S_(),x_={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function vl(e,t,n="Mui"){const r=x_[t];return r?`${n}-${r}`:`${E_.generate(e)}-${t}`}function C_(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function T_(e){return Math.round(e*1e5)/1e5}const Tf={textTransform:"uppercase"},Af='"Roboto", "Helvetica", "Arial", sans-serif';function A_(e,t){const{fontFamily:n=Af,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:o=400,fontWeightMedium:s=500,fontWeightBold:a=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...f}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof r!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof l!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const p=r/14,b=u||(m=>`${m/l*p}rem`),h=(m,E,A,_,x)=>({fontFamily:n,fontWeight:m,fontSize:b(E),lineHeight:A,...n===Af?{letterSpacing:`${T_(_/E)}em`}:{},...x,...c}),g={h1:h(i,96,1.167,-1.5),h2:h(i,60,1.2,-.5),h3:h(o,48,1.167,0),h4:h(o,34,1.235,.25),h5:h(o,24,1.334,0),h6:h(s,20,1.6,.15),subtitle1:h(o,16,1.75,.15),subtitle2:h(s,14,1.57,.1),body1:h(o,16,1.5,.15),body2:h(o,14,1.43,.15),button:h(s,14,1.75,.4,Tf),caption:h(o,12,1.66,.4),overline:h(o,12,2.66,1,Tf),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return sn({htmlFontSize:l,pxToRem:b,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:o,fontWeightMedium:s,fontWeightBold:a,...g},f,{clone:!1})}const k_=.2,R_=.14,O_=.12;function gt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${k_})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${R_})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${O_})`].join(",")}const I_=["none",gt(0,2,1,-1,0,1,1,0,0,1,3,0),gt(0,3,1,-2,0,2,2,0,0,1,5,0),gt(0,3,3,-2,0,3,4,0,0,1,8,0),gt(0,2,4,-1,0,4,5,0,0,1,10,0),gt(0,3,5,-1,0,5,8,0,0,1,14,0),gt(0,3,5,-1,0,6,10,0,0,1,18,0),gt(0,4,5,-2,0,7,10,1,0,2,16,1),gt(0,5,5,-3,0,8,10,1,0,3,14,2),gt(0,5,6,-3,0,9,12,1,0,3,16,2),gt(0,6,6,-3,0,10,14,1,0,4,18,3),gt(0,6,7,-4,0,11,15,1,0,4,20,3),gt(0,7,8,-4,0,12,17,2,0,5,22,4),gt(0,7,8,-4,0,13,19,2,0,5,24,4),gt(0,7,9,-4,0,14,21,2,0,5,26,4),gt(0,8,9,-5,0,15,22,2,0,6,28,5),gt(0,8,10,-5,0,16,24,2,0,6,30,5),gt(0,8,11,-5,0,17,26,2,0,6,32,5),gt(0,9,11,-5,0,18,28,2,0,7,34,6),gt(0,9,12,-6,0,19,29,2,0,7,36,6),gt(0,10,13,-6,0,20,31,3,0,8,38,7),gt(0,10,13,-6,0,21,33,3,0,8,40,7),gt(0,10,14,-6,0,22,35,3,0,8,42,7),gt(0,11,14,-7,0,23,36,3,0,9,44,8),gt(0,11,15,-7,0,24,38,3,0,9,46,8)],P_={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},N_={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kf(e){return`${Math.round(e)}ms`}function M_(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function D_(e){const t={...P_,...e.easing},n={...N_,...e.duration};return{getAutoHeightDuration:M_,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0,...c}=o;if(process.env.NODE_ENV!=="production"){const u=p=>typeof p=="string",f=p=>!Number.isNaN(parseFloat(p));!u(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!f(s)&&!u(s)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${s}.`),u(a)||console.error('MUI: Argument "easing" must be a string.'),!f(l)&&!u(l)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof o!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
32
|
+
`)),Object.keys(c).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(c).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof s=="string"?s:kf(s)} ${a} ${typeof l=="string"?l:kf(l)}`).join(",")},...e,easing:t,duration:n}}const L_={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function $_(e){return br(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function xg(e={}){const t={...e};function n(r){const i=Object.entries(r);for(let o=0;o<i.length;o++){const[s,a]=i[o];!$_(a)||s.startsWith("unstable_")?delete r[s]:br(a)&&(r[s]={...a},n(r[s]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
33
33
|
|
|
34
34
|
const theme = ${JSON.stringify(t,null,2)};
|
|
35
35
|
|
|
36
36
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
37
37
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
38
38
|
|
|
39
|
-
export default theme;`}function Rf(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const B_=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function F_(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:wg(t,B_(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Rf(n)})`:
|
|
40
|
-
`))}m[A]={}}}};Object.keys(b.components).forEach(m=>{const E=b.components[m].styleOverrides;E&&m.startsWith("Mui")&&g(E,m)})}return b.unstable_sxConfig={...
|
|
41
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function K_(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Wn=e=>{try{return e()}catch{}},G_=(e="mui")=>xi.unstable_createGetCssVar(e);function ic(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;const o=i==="dark"?"dark":"light";if(!r){t[i]=U_({...n,palette:{mode:o,...n?.palette},colorSpace:e});return}const{palette:s,...a}=nu({...r,palette:{mode:o,...n?.palette},colorSpace:e});return t[i]={...n,palette:s,opacity:{...Cg(o),...n?.opacity},overlays:n?.overlays||Tg(o)},a}function Q_(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",nativeColor:s=!1,shouldSkipGeneratingVar:a=q_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(n)[0],p=r||(n.light&&f!=="light"?"light":f),b=G_(o),{[p]:h,light:g,dark:m,...E}=n,A={...E};let _=h;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(_=!0),!_)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Ur(21,p));let x;s&&(x="oklch");const d=ic(x,A,_,u,p);g&&!A.light&&ic(x,A,g,void 0,"light"),m&&!A.dark&&ic(x,A,m,void 0,"dark");let w={defaultColorScheme:p,...d,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:b,colorSchemes:A,font:{...__(d.typography),...d.font},spacing:K_(u.spacing)};Object.keys(w.colorSchemes).forEach(T=>{const y=w.colorSchemes[T].palette,I=L=>{const U=L.split("-"),Z=U[1],V=U[2];return b(L,y[Z][V])};y.mode==="light"&&(G(y.common,"background","#fff"),G(y.common,"onBackground","#000")),y.mode==="dark"&&(G(y.common,"background","#000"),G(y.common,"onBackground","#fff"));function O(L,U,Z){if(x){let V;return L===ii&&(V=`transparent ${((1-Z)*100).toFixed(0)}%`),L===et&&(V=`#000 ${(Z*100).toFixed(0)}%`),L===tt&&(V=`#fff ${(Z*100).toFixed(0)}%`),`color-mix(in ${x}, ${U}, ${V})`}return L(U,Z)}if(W_(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){G(y.Alert,"errorColor",O(et,y.error.light,.6)),G(y.Alert,"infoColor",O(et,y.info.light,.6)),G(y.Alert,"successColor",O(et,y.success.light,.6)),G(y.Alert,"warningColor",O(et,y.warning.light,.6)),G(y.Alert,"errorFilledBg",I("palette-error-main")),G(y.Alert,"infoFilledBg",I("palette-info-main")),G(y.Alert,"successFilledBg",I("palette-success-main")),G(y.Alert,"warningFilledBg",I("palette-warning-main")),G(y.Alert,"errorFilledColor",Wn(()=>y.getContrastText(y.error.main))),G(y.Alert,"infoFilledColor",Wn(()=>y.getContrastText(y.info.main))),G(y.Alert,"successFilledColor",Wn(()=>y.getContrastText(y.success.main))),G(y.Alert,"warningFilledColor",Wn(()=>y.getContrastText(y.warning.main))),G(y.Alert,"errorStandardBg",O(tt,y.error.light,.9)),G(y.Alert,"infoStandardBg",O(tt,y.info.light,.9)),G(y.Alert,"successStandardBg",O(tt,y.success.light,.9)),G(y.Alert,"warningStandardBg",O(tt,y.warning.light,.9)),G(y.Alert,"errorIconColor",I("palette-error-main")),G(y.Alert,"infoIconColor",I("palette-info-main")),G(y.Alert,"successIconColor",I("palette-success-main")),G(y.Alert,"warningIconColor",I("palette-warning-main")),G(y.AppBar,"defaultBg",I("palette-grey-100")),G(y.Avatar,"defaultBg",I("palette-grey-400")),G(y.Button,"inheritContainedBg",I("palette-grey-300")),G(y.Button,"inheritContainedHoverBg",I("palette-grey-A100")),G(y.Chip,"defaultBorder",I("palette-grey-400")),G(y.Chip,"defaultAvatarColor",I("palette-grey-700")),G(y.Chip,"defaultIconColor",I("palette-grey-700")),G(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),G(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),G(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),G(y.LinearProgress,"primaryBg",O(tt,y.primary.main,.62)),G(y.LinearProgress,"secondaryBg",O(tt,y.secondary.main,.62)),G(y.LinearProgress,"errorBg",O(tt,y.error.main,.62)),G(y.LinearProgress,"infoBg",O(tt,y.info.main,.62)),G(y.LinearProgress,"successBg",O(tt,y.success.main,.62)),G(y.LinearProgress,"warningBg",O(tt,y.warning.main,.62)),G(y.Skeleton,"bg",x?O(ii,y.text.primary,.11):`rgba(${I("palette-text-primaryChannel")} / 0.11)`),G(y.Slider,"primaryTrack",O(tt,y.primary.main,.62)),G(y.Slider,"secondaryTrack",O(tt,y.secondary.main,.62)),G(y.Slider,"errorTrack",O(tt,y.error.main,.62)),G(y.Slider,"infoTrack",O(tt,y.info.main,.62)),G(y.Slider,"successTrack",O(tt,y.success.main,.62)),G(y.Slider,"warningTrack",O(tt,y.warning.main,.62));const L=x?O(et,y.background.default,.6825):ea(y.background.default,.8);G(y.SnackbarContent,"bg",L),G(y.SnackbarContent,"color",Wn(()=>x?eu.text.primary:y.getContrastText(L))),G(y.SpeedDialAction,"fabHoverBg",ea(y.background.paper,.15)),G(y.StepConnector,"border",I("palette-grey-400")),G(y.StepContent,"border",I("palette-grey-400")),G(y.Switch,"defaultColor",I("palette-common-white")),G(y.Switch,"defaultDisabledColor",I("palette-grey-100")),G(y.Switch,"primaryDisabledColor",O(tt,y.primary.main,.62)),G(y.Switch,"secondaryDisabledColor",O(tt,y.secondary.main,.62)),G(y.Switch,"errorDisabledColor",O(tt,y.error.main,.62)),G(y.Switch,"infoDisabledColor",O(tt,y.info.main,.62)),G(y.Switch,"successDisabledColor",O(tt,y.success.main,.62)),G(y.Switch,"warningDisabledColor",O(tt,y.warning.main,.62)),G(y.TableCell,"border",O(tt,O(ii,y.divider,1),.88)),G(y.Tooltip,"bg",O(ii,y.grey[700],.92))}if(y.mode==="dark"){G(y.Alert,"errorColor",O(tt,y.error.light,.6)),G(y.Alert,"infoColor",O(tt,y.info.light,.6)),G(y.Alert,"successColor",O(tt,y.success.light,.6)),G(y.Alert,"warningColor",O(tt,y.warning.light,.6)),G(y.Alert,"errorFilledBg",I("palette-error-dark")),G(y.Alert,"infoFilledBg",I("palette-info-dark")),G(y.Alert,"successFilledBg",I("palette-success-dark")),G(y.Alert,"warningFilledBg",I("palette-warning-dark")),G(y.Alert,"errorFilledColor",Wn(()=>y.getContrastText(y.error.dark))),G(y.Alert,"infoFilledColor",Wn(()=>y.getContrastText(y.info.dark))),G(y.Alert,"successFilledColor",Wn(()=>y.getContrastText(y.success.dark))),G(y.Alert,"warningFilledColor",Wn(()=>y.getContrastText(y.warning.dark))),G(y.Alert,"errorStandardBg",O(et,y.error.light,.9)),G(y.Alert,"infoStandardBg",O(et,y.info.light,.9)),G(y.Alert,"successStandardBg",O(et,y.success.light,.9)),G(y.Alert,"warningStandardBg",O(et,y.warning.light,.9)),G(y.Alert,"errorIconColor",I("palette-error-main")),G(y.Alert,"infoIconColor",I("palette-info-main")),G(y.Alert,"successIconColor",I("palette-success-main")),G(y.Alert,"warningIconColor",I("palette-warning-main")),G(y.AppBar,"defaultBg",I("palette-grey-900")),G(y.AppBar,"darkBg",I("palette-background-paper")),G(y.AppBar,"darkColor",I("palette-text-primary")),G(y.Avatar,"defaultBg",I("palette-grey-600")),G(y.Button,"inheritContainedBg",I("palette-grey-800")),G(y.Button,"inheritContainedHoverBg",I("palette-grey-700")),G(y.Chip,"defaultBorder",I("palette-grey-700")),G(y.Chip,"defaultAvatarColor",I("palette-grey-300")),G(y.Chip,"defaultIconColor",I("palette-grey-300")),G(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),G(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),G(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),G(y.LinearProgress,"primaryBg",O(et,y.primary.main,.5)),G(y.LinearProgress,"secondaryBg",O(et,y.secondary.main,.5)),G(y.LinearProgress,"errorBg",O(et,y.error.main,.5)),G(y.LinearProgress,"infoBg",O(et,y.info.main,.5)),G(y.LinearProgress,"successBg",O(et,y.success.main,.5)),G(y.LinearProgress,"warningBg",O(et,y.warning.main,.5)),G(y.Skeleton,"bg",x?O(ii,y.text.primary,.13):`rgba(${I("palette-text-primaryChannel")} / 0.13)`),G(y.Slider,"primaryTrack",O(et,y.primary.main,.5)),G(y.Slider,"secondaryTrack",O(et,y.secondary.main,.5)),G(y.Slider,"errorTrack",O(et,y.error.main,.5)),G(y.Slider,"infoTrack",O(et,y.info.main,.5)),G(y.Slider,"successTrack",O(et,y.success.main,.5)),G(y.Slider,"warningTrack",O(et,y.warning.main,.5));const L=x?O(tt,y.background.default,.985):ea(y.background.default,.98);G(y.SnackbarContent,"bg",L),G(y.SnackbarContent,"color",Wn(()=>x?vg.text.primary:y.getContrastText(L))),G(y.SpeedDialAction,"fabHoverBg",ea(y.background.paper,.15)),G(y.StepConnector,"border",I("palette-grey-600")),G(y.StepContent,"border",I("palette-grey-600")),G(y.Switch,"defaultColor",I("palette-grey-300")),G(y.Switch,"defaultDisabledColor",I("palette-grey-600")),G(y.Switch,"primaryDisabledColor",O(et,y.primary.main,.55)),G(y.Switch,"secondaryDisabledColor",O(et,y.secondary.main,.55)),G(y.Switch,"errorDisabledColor",O(et,y.error.main,.55)),G(y.Switch,"infoDisabledColor",O(et,y.info.main,.55)),G(y.Switch,"successDisabledColor",O(et,y.success.main,.55)),G(y.Switch,"warningDisabledColor",O(et,y.warning.main,.55)),G(y.TableCell,"border",O(et,O(ii,y.divider,1),.68)),G(y.Tooltip,"bg",O(ii,y.grey[700],.92))}cr(y.background,"default"),cr(y.background,"paper"),cr(y.common,"background"),cr(y.common,"onBackground"),cr(y,"divider"),Object.keys(y).forEach(L=>{const U=y[L];L!=="tonalOffset"&&U&&typeof U=="object"&&(U.main&&G(y[L],"mainChannel",zo(Uo(U.main))),U.light&&G(y[L],"lightChannel",zo(Uo(U.light))),U.dark&&G(y[L],"darkChannel",zo(Uo(U.dark))),U.contrastText&&G(y[L],"contrastTextChannel",zo(Uo(U.contrastText))),L==="text"&&(cr(y[L],"primary"),cr(y[L],"secondary")),L==="action"&&(U.active&&cr(y[L],"active"),U.selected&&cr(y[L],"selected")))})}),w=t.reduce((T,y)=>sn(T,y),w);const S={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:V_(w),enableContrastVars:s},{vars:C,generateThemeVars:R,generateStyleSheets:k}=w_(w,S);return w.vars=C,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([T,y])=>{w[T]=y}),w.generateThemeVars=R,w.generateStyleSheets=k,w.generateSpacing=function(){return xi.createSpacing(u.spacing,zu(this))},w.getColorSchemeSelector=v_(l),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...bl,...u?.unstable_sxConfig},w.unstable_sx=function(y){return to({sx:y,theme:this})},w.toRuntimeSource=xg,w}function Of(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Hu({...n===!0?{}:n.palette,mode:t})})}function Y_(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n?.mode,...s}=e,a=o||"light",l=i?.[a],c={...i,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return nu(e,...t);let u=n;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));const f=nu({...e,palette:u},...t);return f.defaultColorScheme=a,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},Of(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},Of(f,"light",c.light)),f}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),Q_({...s,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const J_=Y_(),X_="$$material";function Ag(e,t=""){return e.displayName||e.name||t}function If(e,t,n){const r=Ag(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Z_(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ag(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Na.ForwardRef:return If(e,e.render,"ForwardRef");case Na.Memo:return If(e,e.type,"memo");default:return}}}function ev(e){const{variants:t,...n}=e,r={variants:t,style:yi(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=yi(i.style))}),r}const tv=Eg();function oc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function hi(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function nv(e){return e?(t,n)=>n[e]:null}function rv(e,t,n){e.theme=av(e.theme)?n:e.theme[t]||e.theme}function Ta(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>Ta(e,i,n));if(Array.isArray(r?.variants)){let i;if(r.isProcessed)i=n?hi(r.style,n):r.style;else{const{variants:o,...s}=r;i=n?hi(yi(s),n):s}return kg(e,r.variants,[i],n)}return r?.isProcessed?n?hi(yi(r.style),n):r.style:n?hi(yi(r),n):r}function kg(e,t,n=[],r=void 0){let i;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(i))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&e.ownerState?.[a]!==s.props[a])continue e;typeof s.style=="function"?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?hi(yi(s.style(i)),r):s.style(i))):n.push(r?hi(yi(s.style),r):s.style)}return n}function iv(e={}){const{themeId:t,defaultTheme:n=tv,rootShouldForwardProp:r=oc,slotShouldForwardProp:i=oc}=e;function o(a){rv(a,t,n)}return(a,l={})=>{l_(a,w=>w.filter(S=>S!==to));const{name:c,slot:u,skipVariantsResolver:f,skipSx:p,overridesResolver:b=nv(Rg(u)),...h}=l,g=c&&c.startsWith("Mui")||u?"components":"custom",m=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,E=p||!1;let A=oc;u==="Root"||u==="root"?A=r:u?A=i:lv(a)&&(A=void 0);const _=a_(a,{shouldForwardProp:A,label:sv(c,u),...h}),x=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(C){return Ta(C,w,C.theme.modularCssLayers?g:void 0)};if(yr(w)){const S=ev(w);return function(R){return S.variants?Ta(R,S,R.theme.modularCssLayers?g:void 0):R.theme.modularCssLayers?hi(S.style,g):S.style}}return w},d=(...w)=>{const S=[],C=w.map(x),R=[];if(S.push(o),c&&b&&R.push(function(I){const L=I.theme.components?.[c]?.styleOverrides;if(!L)return null;const U={};for(const Z in L)U[Z]=Ta(I,L[Z],I.theme.modularCssLayers?"theme":void 0);return b(I,U)}),c&&!m&&R.push(function(I){const L=I.theme?.components?.[c]?.variants;return L?kg(I,L,[],I.theme.modularCssLayers?"theme":void 0):null}),E||R.push(to),Array.isArray(C[0])){const y=C.shift(),I=new Array(S.length).fill(""),O=new Array(R.length).fill("");let L;L=[...I,...y,...O],L.raw=[...I,...y.raw,...O],S.unshift(L)}const k=[...S,...C,...R],T=_(...k);return a.muiName&&(T.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(T.displayName=ov(c,u,a)),T};return _.withConfig&&(d.withConfig=_.withConfig),d}}function ov(e,t,n){return e?`${e}${Mn(t||"")}`:`Styled(${Z_(n)})`}function sv(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Rg(t||"Root")}`),n}function av(e){for(const t in e)return!1;return!0}function lv(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Rg(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function cv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const uv=e=>cv(e)&&e!=="classes",cn=iv({themeId:X_,defaultTheme:J_,rootShouldForwardProp:uv}),El=xi.unstable_memoTheme;process.env.NODE_ENV!=="production"&&(Se.node,Se.object.isRequired);function Og(e){return d_(e)}function dv(e){return typeof e.main=="string"}function fv(e,t=[]){if(!dv(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function pv(e=[]){return([,t])=>t&&fv(t,e)}function Ig(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=Sl(e,i,n)}),r}function hv(e){return Sl("MuiCircularProgress",e)}Ig("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const An=44,ru=xi.keyframes`
|
|
39
|
+
export default theme;`}function Rf(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const B_=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function F_(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:wg(t,B_(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Rf(n)})`:_l(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Rf(n)})`:wl(t,n)}})}function nu(e={},...t){const{breakpoints:n,mixins:r={},spacing:i,palette:o={},transitions:s={},typography:a={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":qr(20));const f=Hu({...o,colorSpace:c}),p=Eg(e);let b=sn(p,{mixins:C_(p.breakpoints,r),palette:f,shadows:I_.slice(),typography:A_(f,a),transitions:D_(s),zIndex:{...L_}});if(b=sn(b,u),b=t.reduce((h,g)=>sn(h,g),b),process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],g=(m,E)=>{let A;for(A in m){const _=m[A];if(h.includes(A)&&Object.keys(_).length>0){if(process.env.NODE_ENV!=="production"){const x=vl("",A);console.error([`MUI: The \`${E}\` component increases the CSS specificity of the \`${A}\` internal state.`,"You can not override it like this: ",JSON.stringify(m,null,2),"",`Instead, you need to use the '&.${x}' syntax:`,JSON.stringify({root:{[`&.${x}`]:_}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
40
|
+
`))}m[A]={}}}};Object.keys(b.components).forEach(m=>{const E=b.components[m].styleOverrides;E&&m.startsWith("Mui")&&g(E,m)})}return b.unstable_sxConfig={...yl,...u?.unstable_sxConfig},b.unstable_sx=function(g){return no({sx:g,theme:this})},b.toRuntimeSource=xg,F_(b),b}function j_(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const z_=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=j_(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Cg(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Tg(e){return e==="dark"?z_:[]}function U_(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:i,...o}=e,s=Hu({...t,colorSpace:i});return{palette:s,opacity:{...Cg(s.mode),...n},overlays:r||Tg(s.mode),...o}}function q_(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const H_=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],V_=e=>(t,n)=>{const r=e.rootSelector||":root",i=e.colorSchemeSelector;let o=i;if(i==="class"&&(o=".%s"),i==="data"&&(o="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(o=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const s={};return H_(e.cssVarPrefix).forEach(a=>{s[a]=n[a],delete n[a]}),o==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:s}}:o?{[o.replace("%s",t)]:s,[`${r}, ${o.replace("%s",t)}`]:n}:{[r]:{...n,...s}}}if(o&&o!=="media")return`${r}, ${o.replace("%s",String(t))}`}else if(t){if(o==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(o)return o.replace("%s",String(t))}return r};function W_(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function Ho(e){return typeof e!="string"||!e.startsWith("hsl")?e:bg(e)}function ur(e,t){`${t}Channel`in e||(e[`${t}Channel`]=qo(Ho(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
41
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function K_(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Gn=e=>{try{return e()}catch{}},G_=(e="mui")=>Si.unstable_createGetCssVar(e);function ic(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;const o=i==="dark"?"dark":"light";if(!r){t[i]=U_({...n,palette:{mode:o,...n?.palette},colorSpace:e});return}const{palette:s,...a}=nu({...r,palette:{mode:o,...n?.palette},colorSpace:e});return t[i]={...n,palette:s,opacity:{...Cg(o),...n?.opacity},overlays:n?.overlays||Tg(o)},a}function Q_(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",nativeColor:s=!1,shouldSkipGeneratingVar:a=q_,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(n)[0],p=r||(n.light&&f!=="light"?"light":f),b=G_(o),{[p]:h,light:g,dark:m,...E}=n,A={...E};let _=h;if((p==="dark"&&!("dark"in n)||p==="light"&&!("light"in n))&&(_=!0),!_)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:qr(21,p));let x;s&&(x="oklch");const d=ic(x,A,_,u,p);g&&!A.light&&ic(x,A,g,void 0,"light"),m&&!A.dark&&ic(x,A,m,void 0,"dark");let w={defaultColorScheme:p,...d,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:b,colorSchemes:A,font:{...__(d.typography),...d.font},spacing:K_(u.spacing)};Object.keys(w.colorSchemes).forEach(T=>{const y=w.colorSchemes[T].palette,I=L=>{const z=L.split("-"),X=z[1],H=z[2];return b(L,y[X][H])};y.mode==="light"&&(G(y.common,"background","#fff"),G(y.common,"onBackground","#000")),y.mode==="dark"&&(G(y.common,"background","#000"),G(y.common,"onBackground","#fff"));function O(L,z,X){if(x){let H;return L===ni&&(H=`transparent ${((1-X)*100).toFixed(0)}%`),L===rt&&(H=`#000 ${(X*100).toFixed(0)}%`),L===it&&(H=`#fff ${(X*100).toFixed(0)}%`),`color-mix(in ${x}, ${z}, ${H})`}return L(z,X)}if(W_(y,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),y.mode==="light"){G(y.Alert,"errorColor",O(rt,y.error.light,.6)),G(y.Alert,"infoColor",O(rt,y.info.light,.6)),G(y.Alert,"successColor",O(rt,y.success.light,.6)),G(y.Alert,"warningColor",O(rt,y.warning.light,.6)),G(y.Alert,"errorFilledBg",I("palette-error-main")),G(y.Alert,"infoFilledBg",I("palette-info-main")),G(y.Alert,"successFilledBg",I("palette-success-main")),G(y.Alert,"warningFilledBg",I("palette-warning-main")),G(y.Alert,"errorFilledColor",Gn(()=>y.getContrastText(y.error.main))),G(y.Alert,"infoFilledColor",Gn(()=>y.getContrastText(y.info.main))),G(y.Alert,"successFilledColor",Gn(()=>y.getContrastText(y.success.main))),G(y.Alert,"warningFilledColor",Gn(()=>y.getContrastText(y.warning.main))),G(y.Alert,"errorStandardBg",O(it,y.error.light,.9)),G(y.Alert,"infoStandardBg",O(it,y.info.light,.9)),G(y.Alert,"successStandardBg",O(it,y.success.light,.9)),G(y.Alert,"warningStandardBg",O(it,y.warning.light,.9)),G(y.Alert,"errorIconColor",I("palette-error-main")),G(y.Alert,"infoIconColor",I("palette-info-main")),G(y.Alert,"successIconColor",I("palette-success-main")),G(y.Alert,"warningIconColor",I("palette-warning-main")),G(y.AppBar,"defaultBg",I("palette-grey-100")),G(y.Avatar,"defaultBg",I("palette-grey-400")),G(y.Button,"inheritContainedBg",I("palette-grey-300")),G(y.Button,"inheritContainedHoverBg",I("palette-grey-A100")),G(y.Chip,"defaultBorder",I("palette-grey-400")),G(y.Chip,"defaultAvatarColor",I("palette-grey-700")),G(y.Chip,"defaultIconColor",I("palette-grey-700")),G(y.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),G(y.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),G(y.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),G(y.LinearProgress,"primaryBg",O(it,y.primary.main,.62)),G(y.LinearProgress,"secondaryBg",O(it,y.secondary.main,.62)),G(y.LinearProgress,"errorBg",O(it,y.error.main,.62)),G(y.LinearProgress,"infoBg",O(it,y.info.main,.62)),G(y.LinearProgress,"successBg",O(it,y.success.main,.62)),G(y.LinearProgress,"warningBg",O(it,y.warning.main,.62)),G(y.Skeleton,"bg",x?O(ni,y.text.primary,.11):`rgba(${I("palette-text-primaryChannel")} / 0.11)`),G(y.Slider,"primaryTrack",O(it,y.primary.main,.62)),G(y.Slider,"secondaryTrack",O(it,y.secondary.main,.62)),G(y.Slider,"errorTrack",O(it,y.error.main,.62)),G(y.Slider,"infoTrack",O(it,y.info.main,.62)),G(y.Slider,"successTrack",O(it,y.success.main,.62)),G(y.Slider,"warningTrack",O(it,y.warning.main,.62));const L=x?O(rt,y.background.default,.6825):Zs(y.background.default,.8);G(y.SnackbarContent,"bg",L),G(y.SnackbarContent,"color",Gn(()=>x?eu.text.primary:y.getContrastText(L))),G(y.SpeedDialAction,"fabHoverBg",Zs(y.background.paper,.15)),G(y.StepConnector,"border",I("palette-grey-400")),G(y.StepContent,"border",I("palette-grey-400")),G(y.Switch,"defaultColor",I("palette-common-white")),G(y.Switch,"defaultDisabledColor",I("palette-grey-100")),G(y.Switch,"primaryDisabledColor",O(it,y.primary.main,.62)),G(y.Switch,"secondaryDisabledColor",O(it,y.secondary.main,.62)),G(y.Switch,"errorDisabledColor",O(it,y.error.main,.62)),G(y.Switch,"infoDisabledColor",O(it,y.info.main,.62)),G(y.Switch,"successDisabledColor",O(it,y.success.main,.62)),G(y.Switch,"warningDisabledColor",O(it,y.warning.main,.62)),G(y.TableCell,"border",O(it,O(ni,y.divider,1),.88)),G(y.Tooltip,"bg",O(ni,y.grey[700],.92))}if(y.mode==="dark"){G(y.Alert,"errorColor",O(it,y.error.light,.6)),G(y.Alert,"infoColor",O(it,y.info.light,.6)),G(y.Alert,"successColor",O(it,y.success.light,.6)),G(y.Alert,"warningColor",O(it,y.warning.light,.6)),G(y.Alert,"errorFilledBg",I("palette-error-dark")),G(y.Alert,"infoFilledBg",I("palette-info-dark")),G(y.Alert,"successFilledBg",I("palette-success-dark")),G(y.Alert,"warningFilledBg",I("palette-warning-dark")),G(y.Alert,"errorFilledColor",Gn(()=>y.getContrastText(y.error.dark))),G(y.Alert,"infoFilledColor",Gn(()=>y.getContrastText(y.info.dark))),G(y.Alert,"successFilledColor",Gn(()=>y.getContrastText(y.success.dark))),G(y.Alert,"warningFilledColor",Gn(()=>y.getContrastText(y.warning.dark))),G(y.Alert,"errorStandardBg",O(rt,y.error.light,.9)),G(y.Alert,"infoStandardBg",O(rt,y.info.light,.9)),G(y.Alert,"successStandardBg",O(rt,y.success.light,.9)),G(y.Alert,"warningStandardBg",O(rt,y.warning.light,.9)),G(y.Alert,"errorIconColor",I("palette-error-main")),G(y.Alert,"infoIconColor",I("palette-info-main")),G(y.Alert,"successIconColor",I("palette-success-main")),G(y.Alert,"warningIconColor",I("palette-warning-main")),G(y.AppBar,"defaultBg",I("palette-grey-900")),G(y.AppBar,"darkBg",I("palette-background-paper")),G(y.AppBar,"darkColor",I("palette-text-primary")),G(y.Avatar,"defaultBg",I("palette-grey-600")),G(y.Button,"inheritContainedBg",I("palette-grey-800")),G(y.Button,"inheritContainedHoverBg",I("palette-grey-700")),G(y.Chip,"defaultBorder",I("palette-grey-700")),G(y.Chip,"defaultAvatarColor",I("palette-grey-300")),G(y.Chip,"defaultIconColor",I("palette-grey-300")),G(y.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),G(y.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),G(y.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),G(y.LinearProgress,"primaryBg",O(rt,y.primary.main,.5)),G(y.LinearProgress,"secondaryBg",O(rt,y.secondary.main,.5)),G(y.LinearProgress,"errorBg",O(rt,y.error.main,.5)),G(y.LinearProgress,"infoBg",O(rt,y.info.main,.5)),G(y.LinearProgress,"successBg",O(rt,y.success.main,.5)),G(y.LinearProgress,"warningBg",O(rt,y.warning.main,.5)),G(y.Skeleton,"bg",x?O(ni,y.text.primary,.13):`rgba(${I("palette-text-primaryChannel")} / 0.13)`),G(y.Slider,"primaryTrack",O(rt,y.primary.main,.5)),G(y.Slider,"secondaryTrack",O(rt,y.secondary.main,.5)),G(y.Slider,"errorTrack",O(rt,y.error.main,.5)),G(y.Slider,"infoTrack",O(rt,y.info.main,.5)),G(y.Slider,"successTrack",O(rt,y.success.main,.5)),G(y.Slider,"warningTrack",O(rt,y.warning.main,.5));const L=x?O(it,y.background.default,.985):Zs(y.background.default,.98);G(y.SnackbarContent,"bg",L),G(y.SnackbarContent,"color",Gn(()=>x?vg.text.primary:y.getContrastText(L))),G(y.SpeedDialAction,"fabHoverBg",Zs(y.background.paper,.15)),G(y.StepConnector,"border",I("palette-grey-600")),G(y.StepContent,"border",I("palette-grey-600")),G(y.Switch,"defaultColor",I("palette-grey-300")),G(y.Switch,"defaultDisabledColor",I("palette-grey-600")),G(y.Switch,"primaryDisabledColor",O(rt,y.primary.main,.55)),G(y.Switch,"secondaryDisabledColor",O(rt,y.secondary.main,.55)),G(y.Switch,"errorDisabledColor",O(rt,y.error.main,.55)),G(y.Switch,"infoDisabledColor",O(rt,y.info.main,.55)),G(y.Switch,"successDisabledColor",O(rt,y.success.main,.55)),G(y.Switch,"warningDisabledColor",O(rt,y.warning.main,.55)),G(y.TableCell,"border",O(rt,O(ni,y.divider,1),.68)),G(y.Tooltip,"bg",O(ni,y.grey[700],.92))}ur(y.background,"default"),ur(y.background,"paper"),ur(y.common,"background"),ur(y.common,"onBackground"),ur(y,"divider"),Object.keys(y).forEach(L=>{const z=y[L];L!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&G(y[L],"mainChannel",qo(Ho(z.main))),z.light&&G(y[L],"lightChannel",qo(Ho(z.light))),z.dark&&G(y[L],"darkChannel",qo(Ho(z.dark))),z.contrastText&&G(y[L],"contrastTextChannel",qo(Ho(z.contrastText))),L==="text"&&(ur(y[L],"primary"),ur(y[L],"secondary")),L==="action"&&(z.active&&ur(y[L],"active"),z.selected&&ur(y[L],"selected")))})}),w=t.reduce((T,y)=>sn(T,y),w);const S={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:a,getSelector:V_(w),enableContrastVars:s},{vars:C,generateThemeVars:R,generateStyleSheets:k}=w_(w,S);return w.vars=C,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([T,y])=>{w[T]=y}),w.generateThemeVars=R,w.generateStyleSheets=k,w.generateSpacing=function(){return Si.createSpacing(u.spacing,zu(this))},w.getColorSchemeSelector=v_(l),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...yl,...u?.unstable_sxConfig},w.unstable_sx=function(y){return no({sx:y,theme:this})},w.toRuntimeSource=xg,w}function Of(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Hu({...n===!0?{}:n.palette,mode:t})})}function Y_(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:o=n?.mode,...s}=e,a=o||"light",l=i?.[a],c={...i,...n?{[a]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return nu(e,...t);let u=n;"palette"in e||c[a]&&(c[a]!==!0?u=c[a].palette:a==="dark"&&(u={mode:"dark"}));const f=nu({...e,palette:u},...t);return f.defaultColorScheme=a,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},Of(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},Of(f,"light",c.light)),f}return!n&&!("light"in c)&&a==="light"&&(c.light=!0),Q_({...s,colorSchemes:c,defaultColorScheme:a,...typeof r!="boolean"&&r},...t)}const J_=Y_(),X_="$$material";function Ag(e,t=""){return e.displayName||e.name||t}function If(e,t,n){const r=Ag(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function Z_(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Ag(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Pa.ForwardRef:return If(e,e.render,"ForwardRef");case Pa.Memo:return If(e,e.type,"memo");default:return}}}function ev(e){const{variants:t,...n}=e,r={variants:t,style:gi(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=gi(i.style))}),r}const tv=Eg();function oc(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function fi(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function nv(e){return e?(t,n)=>n[e]:null}function rv(e,t,n){e.theme=av(e.theme)?n:e.theme[t]||e.theme}function Ca(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>Ca(e,i,n));if(Array.isArray(r?.variants)){let i;if(r.isProcessed)i=n?fi(r.style,n):r.style;else{const{variants:o,...s}=r;i=n?fi(gi(s),n):s}return kg(e,r.variants,[i],n)}return r?.isProcessed?n?fi(gi(r.style),n):r.style:n?fi(gi(r),n):r}function kg(e,t,n=[],r=void 0){let i;e:for(let o=0;o<t.length;o+=1){const s=t[o];if(typeof s.props=="function"){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!s.props(i))continue}else for(const a in s.props)if(e[a]!==s.props[a]&&e.ownerState?.[a]!==s.props[a])continue e;typeof s.style=="function"?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?fi(gi(s.style(i)),r):s.style(i))):n.push(r?fi(gi(s.style),r):s.style)}return n}function iv(e={}){const{themeId:t,defaultTheme:n=tv,rootShouldForwardProp:r=oc,slotShouldForwardProp:i=oc}=e;function o(a){rv(a,t,n)}return(a,l={})=>{l_(a,w=>w.filter(S=>S!==no));const{name:c,slot:u,skipVariantsResolver:f,skipSx:p,overridesResolver:b=nv(Rg(u)),...h}=l,g=c&&c.startsWith("Mui")||u?"components":"custom",m=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,E=p||!1;let A=oc;u==="Root"||u==="root"?A=r:u?A=i:lv(a)&&(A=void 0);const _=a_(a,{shouldForwardProp:A,label:sv(c,u),...h}),x=w=>{if(w.__emotion_real===w)return w;if(typeof w=="function")return function(C){return Ca(C,w,C.theme.modularCssLayers?g:void 0)};if(br(w)){const S=ev(w);return function(R){return S.variants?Ca(R,S,R.theme.modularCssLayers?g:void 0):R.theme.modularCssLayers?fi(S.style,g):S.style}}return w},d=(...w)=>{const S=[],C=w.map(x),R=[];if(S.push(o),c&&b&&R.push(function(I){const L=I.theme.components?.[c]?.styleOverrides;if(!L)return null;const z={};for(const X in L)z[X]=Ca(I,L[X],I.theme.modularCssLayers?"theme":void 0);return b(I,z)}),c&&!m&&R.push(function(I){const L=I.theme?.components?.[c]?.variants;return L?kg(I,L,[],I.theme.modularCssLayers?"theme":void 0):null}),E||R.push(no),Array.isArray(C[0])){const y=C.shift(),I=new Array(S.length).fill(""),O=new Array(R.length).fill("");let L;L=[...I,...y,...O],L.raw=[...I,...y.raw,...O],S.unshift(L)}const k=[...S,...C,...R],T=_(...k);return a.muiName&&(T.muiName=a.muiName),process.env.NODE_ENV!=="production"&&(T.displayName=ov(c,u,a)),T};return _.withConfig&&(d.withConfig=_.withConfig),d}}function ov(e,t,n){return e?`${e}${Nn(t||"")}`:`Styled(${Z_(n)})`}function sv(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${Rg(t||"Root")}`),n}function av(e){for(const t in e)return!1;return!0}function lv(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Rg(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function cv(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const uv=e=>cv(e)&&e!=="classes",cn=iv({themeId:X_,defaultTheme:J_,rootShouldForwardProp:uv}),Sl=Si.unstable_memoTheme;process.env.NODE_ENV!=="production"&&(xe.node,xe.object.isRequired);function Og(e){return d_(e)}function dv(e){return typeof e.main=="string"}function fv(e,t=[]){if(!dv(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function pv(e=[]){return([,t])=>t&&fv(t,e)}function Ig(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=vl(e,i,n)}),r}function hv(e){return vl("MuiCircularProgress",e)}Ig("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Tn=44,ru=Si.keyframes`
|
|
42
42
|
0% {
|
|
43
43
|
transform: rotate(0deg);
|
|
44
44
|
}
|
|
@@ -46,7 +46,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
46
46
|
100% {
|
|
47
47
|
transform: rotate(360deg);
|
|
48
48
|
}
|
|
49
|
-
`,iu=
|
|
49
|
+
`,iu=Si.keyframes`
|
|
50
50
|
0% {
|
|
51
51
|
stroke-dasharray: 1px, 200px;
|
|
52
52
|
stroke-dashoffset: 0;
|
|
@@ -61,11 +61,11 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
61
61
|
stroke-dasharray: 1px, 200px;
|
|
62
62
|
stroke-dashoffset: -126px;
|
|
63
63
|
}
|
|
64
|
-
`,gv=typeof ru!="string"?
|
|
64
|
+
`,gv=typeof ru!="string"?Si.css`
|
|
65
65
|
animation: ${ru} 1.4s linear infinite;
|
|
66
|
-
`:null,mv=typeof iu!="string"?
|
|
66
|
+
`:null,mv=typeof iu!="string"?Si.css`
|
|
67
67
|
animation: ${iu} 1.4s ease-in-out infinite;
|
|
68
|
-
`:null,yv=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${Mn(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Mn(n)}`,i&&"circleDisableShrink"]};return gg(o,hv,t)},bv=cn("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Mn(n.color)}`]]}})(El(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:gv||{animation:`${ru} 1.4s linear infinite`}},...Object.entries(e.palette).filter(pv()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),wv=cn("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),_v=cn("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Mn(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(El(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:mv||{animation:`${iu} 1.4s ease-in-out infinite`}}]}))),vv=cn("circle",{name:"MuiCircularProgress",slot:"Track"})(El(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),fi=We.forwardRef(function(t,n){const r=Og({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:c,thickness:u=3.6,value:f=0,variant:p="indeterminate",...b}=r,h={...r,color:o,disableShrink:s,size:l,thickness:u,value:f,variant:p,enableTrackSlot:a},g=yv(h),m={},E={},A={};if(p==="determinate"){const _=2*Math.PI*((An-u)/2);m.strokeDasharray=_.toFixed(3),A["aria-valuenow"]=Math.round(f),m.strokeDashoffset=`${((100-f)/100*_).toFixed(3)}px`,E.transform="rotate(-90deg)"}return In.jsx(bv,{className:ju(g.root,i),style:{width:l,height:l,...E,...c},ownerState:h,ref:n,role:"progressbar",...A,...b,children:In.jsxs(wv,{className:g.svg,ownerState:h,viewBox:`${An/2} ${An/2} ${An} ${An}`,children:[a?In.jsx(vv,{className:g.track,ownerState:h,cx:An,cy:An,r:(An-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,In.jsx(_v,{className:g.circle,style:m,ownerState:h,cx:An,cy:An,r:(An-u)/2,fill:"none",strokeWidth:u})]})})});process.env.NODE_ENV!=="production"&&(fi.propTypes={classes:Se.object,className:Se.string,color:Se.oneOfType([Se.oneOf(["inherit","primary","secondary","error","info","success","warning"]),Se.string]),disableShrink:ew(Se.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),enableTrackSlot:Se.bool,size:Se.oneOfType([Se.number,Se.string]),style:Se.object,sx:Se.oneOfType([Se.arrayOf(Se.oneOfType([Se.func,Se.object,Se.bool])),Se.func,Se.object]),thickness:Se.number,value:Se.number,variant:Se.oneOf(["determinate","indeterminate"])});class Vu extends D.Component{state={hasError:!1,error:null,errorInfo:null,showDetails:!1,errorId:void 0};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){const r=this.generateErrorId();this.setState({errorInfo:n,errorId:r}),this.logErrorToService(t,n,r)}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&t.resetKeys&&this.props.resetKeys.some((r,i)=>r!==t.resetKeys[i])&&this.reset()}reset(){this.setState({hasError:!1,error:null,errorInfo:null,showDetails:!1,errorId:void 0})}generateErrorId(){return"ERR-"+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,8)}logErrorToService(t,n,r){fe.error("[ErrorBoundary] Captured error",{errorId:r,error:t,info:n})}handleReload=()=>{window.location.reload()};handleToggleDetails=()=>{this.setState(t=>({showDetails:!t.showDetails}))};render(){if(!this.state.hasError)return this.props.children;const{error:t,errorInfo:n,showDetails:r,errorId:i}=this.state;return M(P.Box,{sx:{p:3,maxWidth:1200,mx:"auto"},children:M(P.Card,{children:ne(P.CardContent,{children:[ne(P.Alert,{severity:"error",sx:{mb:2},children:[M(P.AlertTitle,{children:"Unexpected error"}),M(P.Typography,{variant:"body2",sx:{mb:1},children:"The application couldn't load this view."}),M(P.Typography,{variant:"body2",sx:{mb:1},children:"Please try the following (in this order):"}),ne(P.Box,{component:"ol",sx:{mt:1,mb:1,pl:2.5},children:[M("li",{children:"Wait a few seconds and try again."}),M("li",{children:'Click "Reload".'}),M("li",{children:"If this happens again, contact support and include the error ID."})]}),i&&ne(P.Typography,{variant:"body2",sx:{mt:1},children:[M("strong",{children:"Error ID:"})," ",i]})]}),ne(P.Stack,{direction:"row",spacing:2,sx:{mb:2},children:[M(P.Button,{onClick:this.handleReload,variant:"contained",color:"primary",children:"Reload"}),M(P.Button,{onClick:this.handleToggleDetails,variant:"outlined",children:r?"Hide details":"Show details"})]}),r&&ne(P.Box,{sx:{mt:2},children:[M(P.Typography,{variant:"h6",sx:{mb:1},children:"Error information"}),ne(P.Box,{component:"pre",sx:{whiteSpace:"pre-wrap",backgroundColor:"#f6f6f7",p:1.5,borderRadius:1,maxHeight:300,overflow:"auto",fontSize:12,fontFamily:"monospace"},children:[t?.toString(),"\\n\\n",n?.componentStack]})]})]})})})}}const Sv=(e,t)=>M(Vu,{resetKeys:t,children:e});var qo={exports:{}};qo.exports;var Pf;function Ev(){return Pf||(Pf=1,(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object Boolean]",f="[object Date]",p="[object Error]",b="[object Function]",h="[object GeneratorFunction]",g="[object Map]",m="[object Number]",E="[object Object]",A="[object Promise]",_="[object RegExp]",x="[object Set]",d="[object String]",w="[object Symbol]",S="[object WeakMap]",C="[object ArrayBuffer]",R="[object DataView]",k="[object Float32Array]",T="[object Float64Array]",y="[object Int8Array]",I="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",U="[object Uint8ClampedArray]",Z="[object Uint16Array]",V="[object Uint32Array]",Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/,z=/^\./,se=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,J=/\\(\\)?/g,oe=/^\[object .+?Constructor\]$/,le=/^(?:0|[1-9]\d*)$/,q={};q[k]=q[T]=q[y]=q[I]=q[O]=q[L]=q[U]=q[Z]=q[V]=!0,q[l]=q[c]=q[C]=q[u]=q[R]=q[f]=q[p]=q[b]=q[g]=q[m]=q[E]=q[_]=q[x]=q[d]=q[S]=!1;var re=typeof Ws=="object"&&Ws&&Ws.Object===Object&&Ws,Y=typeof self=="object"&&self&&self.Object===Object&&self,W=re||Y||Function("return this")(),ce=t&&!t.nodeType&&t,B=ce&&!0&&e&&!e.nodeType&&e,me=B&&B.exports===ce,Ee=me&&re.process,be=(function(){try{return Ee&&Ee.binding("util")}catch{}})(),Te=be&&be.isTypedArray;function je(v,N,j){switch(j.length){case 0:return v.call(N);case 1:return v.call(N,j[0]);case 2:return v.call(N,j[0],j[1]);case 3:return v.call(N,j[0],j[1],j[2])}return v.apply(N,j)}function xe(v,N){for(var j=-1,X=v?v.length:0,pe=Array(X);++j<X;)pe[j]=N(v[j],j,v);return pe}function dt(v,N){for(var j=-1,X=N.length,pe=v.length;++j<X;)v[pe+j]=N[j];return v}function Jt(v,N){for(var j=-1,X=v?v.length:0;++j<X;)if(N(v[j],j,v))return!0;return!1}function we(v){return function(N){return N?.[v]}}function Ae(v,N){var j=v.length;for(v.sort(N);j--;)v[j]=v[j].value;return v}function rt(v,N){for(var j=-1,X=Array(v);++j<v;)X[j]=N(j);return X}function ft(v){return function(N){return v(N)}}function qe(v,N){return v?.[N]}function pt(v){var N=!1;if(v!=null&&typeof v.toString!="function")try{N=!!(v+"")}catch{}return N}function At(v){var N=-1,j=Array(v.size);return v.forEach(function(X,pe){j[++N]=[pe,X]}),j}function $n(v,N){return function(j){return v(N(j))}}function Ci(v){var N=-1,j=Array(v.size);return v.forEach(function(X){j[++N]=X}),j}var Ti=Array.prototype,er=Function.prototype,Bn=Object.prototype,Fn=W["__core-js_shared__"],$t=(function(){var v=/[^.]+$/.exec(Fn&&Fn.keys&&Fn.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""})(),Ht=er.toString,Ct=Bn.hasOwnProperty,un=Bn.toString,Xt=RegExp("^"+Ht.call(Ct).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rr=W.Symbol,En=W.Uint8Array,Or=Bn.propertyIsEnumerable,tr=Ti.splice,jn=Rr?Rr.isConcatSpreadable:void 0,Gr=$n(Object.keys,Object),Ai=Math.max,lt=Ii(W,"DataView"),kt=Ii(W,"Map"),Ir=Ii(W,"Promise"),nr=Ii(W,"Set"),rr=Ii(W,"WeakMap"),xn=Ii(Object,"create"),Qr=ni(lt),yo=ni(kt),Vt=ni(Ir),dn=ni(nr),ir=ni(rr),zn=Rr?Rr.prototype:void 0,or=zn?zn.valueOf:void 0,Yr=zn?zn.toString:void 0;function mt(v){var N=-1,j=v?v.length:0;for(this.clear();++N<j;){var X=v[N];this.set(X[0],X[1])}}function Pr(){this.__data__=xn?xn(null):{}}function ki(v){return this.has(v)&&delete this.__data__[v]}function Un(v){var N=this.__data__;if(xn){var j=N[v];return j===i?void 0:j}return Ct.call(N,v)?N[v]:void 0}function Jr(v){var N=this.__data__;return xn?N[v]!==void 0:Ct.call(N,v)}function Xr(v,N){var j=this.__data__;return j[v]=xn&&N===void 0?i:N,this}mt.prototype.clear=Pr,mt.prototype.delete=ki,mt.prototype.get=Un,mt.prototype.has=Jr,mt.prototype.set=Xr;function he(v){var N=-1,j=v?v.length:0;for(this.clear();++N<j;){var X=v[N];this.set(X[0],X[1])}}function $(){this.__data__=[]}function ie(v){var N=this.__data__,j=ar(N,v);if(j<0)return!1;var X=N.length-1;return j==X?N.pop():tr.call(N,j,1),!0}function ge(v){var N=this.__data__,j=ar(N,v);return j<0?void 0:N[j][1]}function Ze(v){return ar(this.__data__,v)>-1}function yt(v,N){var j=this.__data__,X=ar(j,v);return X<0?j.push([v,N]):j[X][1]=N,this}he.prototype.clear=$,he.prototype.delete=ie,he.prototype.get=ge,he.prototype.has=Ze,he.prototype.set=yt;function Ue(v){var N=-1,j=v?v.length:0;for(this.clear();++N<j;){var X=v[N];this.set(X[0],X[1])}}function Rt(){this.__data__={hash:new mt,map:new(kt||he),string:new mt}}function Zt(v){return Bs(this,v).delete(v)}function Cn(v){return Bs(this,v).get(v)}function Bt(v){return Bs(this,v).has(v)}function bt(v,N){return Bs(this,v).set(v,N),this}Ue.prototype.clear=Rt,Ue.prototype.delete=Zt,Ue.prototype.get=Cn,Ue.prototype.has=Bt,Ue.prototype.set=bt;function sr(v){var N=-1,j=v?v.length:0;for(this.__data__=new Ue;++N<j;)this.add(v[N])}function Zr(v){return this.__data__.set(v,i),this}function bo(v){return this.__data__.has(v)}sr.prototype.add=sr.prototype.push=Zr,sr.prototype.has=bo;function fn(v){this.__data__=new he(v)}function Os(){this.__data__=new he}function Ml(v){return this.__data__.delete(v)}function Dl(v){return this.__data__.get(v)}function Ll(v){return this.__data__.has(v)}function Is(v,N){var j=this.__data__;if(j instanceof he){var X=j.__data__;if(!kt||X.length<n-1)return X.push([v,N]),this;j=this.__data__=new Ue(X)}return j.set(v,N),this}fn.prototype.clear=Os,fn.prototype.delete=Ml,fn.prototype.get=Dl,fn.prototype.has=Ll,fn.prototype.set=Is;function Ps(v,N){var j=$r(v)||Ul(v)?rt(v.length,String):[],X=j.length,pe=!!X;for(var de in v)Ct.call(v,de)&&!(pe&&(de=="length"||Fl(de,X)))&&j.push(de);return j}function ar(v,N){for(var j=v.length;j--;)if(zl(v[j][0],N))return j;return-1}var $l=en(Nr);function qn(v,N,j,X,pe){var de=-1,_e=v.length;for(j||(j=Cy),pe||(pe=[]);++de<_e;){var Ke=v[de];j(Ke)?dt(pe,Ke):pe[pe.length]=Ke}return pe}var Hn=$s();function Nr(v,N){return v&&Hn(v,N,Us)}function Ns(v,N){N=Fs(N,v)?[N]:Ne(N);for(var j=0,X=N.length;v!=null&&j<X;)v=v[js(N[j++])];return j&&j==X?v:void 0}function Ri(v){return un.call(v)}function Ms(v,N){return v!=null&&N in Object(v)}function ei(v,N,j,X,pe){return v===N?!0:v==null||N==null||!vo(v)&&!zs(N)?v!==v&&N!==N:Mr(v,N,ei,j,X,pe)}function Mr(v,N,j,X,pe,de){var _e=$r(v),Ke=$r(N),ze=c,ut=c;_e||(ze=Lr(v),ze=ze==l?E:ze),Ke||(ut=Lr(N),ut=ut==l?E:ut);var Wt=ze==E&&!pt(v),Kt=ut==E&&!pt(N),Ft=ze==ut;if(Ft&&!Wt)return de||(de=new fn),_e||Py(v)?It(v,N,j,X,pe,de):Dr(v,N,ze,j,X,pe,de);if(!(pe&s)){var pn=Wt&&Ct.call(v,"__wrapped__"),hn=Kt&&Ct.call(N,"__wrapped__");if(pn||hn){var Br=pn?v.value():v,lr=hn?N.value():N;return de||(de=new fn),j(Br,lr,X,pe,de)}}return Ft?(de||(de=new fn),ti(v,N,j,X,pe,de)):!1}function Bl(v,N,j,X){var pe=j.length,de=pe;if(v==null)return!de;for(v=Object(v);pe--;){var _e=j[pe];if(_e[2]?_e[1]!==v[_e[0]]:!(_e[0]in v))return!1}for(;++pe<de;){_e=j[pe];var Ke=_e[0],ze=v[Ke],ut=_e[1];if(_e[2]){if(ze===void 0&&!(Ke in v))return!1}else{var Wt=new fn,Kt;if(!(Kt===void 0?ei(ut,ze,X,o|s,Wt):Kt))return!1}}return!0}function Oi(v){if(!vo(v)||Ay(v))return!1;var N=_d(v)||pt(v)?Xt:oe;return N.test(ni(v))}function wo(v){return zs(v)&&ql(v.length)&&!!q[un.call(v)]}function Ds(v){return typeof v=="function"?v:v==null?vd:typeof v=="object"?$r(v)?ue(v[0],v[1]):ee(v):Ly(v)}function Ls(v){if(!ky(v))return Gr(v);var N=[];for(var j in Object(v))Ct.call(v,j)&&j!="constructor"&&N.push(j);return N}function K(v,N){var j=-1,X=_o(v)?Array(v.length):[];return $l(v,function(pe,de,_e){X[++j]=N(pe,de,_e)}),X}function ee(v){var N=Ey(v);return N.length==1&&N[0][2]?wd(N[0][0],N[0][1]):function(j){return j===v||Bl(j,v,N)}}function ue(v,N){return Fs(v)&&bd(N)?wd(js(v),N):function(j){var X=My(j,v);return X===void 0&&X===N?Dy(j,v):ei(N,X,void 0,o|s)}}function ye(v,N,j){var X=-1;N=xe(N.length?N:[vd],ft(Ds));var pe=K(v,function(de,_e,Ke){var ze=xe(N,function(ut){return ut(de)});return{criteria:ze,index:++X,value:de}});return Ae(pe,function(de,_e){return Me(de,_e,j)})}function ve(v){return function(N){return Ns(N,v)}}function Ce(v,N){return N=Ai(N===void 0?v.length-1:N,0),function(){for(var j=arguments,X=-1,pe=Ai(j.length-N,0),de=Array(pe);++X<pe;)de[X]=j[N+X];X=-1;for(var _e=Array(N+1);++X<N;)_e[X]=j[X];return _e[N]=de,je(v,this,_e)}}function Fe(v){if(typeof v=="string")return v;if(So(v))return Yr?Yr.call(v):"";var N=v+"";return N=="0"&&1/v==-1/0?"-0":N}function Ne(v){return $r(v)?v:Ry(v)}function ct(v,N){if(v!==N){var j=v!==void 0,X=v===null,pe=v===v,de=So(v),_e=N!==void 0,Ke=N===null,ze=N===N,ut=So(N);if(!Ke&&!ut&&!de&&v>N||de&&_e&&ze&&!Ke&&!ut||X&&_e&&ze||!j&&ze||!pe)return 1;if(!X&&!de&&!ut&&v<N||ut&&j&&pe&&!X&&!de||Ke&&j&&pe||!_e&&pe||!ze)return-1}return 0}function Me(v,N,j){for(var X=-1,pe=v.criteria,de=N.criteria,_e=pe.length,Ke=j.length;++X<_e;){var ze=ct(pe[X],de[X]);if(ze){if(X>=Ke)return ze;var ut=j[X];return ze*(ut=="desc"?-1:1)}}return v.index-N.index}function en(v,N){return function(j,X){if(j==null)return j;if(!_o(j))return v(j,X);for(var pe=j.length,de=-1,_e=Object(j);++de<pe&&X(_e[de],de,_e)!==!1;);return j}}function $s(v){return function(N,j,X){for(var pe=-1,de=Object(N),_e=X(N),Ke=_e.length;Ke--;){var ze=_e[++pe];if(j(de[ze],ze,de)===!1)break}return N}}function It(v,N,j,X,pe,de){var _e=pe&s,Ke=v.length,ze=N.length;if(Ke!=ze&&!(_e&&ze>Ke))return!1;var ut=de.get(v);if(ut&&de.get(N))return ut==N;var Wt=-1,Kt=!0,Ft=pe&o?new sr:void 0;for(de.set(v,N),de.set(N,v);++Wt<Ke;){var pn=v[Wt],hn=N[Wt];if(X)var Br=_e?X(hn,pn,Wt,N,v,de):X(pn,hn,Wt,v,N,de);if(Br!==void 0){if(Br)continue;Kt=!1;break}if(Ft){if(!Jt(N,function(lr,ri){if(!Ft.has(ri)&&(pn===lr||j(pn,lr,X,pe,de)))return Ft.add(ri)})){Kt=!1;break}}else if(!(pn===hn||j(pn,hn,X,pe,de))){Kt=!1;break}}return de.delete(v),de.delete(N),Kt}function Dr(v,N,j,X,pe,de,_e){switch(j){case R:if(v.byteLength!=N.byteLength||v.byteOffset!=N.byteOffset)return!1;v=v.buffer,N=N.buffer;case C:return!(v.byteLength!=N.byteLength||!X(new En(v),new En(N)));case u:case f:case m:return zl(+v,+N);case p:return v.name==N.name&&v.message==N.message;case _:case d:return v==N+"";case g:var Ke=At;case x:var ze=de&s;if(Ke||(Ke=Ci),v.size!=N.size&&!ze)return!1;var ut=_e.get(v);if(ut)return ut==N;de|=o,_e.set(v,N);var Wt=It(Ke(v),Ke(N),X,pe,de,_e);return _e.delete(v),Wt;case w:if(or)return or.call(v)==or.call(N)}return!1}function ti(v,N,j,X,pe,de){var _e=pe&s,Ke=Us(v),ze=Ke.length,ut=Us(N),Wt=ut.length;if(ze!=Wt&&!_e)return!1;for(var Kt=ze;Kt--;){var Ft=Ke[Kt];if(!(_e?Ft in N:Ct.call(N,Ft)))return!1}var pn=de.get(v);if(pn&&de.get(N))return pn==N;var hn=!0;de.set(v,N),de.set(N,v);for(var Br=_e;++Kt<ze;){Ft=Ke[Kt];var lr=v[Ft],ri=N[Ft];if(X)var Sd=_e?X(ri,lr,Ft,N,v,de):X(lr,ri,Ft,v,N,de);if(!(Sd===void 0?lr===ri||j(lr,ri,X,pe,de):Sd)){hn=!1;break}Br||(Br=Ft=="constructor")}if(hn&&!Br){var qs=v.constructor,Hs=N.constructor;qs!=Hs&&"constructor"in v&&"constructor"in N&&!(typeof qs=="function"&&qs instanceof qs&&typeof Hs=="function"&&Hs instanceof Hs)&&(hn=!1)}return de.delete(v),de.delete(N),hn}function Bs(v,N){var j=v.__data__;return Ty(N)?j[typeof N=="string"?"string":"hash"]:j.map}function Ey(v){for(var N=Us(v),j=N.length;j--;){var X=N[j],pe=v[X];N[j]=[X,pe,bd(pe)]}return N}function Ii(v,N){var j=qe(v,N);return Oi(j)?j:void 0}var Lr=Ri;(lt&&Lr(new lt(new ArrayBuffer(1)))!=R||kt&&Lr(new kt)!=g||Ir&&Lr(Ir.resolve())!=A||nr&&Lr(new nr)!=x||rr&&Lr(new rr)!=S)&&(Lr=function(v){var N=un.call(v),j=N==E?v.constructor:void 0,X=j?ni(j):void 0;if(X)switch(X){case Qr:return R;case yo:return g;case Vt:return A;case dn:return x;case ir:return S}return N});function xy(v,N,j){N=Fs(N,v)?[N]:Ne(N);for(var X,pe=-1,_e=N.length;++pe<_e;){var de=js(N[pe]);if(!(X=v!=null&&j(v,de)))break;v=v[de]}if(X)return X;var _e=v?v.length:0;return!!_e&&ql(_e)&&Fl(de,_e)&&($r(v)||Ul(v))}function Cy(v){return $r(v)||Ul(v)||!!(jn&&v&&v[jn])}function Fl(v,N){return N=N??a,!!N&&(typeof v=="number"||le.test(v))&&v>-1&&v%1==0&&v<N}function yd(v,N,j){if(!vo(j))return!1;var X=typeof N;return(X=="number"?_o(j)&&Fl(N,j.length):X=="string"&&N in j)?zl(j[N],v):!1}function Fs(v,N){if($r(v))return!1;var j=typeof v;return j=="number"||j=="symbol"||j=="boolean"||v==null||So(v)?!0:F.test(v)||!Q.test(v)||N!=null&&v in Object(N)}function Ty(v){var N=typeof v;return N=="string"||N=="number"||N=="symbol"||N=="boolean"?v!=="__proto__":v===null}function Ay(v){return!!$t&&$t in v}function ky(v){var N=v&&v.constructor,j=typeof N=="function"&&N.prototype||Bn;return v===j}function bd(v){return v===v&&!vo(v)}function wd(v,N){return function(j){return j==null?!1:j[v]===N&&(N!==void 0||v in Object(j))}}var Ry=jl(function(v){v=Ny(v);var N=[];return z.test(v)&&N.push(""),v.replace(se,function(j,X,pe,de){N.push(pe?de.replace(J,"$1"):X||j)}),N});function js(v){if(typeof v=="string"||So(v))return v;var N=v+"";return N=="0"&&1/v==-1/0?"-0":N}function ni(v){if(v!=null){try{return Ht.call(v)}catch{}try{return v+""}catch{}}return""}var Oy=Ce(function(v,N){if(v==null)return[];var j=N.length;return j>1&&yd(v,N[0],N[1])?N=[]:j>2&&yd(N[0],N[1],N[2])&&(N=[N[0]]),ye(v,qn(N),[])});function jl(v,N){if(typeof v!="function"||N&&typeof N!="function")throw new TypeError(r);var j=function(){var X=arguments,pe=N?N.apply(this,X):X[0],de=j.cache;if(de.has(pe))return de.get(pe);var _e=v.apply(this,X);return j.cache=de.set(pe,_e),_e};return j.cache=new(jl.Cache||Ue),j}jl.Cache=Ue;function zl(v,N){return v===N||v!==v&&N!==N}function Ul(v){return Iy(v)&&Ct.call(v,"callee")&&(!Or.call(v,"callee")||un.call(v)==l)}var $r=Array.isArray;function _o(v){return v!=null&&ql(v.length)&&!_d(v)}function Iy(v){return zs(v)&&_o(v)}function _d(v){var N=vo(v)?un.call(v):"";return N==b||N==h}function ql(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=a}function vo(v){var N=typeof v;return!!v&&(N=="object"||N=="function")}function zs(v){return!!v&&typeof v=="object"}function So(v){return typeof v=="symbol"||zs(v)&&un.call(v)==w}var Py=Te?ft(Te):wo;function Ny(v){return v==null?"":Fe(v)}function My(v,N,j){var X=v==null?void 0:Ns(v,N);return X===void 0?j:X}function Dy(v,N){return v!=null&&xy(v,N,Ms)}function Us(v){return _o(v)?Ps(v):Ls(v)}function vd(v){return v}function Ly(v){return Fs(v)?we(js(v)):ve(v)}e.exports=Oy})(qo,qo.exports)),qo.exports}var xv=Ev();const ta=Nu(xv),Cv=({overlayInfo:e,...t})=>M(P.Fab,{...t,sx:{position:"fixed",bottom:e.present?e.contentOffset.bottom+30+"px":35,right:0,zIndex:1400,background:"linear-gradient(135deg, #1f2937 0%, #475260 100%)",color:"white",width:48,height:48,borderRadius:"5px 0 0 5px",boxShadow:"0 8px 24px rgba(31, 41, 55, 0.4)","&:hover":{background:"linear-gradient(135deg, #2c4870 0%, #4e6c91 100%)",transform:"translateY(-2px)",boxShadow:"0 8px 24px rgba(44, 72, 112, 0.4)"},transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}}),Tv=cn(P.Drawer,{shouldForwardProp:e=>e!=="overlayInfo"})(({overlayInfo:e})=>{const{present:t,position:n,contentOffset:r}=e,i={};if(t)switch(n){case"top":Object.assign(i,{marginTop:r.top,height:`calc(100vh - ${r.top}px)`});break;case"bottom":Object.assign(i,{marginBottom:r.bottom,height:`calc(100vh - ${r.bottom}px)`});break;case"left":Object.assign(i,{marginLeft:r.left});break;case"right":Object.assign(i,{marginRight:r.right});break}return{"& .MuiModal-backdrop":{display:"block"},"& .MuiDrawer-paper":{width:"730px",height:"100vh",borderRadius:"0",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.12)",background:"#f8f9fa",zIndex:1300,display:"flex",flexDirection:"column",...i}}}),Av=cn(P.Box)(({theme:e})=>({padding:e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",minHeight:40,color:e.palette.common.black,borderBottom:`1px solid ${e.palette.divider}`})),kv=cn(P.Box)(({theme:e})=>({flex:1,overflow:"auto",paddingTop:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),paddingBottom:0,borderLeft:`1px solid ${e.palette.divider}`,"&::-webkit-scrollbar":{width:8},"&::-webkit-scrollbar-track":{background:e.palette.grey[100]},"&::-webkit-scrollbar-thumb":{background:e.palette.grey[400],borderRadius:4,"&:hover":{background:e.palette.grey[500]}}})),Rv=({children:e})=>M(P.Box,{sx:{position:"relative",padding:t=>t.spacing(2),borderTop:t=>`1px solid ${t.palette.divider}`,background:"white",display:"flex",justifyContent:"center",zIndex:10},children:e}),Pg=cn(P.Card)(({theme:e})=>({borderRadius:10,padding:e.spacing(3),marginBottom:e.spacing(2),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",background:"white"})),Ng=cn(P.Card)(({theme:e})=>({borderRadius:12,padding:e.spacing(1),paddingTop:e.spacing(4),marginBottom:e.spacing(1),boxShadow:"none",background:"white"})),Mg=cn(P.Card)(({theme:e})=>({borderRadius:10,paddingLeft:e.spacing(3),paddingRight:e.spacing(3),paddingTop:"10px",paddingBottom:"10px",marginBottom:e.spacing(2),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",background:"white"})),Ov=cn(P.Card)(({theme:e})=>({borderRadius:10,padding:e.spacing(3),marginBottom:e.spacing(2),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",background:"white"})),Iv=({expanded:e})=>ne(P.Box,{children:[ne(Pg,{children:[M(P.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:3,children:M(P.Box,{display:"flex",alignItems:"center",gap:1,children:M(P.Skeleton,{variant:"text",width:180,height:30})})}),ne(P.Box,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[M(P.Box,{position:"relative",display:"inline-flex",mr:4,children:M(P.Skeleton,{variant:"circular",width:140,height:140})}),ne(P.Box,{display:"flex",flexDirection:"column",gap:2,flex:0,children:[ne(P.Box,{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",children:[M(P.Skeleton,{variant:"text",width:80,height:28}),M(P.Skeleton,{variant:"text",width:60,height:14})]}),M(P.Skeleton,{variant:"rectangular",width:"100%",height:2}),ne(P.Box,{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",children:[M(P.Skeleton,{variant:"text",width:80,height:28}),M(P.Skeleton,{variant:"text",width:60,height:14})]})]}),M(P.Skeleton,{variant:"rectangular",width:220,height:50,sx:{ml:5}})]})]}),ne(P.Accordion,{defaultExpanded:!0,expanded:e,sx:{borderRadius:2,mb:2,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)","&:before":{display:"none"}},children:[M(P.AccordionSummary,{expandIcon:M(gt.ExpandMore,{}),sx:{px:3},children:M(P.Box,{display:"flex",alignItems:"center",gap:1,height:72,children:M(P.Skeleton,{variant:"text",width:160,height:28})})}),M(P.AccordionDetails,{sx:{px:3,pb:3},children:M(Ng,{children:M(P.Box,{display:"flex",flexWrap:"wrap",gap:3,justifyContent:"space-around",children:[1,2,3,4,5,6].map(t=>ne(P.Box,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,width:"180px",children:[M(P.Box,{position:"relative",display:"inline-flex",children:M(P.Skeleton,{variant:"circular",width:100,height:100})}),ne(P.Box,{textAlign:"center",width:"100%",children:[M(P.Skeleton,{variant:"text",width:120,height:20,sx:{mx:"auto",mb:.5}}),M(P.Skeleton,{variant:"text",width:100,height:16,sx:{mx:"auto"}})]})]},t))})})})]}),M(P.Typography,{variant:"h4",fontWeight:600,gutterBottom:!0,sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:4},children:M(P.Skeleton,{variant:"text",width:280,height:36})}),M(P.Box,{sx:{position:"sticky",top:-31,zIndex:10,py:2,borderRadius:0},children:ne(P.Card,{sx:{padding:2,pb:1,px:"20px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"},children:[ne(P.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1,children:[M(P.Skeleton,{variant:"text",width:240,height:20}),M(P.Skeleton,{variant:"text",width:80,height:28})]}),M(P.Box,{display:"flex",gap:1,flexWrap:"nowrap",sx:{overflowY:"scroll",pb:2.5,pt:1},children:[1,2,3,4].map(t=>M(P.Skeleton,{variant:"rounded",width:140,height:32,sx:{borderRadius:4,flexShrink:0}},t))})]})}),M(P.Box,{sx:{minHeight:"calc(100vh - 320px)"},children:M(Mg,{children:M(P.List,{sx:{p:0},children:[1,2,3].map(t=>M(P.ListItem,{sx:{px:0,py:1.5,alignItems:"flex-start",borderBottom:t<3?"1px solid":"none",borderColor:"divider"},children:ne(P.Box,{mt:.5,width:"100%",children:[M(P.Skeleton,{variant:"text",width:"70%",height:32,sx:{mb:2.5}}),ne(P.Box,{display:"flex",gap:1,mb:2,flexWrap:"wrap",children:[M(P.Skeleton,{variant:"rounded",width:120,height:32,sx:{borderRadius:4}}),M(P.Skeleton,{variant:"rounded",width:100,height:32,sx:{borderRadius:4}}),M(P.Skeleton,{variant:"rounded",width:80,height:32,sx:{borderRadius:4}})]}),ne(P.Box,{mb:2,children:[M(P.Skeleton,{variant:"text",width:"100%",height:20}),M(P.Skeleton,{variant:"text",width:"95%",height:20}),M(P.Skeleton,{variant:"text",width:"60%",height:20})]}),ne(P.Box,{display:"flex",gap:1,children:[M(P.Skeleton,{variant:"rounded",width:140,height:32,sx:{borderRadius:2}}),M(P.Skeleton,{variant:"rounded",width:120,height:32,sx:{borderRadius:2}})]})]})},t))})})})]}),sc=cn(P.IconButton,{shouldForwardProp:e=>e!=="index"})(({theme:e,index:t=0})=>({color:e.palette.text.secondary,position:"absolute",right:12+t*50,top:12,backgroundColor:"rgba(0, 0, 0, 0.04)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.16)"}})),ou=(e,t)=>{const n=t?.allowScripts===!0,i=new DOMParser().parseFromString(e,"text/html");return i.querySelectorAll("base").forEach(o=>o.remove()),i.querySelectorAll("meta[http-equiv]").forEach(o=>{o.getAttribute("http-equiv")?.toLowerCase()==="refresh"&&o.remove()}),n||(i.querySelectorAll("script").forEach(s=>s.remove()),i.querySelectorAll("noscript").forEach(s=>s.remove()),i.querySelectorAll("*").forEach(s=>{const a=s;for(const l of Array.from(a.attributes??[]))l.name.toLowerCase().startsWith("on")&&a.removeAttribute(l.name)})),i.documentElement.outerHTML},Pv=({html:e,currentHighlight:t,onHighlightsFound:n,onVisibleHighlightChange:r,clickedIndicator:i,scriptsDisabled:o=!0})=>{const{t:s}=kr(["sidebar"]),a=D.useRef(null),l=D.useRef(!1);return D.useEffect(()=>{if(!a.current)return;const c=a.current,u=c.contentDocument||c.contentWindow?.document;if(!u){fe.warn("Could not access iframe document");return}const f=new DOMParser,p=o?ou(e,{allowScripts:!1}):e,h=f.parseFromString(p,"text/html").documentElement;h.getElementsByTagName("body")[0].style.overflow="auto",fe.debug("Set iframe body overflow to auto"),u.open(),u.write(h.outerHTML),u.close();const g=u.createElement("style");g.textContent=`
|
|
68
|
+
`:null,yv=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${Nn(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${Nn(n)}`,i&&"circleDisableShrink"]};return gg(o,hv,t)},bv=cn("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Nn(n.color)}`]]}})(Sl(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:gv||{animation:`${ru} 1.4s linear infinite`}},...Object.entries(e.palette).filter(pv()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),wv=cn("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),_v=cn("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Nn(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Sl(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:mv||{animation:`${iu} 1.4s ease-in-out infinite`}}]}))),vv=cn("circle",{name:"MuiCircularProgress",slot:"Track"})(Sl(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),ui=Ke.forwardRef(function(t,n){const r=Og({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,enableTrackSlot:a=!1,size:l=40,style:c,thickness:u=3.6,value:f=0,variant:p="indeterminate",...b}=r,h={...r,color:o,disableShrink:s,size:l,thickness:u,value:f,variant:p,enableTrackSlot:a},g=yv(h),m={},E={},A={};if(p==="determinate"){const _=2*Math.PI*((Tn-u)/2);m.strokeDasharray=_.toFixed(3),A["aria-valuenow"]=Math.round(f),m.strokeDashoffset=`${((100-f)/100*_).toFixed(3)}px`,E.transform="rotate(-90deg)"}return On.jsx(bv,{className:ju(g.root,i),style:{width:l,height:l,...E,...c},ownerState:h,ref:n,role:"progressbar",...A,...b,children:On.jsxs(wv,{className:g.svg,ownerState:h,viewBox:`${Tn/2} ${Tn/2} ${Tn} ${Tn}`,children:[a?On.jsx(vv,{className:g.track,ownerState:h,cx:Tn,cy:Tn,r:(Tn-u)/2,fill:"none",strokeWidth:u,"aria-hidden":"true"}):null,On.jsx(_v,{className:g.circle,style:m,ownerState:h,cx:Tn,cy:Tn,r:(Tn-u)/2,fill:"none",strokeWidth:u})]})})});process.env.NODE_ENV!=="production"&&(ui.propTypes={classes:xe.object,className:xe.string,color:xe.oneOfType([xe.oneOf(["inherit","primary","secondary","error","info","success","warning"]),xe.string]),disableShrink:ew(xe.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),enableTrackSlot:xe.bool,size:xe.oneOfType([xe.number,xe.string]),style:xe.object,sx:xe.oneOfType([xe.arrayOf(xe.oneOfType([xe.func,xe.object,xe.bool])),xe.func,xe.object]),thickness:xe.number,value:xe.number,variant:xe.oneOf(["determinate","indeterminate"])});class Vu extends D.Component{state={hasError:!1,error:null,errorInfo:null,showDetails:!1,errorId:void 0};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){const r=this.generateErrorId();this.setState({errorInfo:n,errorId:r}),this.logErrorToService(t,n,r)}componentDidUpdate(t){this.state.hasError&&this.props.resetKeys&&t.resetKeys&&this.props.resetKeys.some((r,i)=>r!==t.resetKeys[i])&&this.reset()}reset(){this.setState({hasError:!1,error:null,errorInfo:null,showDetails:!1,errorId:void 0})}generateErrorId(){return"ERR-"+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,8)}logErrorToService(t,n,r){le.error("[ErrorBoundary] Captured error",{errorId:r,error:t,info:n})}handleReload=()=>{window.location.reload()};handleToggleDetails=()=>{this.setState(t=>({showDetails:!t.showDetails}))};render(){if(!this.state.hasError)return this.props.children;const{error:t,errorInfo:n,showDetails:r,errorId:i}=this.state;return M(P.Box,{sx:{p:3,maxWidth:1200,mx:"auto"},children:M(P.Card,{children:ne(P.CardContent,{children:[ne(P.Alert,{severity:"error",sx:{mb:2},children:[M(P.AlertTitle,{children:"Unexpected error"}),M(P.Typography,{variant:"body2",sx:{mb:1},children:"The application couldn't load this view."}),M(P.Typography,{variant:"body2",sx:{mb:1},children:"Please try the following (in this order):"}),ne(P.Box,{component:"ol",sx:{mt:1,mb:1,pl:2.5},children:[M("li",{children:"Wait a few seconds and try again."}),M("li",{children:'Click "Reload".'}),M("li",{children:"If this happens again, contact support and include the error ID."})]}),i&&ne(P.Typography,{variant:"body2",sx:{mt:1},children:[M("strong",{children:"Error ID:"})," ",i]})]}),ne(P.Stack,{direction:"row",spacing:2,sx:{mb:2},children:[M(P.Button,{onClick:this.handleReload,variant:"contained",color:"primary",children:"Reload"}),M(P.Button,{onClick:this.handleToggleDetails,variant:"outlined",children:r?"Hide details":"Show details"})]}),r&&ne(P.Box,{sx:{mt:2},children:[M(P.Typography,{variant:"h6",sx:{mb:1},children:"Error information"}),ne(P.Box,{component:"pre",sx:{whiteSpace:"pre-wrap",backgroundColor:"#f6f6f7",p:1.5,borderRadius:1,maxHeight:300,overflow:"auto",fontSize:12,fontFamily:"monospace"},children:[t?.toString(),"\\n\\n",n?.componentStack]})]})]})})})}}const Sv=(e,t)=>M(Vu,{resetKeys:t,children:e});var Vo={exports:{}};Vo.exports;var Pf;function Ev(){return Pf||(Pf=1,(function(e,t){var n=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,a=9007199254740991,l="[object Arguments]",c="[object Array]",u="[object Boolean]",f="[object Date]",p="[object Error]",b="[object Function]",h="[object GeneratorFunction]",g="[object Map]",m="[object Number]",E="[object Object]",A="[object Promise]",_="[object RegExp]",x="[object Set]",d="[object String]",w="[object Symbol]",S="[object WeakMap]",C="[object ArrayBuffer]",R="[object DataView]",k="[object Float32Array]",T="[object Float64Array]",y="[object Int8Array]",I="[object Int16Array]",O="[object Int32Array]",L="[object Uint8Array]",z="[object Uint8ClampedArray]",X="[object Uint16Array]",H="[object Uint32Array]",Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,F=/^\w*$/,U=/^\./,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,J=/\\(\\)?/g,oe=/^\[object .+?Constructor\]$/,ce=/^(?:0|[1-9]\d*)$/,q={};q[k]=q[T]=q[y]=q[I]=q[O]=q[L]=q[z]=q[X]=q[H]=!0,q[l]=q[c]=q[C]=q[u]=q[R]=q[f]=q[p]=q[b]=q[g]=q[m]=q[E]=q[_]=q[x]=q[d]=q[S]=!1;var re=typeof Vs=="object"&&Vs&&Vs.Object===Object&&Vs,Y=typeof self=="object"&&self&&self.Object===Object&&self,W=re||Y||Function("return this")(),fe=t&&!t.nodeType&&t,B=fe&&!0&&e&&!e.nodeType&&e,we=B&&B.exports===fe,be=we&&re.process,Ce=(function(){try{return be&&be.binding("util")}catch{}})(),ke=Ce&&Ce.isTypedArray;function De(v,N,j){switch(j.length){case 0:return v.call(N);case 1:return v.call(N,j[0]);case 2:return v.call(N,j[0],j[1]);case 3:return v.call(N,j[0],j[1],j[2])}return v.apply(N,j)}function Se(v,N){for(var j=-1,Z=v?v.length:0,pe=Array(Z);++j<Z;)pe[j]=N(v[j],j,v);return pe}function Fe(v,N){for(var j=-1,Z=N.length,pe=v.length;++j<Z;)v[pe+j]=N[j];return v}function $t(v,N){for(var j=-1,Z=v?v.length:0;++j<Z;)if(N(v[j],j,v))return!0;return!1}function ye(v){return function(N){return N?.[v]}}function ve(v,N){var j=v.length;for(v.sort(N);j--;)v[j]=v[j].value;return v}function Ge(v,N){for(var j=-1,Z=Array(v);++j<v;)Z[j]=N(j);return Z}function pt(v){return function(N){return v(N)}}function He(v,N){return v?.[N]}function ht(v){var N=!1;if(v!=null&&typeof v.toString!="function")try{N=!!(v+"")}catch{}return N}function At(v){var N=-1,j=Array(v.size);return v.forEach(function(Z,pe){j[++N]=[pe,Z]}),j}function Ln(v,N){return function(j){return v(N(j))}}function Ei(v){var N=-1,j=Array(v.size);return v.forEach(function(Z){j[++N]=Z}),j}var xi=Array.prototype,nr=Function.prototype,$n=Object.prototype,Bn=W["__core-js_shared__"],Bt=(function(){var v=/[^.]+$/.exec(Bn&&Bn.keys&&Bn.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""})(),Ht=nr.toString,Ct=$n.hasOwnProperty,un=$n.toString,Xt=RegExp("^"+Ht.call(Ct).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Or=W.Symbol,Sn=W.Uint8Array,Ir=$n.propertyIsEnumerable,rr=xi.splice,Fn=Or?Or.isConcatSpreadable:void 0,Qr=Ln(Object.keys,Object),Ci=Math.max,ut=Pi(W,"DataView"),kt=Pi(W,"Map"),Pr=Pi(W,"Promise"),ir=Pi(W,"Set"),or=Pi(W,"WeakMap"),En=Pi(Object,"create"),Yr=ei(ut),bo=ei(kt),Vt=ei(Pr),dn=ei(ir),sr=ei(or),jn=Or?Or.prototype:void 0,ar=jn?jn.valueOf:void 0,Jr=jn?jn.toString:void 0;function yt(v){var N=-1,j=v?v.length:0;for(this.clear();++N<j;){var Z=v[N];this.set(Z[0],Z[1])}}function Nr(){this.__data__=En?En(null):{}}function Ti(v){return this.has(v)&&delete this.__data__[v]}function zn(v){var N=this.__data__;if(En){var j=N[v];return j===i?void 0:j}return Ct.call(N,v)?N[v]:void 0}function Xr(v){var N=this.__data__;return En?N[v]!==void 0:Ct.call(N,v)}function xn(v,N){var j=this.__data__;return j[v]=En&&N===void 0?i:N,this}yt.prototype.clear=Nr,yt.prototype.delete=Ti,yt.prototype.get=zn,yt.prototype.has=Xr,yt.prototype.set=xn;function he(v){var N=-1,j=v?v.length:0;for(this.clear();++N<j;){var Z=v[N];this.set(Z[0],Z[1])}}function $(){this.__data__=[]}function ie(v){var N=this.__data__,j=Zr(N,v);if(j<0)return!1;var Z=N.length-1;return j==Z?N.pop():rr.call(N,j,1),!0}function ge(v){var N=this.__data__,j=Zr(N,v);return j<0?void 0:N[j][1]}function tt(v){return Zr(this.__data__,v)>-1}function bt(v,N){var j=this.__data__,Z=Zr(j,v);return Z<0?j.push([v,N]):j[Z][1]=N,this}he.prototype.clear=$,he.prototype.delete=ie,he.prototype.get=ge,he.prototype.has=tt,he.prototype.set=bt;function qe(v){var N=-1,j=v?v.length:0;for(this.clear();++N<j;){var Z=v[N];this.set(Z[0],Z[1])}}function Rt(){this.__data__={hash:new yt,map:new(kt||he),string:new yt}}function Wt(v){return Wn(this,v).delete(v)}function Un(v){return Wn(this,v).get(v)}function Mr(v){return Wn(this,v).has(v)}function nt(v,N){return Wn(this,v).set(v,N),this}qe.prototype.clear=Rt,qe.prototype.delete=Wt,qe.prototype.get=Un,qe.prototype.has=Mr,qe.prototype.set=nt;function qn(v){var N=-1,j=v?v.length:0;for(this.__data__=new qe;++N<j;)this.add(v[N])}function Ai(v){return this.__data__.set(v,i),this}function Ps(v){return this.__data__.has(v)}qn.prototype.add=qn.prototype.push=Ai,qn.prototype.has=Ps;function Zt(v){this.__data__=new he(v)}function Ns(){this.__data__=new he}function Ms(v){return this.__data__.delete(v)}function Nl(v){return this.__data__.get(v)}function Ml(v){return this.__data__.has(v)}function Dl(v,N){var j=this.__data__;if(j instanceof he){var Z=j.__data__;if(!kt||Z.length<n-1)return Z.push([v,N]),this;j=this.__data__=new qe(Z)}return j.set(v,N),this}Zt.prototype.clear=Ns,Zt.prototype.delete=Ms,Zt.prototype.get=Nl,Zt.prototype.has=Ml,Zt.prototype.set=Dl;function Ds(v,N){var j=Br(v)||Ul(v)?Ge(v.length,String):[],Z=j.length,pe=!!Z;for(var de in v)Ct.call(v,de)&&!(pe&&(de=="length"||Fl(de,Z)))&&j.push(de);return j}function Zr(v,N){for(var j=v.length;j--;)if(zl(v[j][0],N))return j;return-1}var ki=Ne(Vn);function Ll(v,N,j,Z,pe){var de=-1,_e=v.length;for(j||(j=Cy),pe||(pe=[]);++de<_e;){var Qe=v[de];j(Qe)?Fe(pe,Qe):pe[pe.length]=Qe}return pe}var Hn=en();function Vn(v,N){return v&&Hn(v,N,zs)}function lr(v,N){N=Bs(N,v)?[N]:je(N);for(var j=0,Z=N.length;v!=null&&j<Z;)v=v[Fs(N[j++])];return j&&j==Z?v:void 0}function $l(v){return un.call(v)}function Ri(v,N){return v!=null&&N in Object(v)}function Oi(v,N,j,Z,pe){return v===N?!0:v==null||N==null||!Eo(v)&&!js(N)?v!==v&&N!==N:wo(v,N,Oi,j,Z,pe)}function wo(v,N,j,Z,pe,de){var _e=Br(v),Qe=Br(N),Ue=c,ft=c;_e||(Ue=$r(v),Ue=Ue==l?E:Ue),Qe||(ft=$r(N),ft=ft==l?E:ft);var Kt=Ue==E&&!ht(v),Gt=ft==E&&!ht(N),Ft=Ue==ft;if(Ft&&!Kt)return de||(de=new Zt),_e||Py(v)?vo(v,N,j,Z,pe,de):Nt(v,N,Ue,j,Z,pe,de);if(!(pe&s)){var fn=Kt&&Ct.call(v,"__wrapped__"),pn=Gt&&Ct.call(N,"__wrapped__");if(fn||pn){var Fr=fn?v.value():v,cr=pn?N.value():N;return de||(de=new Zt),j(Fr,cr,Z,pe,de)}}return Ft?(de||(de=new Zt),Lr(v,N,j,Z,pe,de)):!1}function Dr(v,N,j,Z){var pe=j.length,de=pe;if(v==null)return!de;for(v=Object(v);pe--;){var _e=j[pe];if(_e[2]?_e[1]!==v[_e[0]]:!(_e[0]in v))return!1}for(;++pe<de;){_e=j[pe];var Qe=_e[0],Ue=v[Qe],ft=_e[1];if(_e[2]){if(Ue===void 0&&!(Qe in v))return!1}else{var Kt=new Zt,Gt;if(!(Gt===void 0?Oi(ft,Ue,Z,o|s,Kt):Gt))return!1}}return!0}function Bl(v){if(!Eo(v)||Ay(v))return!1;var N=_d(v)||ht(v)?Xt:oe;return N.test(ei(v))}function Ii(v){return js(v)&&ql(v.length)&&!!q[un.call(v)]}function _o(v){return typeof v=="function"?v:v==null?vd:typeof v=="object"?Br(v)?ee(v[0],v[1]):K(v):Ly(v)}function Ls(v){if(!ky(v))return Qr(v);var N=[];for(var j in Object(v))Ct.call(v,j)&&j!="constructor"&&N.push(j);return N}function $s(v,N){var j=-1,Z=So(v)?Array(v.length):[];return ki(v,function(pe,de,_e){Z[++j]=N(pe,de,_e)}),Z}function K(v){var N=Ey(v);return N.length==1&&N[0][2]?wd(N[0][0],N[0][1]):function(j){return j===v||Dr(j,v,N)}}function ee(v,N){return Bs(v)&&bd(N)?wd(Fs(v),N):function(j){var Z=My(j,v);return Z===void 0&&Z===N?Dy(j,v):Oi(N,Z,void 0,o|s)}}function ue(v,N,j){var Z=-1;N=Se(N.length?N:[vd],pt(_o));var pe=$s(v,function(de,_e,Qe){var Ue=Se(N,function(ft){return ft(de)});return{criteria:Ue,index:++Z,value:de}});return ve(pe,function(de,_e){return dt(de,_e,j)})}function me(v){return function(N){return lr(N,v)}}function Ee(v,N){return N=Ci(N===void 0?v.length-1:N,0),function(){for(var j=arguments,Z=-1,pe=Ci(j.length-N,0),de=Array(pe);++Z<pe;)de[Z]=j[N+Z];Z=-1;for(var _e=Array(N+1);++Z<N;)_e[Z]=j[Z];return _e[N]=de,De(v,this,_e)}}function Te(v){if(typeof v=="string")return v;if(xo(v))return Jr?Jr.call(v):"";var N=v+"";return N=="0"&&1/v==-1/0?"-0":N}function je(v){return Br(v)?v:Ry(v)}function Me(v,N){if(v!==N){var j=v!==void 0,Z=v===null,pe=v===v,de=xo(v),_e=N!==void 0,Qe=N===null,Ue=N===N,ft=xo(N);if(!Qe&&!ft&&!de&&v>N||de&&_e&&Ue&&!Qe&&!ft||Z&&_e&&Ue||!j&&Ue||!pe)return 1;if(!Z&&!de&&!ft&&v<N||ft&&j&&pe&&!Z&&!de||Qe&&j&&pe||!_e&&pe||!Ue)return-1}return 0}function dt(v,N,j){for(var Z=-1,pe=v.criteria,de=N.criteria,_e=pe.length,Qe=j.length;++Z<_e;){var Ue=Me(pe[Z],de[Z]);if(Ue){if(Z>=Qe)return Ue;var ft=j[Z];return Ue*(ft=="desc"?-1:1)}}return v.index-N.index}function Ne(v,N){return function(j,Z){if(j==null)return j;if(!So(j))return v(j,Z);for(var pe=j.length,de=-1,_e=Object(j);++de<pe&&Z(_e[de],de,_e)!==!1;);return j}}function en(v){return function(N,j,Z){for(var pe=-1,de=Object(N),_e=Z(N),Qe=_e.length;Qe--;){var Ue=_e[++pe];if(j(de[Ue],Ue,de)===!1)break}return N}}function vo(v,N,j,Z,pe,de){var _e=pe&s,Qe=v.length,Ue=N.length;if(Qe!=Ue&&!(_e&&Ue>Qe))return!1;var ft=de.get(v);if(ft&&de.get(N))return ft==N;var Kt=-1,Gt=!0,Ft=pe&o?new qn:void 0;for(de.set(v,N),de.set(N,v);++Kt<Qe;){var fn=v[Kt],pn=N[Kt];if(Z)var Fr=_e?Z(pn,fn,Kt,N,v,de):Z(fn,pn,Kt,v,N,de);if(Fr!==void 0){if(Fr)continue;Gt=!1;break}if(Ft){if(!$t(N,function(cr,ti){if(!Ft.has(ti)&&(fn===cr||j(fn,cr,Z,pe,de)))return Ft.add(ti)})){Gt=!1;break}}else if(!(fn===pn||j(fn,pn,Z,pe,de))){Gt=!1;break}}return de.delete(v),de.delete(N),Gt}function Nt(v,N,j,Z,pe,de,_e){switch(j){case R:if(v.byteLength!=N.byteLength||v.byteOffset!=N.byteOffset)return!1;v=v.buffer,N=N.buffer;case C:return!(v.byteLength!=N.byteLength||!Z(new Sn(v),new Sn(N)));case u:case f:case m:return zl(+v,+N);case p:return v.name==N.name&&v.message==N.message;case _:case d:return v==N+"";case g:var Qe=At;case x:var Ue=de&s;if(Qe||(Qe=Ei),v.size!=N.size&&!Ue)return!1;var ft=_e.get(v);if(ft)return ft==N;de|=o,_e.set(v,N);var Kt=vo(Qe(v),Qe(N),Z,pe,de,_e);return _e.delete(v),Kt;case w:if(ar)return ar.call(v)==ar.call(N)}return!1}function Lr(v,N,j,Z,pe,de){var _e=pe&s,Qe=zs(v),Ue=Qe.length,ft=zs(N),Kt=ft.length;if(Ue!=Kt&&!_e)return!1;for(var Gt=Ue;Gt--;){var Ft=Qe[Gt];if(!(_e?Ft in N:Ct.call(N,Ft)))return!1}var fn=de.get(v);if(fn&&de.get(N))return fn==N;var pn=!0;de.set(v,N),de.set(N,v);for(var Fr=_e;++Gt<Ue;){Ft=Qe[Gt];var cr=v[Ft],ti=N[Ft];if(Z)var Sd=_e?Z(ti,cr,Ft,N,v,de):Z(cr,ti,Ft,v,N,de);if(!(Sd===void 0?cr===ti||j(cr,ti,Z,pe,de):Sd)){pn=!1;break}Fr||(Fr=Ft=="constructor")}if(pn&&!Fr){var Us=v.constructor,qs=N.constructor;Us!=qs&&"constructor"in v&&"constructor"in N&&!(typeof Us=="function"&&Us instanceof Us&&typeof qs=="function"&&qs instanceof qs)&&(pn=!1)}return de.delete(v),de.delete(N),pn}function Wn(v,N){var j=v.__data__;return Ty(N)?j[typeof N=="string"?"string":"hash"]:j.map}function Ey(v){for(var N=zs(v),j=N.length;j--;){var Z=N[j],pe=v[Z];N[j]=[Z,pe,bd(pe)]}return N}function Pi(v,N){var j=He(v,N);return Bl(j)?j:void 0}var $r=$l;(ut&&$r(new ut(new ArrayBuffer(1)))!=R||kt&&$r(new kt)!=g||Pr&&$r(Pr.resolve())!=A||ir&&$r(new ir)!=x||or&&$r(new or)!=S)&&($r=function(v){var N=un.call(v),j=N==E?v.constructor:void 0,Z=j?ei(j):void 0;if(Z)switch(Z){case Yr:return R;case bo:return g;case Vt:return A;case dn:return x;case sr:return S}return N});function xy(v,N,j){N=Bs(N,v)?[N]:je(N);for(var Z,pe=-1,_e=N.length;++pe<_e;){var de=Fs(N[pe]);if(!(Z=v!=null&&j(v,de)))break;v=v[de]}if(Z)return Z;var _e=v?v.length:0;return!!_e&&ql(_e)&&Fl(de,_e)&&(Br(v)||Ul(v))}function Cy(v){return Br(v)||Ul(v)||!!(Fn&&v&&v[Fn])}function Fl(v,N){return N=N??a,!!N&&(typeof v=="number"||ce.test(v))&&v>-1&&v%1==0&&v<N}function yd(v,N,j){if(!Eo(j))return!1;var Z=typeof N;return(Z=="number"?So(j)&&Fl(N,j.length):Z=="string"&&N in j)?zl(j[N],v):!1}function Bs(v,N){if(Br(v))return!1;var j=typeof v;return j=="number"||j=="symbol"||j=="boolean"||v==null||xo(v)?!0:F.test(v)||!Q.test(v)||N!=null&&v in Object(N)}function Ty(v){var N=typeof v;return N=="string"||N=="number"||N=="symbol"||N=="boolean"?v!=="__proto__":v===null}function Ay(v){return!!Bt&&Bt in v}function ky(v){var N=v&&v.constructor,j=typeof N=="function"&&N.prototype||$n;return v===j}function bd(v){return v===v&&!Eo(v)}function wd(v,N){return function(j){return j==null?!1:j[v]===N&&(N!==void 0||v in Object(j))}}var Ry=jl(function(v){v=Ny(v);var N=[];return U.test(v)&&N.push(""),v.replace(ae,function(j,Z,pe,de){N.push(pe?de.replace(J,"$1"):Z||j)}),N});function Fs(v){if(typeof v=="string"||xo(v))return v;var N=v+"";return N=="0"&&1/v==-1/0?"-0":N}function ei(v){if(v!=null){try{return Ht.call(v)}catch{}try{return v+""}catch{}}return""}var Oy=Ee(function(v,N){if(v==null)return[];var j=N.length;return j>1&&yd(v,N[0],N[1])?N=[]:j>2&&yd(N[0],N[1],N[2])&&(N=[N[0]]),ue(v,Ll(N),[])});function jl(v,N){if(typeof v!="function"||N&&typeof N!="function")throw new TypeError(r);var j=function(){var Z=arguments,pe=N?N.apply(this,Z):Z[0],de=j.cache;if(de.has(pe))return de.get(pe);var _e=v.apply(this,Z);return j.cache=de.set(pe,_e),_e};return j.cache=new(jl.Cache||qe),j}jl.Cache=qe;function zl(v,N){return v===N||v!==v&&N!==N}function Ul(v){return Iy(v)&&Ct.call(v,"callee")&&(!Ir.call(v,"callee")||un.call(v)==l)}var Br=Array.isArray;function So(v){return v!=null&&ql(v.length)&&!_d(v)}function Iy(v){return js(v)&&So(v)}function _d(v){var N=Eo(v)?un.call(v):"";return N==b||N==h}function ql(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=a}function Eo(v){var N=typeof v;return!!v&&(N=="object"||N=="function")}function js(v){return!!v&&typeof v=="object"}function xo(v){return typeof v=="symbol"||js(v)&&un.call(v)==w}var Py=ke?pt(ke):Ii;function Ny(v){return v==null?"":Te(v)}function My(v,N,j){var Z=v==null?void 0:lr(v,N);return Z===void 0?j:Z}function Dy(v,N){return v!=null&&xy(v,N,Ri)}function zs(v){return So(v)?Ds(v):Ls(v)}function vd(v){return v}function Ly(v){return Bs(v)?ye(Fs(v)):me(v)}e.exports=Oy})(Vo,Vo.exports)),Vo.exports}var xv=Ev();const ea=Nu(xv),Cv=({overlayInfo:e,...t})=>M(P.Fab,{...t,sx:{position:"fixed",bottom:e.present?e.contentOffset.bottom+30+"px":35,right:0,zIndex:1400,background:"linear-gradient(135deg, #1f2937 0%, #475260 100%)",color:"white",width:48,height:48,borderRadius:"5px 0 0 5px",boxShadow:"0 8px 24px rgba(31, 41, 55, 0.4)","&:hover":{background:"linear-gradient(135deg, #2c4870 0%, #4e6c91 100%)",transform:"translateY(-2px)",boxShadow:"0 8px 24px rgba(44, 72, 112, 0.4)"},transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}}),Tv=cn(P.Drawer,{shouldForwardProp:e=>e!=="overlayInfo"})(({overlayInfo:e})=>{const{present:t,position:n,contentOffset:r}=e,i={};if(t)switch(n){case"top":Object.assign(i,{marginTop:r.top,height:`calc(100vh - ${r.top}px)`});break;case"bottom":Object.assign(i,{marginBottom:r.bottom,height:`calc(100vh - ${r.bottom}px)`});break;case"left":Object.assign(i,{marginLeft:r.left});break;case"right":Object.assign(i,{marginRight:r.right});break}return{"& .MuiModal-backdrop":{display:"block"},"& .MuiDrawer-paper":{width:"730px",height:"100vh",borderRadius:"0",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.12)",background:"#f8f9fa",zIndex:1300,display:"flex",flexDirection:"column",...i}}}),Av=cn(P.Box)(({theme:e})=>({padding:e.spacing(2),display:"flex",alignItems:"center",justifyContent:"center",minHeight:40,color:e.palette.common.black,borderBottom:`1px solid ${e.palette.divider}`})),kv=cn(P.Box)(({theme:e})=>({flex:1,overflow:"auto",paddingTop:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),paddingBottom:0,borderLeft:`1px solid ${e.palette.divider}`,"&::-webkit-scrollbar":{width:8},"&::-webkit-scrollbar-track":{background:e.palette.grey[100]},"&::-webkit-scrollbar-thumb":{background:e.palette.grey[400],borderRadius:4,"&:hover":{background:e.palette.grey[500]}}})),Rv=({children:e})=>M(P.Box,{sx:{position:"relative",padding:t=>t.spacing(2),borderTop:t=>`1px solid ${t.palette.divider}`,background:"white",display:"flex",justifyContent:"center",zIndex:10},children:e}),Pg=cn(P.Card)(({theme:e})=>({borderRadius:10,padding:e.spacing(3),marginBottom:e.spacing(2),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",background:"white"})),Ng=cn(P.Card)(({theme:e})=>({borderRadius:12,padding:e.spacing(1),paddingTop:e.spacing(4),marginBottom:e.spacing(1),boxShadow:"none",background:"white"})),Mg=cn(P.Card)(({theme:e})=>({borderRadius:10,paddingLeft:e.spacing(3),paddingRight:e.spacing(3),paddingTop:"10px",paddingBottom:"10px",marginBottom:e.spacing(2),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",background:"white"})),Ov=cn(P.Card)(({theme:e})=>({borderRadius:10,padding:e.spacing(3),marginBottom:e.spacing(2),boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)",background:"white"})),Iv=({expanded:e})=>ne(P.Box,{children:[ne(Pg,{children:[M(P.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",mb:3,children:M(P.Box,{display:"flex",alignItems:"center",gap:1,children:M(P.Skeleton,{variant:"text",width:180,height:30})})}),ne(P.Box,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[M(P.Box,{position:"relative",display:"inline-flex",mr:4,children:M(P.Skeleton,{variant:"circular",width:140,height:140})}),ne(P.Box,{display:"flex",flexDirection:"column",gap:2,flex:0,children:[ne(P.Box,{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",children:[M(P.Skeleton,{variant:"text",width:80,height:28}),M(P.Skeleton,{variant:"text",width:60,height:14})]}),M(P.Skeleton,{variant:"rectangular",width:"100%",height:2}),ne(P.Box,{display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",children:[M(P.Skeleton,{variant:"text",width:80,height:28}),M(P.Skeleton,{variant:"text",width:60,height:14})]})]}),M(P.Skeleton,{variant:"rectangular",width:220,height:50,sx:{ml:5}})]})]}),ne(P.Accordion,{defaultExpanded:!0,expanded:e,sx:{borderRadius:2,mb:2,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)","&:before":{display:"none"}},children:[M(P.AccordionSummary,{expandIcon:M(mt.ExpandMore,{}),sx:{px:3},children:M(P.Box,{display:"flex",alignItems:"center",gap:1,height:72,children:M(P.Skeleton,{variant:"text",width:160,height:28})})}),M(P.AccordionDetails,{sx:{px:3,pb:3},children:M(Ng,{children:M(P.Box,{display:"flex",flexWrap:"wrap",gap:3,justifyContent:"space-around",children:[1,2,3,4,5,6].map(t=>ne(P.Box,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,width:"180px",children:[M(P.Box,{position:"relative",display:"inline-flex",children:M(P.Skeleton,{variant:"circular",width:100,height:100})}),ne(P.Box,{textAlign:"center",width:"100%",children:[M(P.Skeleton,{variant:"text",width:120,height:20,sx:{mx:"auto",mb:.5}}),M(P.Skeleton,{variant:"text",width:100,height:16,sx:{mx:"auto"}})]})]},t))})})})]}),M(P.Typography,{variant:"h4",fontWeight:600,gutterBottom:!0,sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:4},children:M(P.Skeleton,{variant:"text",width:280,height:36})}),M(P.Box,{sx:{position:"sticky",top:-31,zIndex:10,py:2,borderRadius:0},children:ne(P.Card,{sx:{padding:2,pb:1,px:"20px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"},children:[ne(P.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1,children:[M(P.Skeleton,{variant:"text",width:240,height:20}),M(P.Skeleton,{variant:"text",width:80,height:28})]}),M(P.Box,{display:"flex",gap:1,flexWrap:"nowrap",sx:{overflowY:"scroll",pb:2.5,pt:1},children:[1,2,3,4].map(t=>M(P.Skeleton,{variant:"rounded",width:140,height:32,sx:{borderRadius:4,flexShrink:0}},t))})]})}),M(P.Box,{sx:{minHeight:"calc(100vh - 320px)"},children:M(Mg,{children:M(P.List,{sx:{p:0},children:[1,2,3].map(t=>M(P.ListItem,{sx:{px:0,py:1.5,alignItems:"flex-start",borderBottom:t<3?"1px solid":"none",borderColor:"divider"},children:ne(P.Box,{mt:.5,width:"100%",children:[M(P.Skeleton,{variant:"text",width:"70%",height:32,sx:{mb:2.5}}),ne(P.Box,{display:"flex",gap:1,mb:2,flexWrap:"wrap",children:[M(P.Skeleton,{variant:"rounded",width:120,height:32,sx:{borderRadius:4}}),M(P.Skeleton,{variant:"rounded",width:100,height:32,sx:{borderRadius:4}}),M(P.Skeleton,{variant:"rounded",width:80,height:32,sx:{borderRadius:4}})]}),ne(P.Box,{mb:2,children:[M(P.Skeleton,{variant:"text",width:"100%",height:20}),M(P.Skeleton,{variant:"text",width:"95%",height:20}),M(P.Skeleton,{variant:"text",width:"60%",height:20})]}),ne(P.Box,{display:"flex",gap:1,children:[M(P.Skeleton,{variant:"rounded",width:140,height:32,sx:{borderRadius:2}}),M(P.Skeleton,{variant:"rounded",width:120,height:32,sx:{borderRadius:2}})]})]})},t))})})})]}),sc=cn(P.IconButton,{shouldForwardProp:e=>e!=="index"})(({theme:e,index:t=0})=>({color:e.palette.text.secondary,position:"absolute",right:12+t*50,top:12,backgroundColor:"rgba(0, 0, 0, 0.04)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.16)"}})),ou=(e,t)=>{const n=t?.allowScripts===!0,i=new DOMParser().parseFromString(e,"text/html");return i.querySelectorAll("base").forEach(o=>o.remove()),i.querySelectorAll("meta[http-equiv]").forEach(o=>{o.getAttribute("http-equiv")?.toLowerCase()==="refresh"&&o.remove()}),n||(i.querySelectorAll("script").forEach(s=>s.remove()),i.querySelectorAll("noscript").forEach(s=>s.remove()),i.querySelectorAll("*").forEach(s=>{const a=s;for(const l of Array.from(a.attributes??[]))l.name.toLowerCase().startsWith("on")&&a.removeAttribute(l.name)})),i.documentElement.outerHTML},Pv=({html:e,currentHighlight:t,onHighlightsFound:n,onVisibleHighlightChange:r,clickedIndicator:i,scriptsDisabled:o=!0})=>{const{t:s}=Rr(["sidebar"]),a=D.useRef(null),l=D.useRef(!1);return D.useEffect(()=>{if(!a.current)return;const c=a.current,u=c.contentDocument||c.contentWindow?.document;if(!u){le.warn("Could not access iframe document");return}const f=new DOMParser,p=o?ou(e,{allowScripts:!1}):e,h=f.parseFromString(p,"text/html").documentElement;h.getElementsByTagName("body")[0].style.overflow="auto",le.debug("Set iframe body overflow to auto"),u.open(),u.write(h.outerHTML),u.close();const g=u.createElement("style");g.textContent=`
|
|
69
69
|
.astHighlightFull,
|
|
70
70
|
.astHighlightStart,
|
|
71
71
|
.astHighlightMiddle,
|
|
@@ -94,37 +94,37 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
94
94
|
outline-color: #ff6666;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
`,u.head.appendChild(g);const E=setTimeout(()=>{const A=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],_=u.querySelectorAll(A.join(", "));if(fe.debug("Browser View - Found highlights:",_.length),n&&n(_.length),_.length>0&&r&&c.contentWindow){const x={root:null,rootMargin:"-20% 0px -20% 0px",threshold:[0,.25,.5,.75,1]},d=new Map,S=c.contentWindow.IntersectionObserver,C=new S(R=>{if(!l.current&&(R.forEach(k=>{const T=Array.from(_).indexOf(k.target);k.isIntersecting&&k.intersectionRatio>0?d.set(k.target,T):d.delete(k.target)}),d.size>0)){const T=Array.from(d.entries()).sort((y,I)=>y[1]-I[1])[0][1];r(T+1)}},x);return _.forEach(R=>C.observe(R)),()=>{C.disconnect()}}},100);return()=>{clearTimeout(E)}},[e,n,r]),D.useEffect(()=>{if(!a.current||!t||t===0)return;const c=a.current,u=c.contentDocument||c.contentWindow?.document;if(!u)return;const f=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],p=u.querySelectorAll(f.join(", "));if(fe.debug("iFrame scroll - currentHighlight:",t,"total highlights:",p.length),p.length===0){fe.warn("No highlights found in iframe");return}const b=p[t-1];b?(fe.debug("Scrolling to highlight",t,"in iframe"),l.current=!0,b.scrollIntoView({behavior:"smooth",block:"center"}),b.classList.add("animate"),setTimeout(()=>{b.classList.remove("animate")},800),setTimeout(()=>{l.current=!1,r&&r(t)},1e3)):fe.warn("Target element not found for highlight",t)},[t,r,i]),M(zr,{children:M("iframe",{ref:a,title:s("sidebar:browser_view"),style:{width:"100%",height:"600px",border:"1px solid #e0e0e0",borderRadius:"8px"},sandbox:o?"allow-same-origin allow-popups allow-forms":"allow-same-origin allow-scripts allow-popups allow-forms"})})},Nv=({html:e,onHighlightsFound:t,currentHighlight:n,shouldAutoScrollToFirst:r=!1,onVisibleHighlightChange:i,clickedIndicator:o,scrollContainerRef:s})=>{const a=D.useRef(null),l=D.useRef(null),c=D.useRef(!1);return D.useEffect(()=>{if(a.current){if(!l.current)try{l.current=a.current.attachShadow({mode:"open"})}catch(u){fe.warn("Could not attach shadow DOM, falling back to regular DOM",u),a.current.innerHTML=e;return}if(l.current){l.current.innerHTML=e;const u=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],f=l.current.querySelectorAll(u.join(", "));if(t&&t(f.length),f.length>0&&i){const p=s?.current;if(p){const b={root:p,rootMargin:"-20% 0px -20% 0px",threshold:[0,.25,.5,.75,1]},h=new Map,g=new IntersectionObserver(m=>{if(!c.current&&(m.forEach(E=>{const A=Array.from(f).indexOf(E.target);E.isIntersecting&&E.intersectionRatio>0?h.set(E.target,A):h.delete(E.target)}),h.size>0)){const A=Array.from(h.entries()).sort((_,x)=>_[1]-x[1])[0][1];i(A+1)}},b);return f.forEach(m=>g.observe(m)),()=>{g.disconnect()}}}}}},[e,t,r,i,s]),D.useEffect(()=>{if(!l.current||!n||n===0)return;const u=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],f=l.current.querySelectorAll(u.join(", "));if(f.length===0)return;const p=f[n-1];p&&(c.current=!0,p.scrollIntoView({behavior:"smooth",block:"center"}),p.classList.add("animate"),setTimeout(()=>{p.classList.remove("animate")},800),setTimeout(()=>{c.current=!1,i&&i(n)},1e3))},[n,i,o]),M("div",{ref:a,style:{width:"100%",minHeight:"100px"}})};const{entries:Dg,setPrototypeOf:Nf,isFrozen:Mv,getPrototypeOf:Dv,getOwnPropertyDescriptor:Lv}=Object;let{freeze:Ut,seal:_n,create:su}=Object,{apply:au,construct:lu}=typeof Reflect<"u"&&Reflect;Ut||(Ut=function(t){return t});_n||(_n=function(t){return t});au||(au=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(n,i)});lu||(lu=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const na=qt(Array.prototype.forEach),$v=qt(Array.prototype.lastIndexOf),Mf=qt(Array.prototype.pop),To=qt(Array.prototype.push),Bv=qt(Array.prototype.splice),Aa=qt(String.prototype.toLowerCase),ac=qt(String.prototype.toString),lc=qt(String.prototype.match),Ao=qt(String.prototype.replace),Fv=qt(String.prototype.indexOf),jv=qt(String.prototype.trim),kn=qt(Object.prototype.hasOwnProperty),jt=qt(RegExp.prototype.test),ko=zv(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return au(e,t,r)}}function zv(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lu(e,n)}}function $e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Aa;Nf&&Nf(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(Mv(t)||(t[r]=o),i=o)}e[i]=!0}return e}function Uv(e){for(let t=0;t<e.length;t++)kn(e,t)||(e[t]=null);return e}function pr(e){const t=su(null);for(const[n,r]of Dg(e))kn(e,n)&&(Array.isArray(r)?t[n]=Uv(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=pr(r):t[n]=r);return t}function Ro(e,t){for(;e!==null;){const r=Lv(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=Dv(e)}function n(){return null}return n}const Df=Ut(["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"]),cc=Ut(["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"]),uc=Ut(["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"]),qv=Ut(["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"]),dc=Ut(["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"]),Hv=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Lf=Ut(["#text"]),$f=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),fc=Ut(["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","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","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-rendering","textlength","type","u1","u2","unicode","values","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"]),Bf=Ut(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),ra=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vv=_n(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wv=_n(/<%[\w\W]*|[\w\W]*%>/gm),Kv=_n(/\$\{[\w\W]*/gm),Gv=_n(/^data-[\-\w.\u00B7-\uFFFF]+$/),Qv=_n(/^aria-[\-\w]+$/),Lg=_n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yv=_n(/^(?:\w+script|data):/i),Jv=_n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$g=_n(/^html$/i),Xv=_n(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ff=Object.freeze({__proto__:null,ARIA_ATTR:Qv,ATTR_WHITESPACE:Jv,CUSTOM_ELEMENT:Xv,DATA_ATTR:Gv,DOCTYPE_NAME:$g,ERB_EXPR:Wv,IS_ALLOWED_URI:Lg,IS_SCRIPT_OR_DATA:Yv,MUSTACHE_EXPR:Vv,TMPLIT_EXPR:Kv});const Oo={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zv=function(){return typeof window>"u"?null:window},eS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},jf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Bg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zv();const t=he=>Bg(he);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==Oo.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:b}=e,h=l.prototype,g=Ro(h,"cloneNode"),m=Ro(h,"remove"),E=Ro(h,"nextSibling"),A=Ro(h,"childNodes"),_=Ro(h,"parentNode");if(typeof s=="function"){const he=n.createElement("template");he.content&&he.content.ownerDocument&&(n=he.content.ownerDocument)}let x,d="";const{implementation:w,createNodeIterator:S,createDocumentFragment:C,getElementsByTagName:R}=n,{importNode:k}=r;let T=jf();t.isSupported=typeof Dg=="function"&&typeof _=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:y,ERB_EXPR:I,TMPLIT_EXPR:O,DATA_ATTR:L,ARIA_ATTR:U,IS_SCRIPT_OR_DATA:Z,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:Q}=Ff;let{IS_ALLOWED_URI:F}=Ff,z=null;const se=$e({},[...Df,...cc,...uc,...dc,...Lf]);let te=null;const J=$e({},[...$f,...fc,...Bf,...ra]);let oe=Object.seal(su(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}})),le=null,q=null;const re=Object.seal(su(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Y=!0,W=!0,ce=!1,B=!0,me=!1,Ee=!0,be=!1,Te=!1,je=!1,xe=!1,dt=!1,Jt=!1,we=!0,Ae=!1;const rt="user-content-";let ft=!0,qe=!1,pt={},At=null;const $n=$e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ci=null;const Ti=$e({},["audio","video","img","source","image","track"]);let er=null;const Bn=$e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Fn="http://www.w3.org/1998/Math/MathML",$t="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml";let Ct=Ht,un=!1,Xt=null;const Rr=$e({},[Fn,$t,Ht],ac);let En=$e({},["mi","mo","mn","ms","mtext"]),Or=$e({},["annotation-xml"]);const tr=$e({},["title","style","font","a","script"]);let jn=null;const Gr=["application/xhtml+xml","text/html"],Ai="text/html";let lt=null,kt=null;const Ir=n.createElement("form"),nr=function($){return $ instanceof RegExp||$ instanceof Function},rr=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===$)){if((!$||typeof $!="object")&&($={}),$=pr($),jn=Gr.indexOf($.PARSER_MEDIA_TYPE)===-1?Ai:$.PARSER_MEDIA_TYPE,lt=jn==="application/xhtml+xml"?ac:Aa,z=kn($,"ALLOWED_TAGS")?$e({},$.ALLOWED_TAGS,lt):se,te=kn($,"ALLOWED_ATTR")?$e({},$.ALLOWED_ATTR,lt):J,Xt=kn($,"ALLOWED_NAMESPACES")?$e({},$.ALLOWED_NAMESPACES,ac):Rr,er=kn($,"ADD_URI_SAFE_ATTR")?$e(pr(Bn),$.ADD_URI_SAFE_ATTR,lt):Bn,Ci=kn($,"ADD_DATA_URI_TAGS")?$e(pr(Ti),$.ADD_DATA_URI_TAGS,lt):Ti,At=kn($,"FORBID_CONTENTS")?$e({},$.FORBID_CONTENTS,lt):$n,le=kn($,"FORBID_TAGS")?$e({},$.FORBID_TAGS,lt):pr({}),q=kn($,"FORBID_ATTR")?$e({},$.FORBID_ATTR,lt):pr({}),pt=kn($,"USE_PROFILES")?$.USE_PROFILES:!1,Y=$.ALLOW_ARIA_ATTR!==!1,W=$.ALLOW_DATA_ATTR!==!1,ce=$.ALLOW_UNKNOWN_PROTOCOLS||!1,B=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,me=$.SAFE_FOR_TEMPLATES||!1,Ee=$.SAFE_FOR_XML!==!1,be=$.WHOLE_DOCUMENT||!1,xe=$.RETURN_DOM||!1,dt=$.RETURN_DOM_FRAGMENT||!1,Jt=$.RETURN_TRUSTED_TYPE||!1,je=$.FORCE_BODY||!1,we=$.SANITIZE_DOM!==!1,Ae=$.SANITIZE_NAMED_PROPS||!1,ft=$.KEEP_CONTENT!==!1,qe=$.IN_PLACE||!1,F=$.ALLOWED_URI_REGEXP||Lg,Ct=$.NAMESPACE||Ht,En=$.MATHML_TEXT_INTEGRATION_POINTS||En,Or=$.HTML_INTEGRATION_POINTS||Or,oe=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&nr($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&nr($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),me&&(W=!1),dt&&(xe=!0),pt&&(z=$e({},Lf),te=[],pt.html===!0&&($e(z,Df),$e(te,$f)),pt.svg===!0&&($e(z,cc),$e(te,fc),$e(te,ra)),pt.svgFilters===!0&&($e(z,uc),$e(te,fc),$e(te,ra)),pt.mathMl===!0&&($e(z,dc),$e(te,Bf),$e(te,ra))),$.ADD_TAGS&&(typeof $.ADD_TAGS=="function"?re.tagCheck=$.ADD_TAGS:(z===se&&(z=pr(z)),$e(z,$.ADD_TAGS,lt))),$.ADD_ATTR&&(typeof $.ADD_ATTR=="function"?re.attributeCheck=$.ADD_ATTR:(te===J&&(te=pr(te)),$e(te,$.ADD_ATTR,lt))),$.ADD_URI_SAFE_ATTR&&$e(er,$.ADD_URI_SAFE_ATTR,lt),$.FORBID_CONTENTS&&(At===$n&&(At=pr(At)),$e(At,$.FORBID_CONTENTS,lt)),ft&&(z["#text"]=!0),be&&$e(z,["html","head","body"]),z.table&&($e(z,["tbody"]),delete le.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw ko('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ko('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=$.TRUSTED_TYPES_POLICY,d=x.createHTML("")}else x===void 0&&(x=eS(b,i)),x!==null&&typeof d=="string"&&(d=x.createHTML(""));Ut&&Ut($),kt=$}},xn=$e({},[...cc,...uc,...qv]),Qr=$e({},[...dc,...Hv]),yo=function($){let ie=_($);(!ie||!ie.tagName)&&(ie={namespaceURI:Ct,tagName:"template"});const ge=Aa($.tagName),Ze=Aa(ie.tagName);return Xt[$.namespaceURI]?$.namespaceURI===$t?ie.namespaceURI===Ht?ge==="svg":ie.namespaceURI===Fn?ge==="svg"&&(Ze==="annotation-xml"||En[Ze]):!!xn[ge]:$.namespaceURI===Fn?ie.namespaceURI===Ht?ge==="math":ie.namespaceURI===$t?ge==="math"&&Or[Ze]:!!Qr[ge]:$.namespaceURI===Ht?ie.namespaceURI===$t&&!Or[Ze]||ie.namespaceURI===Fn&&!En[Ze]?!1:!Qr[ge]&&(tr[ge]||!xn[ge]):!!(jn==="application/xhtml+xml"&&Xt[$.namespaceURI]):!1},Vt=function($){To(t.removed,{element:$});try{_($).removeChild($)}catch{m($)}},dn=function($,ie){try{To(t.removed,{attribute:ie.getAttributeNode($),from:ie})}catch{To(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute($),$==="is")if(xe||dt)try{Vt(ie)}catch{}else try{ie.setAttribute($,"")}catch{}},ir=function($){let ie=null,ge=null;if(je)$="<remove></remove>"+$;else{const Ue=lc($,/^[\r\n\t ]+/);ge=Ue&&Ue[0]}jn==="application/xhtml+xml"&&Ct===Ht&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const Ze=x?x.createHTML($):$;if(Ct===Ht)try{ie=new p().parseFromString(Ze,jn)}catch{}if(!ie||!ie.documentElement){ie=w.createDocument(Ct,"template",null);try{ie.documentElement.innerHTML=un?d:Ze}catch{}}const yt=ie.body||ie.documentElement;return $&&ge&&yt.insertBefore(n.createTextNode(ge),yt.childNodes[0]||null),Ct===Ht?R.call(ie,be?"html":"body")[0]:be?ie.documentElement:yt},zn=function($){return S.call($.ownerDocument||$,$,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},or=function($){return $ instanceof f&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof u)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},Yr=function($){return typeof a=="function"&&$ instanceof a};function mt(he,$,ie){na(he,ge=>{ge.call(t,$,ie,kt)})}const Pr=function($){let ie=null;if(mt(T.beforeSanitizeElements,$,null),or($))return Vt($),!0;const ge=lt($.nodeName);if(mt(T.uponSanitizeElement,$,{tagName:ge,allowedTags:z}),Ee&&$.hasChildNodes()&&!Yr($.firstElementChild)&&jt(/<[/\w!]/g,$.innerHTML)&&jt(/<[/\w!]/g,$.textContent)||$.nodeType===Oo.progressingInstruction||Ee&&$.nodeType===Oo.comment&&jt(/<[/\w]/g,$.data))return Vt($),!0;if(!(re.tagCheck instanceof Function&&re.tagCheck(ge))&&(!z[ge]||le[ge])){if(!le[ge]&&Un(ge)&&(oe.tagNameCheck instanceof RegExp&&jt(oe.tagNameCheck,ge)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ge)))return!1;if(ft&&!At[ge]){const Ze=_($)||$.parentNode,yt=A($)||$.childNodes;if(yt&&Ze){const Ue=yt.length;for(let Rt=Ue-1;Rt>=0;--Rt){const Zt=g(yt[Rt],!0);Zt.__removalCount=($.__removalCount||0)+1,Ze.insertBefore(Zt,E($))}}}return Vt($),!0}return $ instanceof l&&!yo($)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&jt(/<\/no(script|embed|frames)/i,$.innerHTML)?(Vt($),!0):(me&&$.nodeType===Oo.text&&(ie=$.textContent,na([y,I,O],Ze=>{ie=Ao(ie,Ze," ")}),$.textContent!==ie&&(To(t.removed,{element:$.cloneNode()}),$.textContent=ie)),mt(T.afterSanitizeElements,$,null),!1)},ki=function($,ie,ge){if(we&&(ie==="id"||ie==="name")&&(ge in n||ge in Ir))return!1;if(!(W&&!q[ie]&&jt(L,ie))){if(!(Y&&jt(U,ie))){if(!(re.attributeCheck instanceof Function&&re.attributeCheck(ie,$))){if(!te[ie]||q[ie]){if(!(Un($)&&(oe.tagNameCheck instanceof RegExp&&jt(oe.tagNameCheck,$)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck($))&&(oe.attributeNameCheck instanceof RegExp&&jt(oe.attributeNameCheck,ie)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ie,$))||ie==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&jt(oe.tagNameCheck,ge)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ge))))return!1}else if(!er[ie]){if(!jt(F,Ao(ge,V,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&$!=="script"&&Fv(ge,"data:")===0&&Ci[$])){if(!(ce&&!jt(Z,Ao(ge,V,"")))){if(ge)return!1}}}}}}}return!0},Un=function($){return $!=="annotation-xml"&&lc($,Q)},Jr=function($){mt(T.beforeSanitizeAttributes,$,null);const{attributes:ie}=$;if(!ie||or($))return;const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let Ze=ie.length;for(;Ze--;){const yt=ie[Ze],{name:Ue,namespaceURI:Rt,value:Zt}=yt,Cn=lt(Ue),Bt=Zt;let bt=Ue==="value"?Bt:jv(Bt);if(ge.attrName=Cn,ge.attrValue=bt,ge.keepAttr=!0,ge.forceKeepAttr=void 0,mt(T.uponSanitizeAttribute,$,ge),bt=ge.attrValue,Ae&&(Cn==="id"||Cn==="name")&&(dn(Ue,$),bt=rt+bt),Ee&&jt(/((--!?|])>)|<\/(style|title|textarea)/i,bt)){dn(Ue,$);continue}if(Cn==="attributename"&&lc(bt,"href")){dn(Ue,$);continue}if(ge.forceKeepAttr)continue;if(!ge.keepAttr){dn(Ue,$);continue}if(!B&&jt(/\/>/i,bt)){dn(Ue,$);continue}me&&na([y,I,O],Zr=>{bt=Ao(bt,Zr," ")});const sr=lt($.nodeName);if(!ki(sr,Cn,bt)){dn(Ue,$);continue}if(x&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!Rt)switch(b.getAttributeType(sr,Cn)){case"TrustedHTML":{bt=x.createHTML(bt);break}case"TrustedScriptURL":{bt=x.createScriptURL(bt);break}}if(bt!==Bt)try{Rt?$.setAttributeNS(Rt,Ue,bt):$.setAttribute(Ue,bt),or($)?Vt($):Mf(t.removed)}catch{dn(Ue,$)}}mt(T.afterSanitizeAttributes,$,null)},Xr=function he($){let ie=null;const ge=zn($);for(mt(T.beforeSanitizeShadowDOM,$,null);ie=ge.nextNode();)mt(T.uponSanitizeShadowNode,ie,null),Pr(ie),Jr(ie),ie.content instanceof o&&he(ie.content);mt(T.afterSanitizeShadowDOM,$,null)};return t.sanitize=function(he){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,ge=null,Ze=null,yt=null;if(un=!he,un&&(he="<!-->"),typeof he!="string"&&!Yr(he))if(typeof he.toString=="function"){if(he=he.toString(),typeof he!="string")throw ko("dirty is not a string, aborting")}else throw ko("toString is not a function");if(!t.isSupported)return he;if(Te||rr($),t.removed=[],typeof he=="string"&&(qe=!1),qe){if(he.nodeName){const Zt=lt(he.nodeName);if(!z[Zt]||le[Zt])throw ko("root node is forbidden and cannot be sanitized in-place")}}else if(he instanceof a)ie=ir("<!---->"),ge=ie.ownerDocument.importNode(he,!0),ge.nodeType===Oo.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?ie=ge:ie.appendChild(ge);else{if(!xe&&!me&&!be&&he.indexOf("<")===-1)return x&&Jt?x.createHTML(he):he;if(ie=ir(he),!ie)return xe?null:Jt?d:""}ie&&je&&Vt(ie.firstChild);const Ue=zn(qe?he:ie);for(;Ze=Ue.nextNode();)Pr(Ze),Jr(Ze),Ze.content instanceof o&&Xr(Ze.content);if(qe)return he;if(xe){if(dt)for(yt=C.call(ie.ownerDocument);ie.firstChild;)yt.appendChild(ie.firstChild);else yt=ie;return(te.shadowroot||te.shadowrootmode)&&(yt=k.call(r,yt,!0)),yt}let Rt=be?ie.outerHTML:ie.innerHTML;return be&&z["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&jt($g,ie.ownerDocument.doctype.name)&&(Rt="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
|
|
98
|
-
`+Rt),me&&na([y,I,O],Zt=>{Rt=Ao(Rt,Zt," ")}),x&&Jt?x.createHTML(Rt):Rt},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};rr(he),Te=!0},t.clearConfig=function(){kt=null,Te=!1},t.isValidAttribute=function(he,$,ie){kt||rr({});const ge=lt(he),Ze=lt($);return ki(ge,Ze,ie)},t.addHook=function(he,$){typeof $=="function"&&To(T[he],$)},t.removeHook=function(he,$){if($!==void 0){const ie=$v(T[he],$);return ie===-1?void 0:Bv(T[he],ie,1)[0]}return Mf(T[he])},t.removeHooks=function(he){T[he]=[]},t.removeAllHooks=function(){T=jf()},t}var tS=Bg(),Io={},$i={},ia={},oi={},si={},pc={},zf;function Fg(){return zf||(zf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(pc)),pc}var Pe={},Uf;function qf(){if(Uf)return Pe;Uf=1;var e=Pe&&Pe.__extends||(function(){var d=function(w,S){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,R){C.__proto__=R}||function(C,R){for(var k in R)Object.prototype.hasOwnProperty.call(R,k)&&(C[k]=R[k])},d(w,S)};return function(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");d(w,S);function C(){this.constructor=w}w.prototype=S===null?Object.create(S):(C.prototype=S.prototype,new C)}})(),t=Pe&&Pe.__assign||function(){return t=Object.assign||function(d){for(var w,S=1,C=arguments.length;S<C;S++){w=arguments[S];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(d[R]=w[R])}return d},t.apply(this,arguments)};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.cloneNode=Pe.hasChildren=Pe.isDocument=Pe.isDirective=Pe.isComment=Pe.isText=Pe.isCDATA=Pe.isTag=Pe.Element=Pe.Document=Pe.CDATA=Pe.NodeWithChildren=Pe.ProcessingInstruction=Pe.Comment=Pe.Text=Pe.DataNode=Pe.Node=void 0;var n=Fg(),r=(function(){function d(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(d.prototype,"parentNode",{get:function(){return this.parent},set:function(w){this.parent=w},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"previousSibling",{get:function(){return this.prev},set:function(w){this.prev=w},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"nextSibling",{get:function(){return this.next},set:function(w){this.next=w},enumerable:!1,configurable:!0}),d.prototype.cloneNode=function(w){return w===void 0&&(w=!1),_(this,w)},d})();Pe.Node=r;var i=(function(d){e(w,d);function w(S){var C=d.call(this)||this;return C.data=S,C}return Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.data},set:function(S){this.data=S},enumerable:!1,configurable:!0}),w})(r);Pe.DataNode=i;var o=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.Text,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),w})(i);Pe.Text=o;var s=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.Comment,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),w})(i);Pe.Comment=s;var a=(function(d){e(w,d);function w(S,C){var R=d.call(this,C)||this;return R.name=S,R.type=n.ElementType.Directive,R}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),w})(i);Pe.ProcessingInstruction=a;var l=(function(d){e(w,d);function w(S){var C=d.call(this)||this;return C.children=S,C}return Object.defineProperty(w.prototype,"firstChild",{get:function(){var S;return(S=this.children[0])!==null&&S!==void 0?S:null},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return this.children},set:function(S){this.children=S},enumerable:!1,configurable:!0}),w})(r);Pe.NodeWithChildren=l;var c=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.CDATA,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),w})(l);Pe.CDATA=c;var u=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.Root,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),w})(l);Pe.Document=u;var f=(function(d){e(w,d);function w(S,C,R,k){R===void 0&&(R=[]),k===void 0&&(k=S==="script"?n.ElementType.Script:S==="style"?n.ElementType.Style:n.ElementType.Tag);var T=d.call(this,R)||this;return T.name=S,T.attribs=C,T.type=k,T}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"tagName",{get:function(){return this.name},set:function(S){this.name=S},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"attributes",{get:function(){var S=this;return Object.keys(this.attribs).map(function(C){var R,k;return{name:C,value:S.attribs[C],namespace:(R=S["x-attribsNamespace"])===null||R===void 0?void 0:R[C],prefix:(k=S["x-attribsPrefix"])===null||k===void 0?void 0:k[C]}})},enumerable:!1,configurable:!0}),w})(l);Pe.Element=f;function p(d){return(0,n.isTag)(d)}Pe.isTag=p;function b(d){return d.type===n.ElementType.CDATA}Pe.isCDATA=b;function h(d){return d.type===n.ElementType.Text}Pe.isText=h;function g(d){return d.type===n.ElementType.Comment}Pe.isComment=g;function m(d){return d.type===n.ElementType.Directive}Pe.isDirective=m;function E(d){return d.type===n.ElementType.Root}Pe.isDocument=E;function A(d){return Object.prototype.hasOwnProperty.call(d,"children")}Pe.hasChildren=A;function _(d,w){w===void 0&&(w=!1);var S;if(h(d))S=new o(d.data);else if(g(d))S=new s(d.data);else if(p(d)){var C=w?x(d.children):[],R=new f(d.name,t({},d.attribs),C);C.forEach(function(I){return I.parent=R}),d.namespace!=null&&(R.namespace=d.namespace),d["x-attribsNamespace"]&&(R["x-attribsNamespace"]=t({},d["x-attribsNamespace"])),d["x-attribsPrefix"]&&(R["x-attribsPrefix"]=t({},d["x-attribsPrefix"])),S=R}else if(b(d)){var C=w?x(d.children):[],k=new c(C);C.forEach(function(O){return O.parent=k}),S=k}else if(E(d)){var C=w?x(d.children):[],T=new u(C);C.forEach(function(O){return O.parent=T}),d["x-mode"]&&(T["x-mode"]=d["x-mode"]),S=T}else if(m(d)){var y=new a(d.name,d.data);d["x-name"]!=null&&(y["x-name"]=d["x-name"],y["x-publicId"]=d["x-publicId"],y["x-systemId"]=d["x-systemId"]),S=y}else throw new Error("Not implemented yet: ".concat(d.type));return S.startIndex=d.startIndex,S.endIndex=d.endIndex,d.sourceCodeLocation!=null&&(S.sourceCodeLocation=d.sourceCodeLocation),S}Pe.cloneNode=_;function x(d){for(var w=d.map(function(C){return _(C,!0)}),S=1;S<w.length;S++)w[S].prev=w[S-1],w[S-1].next=w[S];return w}return Pe}var Hf;function jg(){return Hf||(Hf=1,(function(e){var t=si&&si.__createBinding||(Object.create?(function(a,l,c,u){u===void 0&&(u=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return l[c]}}),Object.defineProperty(a,u,f)}):(function(a,l,c,u){u===void 0&&(u=c),a[u]=l[c]})),n=si&&si.__exportStar||function(a,l){for(var c in a)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&t(l,a,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=Fg(),i=qf();n(qf(),e);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=(function(){function a(l,c,u){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof c=="function"&&(u=c,c=o),typeof l=="object"&&(c=l,l=void 0),this.callback=l??null,this.options=c??o,this.elementCB=u??null}return a.prototype.onparserinit=function(l){this.parser=l},a.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},a.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},a.prototype.onerror=function(l){this.handleCallback(l)},a.prototype.onclosetag=function(){this.lastNode=null;var l=this.tagStack.pop();this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(l)},a.prototype.onopentag=function(l,c){var u=this.options.xmlMode?r.ElementType.Tag:void 0,f=new i.Element(l,c,void 0,u);this.addNode(f),this.tagStack.push(f)},a.prototype.ontext=function(l){var c=this.lastNode;if(c&&c.type===r.ElementType.Text)c.data+=l,this.options.withEndIndices&&(c.endIndex=this.parser.endIndex);else{var u=new i.Text(l);this.addNode(u),this.lastNode=u}},a.prototype.oncomment=function(l){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=l;return}var c=new i.Comment(l);this.addNode(c),this.lastNode=c},a.prototype.oncommentend=function(){this.lastNode=null},a.prototype.oncdatastart=function(){var l=new i.Text(""),c=new i.CDATA([l]);this.addNode(c),l.parent=c,this.lastNode=l},a.prototype.oncdataend=function(){this.lastNode=null},a.prototype.onprocessinginstruction=function(l,c){var u=new i.ProcessingInstruction(l,c);this.addNode(u)},a.prototype.handleCallback=function(l){if(typeof this.callback=="function")this.callback(l,this.dom);else if(l)throw l},a.prototype.addNode=function(l){var c=this.tagStack[this.tagStack.length-1],u=c.children[c.children.length-1];this.options.withStartIndices&&(l.startIndex=this.parser.startIndex),this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),c.children.push(l),u&&(l.prev=u,u.next=l),l.parent=c,this.lastNode=null},a})();e.DomHandler=s,e.default=s})(si)),si}var hc={},Vf;function nS(){return Vf||(Vf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(hc)),hc}var Wf;function zg(){if(Wf)return oi;Wf=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.formatAttributes=r,oi.escapeSpecialCharacters=o,oi.revertEscapedCharacters=s,oi.formatDOM=a;var e=jg(),t=nS();function n(l){return t.CASE_SENSITIVE_TAG_NAMES_MAP[l]}function r(l){for(var c={},u=0,f=l.length;u<f;u++){var p=l[u];c[p.name]=p.value}return c}function i(l){l=l.toLowerCase();var c=n(l);return c||l}function o(l){return l.replace(t.CARRIAGE_RETURN_REGEX,t.CARRIAGE_RETURN_PLACEHOLDER)}function s(l){return l.replace(t.CARRIAGE_RETURN_PLACEHOLDER_REGEX,t.CARRIAGE_RETURN)}function a(l,c,u){c===void 0&&(c=null);for(var f=[],p,b=0,h=l.length;b<h;b++){var g=l[b];switch(g.nodeType){case 1:{var m=i(g.nodeName);p=new e.Element(m,r(g.attributes)),p.children=a(m==="template"?g.content.childNodes:g.childNodes,p);break}case 3:p=new e.Text(s(g.nodeValue));break;case 8:p=new e.Comment(g.nodeValue);break;default:continue}var E=f[b-1]||null;E&&(E.next=p),p.parent=c,p.prev=E,p.next=null,f.push(p)}return u&&(p=new e.ProcessingInstruction(u.substring(0,u.indexOf(" ")).toLowerCase(),u),p.next=f[0]||null,p.parent=c,f.unshift(p),f[1]&&(f[1].prev=f[0])),f}return oi}var Kf;function rS(){if(Kf)return ia;Kf=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=g;var e=zg(),t="html",n="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,o=/<head[^]*>/i,s=/<body[^]*>/i,a=function(m,E){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(m,E){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c=typeof window=="object"&&window.DOMParser;if(typeof c=="function"){var u=new c,f="text/html";l=function(m,E){return E&&(m="<".concat(E,">").concat(m,"</").concat(E,">")),u.parseFromString(m,f)},a=l}if(typeof document=="object"&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(m,E){if(E){var A=p.documentElement.querySelector(E);return A&&(A.innerHTML=m),p}return p.documentElement.innerHTML=m,p}}var b=typeof document=="object"&&document.createElement("template"),h;b&&b.content&&(h=function(m){return b.innerHTML=m,b.content.childNodes});function g(m){var E,A;m=(0,e.escapeSpecialCharacters)(m);var _=m.match(i),x=_&&_[1]?_[1].toLowerCase():"";switch(x){case t:{var d=l(m);if(!o.test(m)){var w=d.querySelector(n);(E=w?.parentNode)===null||E===void 0||E.removeChild(w)}if(!s.test(m)){var w=d.querySelector(r);(A=w?.parentNode)===null||A===void 0||A.removeChild(w)}return d.querySelectorAll(t)}case n:case r:{var S=a(m).querySelectorAll(x);return s.test(m)&&o.test(m)?S[0].parentNode.childNodes:S}default:{if(h)return h(m);var w=a(m,r).querySelector(r);return w.childNodes}}}return ia}var Gf;function iS(){if(Gf)return $i;Gf=1;var e=$i&&$i.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty($i,"__esModule",{value:!0}),$i.default=i;var t=e(rS()),n=zg(),r=/<(![a-zA-Z\s]+)>/;function i(o){if(typeof o!="string")throw new TypeError("First argument must be a string");if(!o)return[];var s=o.match(r),a=s?s[1]:void 0;return(0,n.formatDOM)((0,t.default)(o),null,a)}return $i}var oa={},gn={},Po={},Qf;function oS(){if(Qf)return Po;Qf=1;var e=0;Po.SAME=e;var t=1;return Po.CAMELCASE=t,Po.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Po}var Yf;function sS(){if(Yf)return gn;Yf=1;const e=0,t=1,n=2,r=3,i=4,o=5,s=6;function a(d){return c.hasOwnProperty(d)?c[d]:null}function l(d,w,S,C,R,k,T){this.acceptsBooleans=w===n||w===r||w===i,this.attributeName=C,this.attributeNamespace=R,this.mustUseProperty=S,this.propertyName=d,this.type=w,this.sanitizeURL=k,this.removeEmptyString=T}const c={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(d=>{c[d]=new l(d,e,!1,d,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([d,w])=>{c[d]=new l(d,t,!1,w,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(d=>{c[d]=new l(d,n,!1,d.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(d=>{c[d]=new l(d,n,!1,d,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(d=>{c[d]=new l(d,r,!1,d.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(d=>{c[d]=new l(d,r,!0,d,null,!1,!1)}),["capture","download"].forEach(d=>{c[d]=new l(d,i,!1,d,null,!1,!1)}),["cols","rows","size","span"].forEach(d=>{c[d]=new l(d,s,!1,d,null,!1,!1)}),["rowSpan","start"].forEach(d=>{c[d]=new l(d,o,!1,d.toLowerCase(),null,!1,!1)});const f=/[\-\:]([a-z])/g,p=d=>d[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(d=>{const w=d.replace(f,p);c[w]=new l(w,t,!1,d,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(d=>{const w=d.replace(f,p);c[w]=new l(w,t,!1,d,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(d=>{const w=d.replace(f,p);c[w]=new l(w,t,!1,d,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(d=>{c[d]=new l(d,t,!1,d.toLowerCase(),null,!1,!1)});const b="xlinkHref";c[b]=new l("xlinkHref",t,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(d=>{c[d]=new l(d,t,!1,d.toLowerCase(),null,!0,!0)});const{CAMELCASE:h,SAME:g,possibleStandardNames:m}=oS(),A=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+A+"]*$")),x=Object.keys(m).reduce((d,w)=>{const S=m[w];return S===g?d[w]=w:S===h?d[w.toLowerCase()]=w:d[w]=S,d},{});return gn.BOOLEAN=r,gn.BOOLEANISH_STRING=n,gn.NUMERIC=o,gn.OVERLOADED_BOOLEAN=i,gn.POSITIVE_NUMERIC=s,gn.RESERVED=e,gn.STRING=t,gn.getPropertyInfo=a,gn.isCustomAttribute=_,gn.possibleStandardNames=x,gn}var No={},Bi={},gc,Jf;function aS(){if(Jf)return gc;Jf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
|
|
99
|
-
`,c="/",u="*",f="",p="comment",b="declaration";function h(m,E){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];E=E||{};var A=1,_=1;function x(O){var L=O.match(t);L&&(A+=L.length);var U=O.lastIndexOf(l);_=~U?O.length-U:_+O.length}function d(){var O={line:A,column:_};return function(L){return L.position=new w(O),R(),L}}function w(O){this.start=O,this.end={line:A,column:_},this.source=E.source}w.prototype.content=m;function S(O){var L=new Error(E.source+":"+A+":"+_+": "+O);if(L.reason=O,L.filename=E.source,L.line=A,L.column=_,L.source=m,!E.silent)throw L}function C(O){var L=O.exec(m);if(L){var U=L[0];return x(U),m=m.slice(U.length),L}}function R(){C(n)}function k(O){var L;for(O=O||[];L=T();)L!==!1&&O.push(L);return O}function T(){var O=d();if(!(c!=m.charAt(0)||u!=m.charAt(1))){for(var L=2;f!=m.charAt(L)&&(u!=m.charAt(L)||c!=m.charAt(L+1));)++L;if(L+=2,f===m.charAt(L-1))return S("End of comment missing");var U=m.slice(2,L-2);return _+=2,x(U),m=m.slice(L),_+=2,O({type:p,comment:U})}}function y(){var O=d(),L=C(r);if(L){if(T(),!C(i))return S("property missing ':'");var U=C(o),Z=O({type:b,property:g(L[0].replace(e,f)),value:U?g(U[0].replace(e,f)):f});return C(s),Z}}function I(){var O=[];k(O);for(var L;L=y();)L!==!1&&(O.push(L),k(O));return O}return R(),I()}function g(m){return m?m.replace(a,f):f}return gc=h,gc}var Xf;function lS(){if(Xf)return Bi;Xf=1;var e=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=n;const t=e(aS());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),a=typeof i=="function";return s.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;a?i(c,u,l):u&&(o=o||{},o[c]=u)}),o}return Bi}var Mo={},Zf;function cS(){if(Zf)return Mo;Zf=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(c){return!c||n.test(c)||e.test(c)},s=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),o(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,a):c=c.replace(r,a),c.replace(t,s))};return Mo.camelCase=l,Mo}var Do,ep;function uS(){if(ep)return Do;ep=1;var e=Do&&Do.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(lS()),n=cS();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(s[(0,n.camelCase)(a,o)]=l)}),s}return r.default=r,Do=r,Do}var tp;function Ug(){return tp||(tp=1,(function(e){var t=No&&No.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=o,e.setStyleProp=a;var n=D,r=t(uS()),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(u,f){return u.includes("-")?!i.has(u):!!(f&&typeof f.is=="string")}var s={reactCompat:!0};function a(u,f){if(typeof u=="string"){if(!u.trim()){f.style={};return}try{f.style=(0,r.default)(u,s)}catch{f.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(u){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(u.name)};e.canTextBeChildOfNode=l;var c=function(u){return u};e.returnFirstArg=c})(No)),No}var np;function qg(){if(np)return oa;np=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.default=o;var e=sS(),t=Ug(),n=["checked","value"],r=["input","select","textarea"],i={reset:!0,submit:!0};function o(a,l){a===void 0&&(a={});var c={},u=!!(a.type&&i[a.type]);for(var f in a){var p=a[f];if((0,e.isCustomAttribute)(f)){c[f]=p;continue}var b=f.toLowerCase(),h=s(b);if(h){var g=(0,e.getPropertyInfo)(h);switch(n.includes(h)&&r.includes(l)&&!u&&(h=s("default"+b)),c[h]=p,g&&g.type){case e.BOOLEAN:c[h]=!0;break;case e.OVERLOADED_BOOLEAN:p===""&&(c[h]=!0);break}continue}t.PRESERVE_CUSTOM_ATTRIBUTES&&(c[f]=p)}return(0,t.setStyleProp)(a.style,c),c}function s(a){return e.possibleStandardNames[a]}return oa}var Fi={},rp;function dS(){if(rp)return Fi;rp=1;var e=Fi&&Fi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.default=o;var t=D,n=e(qg()),r=Ug(),i={cloneElement:t.cloneElement,createElement:t.createElement,isValidElement:t.isValidElement};function o(a,l){l===void 0&&(l={});for(var c=[],u=typeof l.replace=="function",f=l.transform||r.returnFirstArg,p=l.library||i,b=p.cloneElement,h=p.createElement,g=p.isValidElement,m=a.length,E=0;E<m;E++){var A=a[E];if(u){var _=l.replace(A,E);if(g(_)){m>1&&(_=b(_,{key:_.key||E})),c.push(f(_,A,E));continue}}if(A.type==="text"){var x=!A.data.trim().length;if(x&&A.parent&&!(0,r.canTextBeChildOfNode)(A.parent)||l.trim&&x)continue;c.push(f(A.data,A,E));continue}var d=A,w={};s(d)?((0,r.setStyleProp)(d.attribs.style,d.attribs),w=d.attribs):d.attribs&&(w=(0,n.default)(d.attribs,d.name));var S=void 0;switch(A.type){case"script":case"style":A.children[0]&&(w.dangerouslySetInnerHTML={__html:A.children[0].data});break;case"tag":A.name==="textarea"&&A.children[0]?w.defaultValue=A.children[0].data:A.children&&A.children.length&&(S=o(A.children,l));break;default:continue}m>1&&(w.key=E),c.push(f(h(A.name,w,S),A,E))}return c.length===1?c[0]:c}function s(a){return r.PRESERVE_CUSTOM_ATTRIBUTES&&a.type==="tag"&&(0,r.isCustomComponent)(a.name,a.attribs)}return Fi}var ip;function fS(){return ip||(ip=1,(function(e){var t=Io&&Io.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=a;var n=t(iS());e.htmlToDOM=n.default;var r=t(qg());e.attributesToProps=r.default;var i=t(dS());e.domToReact=i.default;var o=jg();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return o.Text}});var s={lowerCaseAttributeNames:!1};function a(l,c){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,i.default)((0,n.default)(l,c?.htmlparser2||s),c):[]}})(Io)),Io}var pS=fS();const op=Nu(pS),hS=op.default||op,sp=({html:e=""})=>{const t=["b","i","strong","em","u","br","span","p","ul","ol","li","blockquote","a","h1","h2","h3","h4","h5","h6","img","table","thead","tbody","tr","th","td","code","pre","div"],n=["href","title","target","rel","src","alt","title","width","height","class","id","style","colspan","rowspan","align","data-*","aria-*","role"];let r=tS.sanitize(e,{ALLOWED_TAGS:t,ALLOWED_ATTR:n});const i=/^\s*(?:<br\s*\/?\s*>)+|(?:<br\s*\/?\s*>)+\s*$/gi;return r=r.replace(i,""),M("span",{children:hS(r)})},{min:gS,max:mS}=Math,bi=(e,t=0,n=1)=>gS(mS(t,e),n),Wu=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=bi(e[t],0,255)):t===3&&(e[t]=bi(e[t],0,1));return e},Hg={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Hg[`[object ${e}]`]=e.toLowerCase();function Le(e){return Hg[Object.prototype.toString.call(e)]||"object"}const Ie=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):Le(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),fo=e=>{if(e.length<2)return null;const t=e.length-1;return Le(e[t])=="string"?e[t].toLowerCase():null},{PI:xl,min:Vg,max:Wg}=Math,wn=e=>Math.round(e*100)/100,cu=e=>Math.round(e*100)/100,hr=xl*2,mc=xl/3,yS=xl/180,bS=180/xl;function Kg(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Re={format:{},autodetect:[]};class ae{constructor(...t){const n=this;if(Le(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=fo(t),i=!1;if(!r){i=!0,Re.sorted||(Re.autodetect=Re.autodetect.sort((o,s)=>s.p-o.p),Re.sorted=!0);for(let o of Re.autodetect)if(r=o.test(...t),r)break}if(Re.format[r]){const o=Re.format[r].apply(null,i?t:t.slice(0,-1));n._rgb=Wu(o)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return Le(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const wS="3.2.0",De=(...e)=>new ae(...e);De.version=wS;const no={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_S=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,vS=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Gg=e=>{if(e.match(_S)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),n=t>>16,r=t>>8&255,i=t&255;return[n,r,i,1]}if(e.match(vS)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),n=t>>24&255,r=t>>16&255,i=t>>8&255,o=Math.round((t&255)/255*100)/100;return[n,r,i,o]}throw new Error(`unknown hex color: ${e}`)},{round:sa}=Math,Qg=(...e)=>{let[t,n,r,i]=Ie(e,"rgba"),o=fo(e)||"auto";i===void 0&&(i=1),o==="auto"&&(o=i<1?"rgba":"rgb"),t=sa(t),n=sa(n),r=sa(r);let a="000000"+(t<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+sa(i*255).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};ae.prototype.name=function(){const e=Qg(this._rgb,"rgb");for(let t of Object.keys(no))if(no[t]===e)return t.toLowerCase();return e};Re.format.named=e=>{if(e=e.toLowerCase(),no[e])return Gg(no[e]);throw new Error("unknown color name: "+e)};Re.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Le(e)==="string"&&no[e.toLowerCase()])return"named"}});ae.prototype.alpha=function(e,t=!1){return e!==void 0&&Le(e)==="number"?t?(this._rgb[3]=e,this):new ae([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};ae.prototype.clipped=function(){return this._rgb._clipped||!1};const Xn={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},SS=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function _r(e){const t=SS.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);Xn.labWhitePoint=e,Xn.Xn=t[0],Xn.Zn=t[1]}function os(){return Xn.labWhitePoint}const Ku=(...e)=>{e=Ie(e,"lab");const[t,n,r]=e,[i,o,s]=ES(t,n,r),[a,l,c]=Yg(i,o,s);return[a,l,c,e.length>3?e[3]:1]},ES=(e,t,n)=>{const{kE:r,kK:i,kKE:o,Xn:s,Yn:a,Zn:l}=Xn,c=(e+16)/116,u=.002*t+c,f=c-.005*n,p=u*u*u,b=f*f*f,h=p>r?p:(116*u-16)/i,g=e>o?Math.pow((e+16)/116,3):e/i,m=b>r?b:(116*f-16)/i,E=h*s,A=g*a,_=m*l;return[E,A,_]},yc=e=>{const t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*t},Yg=(e,t,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:o,RefWhiteRGB:s,Xn:a,Yn:l,Zn:c}=Xn,u=a*r.m00+l*r.m10+c*r.m20,f=a*r.m01+l*r.m11+c*r.m21,p=a*r.m02+l*r.m12+c*r.m22,b=s.X*r.m00+s.Y*r.m10+s.Z*r.m20,h=s.X*r.m01+s.Y*r.m11+s.Z*r.m21,g=s.X*r.m02+s.Y*r.m12+s.Z*r.m22,m=(e*r.m00+t*r.m10+n*r.m20)*(b/u),E=(e*r.m01+t*r.m11+n*r.m21)*(h/f),A=(e*r.m02+t*r.m12+n*r.m22)*(g/p),_=m*i.m00+E*i.m10+A*i.m20,x=m*i.m01+E*i.m11+A*i.m21,d=m*i.m02+E*i.m12+A*i.m22,w=yc(_*o.m00+x*o.m10+d*o.m20),S=yc(_*o.m01+x*o.m11+d*o.m21),C=yc(_*o.m02+x*o.m12+d*o.m22);return[w*255,S*255,C*255]},Gu=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),[o,s,a]=Jg(t,n,r),[l,c,u]=xS(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function xS(e,t,n){const{Xn:r,Yn:i,Zn:o,kE:s,kK:a}=Xn,l=e/r,c=t/i,u=n/o,f=l>s?Math.pow(l,1/3):(a*l+16)/116,p=c>s?Math.pow(c,1/3):(a*c+16)/116,b=u>s?Math.pow(u,1/3):(a*u+16)/116;return[116*p-16,500*(f-p),200*(p-b)]}function bc(e){const t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const Jg=(e,t,n)=>{e=bc(e/255),t=bc(t/255),n=bc(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:o,Xn:s,Yn:a,Zn:l,As:c,Bs:u,Cs:f}=Xn;let p=e*r.m00+t*r.m10+n*r.m20,b=e*r.m01+t*r.m11+n*r.m21,h=e*r.m02+t*r.m12+n*r.m22;const g=s*i.m00+a*i.m10+l*i.m20,m=s*i.m01+a*i.m11+l*i.m21,E=s*i.m02+a*i.m12+l*i.m22;let A=p*i.m00+b*i.m10+h*i.m20,_=p*i.m01+b*i.m11+h*i.m21,x=p*i.m02+b*i.m12+h*i.m22;return A*=g/c,_*=m/u,x*=E/f,p=A*o.m00+_*o.m10+x*o.m20,b=A*o.m01+_*o.m11+x*o.m21,h=A*o.m02+_*o.m12+x*o.m22,[p,b,h]};ae.prototype.lab=function(){return Gu(this._rgb)};const CS=(...e)=>new ae(...e,"lab");Object.assign(De,{lab:CS,getLabWhitePoint:os,setLabWhitePoint:_r});Re.format.lab=Ku;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"lab"),Le(e)==="array"&&e.length===3)return"lab"}});ae.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=Xn.Kn*e,new ae(n,"lab").alpha(t.alpha(),!0)};ae.prototype.brighten=function(e=1){return this.darken(-e)};ae.prototype.darker=ae.prototype.darken;ae.prototype.brighter=ae.prototype.brighten;ae.prototype.get=function(e){const[t,n]=e.split("."),r=this[t]();if(n){const i=t.indexOf(n)-(t.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${n} in mode ${t}`)}else return r};const{pow:TS}=Math,AS=1e-7,kS=20;ae.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&Le(e)==="number"){if(e===0)return new ae([0,0,0,this._rgb[3]],"rgb");if(e===1)return new ae([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=kS;const i=(s,a)=>{const l=s.interpolate(a,.5,t),c=l.luminance();return Math.abs(e-c)<AS||!r--?l:c>e?i(s,l):i(l,a)},o=(n>e?i(new ae([0,0,0]),this):i(this,new ae([255,255,255]))).rgb();return new ae([...o,this._rgb[3]])}return RS(...this._rgb.slice(0,3))};const RS=(e,t,n)=>(e=wc(e),t=wc(t),n=wc(n),.2126*e+.7152*t+.0722*n),wc=e=>(e/=255,e<=.03928?e/12.92:TS((e+.055)/1.055,2.4)),Lt={},ro=(e,t,n=.5,...r)=>{let i=r[0]||"lrgb";if(!Lt[i]&&!r.length&&(i=Object.keys(Lt)[0]),!Lt[i])throw new Error(`interpolation mode ${i} is not defined`);return Le(e)!=="object"&&(e=new ae(e)),Le(t)!=="object"&&(t=new ae(t)),Lt[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};ae.prototype.mix=ae.prototype.interpolate=function(e,t=.5,...n){return ro(this,e,t,...n)};ae.prototype.premultiply=function(e=!1){const t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new ae([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};const{sin:OS,cos:IS}=Math,Xg=(...e)=>{let[t,n,r]=Ie(e,"lch");return isNaN(r)&&(r=0),r=r*yS,[t,IS(r)*n,OS(r)*n]},Qu=(...e)=>{e=Ie(e,"lch");const[t,n,r]=e,[i,o,s]=Xg(t,n,r),[a,l,c]=Ku(i,o,s);return[a,l,c,e.length>3?e[3]:1]},PS=(...e)=>{const t=Kg(Ie(e,"hcl"));return Qu(...t)},{sqrt:NS,atan2:MS,round:DS}=Math,Zg=(...e)=>{const[t,n,r]=Ie(e,"lab"),i=NS(n*n+r*r);let o=(MS(r,n)*bS+360)%360;return DS(i*1e4)===0&&(o=Number.NaN),[t,i,o]},Yu=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),[o,s,a]=Gu(t,n,r),[l,c,u]=Zg(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]};ae.prototype.lch=function(){return Yu(this._rgb)};ae.prototype.hcl=function(){return Kg(Yu(this._rgb))};const LS=(...e)=>new ae(...e,"lch"),$S=(...e)=>new ae(...e,"hcl");Object.assign(De,{lch:LS,hcl:$S});Re.format.lch=Qu;Re.format.hcl=PS;["lch","hcl"].forEach(e=>Re.autodetect.push({p:2,test:(...t)=>{if(t=Ie(t,e),Le(t)==="array"&&t.length===3)return e}}));ae.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=Xn.Kn*e,n[1]<0&&(n[1]=0),new ae(n,"lch").alpha(t.alpha(),!0)};ae.prototype.desaturate=function(e=1){return this.saturate(-e)};ae.prototype.set=function(e,t,n=!1){const[r,i]=e.split("."),o=this[r]();if(i){const s=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(s>-1){if(Le(t)=="string")switch(t.charAt(0)){case"+":o[s]+=+t;break;case"-":o[s]+=+t;break;case"*":o[s]*=+t.substr(1);break;case"/":o[s]/=+t.substr(1);break;default:o[s]=+t}else if(Le(t)==="number")o[s]=t;else throw new Error("unsupported value for Color.set");const a=new ae(o,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${i} in mode ${r}`)}else return o};ae.prototype.tint=function(e=.5,...t){return ro(this,"white",e,...t)};ae.prototype.shade=function(e=.5,...t){return ro(this,"black",e,...t)};const BS=(e,t,n)=>{const r=e._rgb,i=t._rgb;return new ae(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};Lt.rgb=BS;const{sqrt:_c,pow:ji}=Math,FS=(e,t,n)=>{const[r,i,o]=e._rgb,[s,a,l]=t._rgb;return new ae(_c(ji(r,2)*(1-n)+ji(s,2)*n),_c(ji(i,2)*(1-n)+ji(a,2)*n),_c(ji(o,2)*(1-n)+ji(l,2)*n),"rgb")};Lt.lrgb=FS;const jS=(e,t,n)=>{const r=e.lab(),i=t.lab();return new ae(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};Lt.lab=jS;const po=(e,t,n,r)=>{let i,o;r==="hsl"?(i=e.hsl(),o=t.hsl()):r==="hsv"?(i=e.hsv(),o=t.hsv()):r==="hcg"?(i=e.hcg(),o=t.hcg()):r==="hsi"?(i=e.hsi(),o=t.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=e.hcl(),o=t.hcl()):r==="oklch"&&(i=e.oklch().reverse(),o=t.oklch().reverse());let s,a,l,c,u,f;(r.substr(0,1)==="h"||r==="oklch")&&([s,l,u]=i,[a,c,f]=o);let p,b,h,g;return!isNaN(s)&&!isNaN(a)?(a>s&&a-s>180?g=a-(s+360):a<s&&s-a>180?g=a+360-s:g=a-s,b=s+n*g):isNaN(s)?isNaN(a)?b=Number.NaN:(b=a,(u==1||u==0)&&r!="hsv"&&(p=c)):(b=s,(f==1||f==0)&&r!="hsv"&&(p=l)),p===void 0&&(p=l+n*(c-l)),h=u+n*(f-u),r==="oklch"?new ae([h,p,b],r):new ae([b,p,h],r)},em=(e,t,n)=>po(e,t,n,"lch");Lt.lch=em;Lt.hcl=em;const zS=e=>{if(Le(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,n=e>>8&255,r=e&255;return[t,n,r,1]}throw new Error("unknown num color: "+e)},US=(...e)=>{const[t,n,r]=Ie(e,"rgb");return(t<<16)+(n<<8)+r};ae.prototype.num=function(){return US(this._rgb)};const qS=(...e)=>new ae(...e,"num");Object.assign(De,{num:qS});Re.format.num=zS;Re.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Le(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const HS=(e,t,n)=>{const r=e.num(),i=t.num();return new ae(r+n*(i-r),"num")};Lt.num=HS;const{floor:VS}=Math,WS=(...e)=>{e=Ie(e,"hcg");let[t,n,r]=e,i,o,s;r=r*255;const a=n*255;if(n===0)i=o=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const l=VS(t),c=t-l,u=r*(1-n),f=u+a*(1-c),p=u+a*c,b=u+a;switch(l){case 0:[i,o,s]=[b,p,u];break;case 1:[i,o,s]=[f,b,u];break;case 2:[i,o,s]=[u,b,p];break;case 3:[i,o,s]=[u,f,b];break;case 4:[i,o,s]=[p,u,b];break;case 5:[i,o,s]=[b,u,f];break}}return[i,o,s,e.length>3?e[3]:1]},KS=(...e)=>{const[t,n,r]=Ie(e,"rgb"),i=Vg(t,n,r),o=Wg(t,n,r),s=o-i,a=s*100/255,l=i/(255-s)*100;let c;return s===0?c=Number.NaN:(t===o&&(c=(n-r)/s),n===o&&(c=2+(r-t)/s),r===o&&(c=4+(t-n)/s),c*=60,c<0&&(c+=360)),[c,a,l]};ae.prototype.hcg=function(){return KS(this._rgb)};const GS=(...e)=>new ae(...e,"hcg");De.hcg=GS;Re.format.hcg=WS;Re.autodetect.push({p:1,test:(...e)=>{if(e=Ie(e,"hcg"),Le(e)==="array"&&e.length===3)return"hcg"}});const QS=(e,t,n)=>po(e,t,n,"hcg");Lt.hcg=QS;const{cos:zi}=Math,YS=(...e)=>{e=Ie(e,"hsi");let[t,n,r]=e,i,o,s;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(s=(1-n)/3,i=(1+n*zi(hr*t)/zi(mc-hr*t))/3,o=1-(s+i)):t<2/3?(t-=1/3,i=(1-n)/3,o=(1+n*zi(hr*t)/zi(mc-hr*t))/3,s=1-(i+o)):(t-=2/3,o=(1-n)/3,s=(1+n*zi(hr*t)/zi(mc-hr*t))/3,i=1-(o+s)),i=bi(r*i*3),o=bi(r*o*3),s=bi(r*s*3),[i*255,o*255,s*255,e.length>3?e[3]:1]},{min:JS,sqrt:XS,acos:ZS}=Math,eE=(...e)=>{let[t,n,r]=Ie(e,"rgb");t/=255,n/=255,r/=255;let i;const o=JS(t,n,r),s=(t+n+r)/3,a=s>0?1-o/s:0;return a===0?i=NaN:(i=(t-n+(t-r))/2,i/=XS((t-n)*(t-n)+(t-r)*(n-r)),i=ZS(i),r>n&&(i=hr-i),i/=hr),[i*360,a,s]};ae.prototype.hsi=function(){return eE(this._rgb)};const tE=(...e)=>new ae(...e,"hsi");De.hsi=tE;Re.format.hsi=YS;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"hsi"),Le(e)==="array"&&e.length===3)return"hsi"}});const nE=(e,t,n)=>po(e,t,n,"hsi");Lt.hsi=nE;const uu=(...e)=>{e=Ie(e,"hsl");const[t,n,r]=e;let i,o,s;if(n===0)i=o=s=r*255;else{const a=[0,0,0],l=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,u=2*r-c,f=t/360;a[0]=f+1/3,a[1]=f,a[2]=f-1/3;for(let p=0;p<3;p++)a[p]<0&&(a[p]+=1),a[p]>1&&(a[p]-=1),6*a[p]<1?l[p]=u+(c-u)*6*a[p]:2*a[p]<1?l[p]=c:3*a[p]<2?l[p]=u+(c-u)*(2/3-a[p])*6:l[p]=u;[i,o,s]=[l[0]*255,l[1]*255,l[2]*255]}return e.length>3?[i,o,s,e[3]]:[i,o,s,1]},tm=(...e)=>{e=Ie(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const i=Vg(t,n,r),o=Wg(t,n,r),s=(o+i)/2;let a,l;return o===i?(a=0,l=Number.NaN):a=s<.5?(o-i)/(o+i):(o-i)/(2-o-i),t==o?l=(n-r)/(o-i):n==o?l=2+(r-t)/(o-i):r==o&&(l=4+(t-n)/(o-i)),l*=60,l<0&&(l+=360),e.length>3&&e[3]!==void 0?[l,a,s,e[3]]:[l,a,s]};ae.prototype.hsl=function(){return tm(this._rgb)};const rE=(...e)=>new ae(...e,"hsl");De.hsl=rE;Re.format.hsl=uu;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"hsl"),Le(e)==="array"&&e.length===3)return"hsl"}});const iE=(e,t,n)=>po(e,t,n,"hsl");Lt.hsl=iE;const{floor:oE}=Math,sE=(...e)=>{e=Ie(e,"hsv");let[t,n,r]=e,i,o,s;if(r*=255,n===0)i=o=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=oE(t),l=t-a,c=r*(1-n),u=r*(1-n*l),f=r*(1-n*(1-l));switch(a){case 0:[i,o,s]=[r,f,c];break;case 1:[i,o,s]=[u,r,c];break;case 2:[i,o,s]=[c,r,f];break;case 3:[i,o,s]=[c,u,r];break;case 4:[i,o,s]=[f,c,r];break;case 5:[i,o,s]=[r,c,u];break}}return[i,o,s,e.length>3?e[3]:1]},{min:aE,max:lE}=Math,cE=(...e)=>{e=Ie(e,"rgb");let[t,n,r]=e;const i=aE(t,n,r),o=lE(t,n,r),s=o-i;let a,l,c;return c=o/255,o===0?(a=Number.NaN,l=0):(l=s/o,t===o&&(a=(n-r)/s),n===o&&(a=2+(r-t)/s),r===o&&(a=4+(t-n)/s),a*=60,a<0&&(a+=360)),[a,l,c]};ae.prototype.hsv=function(){return cE(this._rgb)};const uE=(...e)=>new ae(...e,"hsv");De.hsv=uE;Re.format.hsv=sE;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"hsv"),Le(e)==="array"&&e.length===3)return"hsv"}});const dE=(e,t,n)=>po(e,t,n,"hsv");Lt.hsv=dE;function Da(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(s=>[s]));let r=t[0].length,i=t[0].map((s,a)=>t.map(l=>l[a])),o=e.map(s=>i.map(a=>Array.isArray(s)?s.reduce((l,c,u)=>l+c*(a[u]||0),0):a.reduce((l,c)=>l+c*s,0)));return n===1&&(o=o[0]),r===1?o.map(s=>s[0]):o}const Ju=(...e)=>{e=Ie(e,"lab");const[t,n,r,...i]=e,[o,s,a]=fE([t,n,r]),[l,c,u]=Yg(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function fE(e){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Da(n,e);return Da(t,r.map(i=>i**3))}const Xu=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),o=Jg(t,n,r);return[...pE(o),...i.length>0&&i[0]<1?[i[0]]:[]]};function pE(e){const t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Da(t,e);return Da(n,r.map(i=>Math.cbrt(i)))}ae.prototype.oklab=function(){return Xu(this._rgb)};const hE=(...e)=>new ae(...e,"oklab");Object.assign(De,{oklab:hE});Re.format.oklab=Ju;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"oklab"),Le(e)==="array"&&e.length===3)return"oklab"}});const gE=(e,t,n)=>{const r=e.oklab(),i=t.oklab();return new ae(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"oklab")};Lt.oklab=gE;const mE=(e,t,n)=>po(e,t,n,"oklch");Lt.oklch=mE;const{pow:vc,sqrt:Sc,PI:Ec,cos:ap,sin:lp,atan2:yE}=Math,bE=(e,t="lrgb",n=null)=>{const r=e.length;n||(n=Array.from(new Array(r)).map(()=>1));const i=r/n.reduce(function(f,p){return f+p});if(n.forEach((f,p)=>{n[p]*=i}),e=e.map(f=>new ae(f)),t==="lrgb")return wE(e,n);const o=e.shift(),s=o.get(t),a=[];let l=0,c=0;for(let f=0;f<s.length;f++)if(s[f]=(s[f]||0)*n[0],a.push(isNaN(s[f])?0:n[0]),t.charAt(f)==="h"&&!isNaN(s[f])){const p=s[f]/180*Ec;l+=ap(p)*n[0],c+=lp(p)*n[0]}let u=o.alpha()*n[0];e.forEach((f,p)=>{const b=f.get(t);u+=f.alpha()*n[p+1];for(let h=0;h<s.length;h++)if(!isNaN(b[h]))if(a[h]+=n[p+1],t.charAt(h)==="h"){const g=b[h]/180*Ec;l+=ap(g)*n[p+1],c+=lp(g)*n[p+1]}else s[h]+=b[h]*n[p+1]});for(let f=0;f<s.length;f++)if(t.charAt(f)==="h"){let p=yE(c/a[f],l/a[f])/Ec*180;for(;p<0;)p+=360;for(;p>=360;)p-=360;s[f]=p}else s[f]=s[f]/a[f];return u/=r,new ae(s,t).alpha(u>.99999?1:u,!0)},wE=(e,t)=>{const n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){const o=e[i],s=t[i]/n,a=o._rgb;r[0]+=vc(a[0],2)*s,r[1]+=vc(a[1],2)*s,r[2]+=vc(a[2],2)*s,r[3]+=a[3]*s}return r[0]=Sc(r[0]),r[1]=Sc(r[1]),r[2]=Sc(r[2]),r[3]>.9999999&&(r[3]=1),new ae(Wu(r))},{pow:_E}=Math;function La(e){let t="rgb",n=De("#ccc"),r=0,i=[0,1],o=[0,1],s=[],a=[0,0],l=!1,c=[],u=!1,f=0,p=1,b=!1,h={},g=!0,m=1;const E=function(C){if(C=C||["#fff","#000"],C&&Le(C)==="string"&&De.brewer&&De.brewer[C.toLowerCase()]&&(C=De.brewer[C.toLowerCase()]),Le(C)==="array"){C.length===1&&(C=[C[0],C[0]]),C=C.slice(0);for(let R=0;R<C.length;R++)C[R]=De(C[R]);s.length=0;for(let R=0;R<C.length;R++)s.push(R/(C.length-1))}return w(),c=C},A=function(C){if(l!=null){const R=l.length-1;let k=0;for(;k<R&&C>=l[k];)k++;return k-1}return 0};let _=C=>C,x=C=>C;const d=function(C,R){let k,T;if(R==null&&(R=!1),isNaN(C)||C===null)return n;R?T=C:l&&l.length>2?T=A(C)/(l.length-2):p!==f?T=(C-f)/(p-f):T=1,T=x(T),R||(T=_(T)),m!==1&&(T=_E(T,m)),T=a[0]+T*(1-a[0]-a[1]),T=bi(T,0,1);const y=Math.floor(T*1e4);if(g&&h[y])k=h[y];else{if(Le(c)==="array")for(let I=0;I<s.length;I++){const O=s[I];if(T<=O){k=c[I];break}if(T>=O&&I===s.length-1){k=c[I];break}if(T>O&&T<s[I+1]){T=(T-O)/(s[I+1]-O),k=De.interpolate(c[I],c[I+1],T,t);break}}else Le(c)==="function"&&(k=c(T));g&&(h[y]=k)}return k};var w=()=>h={};E(e);const S=function(C){const R=De(d(C));return u&&R[u]?R[u]():R};return S.classes=function(C){if(C!=null){if(Le(C)==="array")l=C,i=[C[0],C[C.length-1]];else{const R=De.analyze(i);C===0?l=[R.min,R.max]:l=De.limits(R,"e",C)}return S}return l},S.domain=function(C){if(!arguments.length)return o;o=C.slice(0),f=C[0],p=C[C.length-1],s=[];const R=c.length;if(C.length===R&&f!==p)for(let k of Array.from(C))s.push((k-f)/(p-f));else{for(let k=0;k<R;k++)s.push(k/(R-1));if(C.length>2){const k=C.map((y,I)=>I/(C.length-1)),T=C.map(y=>(y-f)/(p-f));T.every((y,I)=>k[I]===y)||(x=y=>{if(y<=0||y>=1)return y;let I=0;for(;y>=T[I+1];)I++;const O=(y-T[I])/(T[I+1]-T[I]);return k[I]+O*(k[I+1]-k[I])})}}return i=[f,p],S},S.mode=function(C){return arguments.length?(t=C,w(),S):t},S.range=function(C,R){return E(C),S},S.out=function(C){return u=C,S},S.spread=function(C){return arguments.length?(r=C,S):r},S.correctLightness=function(C){return C==null&&(C=!0),b=C,w(),b?_=function(R){const k=d(0,!0).lab()[0],T=d(1,!0).lab()[0],y=k>T;let I=d(R,!0).lab()[0];const O=k+(T-k)*R;let L=I-O,U=0,Z=1,V=20;for(;Math.abs(L)>.01&&V-- >0;)(function(){return y&&(L*=-1),L<0?(U=R,R+=(Z-R)*.5):(Z=R,R+=(U-R)*.5),I=d(R,!0).lab()[0],L=I-O})();return R}:_=R=>R,S},S.padding=function(C){return C!=null?(Le(C)==="number"&&(C=[C,C]),a=C,S):a},S.colors=function(C,R){arguments.length<2&&(R="hex");let k=[];if(arguments.length===0)k=c.slice(0);else if(C===1)k=[S(.5)];else if(C>1){const T=i[0],y=i[1]-T;k=vE(0,C).map(I=>S(T+I/(C-1)*y))}else{e=[];let T=[];if(l&&l.length>2)for(let y=1,I=l.length,O=1<=I;O?y<I:y>I;O?y++:y--)T.push((l[y-1]+l[y])*.5);else T=i;k=T.map(y=>S(y))}return De[R]&&(k=k.map(T=>T[R]())),k},S.cache=function(C){return C!=null?(g=C,S):g},S.gamma=function(C){return C!=null?(m=C,S):m},S.nodata=function(C){return C!=null?(n=De(C),S):n},S}function vE(e,t,n){let r=[],i=e<t,o=t;for(let s=e;i?s<o:s>o;i?s++:s--)r.push(s);return r}const SE=function(e){let t=[1,1];for(let n=1;n<e;n++){let r=[1];for(let i=1;i<=t.length;i++)r[i]=(t[i]||0)+t[i-1];t=r}return t},EE=function(e){let t,n,r,i;if(e=e.map(o=>new ae(o)),e.length===2)[n,r]=e.map(o=>o.lab()),t=function(o){const s=[0,1,2].map(a=>n[a]+o*(r[a]-n[a]));return new ae(s,"lab")};else if(e.length===3)[n,r,i]=e.map(o=>o.lab()),t=function(o){const s=[0,1,2].map(a=>(1-o)*(1-o)*n[a]+2*(1-o)*o*r[a]+o*o*i[a]);return new ae(s,"lab")};else if(e.length===4){let o;[n,r,i,o]=e.map(s=>s.lab()),t=function(s){const a=[0,1,2].map(l=>(1-s)*(1-s)*(1-s)*n[l]+3*(1-s)*(1-s)*s*r[l]+3*(1-s)*s*s*i[l]+s*s*s*o[l]);return new ae(a,"lab")}}else if(e.length>=5){let o,s,a;o=e.map(l=>l.lab()),a=e.length-1,s=SE(a),t=function(l){const c=1-l,u=[0,1,2].map(f=>o.reduce((p,b,h)=>p+s[h]*c**(a-h)*l**h*b[f],0));return new ae(u,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},xE=e=>{const t=EE(e);return t.scale=()=>La(t),t},{round:nm}=Math;ae.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(nm)};ae.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:nm(t):t)};const CE=(...e)=>new ae(...e,"rgb");Object.assign(De,{rgb:CE});Re.format.rgb=(...e)=>{const t=Ie(e,"rgba");return t[3]===void 0&&(t[3]=1),t};Re.autodetect.push({p:3,test:(...e)=>{if(e=Ie(e,"rgba"),Le(e)==="array"&&(e.length===3||e.length===4&&Le(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const Dn=(e,t,n)=>{if(!Dn[n])throw new Error("unknown blend mode "+n);return Dn[n](e,t)},Wr=e=>(t,n)=>{const r=De(n).rgb(),i=De(t).rgb();return De.rgb(e(r,i))},Kr=e=>(t,n)=>{const r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},TE=e=>e,AE=(e,t)=>e*t/255,kE=(e,t)=>e>t?t:e,RE=(e,t)=>e>t?e:t,OE=(e,t)=>255*(1-(1-e/255)*(1-t/255)),IE=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),PE=(e,t)=>255*(1-(1-t/255)/(e/255)),NE=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);Dn.normal=Wr(Kr(TE));Dn.multiply=Wr(Kr(AE));Dn.screen=Wr(Kr(OE));Dn.overlay=Wr(Kr(IE));Dn.darken=Wr(Kr(kE));Dn.lighten=Wr(Kr(RE));Dn.dodge=Wr(Kr(NE));Dn.burn=Wr(Kr(PE));const{pow:ME,sin:DE,cos:LE}=Math;function $E(e=300,t=-1.5,n=1,r=1,i=[0,1]){let o=0,s;Le(i)==="array"?s=i[1]-i[0]:(s=0,i=[i,i]);const a=function(l){const c=hr*((e+120)/360+t*l),u=ME(i[0]+s*l,r),p=(o!==0?n[0]+l*o:n)*u*(1-u)/2,b=LE(c),h=DE(c),g=u+p*(-.14861*b+1.78277*h),m=u+p*(-.29227*b-.90649*h),E=u+p*(1.97294*b);return De(Wu([g*255,m*255,E*255,1]))};return a.start=function(l){return l==null?e:(e=l,a)},a.rotations=function(l){return l==null?t:(t=l,a)},a.gamma=function(l){return l==null?r:(r=l,a)},a.hue=function(l){return l==null?n:(n=l,Le(n)==="array"?(o=n[1]-n[0],o===0&&(n=n[1])):o=0,a)},a.lightness=function(l){return l==null?i:(Le(l)==="array"?(i=l,s=l[1]-l[0]):(i=[l,l],s=0),a)},a.scale=()=>De.scale(a),a.hue(n),a}const BE="0123456789abcdef",{floor:FE,random:jE}=Math,zE=(e=jE)=>{let t="#";for(let n=0;n<6;n++)t+=BE.charAt(FE(e()*16));return new ae(t,"hex")},{log:cp,pow:UE,floor:qE,abs:HE}=Math;function rm(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Le(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&Le(r)==="object"&&(r=r[t]),r!=null&&!isNaN(r)&&(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(r,i)=>im(n,r,i),n}function im(e,t="equal",n=7){Le(e)=="array"&&(e=rm(e));const{min:r,max:i}=e,o=e.values.sort((a,l)=>a-l);if(n===1)return[r,i];const s=[];if(t.substr(0,1)==="c"&&(s.push(r),s.push(i)),t.substr(0,1)==="e"){s.push(r);for(let a=1;a<n;a++)s.push(r+a/n*(i-r));s.push(i)}else if(t.substr(0,1)==="l"){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*cp(r),l=Math.LOG10E*cp(i);s.push(r);for(let c=1;c<n;c++)s.push(UE(10,a+c/n*(l-a)));s.push(i)}else if(t.substr(0,1)==="q"){s.push(r);for(let a=1;a<n;a++){const l=(o.length-1)*a/n,c=qE(l);if(c===l)s.push(o[c]);else{const u=l-c;s.push(o[c]*(1-u)+o[c+1]*u)}}s.push(i)}else if(t.substr(0,1)==="k"){let a;const l=o.length,c=new Array(l),u=new Array(n);let f=!0,p=0,b=null;b=[],b.push(r);for(let m=1;m<n;m++)b.push(r+m/n*(i-r));for(b.push(i);f;){for(let E=0;E<n;E++)u[E]=0;for(let E=0;E<l;E++){const A=o[E];let _=Number.MAX_VALUE,x;for(let d=0;d<n;d++){const w=HE(b[d]-A);w<_&&(_=w,x=d),u[x]++,c[E]=x}}const m=new Array(n);for(let E=0;E<n;E++)m[E]=null;for(let E=0;E<l;E++)a=c[E],m[a]===null?m[a]=o[E]:m[a]+=o[E];for(let E=0;E<n;E++)m[E]*=1/u[E];f=!1;for(let E=0;E<n;E++)if(m[E]!==b[E]){f=!0;break}b=m,p++,p>200&&(f=!1)}const h={};for(let m=0;m<n;m++)h[m]=[];for(let m=0;m<l;m++)a=c[m],h[a].push(o[m]);let g=[];for(let m=0;m<n;m++)g.push(h[m][0]),g.push(h[m][h[m].length-1]);g=g.sort((m,E)=>m-E),s.push(g[0]);for(let m=1;m<g.length;m+=2){const E=g[m];!isNaN(E)&&s.indexOf(E)===-1&&s.push(E)}}return s}const VE=(e,t)=>{e=new ae(e),t=new ae(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};const up=.027,WE=5e-4,KE=.1,dp=1.14,aa=.022,fp=1.414,GE=(e,t)=>{e=new ae(e),t=new ae(t),e.alpha()<1&&(e=ro(t,e,e.alpha(),"rgb"));const n=pp(...e.rgb()),r=pp(...t.rgb()),i=n>=aa?n:n+Math.pow(aa-n,fp),o=r>=aa?r:r+Math.pow(aa-r,fp),s=Math.pow(o,.56)-Math.pow(i,.57),a=Math.pow(o,.65)-Math.pow(i,.62),l=Math.abs(o-i)<WE?0:i<o?s*dp:a*dp;return(Math.abs(l)<KE?0:l>0?l-up:l+up)*100};function pp(e,t,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:ur,pow:St,min:QE,max:YE,atan2:hp,abs:gp,cos:la,sin:mp,exp:JE,PI:yp}=Math;function XE(e,t,n=1,r=1,i=1){var o=function(te){return 360*te/(2*yp)},s=function(te){return 2*yp*te/360};e=new ae(e),t=new ae(t);const[a,l,c]=Array.from(e.lab()),[u,f,p]=Array.from(t.lab()),b=(a+u)/2,h=ur(St(l,2)+St(c,2)),g=ur(St(f,2)+St(p,2)),m=(h+g)/2,E=.5*(1-ur(St(m,7)/(St(m,7)+St(25,7)))),A=l*(1+E),_=f*(1+E),x=ur(St(A,2)+St(c,2)),d=ur(St(_,2)+St(p,2)),w=(x+d)/2,S=o(hp(c,A)),C=o(hp(p,_)),R=S>=0?S:S+360,k=C>=0?C:C+360,T=gp(R-k)>180?(R+k+360)/2:(R+k)/2,y=1-.17*la(s(T-30))+.24*la(s(2*T))+.32*la(s(3*T+6))-.2*la(s(4*T-63));let I=k-R;I=gp(I)<=180?I:k<=R?I+360:I-360,I=2*ur(x*d)*mp(s(I)/2);const O=u-a,L=d-x,U=1+.015*St(b-50,2)/ur(20+St(b-50,2)),Z=1+.045*w,V=1+.015*w*y,Q=30*JE(-St((T-275)/25,2)),z=-(2*ur(St(w,7)/(St(w,7)+St(25,7))))*mp(2*s(Q)),se=ur(St(O/(n*U),2)+St(L/(r*Z),2)+St(I/(i*V),2)+z*(L/(r*Z))*(I/(i*V)));return YE(0,QE(100,se))}function ZE(e,t,n="lab"){e=new ae(e),t=new ae(t);const r=e.get(n),i=t.get(n);let o=0;for(let s in r){const a=(r[s]||0)-(i[s]||0);o+=a*a}return Math.sqrt(o)}const ex=(...e)=>{try{return new ae(...e),!0}catch{return!1}},tx={cool(){return La([De.hsl(180,1,.9),De.hsl(250,.7,.4)])},hot(){return La(["#000","#f00","#ff0","#fff"]).mode("rgb")}},du={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},om=Object.keys(du),bp=new Map(om.map(e=>[e.toLowerCase(),e])),nx=typeof Proxy=="function"?new Proxy(du,{get(e,t){const n=t.toLowerCase();if(bp.has(n))return e[bp.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(om)}}):du,rx=(...e)=>{e=Ie(e,"cmyk");const[t,n,r,i]=e,o=e.length>4?e[4]:1;return i===1?[0,0,0,o]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),o]},{max:wp}=Math,ix=(...e)=>{let[t,n,r]=Ie(e,"rgb");t=t/255,n=n/255,r=r/255;const i=1-wp(t,wp(n,r)),o=i<1?1/(1-i):0,s=(1-t-i)*o,a=(1-n-i)*o,l=(1-r-i)*o;return[s,a,l,i]};ae.prototype.cmyk=function(){return ix(this._rgb)};const ox=(...e)=>new ae(...e,"cmyk");Object.assign(De,{cmyk:ox});Re.format.cmyk=rx;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"cmyk"),Le(e)==="array"&&e.length===4)return"cmyk"}});const sx=(...e)=>{const t=Ie(e,"hsla");let n=fo(e)||"lsa";return t[0]=wn(t[0]||0)+"deg",t[1]=wn(t[1]*100)+"%",t[2]=wn(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),n="hsla"):t.length=3,`${n.substr(0,3)}(${t.join(" ")})`},ax=(...e)=>{const t=Ie(e,"lab");let n=fo(e)||"lab";return t[0]=wn(t[0])+"%",t[1]=wn(t[1]),t[2]=wn(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},lx=(...e)=>{const t=Ie(e,"lch");let n=fo(e)||"lab";return t[0]=wn(t[0])+"%",t[1]=wn(t[1]),t[2]=isNaN(t[2])?"none":wn(t[2])+"deg",n==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},cx=(...e)=>{const t=Ie(e,"lab");return t[0]=wn(t[0]*100)+"%",t[1]=cu(t[1]),t[2]=cu(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},sm=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),[o,s,a]=Xu(t,n,r),[l,c,u]=Zg(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]},ux=(...e)=>{const t=Ie(e,"lch");return t[0]=wn(t[0]*100)+"%",t[1]=cu(t[1]),t[2]=isNaN(t[2])?"none":wn(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:xc}=Math,dx=(...e)=>{const t=Ie(e,"rgba");let n=fo(e)||"rgb";if(n.substr(0,3)==="hsl")return sx(tm(t),n);if(n.substr(0,3)==="lab"){const r=os();_r("d50");const i=ax(Gu(t),n);return _r(r),i}if(n.substr(0,3)==="lch"){const r=os();_r("d50");const i=lx(Yu(t),n);return _r(r),i}return n.substr(0,5)==="oklab"?cx(Xu(t)):n.substr(0,5)==="oklch"?ux(sm(t)):(t[0]=xc(t[0]),t[1]=xc(t[1]),t[2]=xc(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),n="rgba"),`${n.substr(0,3)}(${t.slice(0,n==="rgb"?3:4).join(" ")})`)},am=(...e)=>{e=Ie(e,"lch");const[t,n,r,...i]=e,[o,s,a]=Xg(t,n,r),[l,c,u]=Ju(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]},Er=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,Pn=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,$a=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,vn=/\s*/.source,ho=/\s+/.source,Zu=/\s*,\s*/.source,Cl=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,go=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,lm=new RegExp("^rgba?\\("+vn+[Er,Er,Er].join(ho)+go+"\\)$"),cm=new RegExp("^rgb\\("+vn+[Er,Er,Er].join(Zu)+vn+"\\)$"),um=new RegExp("^rgba\\("+vn+[Er,Er,Er,Pn].join(Zu)+vn+"\\)$"),dm=new RegExp("^hsla?\\("+vn+[Cl,$a,$a].join(ho)+go+"\\)$"),fm=new RegExp("^hsl?\\("+vn+[Cl,$a,$a].join(Zu)+vn+"\\)$"),pm=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,hm=new RegExp("^lab\\("+vn+[Pn,Pn,Pn].join(ho)+go+"\\)$"),gm=new RegExp("^lch\\("+vn+[Pn,Pn,Cl].join(ho)+go+"\\)$"),mm=new RegExp("^oklab\\("+vn+[Pn,Pn,Pn].join(ho)+go+"\\)$"),ym=new RegExp("^oklch\\("+vn+[Pn,Pn,Cl].join(ho)+go+"\\)$"),{round:bm}=Math,Ui=e=>e.map((t,n)=>n<=2?bi(bm(t),0,255):t),Et=(e,t=0,n=100,r=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,r?e=t+(e+1)*.5*(n-t):e=t+e*(n-t)),+e),zt=(e,t)=>e==="none"?t:e,ed=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Re.format.named)try{return Re.format.named(e)}catch{}if((t=e.match(lm))||(t=e.match(cm))){let n=t.slice(1,4);for(let i=0;i<3;i++)n[i]=+Et(zt(n[i],0),0,255);n=Ui(n);const r=t[4]!==void 0?+Et(t[4],0,1):1;return n[3]=r,n}if(t=e.match(um)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+Et(n[r],0,255);return n}if((t=e.match(dm))||(t=e.match(fm))){const n=t.slice(1,4);n[0]=+zt(n[0].replace("deg",""),0),n[1]=+Et(zt(n[1],0),0,100)*.01,n[2]=+Et(zt(n[2],0),0,100)*.01;const r=Ui(uu(n)),i=t[4]!==void 0?+Et(t[4],0,1):1;return r[3]=i,r}if(t=e.match(pm)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=uu(n);for(let i=0;i<3;i++)r[i]=bm(r[i]);return r[3]=+t[4],r}if(t=e.match(hm)){const n=t.slice(1,4);n[0]=Et(zt(n[0],0),0,100),n[1]=Et(zt(n[1],0),-125,125,!0),n[2]=Et(zt(n[2],0),-125,125,!0);const r=os();_r("d50");const i=Ui(Ku(n));_r(r);const o=t[4]!==void 0?+Et(t[4],0,1):1;return i[3]=o,i}if(t=e.match(gm)){const n=t.slice(1,4);n[0]=Et(n[0],0,100),n[1]=Et(zt(n[1],0),0,150,!1),n[2]=+zt(n[2].replace("deg",""),0);const r=os();_r("d50");const i=Ui(Qu(n));_r(r);const o=t[4]!==void 0?+Et(t[4],0,1):1;return i[3]=o,i}if(t=e.match(mm)){const n=t.slice(1,4);n[0]=Et(zt(n[0],0),0,1),n[1]=Et(zt(n[1],0),-.4,.4,!0),n[2]=Et(zt(n[2],0),-.4,.4,!0);const r=Ui(Ju(n)),i=t[4]!==void 0?+Et(t[4],0,1):1;return r[3]=i,r}if(t=e.match(ym)){const n=t.slice(1,4);n[0]=Et(zt(n[0],0),0,1),n[1]=Et(zt(n[1],0),0,.4,!1),n[2]=+zt(n[2].replace("deg",""),0);const r=Ui(am(n)),i=t[4]!==void 0?+Et(t[4],0,1):1;return r[3]=i,r}};ed.test=e=>lm.test(e)||dm.test(e)||hm.test(e)||gm.test(e)||mm.test(e)||ym.test(e)||cm.test(e)||um.test(e)||fm.test(e)||pm.test(e)||e==="transparent";ae.prototype.css=function(e){return dx(this._rgb,e)};const fx=(...e)=>new ae(...e,"css");De.css=fx;Re.format.css=ed;Re.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&Le(e)==="string"&&ed.test(e))return"css"}});Re.format.gl=(...e)=>{const t=Ie(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const px=(...e)=>new ae(...e,"gl");De.gl=px;ae.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};ae.prototype.hex=function(e){return Qg(this._rgb,e)};const hx=(...e)=>new ae(...e,"hex");De.hex=hx;Re.format.hex=Gg;Re.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&Le(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:ca}=Math,wm=e=>{const t=e/100;let n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*ca(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*ca(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*ca(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*ca(r),i=255),[n,r,i,1]},{round:gx}=Math,mx=(...e)=>{const t=Ie(e,"rgb"),n=t[0],r=t[2];let i=1e3,o=4e4;const s=.4;let a;for(;o-i>s;){a=(o+i)*.5;const l=wm(a);l[2]/l[0]>=r/n?o=a:i=a}return gx(a)};ae.prototype.temp=ae.prototype.kelvin=ae.prototype.temperature=function(){return mx(this._rgb)};const Cc=(...e)=>new ae(...e,"temp");Object.assign(De,{temp:Cc,kelvin:Cc,temperature:Cc});Re.format.temp=Re.format.kelvin=Re.format.temperature=wm;ae.prototype.oklch=function(){return sm(this._rgb)};const yx=(...e)=>new ae(...e,"oklch");Object.assign(De,{oklch:yx});Re.format.oklch=am;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"oklch"),Le(e)==="array"&&e.length===3)return"oklch"}});Object.assign(De,{analyze:rm,average:bE,bezier:xE,blend:Dn,brewer:nx,Color:ae,colors:no,contrast:VE,contrastAPCA:GE,cubehelix:$E,deltaE:XE,distance:ZE,input:Re,interpolate:ro,limits:im,mix:ro,random:zE,scale:La,scales:tx,valid:ex});const bx=e=>{if(e.length===0)return{};const t=[...e].sort(),n=De.scale(["#006675","#3636C5","#008060","#001746","#36B37E","#00B8D9"]).mode("hsl"),r={};return t.forEach((i,o)=>{const s=o/Math.max(t.length-1,1);r[i]=n(s).darken(.2).hex()}),r},wx=e=>{const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(r,i,o,s){return i+i+o+o+s+s});const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null},_p=e=>{if(!e.startsWith("#"))return fe.warn("getContrastTextColor: Invalid hex color",e),"#000000";if(e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.length!==7)return fe.warn("getContrastTextColor: Invalid hex color length",e),"#000000";const t=wx(e);return t?(.299*t.r+.587*t.g+.114*t.b)/255>.6?"#000000":"#FFFFFF":(fe.warn("getContrastTextColor: Could not convert hex to rgb",e),"#000000")},_m=(e,t=[])=>{if(t.length>0){const o=bx(t)[e]||"#6c757d";return{bg:o,text:_p(o)}}let n=0;for(let i=0;i<e.length;i++)n=e.charCodeAt(i)+((n<<5)-n);const r=Math.abs(n)%360;return{bg:De.hsl(r,.7,.3).hex(),text:_p(De.hsl(r,.7,.3).hex())}},_x=({value:e,size:t=120})=>{const n=r=>r>=90?"#28a745":r>=70?"#ffc107":"#dc3545";return M(P.Box,{flexDirection:"column",display:"flex",alignItems:"center",justifyContent:"center",children:ne(P.Box,{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",children:[M(fi,{variant:"determinate",value:e,size:t,thickness:4,sx:{color:n(e),"& .MuiCircularProgress-circle":{strokeLinecap:"round"}}}),M(P.Box,{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",children:ne(P.Typography,{variant:"h3",component:"div",fontWeight:"bold",color:n(e),sx:{fontSize:"1.5rem"},children:[Math.round(e),"%"]})})]})})};function vx(e){return Sl("MuiSvgIcon",e)}Ig("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Sx=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Mn(t)}`,`fontSize${Mn(n)}`]};return gg(i,vx,r)},Ex=cn("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Mn(n.color)}`],t[`fontSize${Mn(n.fontSize)}`]]}})(El(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Ba=We.forwardRef(function(t,n){const r=Og({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:p="0 0 24 24",...b}=r,h=We.isValidElement(i)&&i.type==="svg",g={...r,color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:h},m={};u||(m.viewBox=p);const E=Sx(g);return In.jsxs(Ex,{as:a,className:ju(E.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...m,...b,...h&&i.props,ownerState:g,children:[h?i.props.children:i,f?In.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(Ba.propTypes={children:Se.node,classes:Se.object,className:Se.string,color:Se.oneOfType([Se.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Se.string]),component:Se.elementType,fontSize:Se.oneOfType([Se.oneOf(["inherit","large","medium","small"]),Se.string]),htmlColor:Se.string,inheritViewBox:Se.bool,shapeRendering:Se.string,sx:Se.oneOfType([Se.arrayOf(Se.oneOfType([Se.func,Se.object,Se.bool])),Se.func,Se.object]),titleAccess:Se.string,viewBox:Se.string});Ba.muiName="SvgIcon";function td(e,t){function n(r,i){return In.jsx(Ba,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Ba.muiName,We.memo(We.forwardRef(n))}const xx=td(In.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Cx=td(In.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Tx=td(In.jsx("path",{d:"m12.87 15.07-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7 1.62-4.33L19.12 17z"}),"Translate"),Ax={en:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><rect width="24" height="16" fill="#fff"/><g stroke-width="0"><rect y="0" width="24" height="2" fill="#b22234"/><rect y="3" width="24" height="2" fill="#b22234"/><rect y="6" width="24" height="2" fill="#b22234"/><rect y="9" width="24" height="2" fill="#b22234"/><rect y="12" width="24" height="2" fill="#b22234"/><rect width="10" height="8" fill="#3c3b6e"/></g></svg>',de:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><rect width="24" height="16" fill="#ffce00"/><rect y="0" width="24" height="5.33" fill="#000"/><rect y="5.33" width="24" height="5.33" fill="#dd0000"/></svg>',es:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><rect width="24" height="16" fill="#c60b1e"/><rect y="4" width="24" height="8" fill="#ffc400"/></svg>'},kx=e=>`url("data:image/svg+xml;utf8,${encodeURIComponent(Ax[e])}")`,Rx=({locale:e,isUrlControlled:t,userOverride:n,switchLabel:r,sourceLabel:i,localeLabels:o,onSelect:s,onReset:a,resetLabel:l,index:c=1})=>{const[u,f]=D.useState(null),p=!!u,{palette:{text:{secondary:b}}}=P.useTheme(),h=c===0?{}:{position:"absolute",right:12+c*50,top:12};return ne(zr,{children:[M(P.Fab,{"data-testid":"language-switch",size:"small",color:"primary","aria-label":r,onClick:g=>f(g.currentTarget),disabled:t,sx:{boxShadow:"none",color:b,backgroundColor:"rgba(0, 0, 0, 0.04)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.16)"},...h},children:M(Tx,{fontSize:"small"})}),ne(P.Menu,{anchorEl:u,open:p,onClose:()=>f(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{".MuiMenu-paper":{width:240},"li.MuiMenuItem-root":{textWrap:"auto"}},children:[Object.keys(o).map(g=>ne(P.MenuItem,{"data-testid":`language-${g}`,selected:e===g,onClick:()=>{s(g),f(null)},sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:.25},children:[ne(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,width:"100%"},children:[ne(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[M(P.Box,{component:"span","aria-hidden":"true",sx:{width:22,height:14,backgroundImage:kx(g),backgroundSize:"cover",backgroundRepeat:"no-repeat",boxShadow:"0 0 0 1px rgba(0,0,0,0.12)"}}),M(P.Divider,{orientation:"vertical",flexItem:!0}),M(P.Typography,{variant:"body2",children:o[g]})]}),M(P.Typography,{component:"span",variant:"caption",color:"text.secondary",textAlign:"right",children:g.toUpperCase()})]}),e===g&&ne(P.Typography,{variant:"caption",color:t?"warning.main":"text.secondary",children:[t?M(Cx,{fontSize:"inherit",sx:{mr:.5,verticalAlign:"middle"}}):null,i]})]},g)),M(P.Divider,{sx:{my:.5}}),ne(P.MenuItem,{onClick:()=>{a(),f(null)},disabled:t&&!n,sx:{gap:1},children:[M(xx,{fontSize:"small"}),M(P.Typography,{variant:"caption",fontSize:"0.8rem",children:l})]})]})]})};function Pt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ox=typeof Symbol=="function"&&Symbol.observable||"@@observable",vp=Ox,Tc=()=>Math.random().toString(36).substring(7).split("").join("."),Ix={INIT:`@@redux/INIT${Tc()}`,REPLACE:`@@redux/REPLACE${Tc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tc()}`},wi=Ix;function Zn(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Px(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Dx(e))return"date";if(Mx(e))return"error";const n=Nx(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Nx(e){return typeof e.constructor=="function"?e.constructor.name:null}function Mx(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Dx(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Fr(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Px(e)),t}function vm(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(2):`Expected the root reducer to be a function. Instead, received: '${Fr(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?Pt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(1):`Expected the enhancer to be a function. Instead, received: '${Fr(n)}'`);return n(vm)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((m,E)=>{s.set(E,m)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(4):`Expected the listener to be a function. Instead, received: '${Fr(m)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let E=!0;c();const A=a++;return s.set(A,m),function(){if(E){if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");E=!1,c(),s.delete(A),o=null}}}function p(m){if(!Zn(m))throw new Error(process.env.NODE_ENV==="production"?Pt(7):`Actions must be plain objects. Instead, the actual type was: '${Fr(m)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof m.type!="string")throw new Error(process.env.NODE_ENV==="production"?Pt(17):`Action "type" property must be a string. Instead, the actual type was: '${Fr(m.type)}'. Value was: '${m.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?Pt(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,m)}finally{l=!1}return(o=s).forEach(A=>{A()}),m}function b(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?Pt(10):`Expected the nextReducer to be a function. Instead, received: '${Fr(m)}`);r=m,p({type:wi.REPLACE})}function h(){const m=f;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(process.env.NODE_ENV==="production"?Pt(11):`Expected the observer to be an object. Instead, received: '${Fr(E)}'`);function A(){const x=E;x.next&&x.next(u())}return A(),{unsubscribe:m(A)}},[vp](){return this}}}return p({type:wi.INIT}),{dispatch:p,subscribe:f,getState:u,replaceReducer:b,[vp]:h}}function Sp(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Lx(e,t,n,r){const i=Object.keys(t),o=n&&n.type===wi.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Zn(e))return`The ${o} has unexpected type of "${Fr(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const s=Object.keys(e).filter(a=>!t.hasOwnProperty(a)&&!r[a]);if(s.forEach(a=>{r[a]=!0}),!(n&&n.type===wi.REPLACE)&&s.length>0)return`Unexpected ${s.length>1?"keys":"key"} "${s.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function $x(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:wi.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:wi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?Pt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${wi.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Sm(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const a=t[s];process.env.NODE_ENV!=="production"&&typeof e[a]>"u"&&Sp(`No reducer provided for key "${a}"`),typeof e[a]=="function"&&(n[a]=e[a])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{$x(n)}catch(s){o=s}return function(a={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const f=Lx(a,n,l,i);f&&Sp(f)}let c=!1;const u={};for(let f=0;f<r.length;f++){const p=r[f],b=n[p],h=a[p],g=b(h,l);if(typeof g>"u"){const m=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?Pt(14):`When called with an action of type ${m?`"${String(m)}"`:"(unknown type)"}, the slice reducer for key "${p}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[p]=g,c=c||g!==h}return c=c||r.length!==Object.keys(a).length,c?u:a}}function Fa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Bx(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(process.env.NODE_ENV==="production"?Pt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=Fa(...a)(i.dispatch),{...i,dispatch:o}}}function nd(e){return Zn(e)&&"type"in e&&typeof e.type=="string"}var rd=Symbol.for("immer-nothing"),Yo=Symbol.for("immer-draftable"),Ot=Symbol.for("immer-state"),Em=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Tt(e,...t){if(process.env.NODE_ENV!=="production"){const n=Em[e],r=jr(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,vi=rn.getPrototypeOf,ss="constructor",Ss="prototype",fu="configurable",ja="enumerable",ka="writable",as="value",an=e=>!!e&&!!e[Ot];function ln(e){return e?xm(e)||Es(e)||!!e[Yo]||!!e[ss]?.[Yo]||xs(e)||Cs(e):!1}var Fx=rn[Ss][ss].toString(),Ep=new WeakMap;function xm(e){if(!e||!io(e))return!1;const t=vi(e);if(t===null||t===rn[Ss])return!0;const n=rn.hasOwnProperty.call(t,ss)&&t[ss];if(n===Object)return!0;if(!jr(n))return!1;let r=Ep.get(n);return r===void 0&&(r=Function.toString.call(n),Ep.set(n,r)),r===Fx}function jx(e){return an(e)||Tt(15,e),e[Ot].base_}function mo(e,t,n=!0){Si(e)===0?(n?Reflect.ownKeys(e):rn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Si(e){const t=e[Ot];return t?t.type_:Es(e)?1:xs(e)?2:Cs(e)?3:0}var Jo=(e,t,n=Si(e))=>n===2?e.has(t):rn[Ss].hasOwnProperty.call(e,t),gr=(e,t,n=Si(e))=>n===2?e.get(t):e[t],za=(e,t,n,r=Si(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function zx(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Es=Array.isArray,xs=e=>e instanceof Map,Cs=e=>e instanceof Set,io=e=>typeof e=="object",jr=e=>typeof e=="function",Ac=e=>typeof e=="boolean",Ux=e=>io(e)?e?.[Ot]:null,mr=e=>e.copy_||e.base_,id=e=>e.modified_?e.copy_:e.base_;function pu(e,t){if(xs(e))return new Map(e);if(Cs(e))return new Set(e);if(Es(e))return Array[Ss].slice.call(e);const n=xm(e);if(t===!0||t==="class_only"&&!n){const r=rn.getOwnPropertyDescriptors(e);delete r[Ot];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a[ka]===!1&&(a[ka]=!0,a[fu]=!0),(a.get||a.set)&&(r[s]={[fu]:!0,[ka]:!0,[ja]:a[ja],[as]:e[s]})}return rn.create(vi(e),r)}else{const r=vi(e);if(r!==null&&n)return{...e};const i=rn.create(r);return rn.assign(i,e)}}function od(e,t=!1){return Tl(e)||an(e)||!ln(e)||(Si(e)>1&&rn.defineProperties(e,{set:ua,add:ua,clear:ua,delete:ua}),rn.freeze(e),t&&mo(e,(n,r)=>{od(r,!0)},!1)),e}function qx(){Tt(2)}var ua={[as]:qx};function Tl(e){return e===null||!io(e)?!0:rn.isFrozen(e)}var Ua="MapSet",qa="Patches",Ha={};function oo(e){const t=Ha[e];return t||Tt(0,e),t}var Hx=e=>!!Ha[e];function Vx(e,t){Ha[e]||(Ha[e]=t)}var ls,Cm=()=>ls,Wx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hx(Ua)?oo(Ua):void 0});function xp(e,t){t&&(e.patchPlugin_=oo(qa),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hu(e){gu(e),e.drafts_.forEach(Kx),e.drafts_=null}function gu(e){e===ls&&(ls=e.parent_)}var Cp=e=>ls=Wx(ls,e);function Kx(e){const t=e[Ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Tp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ot].modified_&&(hu(t),Tt(4)),ln(e)&&(e=Ap(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Ot].base_,e,t)}else e=Ap(t,n);return Gx(t,e,!0),hu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==rd?e:void 0}function Ap(e,t){if(Tl(t))return t;const n=t[Ot];if(!n)return sd(t,e.handledSet_,e);if(!Al(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);km(n,e)}return n.copy_}function Gx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&od(t,n)}function Tm(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Al=(e,t)=>e.scope_===t,Qx=[];function Am(e,t,n,r){const i=mr(e),o=e.type_;if(r!==void 0&&gr(i,r,o)===t){za(i,r,n,o);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;mo(i,(l,c)=>{if(an(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const s=e.draftLocations_.get(t)??Qx;for(const a of s)za(i,a,n,o)}function Yx(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!Al(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const s=id(o);Am(e,o.draft_??o,s,n),km(o,i)})}function km(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}Tm(e)}}function Jx(e,t,n){const{scope_:r}=e;if(an(n)){const i=n[Ot];Al(i,r)&&i.callbacks_.push(function(){Ra(e);const s=id(i);Am(e,n,s,t)})}else ln(n)&&e.callbacks_.push(function(){const o=mr(e);gr(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&sd(gr(e.copy_,t,e.type_),r.handledSet_,r)})}function sd(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||an(e)||t.has(e)||!ln(e)||Tl(e)||(t.add(e),mo(e,(r,i)=>{if(an(i)){const o=i[Ot];if(Al(o,n)){const s=id(o);za(e,r,s,e.type_),Tm(o)}}else ln(i)&&sd(i,t,n)})),e}function Xx(e,t){const n=Es(e),r={type_:n?1:0,scope_:t?t.scope_:Cm(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=ad;n&&(i=[r],o=cs);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}var ad={get(e,t){if(t===Ot)return e;const n=mr(e);if(!Jo(n,t,e.type_))return Zx(e,n,t);const r=n[t];if(e.finalized_||!ln(r))return r;if(r===kc(e.base_,t)){Ra(e);const i=e.type_===1?+t:t,o=yu(e.scope_,r,e,i);return e.copy_[i]=o}return r},has(e,t){return t in mr(e)},ownKeys(e){return Reflect.ownKeys(mr(e))},set(e,t,n){const r=Rm(mr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=kc(mr(e),t),o=i?.[Ot];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(zx(n,i)&&(n!==void 0||Jo(e.base_,t,e.type_)))return!0;Ra(e),mu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Jx(e,t,n)),!0},deleteProperty(e,t){return Ra(e),kc(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),mu(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=mr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[ka]:!0,[fu]:e.type_!==1||t!=="length",[ja]:r[ja],[as]:n[t]}},defineProperty(){Tt(11)},getPrototypeOf(e){return vi(e.base_)},setPrototypeOf(){Tt(12)}},cs={};mo(ad,(e,t)=>{cs[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});cs.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Tt(13),cs.set.call(this,e,t,void 0)};cs.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Tt(14),ad.set.call(this,e[0],t,n,e[0])};function kc(e,t){const n=e[Ot];return(n?mr(n):e)[t]}function Zx(e,t,n){const r=Rm(t,n);return r?as in r?r[as]:r.get?.call(e.draft_):void 0}function Rm(e,t){if(!(t in e))return;let n=vi(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=vi(n)}}function mu(e){e.modified_||(e.modified_=!0,e.parent_&&mu(e.parent_))}function Ra(e){e.copy_||(e.assigned_=new Map,e.copy_=pu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(jr(t)&&!jr(n)){const o=n;n=t;const s=this;return function(l=o,...c){return s.produce(l,u=>n.call(this,u,...c))}}jr(n)||Tt(6),r!==void 0&&!jr(r)&&Tt(7);let i;if(ln(t)){const o=Cp(this),s=yu(o,t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?hu(o):gu(o)}return xp(o,r),Tp(i,o)}else if(!t||!io(t)){if(i=n(t),i===void 0&&(i=t),i===rd&&(i=void 0),this.autoFreeze_&&od(i,!0),r){const o=[],s=[];oo(qa).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),r(o,s)}return i}else Tt(1,t)},this.produceWithPatches=(t,n)=>{if(jr(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},Ac(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ac(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ac(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ln(e)||Tt(8),an(e)&&(e=Om(e));const t=Cp(this),n=yu(t,e,void 0);return n[Ot].isManual_=!0,gu(t),n}finishDraft(e,t){const n=e&&e[Ot];(!n||!n.isManual_)&&Tt(9);const{scope_:r}=n;return xp(r,t),Tp(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=oo(qa).applyPatches_;return an(e)?r(e,t):this.produce(e,i=>r(i,t))}};function yu(e,t,n,r){const[i,o]=xs(t)?oo(Ua).proxyMap_(t,n):Cs(t)?oo(Ua).proxySet_(t,n):Xx(t,n);return(n?.scope_??Cm()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?Yx(n,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),i}function Om(e){return an(e)||Tt(10,e),Im(e)}function Im(e){if(!ln(e)||Tl(e))return e;const t=e[Ot];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=pu(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=pu(e,!0);return mo(n,(i,o)=>{za(n,i,Im(o))},r),t&&(t.finalized_=!1),n}function tC(){process.env.NODE_ENV!=="production"&&Em.push('Sets cannot have "replace" patches.',function(h){return"Unsupported patch operation: "+h},function(h){return"Cannot apply patch, path doesn't resolve: "+h},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");function t(h,g=[]){if("key_"in h&&h.key_!==void 0){const m=h.parent_.copy_??h.parent_.base_,E=Ux(gr(m,h.key_)),A=gr(m,h.key_);if(A===void 0||A!==h.draft_&&A!==h.base_&&A!==h.copy_||E!=null&&E.base_!==h.base_)return null;const _=h.parent_.type_===3;let x;if(_){const d=h.parent_;x=Array.from(d.drafts_.keys()).indexOf(h.key_)}else x=h.key_;if(!(_&&m.size>x||Jo(m,x)))return null;g.push(x)}if(h.parent_)return t(h.parent_,g);g.reverse();try{n(h.copy_,g)}catch{return null}return g}function n(h,g){let m=h;for(let E=0;E<g.length-1;E++){const A=g[E];if(m=gr(m,A),!io(m)||m===null)throw new Error(`Cannot resolve path at '${g.join("/")}'`)}return m}const r="replace",i="add",o="remove";function s(h,g,m){if(h.scope_.processedForPatches_.has(h))return;h.scope_.processedForPatches_.add(h);const{patches_:E,inversePatches_:A}=m;switch(h.type_){case 0:case 2:return l(h,g,E,A);case 1:return a(h,g,E,A);case 3:return c(h,g,E,A)}}function a(h,g,m,E){let{base_:A,assigned_:_}=h,x=h.copy_;x.length<A.length&&([A,x]=[x,A],[m,E]=[E,m]);for(let d=0;d<A.length;d++){const w=x[d],S=A[d];if(_?.get(d.toString())&&w!==S){const C=w?.[Ot];if(C&&C.modified_)continue;const R=g.concat([d]);m.push({op:r,path:R,value:b(w)}),E.push({op:r,path:R,value:b(S)})}}for(let d=A.length;d<x.length;d++){const w=g.concat([d]);m.push({op:i,path:w,value:b(x[d])})}for(let d=x.length-1;A.length<=d;--d){const w=g.concat([d]);E.push({op:o,path:w})}}function l(h,g,m,E){const{base_:A,copy_:_,type_:x}=h;mo(h.assigned_,(d,w)=>{const S=gr(A,d,x),C=gr(_,d,x),R=w?Jo(A,d)?r:i:o;if(S===C&&R===r)return;const k=g.concat(d);m.push(R===o?{op:R,path:k}:{op:R,path:k,value:b(C)}),E.push(R===i?{op:o,path:k}:R===o?{op:i,path:k,value:b(S)}:{op:r,path:k,value:b(S)})})}function c(h,g,m,E){let{base_:A,copy_:_}=h,x=0;A.forEach(d=>{if(!_.has(d)){const w=g.concat([x]);m.push({op:o,path:w,value:d}),E.unshift({op:i,path:w,value:d})}x++}),x=0,_.forEach(d=>{if(!A.has(d)){const w=g.concat([x]);m.push({op:i,path:w,value:d}),E.unshift({op:o,path:w,value:d})}x++})}function u(h,g,m){const{patches_:E,inversePatches_:A}=m;E.push({op:r,path:[],value:g===rd?void 0:g}),A.push({op:r,path:[],value:h})}function f(h,g){return g.forEach(m=>{const{path:E,op:A}=m;let _=h;for(let S=0;S<E.length-1;S++){const C=Si(_);let R=E[S];typeof R!="string"&&typeof R!="number"&&(R=""+R),(C===0||C===1)&&(R==="__proto__"||R===ss)&&Tt(19),jr(_)&&R===Ss&&Tt(19),_=gr(_,R),io(_)||Tt(18,E.join("/"))}const x=Si(_),d=p(m.value),w=E[E.length-1];switch(A){case r:switch(x){case 2:return _.set(w,d);case 3:Tt(16);default:return _[w]=d}case i:switch(x){case 1:return w==="-"?_.push(d):_.splice(w,0,d);case 2:return _.set(w,d);case 3:return _.add(d);default:return _[w]=d}case o:switch(x){case 1:return _.splice(w,1);case 2:return _.delete(w);case 3:return _.delete(m.value);default:return delete _[w]}default:Tt(17,A)}}),h}function p(h){if(!ln(h))return h;if(Es(h))return h.map(p);if(xs(h))return new Map(Array.from(h.entries()).map(([m,E])=>[m,p(E)]));if(Cs(h))return new Set(Array.from(h).map(p));const g=Object.create(vi(h));for(const m in h)g[m]=p(h[m]);return Jo(h,Yo)&&(g[Yo]=h[Yo]),g}function b(h){return an(h)?p(h):h}Vx(qa,{applyPatches_:f,generatePatches_:s,generateReplacementPatches_:u,getPath:t})}var us=new eC,Ts=us.produce,Pm=us.produceWithPatches.bind(us),kp=us.applyPatches.bind(us),nC=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const i={};e(i)===i&&(r=!0)}catch{}if(r){let i;try{throw new Error}catch(o){({stack:i}=o)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
97
|
+
`,u.head.appendChild(g);const E=setTimeout(()=>{const A=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],_=u.querySelectorAll(A.join(", "));if(le.debug("Browser View - Found highlights:",_.length),n&&n(_.length),_.length>0&&r&&c.contentWindow){const x={root:null,rootMargin:"-20% 0px -20% 0px",threshold:[0,.25,.5,.75,1]},d=new Map,S=c.contentWindow.IntersectionObserver,C=new S(R=>{if(!l.current&&(R.forEach(k=>{const T=Array.from(_).indexOf(k.target);k.isIntersecting&&k.intersectionRatio>0?d.set(k.target,T):d.delete(k.target)}),d.size>0)){const T=Array.from(d.entries()).sort((y,I)=>y[1]-I[1])[0][1];r(T+1)}},x);return _.forEach(R=>C.observe(R)),()=>{C.disconnect()}}},100);return()=>{clearTimeout(E)}},[e,n,r]),D.useEffect(()=>{if(!a.current||!t||t===0)return;const c=a.current,u=c.contentDocument||c.contentWindow?.document;if(!u)return;const f=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],p=u.querySelectorAll(f.join(", "));if(le.debug("iFrame scroll - currentHighlight:",t,"total highlights:",p.length),p.length===0){le.warn("No highlights found in iframe");return}const b=p[t-1];b?(le.debug("Scrolling to highlight",t,"in iframe"),l.current=!0,b.scrollIntoView({behavior:"smooth",block:"center"}),b.classList.add("animate"),setTimeout(()=>{b.classList.remove("animate")},800),setTimeout(()=>{l.current=!1,r&&r(t)},1e3)):le.warn("Target element not found for highlight",t)},[t,r,i]),M(Ur,{children:M("iframe",{ref:a,title:s("sidebar:browser_view"),style:{width:"100%",height:"600px",border:"1px solid #e0e0e0",borderRadius:"8px"},sandbox:o?"allow-same-origin allow-popups allow-forms":"allow-same-origin allow-scripts allow-popups allow-forms"})})},Nv=({html:e,onHighlightsFound:t,currentHighlight:n,shouldAutoScrollToFirst:r=!1,onVisibleHighlightChange:i,clickedIndicator:o,scrollContainerRef:s})=>{const a=D.useRef(null),l=D.useRef(null),c=D.useRef(!1);return D.useEffect(()=>{if(a.current){if(!l.current)try{l.current=a.current.attachShadow({mode:"open"})}catch(u){le.warn("Could not attach shadow DOM, falling back to regular DOM",u),a.current.innerHTML=e;return}if(l.current){l.current.innerHTML=e;const u=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],f=l.current.querySelectorAll(u.join(", "));if(t&&t(f.length),f.length>0&&i){const p=s?.current;if(p){const b={root:p,rootMargin:"-20% 0px -20% 0px",threshold:[0,.25,.5,.75,1]},h=new Map,g=new IntersectionObserver(m=>{if(!c.current&&(m.forEach(E=>{const A=Array.from(f).indexOf(E.target);E.isIntersecting&&E.intersectionRatio>0?h.set(E.target,A):h.delete(E.target)}),h.size>0)){const A=Array.from(h.entries()).sort((_,x)=>_[1]-x[1])[0][1];i(A+1)}},b);return f.forEach(m=>g.observe(m)),()=>{g.disconnect()}}}}}},[e,t,r,i,s]),D.useEffect(()=>{if(!l.current||!n||n===0)return;const u=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],f=l.current.querySelectorAll(u.join(", "));if(f.length===0)return;const p=f[n-1];p&&(c.current=!0,p.scrollIntoView({behavior:"smooth",block:"center"}),p.classList.add("animate"),setTimeout(()=>{p.classList.remove("animate")},800),setTimeout(()=>{c.current=!1,i&&i(n)},1e3))},[n,i,o]),M("div",{ref:a,style:{width:"100%",minHeight:"100px"}})};const{entries:Dg,setPrototypeOf:Nf,isFrozen:Mv,getPrototypeOf:Dv,getOwnPropertyDescriptor:Lv}=Object;let{freeze:Ut,seal:wn,create:su}=Object,{apply:au,construct:lu}=typeof Reflect<"u"&&Reflect;Ut||(Ut=function(t){return t});wn||(wn=function(t){return t});au||(au=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return t.apply(n,i)});lu||(lu=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new t(...r)});const ta=qt(Array.prototype.forEach),$v=qt(Array.prototype.lastIndexOf),Mf=qt(Array.prototype.pop),ko=qt(Array.prototype.push),Bv=qt(Array.prototype.splice),Ta=qt(String.prototype.toLowerCase),ac=qt(String.prototype.toString),lc=qt(String.prototype.match),Ro=qt(String.prototype.replace),Fv=qt(String.prototype.indexOf),jv=qt(String.prototype.trim),An=qt(Object.prototype.hasOwnProperty),jt=qt(RegExp.prototype.test),Oo=zv(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return au(e,t,r)}}function zv(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lu(e,n)}}function Be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ta;Nf&&Nf(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const o=n(i);o!==i&&(Mv(t)||(t[r]=o),i=o)}e[i]=!0}return e}function Uv(e){for(let t=0;t<e.length;t++)An(e,t)||(e[t]=null);return e}function hr(e){const t=su(null);for(const[n,r]of Dg(e))An(e,n)&&(Array.isArray(r)?t[n]=Uv(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=hr(r):t[n]=r);return t}function Io(e,t){for(;e!==null;){const r=Lv(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=Dv(e)}function n(){return null}return n}const Df=Ut(["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"]),cc=Ut(["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"]),uc=Ut(["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"]),qv=Ut(["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"]),dc=Ut(["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"]),Hv=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Lf=Ut(["#text"]),$f=Ut(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),fc=Ut(["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","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","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-rendering","textlength","type","u1","u2","unicode","values","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"]),Bf=Ut(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),na=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vv=wn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Wv=wn(/<%[\w\W]*|[\w\W]*%>/gm),Kv=wn(/\$\{[\w\W]*/gm),Gv=wn(/^data-[\-\w.\u00B7-\uFFFF]+$/),Qv=wn(/^aria-[\-\w]+$/),Lg=wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Yv=wn(/^(?:\w+script|data):/i),Jv=wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$g=wn(/^html$/i),Xv=wn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ff=Object.freeze({__proto__:null,ARIA_ATTR:Qv,ATTR_WHITESPACE:Jv,CUSTOM_ELEMENT:Xv,DATA_ATTR:Gv,DOCTYPE_NAME:$g,ERB_EXPR:Wv,IS_ALLOWED_URI:Lg,IS_SCRIPT_OR_DATA:Yv,MUSTACHE_EXPR:Vv,TMPLIT_EXPR:Kv});const Po={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zv=function(){return typeof window>"u"?null:window},eS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},jf=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Bg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zv();const t=he=>Bg(he);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==Po.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:b}=e,h=l.prototype,g=Io(h,"cloneNode"),m=Io(h,"remove"),E=Io(h,"nextSibling"),A=Io(h,"childNodes"),_=Io(h,"parentNode");if(typeof s=="function"){const he=n.createElement("template");he.content&&he.content.ownerDocument&&(n=he.content.ownerDocument)}let x,d="";const{implementation:w,createNodeIterator:S,createDocumentFragment:C,getElementsByTagName:R}=n,{importNode:k}=r;let T=jf();t.isSupported=typeof Dg=="function"&&typeof _=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:y,ERB_EXPR:I,TMPLIT_EXPR:O,DATA_ATTR:L,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:X,ATTR_WHITESPACE:H,CUSTOM_ELEMENT:Q}=Ff;let{IS_ALLOWED_URI:F}=Ff,U=null;const ae=Be({},[...Df,...cc,...uc,...dc,...Lf]);let te=null;const J=Be({},[...$f,...fc,...Bf,...na]);let oe=Object.seal(su(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}})),ce=null,q=null;const re=Object.seal(su(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Y=!0,W=!0,fe=!1,B=!0,we=!1,be=!0,Ce=!1,ke=!1,De=!1,Se=!1,Fe=!1,$t=!1,ye=!0,ve=!1;const Ge="user-content-";let pt=!0,He=!1,ht={},At=null;const Ln=Be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ei=null;const xi=Be({},["audio","video","img","source","image","track"]);let nr=null;const $n=Be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bn="http://www.w3.org/1998/Math/MathML",Bt="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml";let Ct=Ht,un=!1,Xt=null;const Or=Be({},[Bn,Bt,Ht],ac);let Sn=Be({},["mi","mo","mn","ms","mtext"]),Ir=Be({},["annotation-xml"]);const rr=Be({},["title","style","font","a","script"]);let Fn=null;const Qr=["application/xhtml+xml","text/html"],Ci="text/html";let ut=null,kt=null;const Pr=n.createElement("form"),ir=function($){return $ instanceof RegExp||$ instanceof Function},or=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===$)){if((!$||typeof $!="object")&&($={}),$=hr($),Fn=Qr.indexOf($.PARSER_MEDIA_TYPE)===-1?Ci:$.PARSER_MEDIA_TYPE,ut=Fn==="application/xhtml+xml"?ac:Ta,U=An($,"ALLOWED_TAGS")?Be({},$.ALLOWED_TAGS,ut):ae,te=An($,"ALLOWED_ATTR")?Be({},$.ALLOWED_ATTR,ut):J,Xt=An($,"ALLOWED_NAMESPACES")?Be({},$.ALLOWED_NAMESPACES,ac):Or,nr=An($,"ADD_URI_SAFE_ATTR")?Be(hr($n),$.ADD_URI_SAFE_ATTR,ut):$n,Ei=An($,"ADD_DATA_URI_TAGS")?Be(hr(xi),$.ADD_DATA_URI_TAGS,ut):xi,At=An($,"FORBID_CONTENTS")?Be({},$.FORBID_CONTENTS,ut):Ln,ce=An($,"FORBID_TAGS")?Be({},$.FORBID_TAGS,ut):hr({}),q=An($,"FORBID_ATTR")?Be({},$.FORBID_ATTR,ut):hr({}),ht=An($,"USE_PROFILES")?$.USE_PROFILES:!1,Y=$.ALLOW_ARIA_ATTR!==!1,W=$.ALLOW_DATA_ATTR!==!1,fe=$.ALLOW_UNKNOWN_PROTOCOLS||!1,B=$.ALLOW_SELF_CLOSE_IN_ATTR!==!1,we=$.SAFE_FOR_TEMPLATES||!1,be=$.SAFE_FOR_XML!==!1,Ce=$.WHOLE_DOCUMENT||!1,Se=$.RETURN_DOM||!1,Fe=$.RETURN_DOM_FRAGMENT||!1,$t=$.RETURN_TRUSTED_TYPE||!1,De=$.FORCE_BODY||!1,ye=$.SANITIZE_DOM!==!1,ve=$.SANITIZE_NAMED_PROPS||!1,pt=$.KEEP_CONTENT!==!1,He=$.IN_PLACE||!1,F=$.ALLOWED_URI_REGEXP||Lg,Ct=$.NAMESPACE||Ht,Sn=$.MATHML_TEXT_INTEGRATION_POINTS||Sn,Ir=$.HTML_INTEGRATION_POINTS||Ir,oe=$.CUSTOM_ELEMENT_HANDLING||{},$.CUSTOM_ELEMENT_HANDLING&&ir($.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=$.CUSTOM_ELEMENT_HANDLING.tagNameCheck),$.CUSTOM_ELEMENT_HANDLING&&ir($.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=$.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),$.CUSTOM_ELEMENT_HANDLING&&typeof $.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=$.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),we&&(W=!1),Fe&&(Se=!0),ht&&(U=Be({},Lf),te=[],ht.html===!0&&(Be(U,Df),Be(te,$f)),ht.svg===!0&&(Be(U,cc),Be(te,fc),Be(te,na)),ht.svgFilters===!0&&(Be(U,uc),Be(te,fc),Be(te,na)),ht.mathMl===!0&&(Be(U,dc),Be(te,Bf),Be(te,na))),$.ADD_TAGS&&(typeof $.ADD_TAGS=="function"?re.tagCheck=$.ADD_TAGS:(U===ae&&(U=hr(U)),Be(U,$.ADD_TAGS,ut))),$.ADD_ATTR&&(typeof $.ADD_ATTR=="function"?re.attributeCheck=$.ADD_ATTR:(te===J&&(te=hr(te)),Be(te,$.ADD_ATTR,ut))),$.ADD_URI_SAFE_ATTR&&Be(nr,$.ADD_URI_SAFE_ATTR,ut),$.FORBID_CONTENTS&&(At===Ln&&(At=hr(At)),Be(At,$.FORBID_CONTENTS,ut)),pt&&(U["#text"]=!0),Ce&&Be(U,["html","head","body"]),U.table&&(Be(U,["tbody"]),delete ce.tbody),$.TRUSTED_TYPES_POLICY){if(typeof $.TRUSTED_TYPES_POLICY.createHTML!="function")throw Oo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof $.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Oo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=$.TRUSTED_TYPES_POLICY,d=x.createHTML("")}else x===void 0&&(x=eS(b,i)),x!==null&&typeof d=="string"&&(d=x.createHTML(""));Ut&&Ut($),kt=$}},En=Be({},[...cc,...uc,...qv]),Yr=Be({},[...dc,...Hv]),bo=function($){let ie=_($);(!ie||!ie.tagName)&&(ie={namespaceURI:Ct,tagName:"template"});const ge=Ta($.tagName),tt=Ta(ie.tagName);return Xt[$.namespaceURI]?$.namespaceURI===Bt?ie.namespaceURI===Ht?ge==="svg":ie.namespaceURI===Bn?ge==="svg"&&(tt==="annotation-xml"||Sn[tt]):!!En[ge]:$.namespaceURI===Bn?ie.namespaceURI===Ht?ge==="math":ie.namespaceURI===Bt?ge==="math"&&Ir[tt]:!!Yr[ge]:$.namespaceURI===Ht?ie.namespaceURI===Bt&&!Ir[tt]||ie.namespaceURI===Bn&&!Sn[tt]?!1:!Yr[ge]&&(rr[ge]||!En[ge]):!!(Fn==="application/xhtml+xml"&&Xt[$.namespaceURI]):!1},Vt=function($){ko(t.removed,{element:$});try{_($).removeChild($)}catch{m($)}},dn=function($,ie){try{ko(t.removed,{attribute:ie.getAttributeNode($),from:ie})}catch{ko(t.removed,{attribute:null,from:ie})}if(ie.removeAttribute($),$==="is")if(Se||Fe)try{Vt(ie)}catch{}else try{ie.setAttribute($,"")}catch{}},sr=function($){let ie=null,ge=null;if(De)$="<remove></remove>"+$;else{const qe=lc($,/^[\r\n\t ]+/);ge=qe&&qe[0]}Fn==="application/xhtml+xml"&&Ct===Ht&&($='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+$+"</body></html>");const tt=x?x.createHTML($):$;if(Ct===Ht)try{ie=new p().parseFromString(tt,Fn)}catch{}if(!ie||!ie.documentElement){ie=w.createDocument(Ct,"template",null);try{ie.documentElement.innerHTML=un?d:tt}catch{}}const bt=ie.body||ie.documentElement;return $&&ge&&bt.insertBefore(n.createTextNode(ge),bt.childNodes[0]||null),Ct===Ht?R.call(ie,Ce?"html":"body")[0]:Ce?ie.documentElement:bt},jn=function($){return S.call($.ownerDocument||$,$,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ar=function($){return $ instanceof f&&(typeof $.nodeName!="string"||typeof $.textContent!="string"||typeof $.removeChild!="function"||!($.attributes instanceof u)||typeof $.removeAttribute!="function"||typeof $.setAttribute!="function"||typeof $.namespaceURI!="string"||typeof $.insertBefore!="function"||typeof $.hasChildNodes!="function")},Jr=function($){return typeof a=="function"&&$ instanceof a};function yt(he,$,ie){ta(he,ge=>{ge.call(t,$,ie,kt)})}const Nr=function($){let ie=null;if(yt(T.beforeSanitizeElements,$,null),ar($))return Vt($),!0;const ge=ut($.nodeName);if(yt(T.uponSanitizeElement,$,{tagName:ge,allowedTags:U}),be&&$.hasChildNodes()&&!Jr($.firstElementChild)&&jt(/<[/\w!]/g,$.innerHTML)&&jt(/<[/\w!]/g,$.textContent)||$.nodeType===Po.progressingInstruction||be&&$.nodeType===Po.comment&&jt(/<[/\w]/g,$.data))return Vt($),!0;if(!(re.tagCheck instanceof Function&&re.tagCheck(ge))&&(!U[ge]||ce[ge])){if(!ce[ge]&&zn(ge)&&(oe.tagNameCheck instanceof RegExp&&jt(oe.tagNameCheck,ge)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ge)))return!1;if(pt&&!At[ge]){const tt=_($)||$.parentNode,bt=A($)||$.childNodes;if(bt&&tt){const qe=bt.length;for(let Rt=qe-1;Rt>=0;--Rt){const Wt=g(bt[Rt],!0);Wt.__removalCount=($.__removalCount||0)+1,tt.insertBefore(Wt,E($))}}}return Vt($),!0}return $ instanceof l&&!bo($)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&jt(/<\/no(script|embed|frames)/i,$.innerHTML)?(Vt($),!0):(we&&$.nodeType===Po.text&&(ie=$.textContent,ta([y,I,O],tt=>{ie=Ro(ie,tt," ")}),$.textContent!==ie&&(ko(t.removed,{element:$.cloneNode()}),$.textContent=ie)),yt(T.afterSanitizeElements,$,null),!1)},Ti=function($,ie,ge){if(ye&&(ie==="id"||ie==="name")&&(ge in n||ge in Pr))return!1;if(!(W&&!q[ie]&&jt(L,ie))){if(!(Y&&jt(z,ie))){if(!(re.attributeCheck instanceof Function&&re.attributeCheck(ie,$))){if(!te[ie]||q[ie]){if(!(zn($)&&(oe.tagNameCheck instanceof RegExp&&jt(oe.tagNameCheck,$)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck($))&&(oe.attributeNameCheck instanceof RegExp&&jt(oe.attributeNameCheck,ie)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(ie,$))||ie==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&jt(oe.tagNameCheck,ge)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(ge))))return!1}else if(!nr[ie]){if(!jt(F,Ro(ge,H,""))){if(!((ie==="src"||ie==="xlink:href"||ie==="href")&&$!=="script"&&Fv(ge,"data:")===0&&Ei[$])){if(!(fe&&!jt(X,Ro(ge,H,"")))){if(ge)return!1}}}}}}}return!0},zn=function($){return $!=="annotation-xml"&&lc($,Q)},Xr=function($){yt(T.beforeSanitizeAttributes,$,null);const{attributes:ie}=$;if(!ie||ar($))return;const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let tt=ie.length;for(;tt--;){const bt=ie[tt],{name:qe,namespaceURI:Rt,value:Wt}=bt,Un=ut(qe),Mr=Wt;let nt=qe==="value"?Mr:jv(Mr);if(ge.attrName=Un,ge.attrValue=nt,ge.keepAttr=!0,ge.forceKeepAttr=void 0,yt(T.uponSanitizeAttribute,$,ge),nt=ge.attrValue,ve&&(Un==="id"||Un==="name")&&(dn(qe,$),nt=Ge+nt),be&&jt(/((--!?|])>)|<\/(style|title|textarea)/i,nt)){dn(qe,$);continue}if(Un==="attributename"&&lc(nt,"href")){dn(qe,$);continue}if(ge.forceKeepAttr)continue;if(!ge.keepAttr){dn(qe,$);continue}if(!B&&jt(/\/>/i,nt)){dn(qe,$);continue}we&&ta([y,I,O],Ai=>{nt=Ro(nt,Ai," ")});const qn=ut($.nodeName);if(!Ti(qn,Un,nt)){dn(qe,$);continue}if(x&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!Rt)switch(b.getAttributeType(qn,Un)){case"TrustedHTML":{nt=x.createHTML(nt);break}case"TrustedScriptURL":{nt=x.createScriptURL(nt);break}}if(nt!==Mr)try{Rt?$.setAttributeNS(Rt,qe,nt):$.setAttribute(qe,nt),ar($)?Vt($):Mf(t.removed)}catch{dn(qe,$)}}yt(T.afterSanitizeAttributes,$,null)},xn=function he($){let ie=null;const ge=jn($);for(yt(T.beforeSanitizeShadowDOM,$,null);ie=ge.nextNode();)yt(T.uponSanitizeShadowNode,ie,null),Nr(ie),Xr(ie),ie.content instanceof o&&he(ie.content);yt(T.afterSanitizeShadowDOM,$,null)};return t.sanitize=function(he){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=null,ge=null,tt=null,bt=null;if(un=!he,un&&(he="<!-->"),typeof he!="string"&&!Jr(he))if(typeof he.toString=="function"){if(he=he.toString(),typeof he!="string")throw Oo("dirty is not a string, aborting")}else throw Oo("toString is not a function");if(!t.isSupported)return he;if(ke||or($),t.removed=[],typeof he=="string"&&(He=!1),He){if(he.nodeName){const Wt=ut(he.nodeName);if(!U[Wt]||ce[Wt])throw Oo("root node is forbidden and cannot be sanitized in-place")}}else if(he instanceof a)ie=sr("<!---->"),ge=ie.ownerDocument.importNode(he,!0),ge.nodeType===Po.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?ie=ge:ie.appendChild(ge);else{if(!Se&&!we&&!Ce&&he.indexOf("<")===-1)return x&&$t?x.createHTML(he):he;if(ie=sr(he),!ie)return Se?null:$t?d:""}ie&&De&&Vt(ie.firstChild);const qe=jn(He?he:ie);for(;tt=qe.nextNode();)Nr(tt),Xr(tt),tt.content instanceof o&&xn(tt.content);if(He)return he;if(Se){if(Fe)for(bt=C.call(ie.ownerDocument);ie.firstChild;)bt.appendChild(ie.firstChild);else bt=ie;return(te.shadowroot||te.shadowrootmode)&&(bt=k.call(r,bt,!0)),bt}let Rt=Ce?ie.outerHTML:ie.innerHTML;return Ce&&U["!doctype"]&&ie.ownerDocument&&ie.ownerDocument.doctype&&ie.ownerDocument.doctype.name&&jt($g,ie.ownerDocument.doctype.name)&&(Rt="<!DOCTYPE "+ie.ownerDocument.doctype.name+`>
|
|
98
|
+
`+Rt),we&&ta([y,I,O],Wt=>{Rt=Ro(Rt,Wt," ")}),x&&$t?x.createHTML(Rt):Rt},t.setConfig=function(){let he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};or(he),ke=!0},t.clearConfig=function(){kt=null,ke=!1},t.isValidAttribute=function(he,$,ie){kt||or({});const ge=ut(he),tt=ut($);return Ti(ge,tt,ie)},t.addHook=function(he,$){typeof $=="function"&&ko(T[he],$)},t.removeHook=function(he,$){if($!==void 0){const ie=$v(T[he],$);return ie===-1?void 0:Bv(T[he],ie,1)[0]}return Mf(T[he])},t.removeHooks=function(he){T[he]=[]},t.removeAllHooks=function(){T=jf()},t}var tS=Bg(),No={},Bi={},ra={},ri={},ii={},pc={},zf;function Fg(){return zf||(zf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(r){r.Root="root",r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function n(r){return r.type===t.Tag||r.type===t.Script||r.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(pc)),pc}var Pe={},Uf;function qf(){if(Uf)return Pe;Uf=1;var e=Pe&&Pe.__extends||(function(){var d=function(w,S){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,R){C.__proto__=R}||function(C,R){for(var k in R)Object.prototype.hasOwnProperty.call(R,k)&&(C[k]=R[k])},d(w,S)};return function(w,S){if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");d(w,S);function C(){this.constructor=w}w.prototype=S===null?Object.create(S):(C.prototype=S.prototype,new C)}})(),t=Pe&&Pe.__assign||function(){return t=Object.assign||function(d){for(var w,S=1,C=arguments.length;S<C;S++){w=arguments[S];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(d[R]=w[R])}return d},t.apply(this,arguments)};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.cloneNode=Pe.hasChildren=Pe.isDocument=Pe.isDirective=Pe.isComment=Pe.isText=Pe.isCDATA=Pe.isTag=Pe.Element=Pe.Document=Pe.CDATA=Pe.NodeWithChildren=Pe.ProcessingInstruction=Pe.Comment=Pe.Text=Pe.DataNode=Pe.Node=void 0;var n=Fg(),r=(function(){function d(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(d.prototype,"parentNode",{get:function(){return this.parent},set:function(w){this.parent=w},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"previousSibling",{get:function(){return this.prev},set:function(w){this.prev=w},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"nextSibling",{get:function(){return this.next},set:function(w){this.next=w},enumerable:!1,configurable:!0}),d.prototype.cloneNode=function(w){return w===void 0&&(w=!1),_(this,w)},d})();Pe.Node=r;var i=(function(d){e(w,d);function w(S){var C=d.call(this)||this;return C.data=S,C}return Object.defineProperty(w.prototype,"nodeValue",{get:function(){return this.data},set:function(S){this.data=S},enumerable:!1,configurable:!0}),w})(r);Pe.DataNode=i;var o=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.Text,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),w})(i);Pe.Text=o;var s=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.Comment,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),w})(i);Pe.Comment=s;var a=(function(d){e(w,d);function w(S,C){var R=d.call(this,C)||this;return R.name=S,R.type=n.ElementType.Directive,R}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),w})(i);Pe.ProcessingInstruction=a;var l=(function(d){e(w,d);function w(S){var C=d.call(this)||this;return C.children=S,C}return Object.defineProperty(w.prototype,"firstChild",{get:function(){var S;return(S=this.children[0])!==null&&S!==void 0?S:null},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"childNodes",{get:function(){return this.children},set:function(S){this.children=S},enumerable:!1,configurable:!0}),w})(r);Pe.NodeWithChildren=l;var c=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.CDATA,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),w})(l);Pe.CDATA=c;var u=(function(d){e(w,d);function w(){var S=d!==null&&d.apply(this,arguments)||this;return S.type=n.ElementType.Root,S}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),w})(l);Pe.Document=u;var f=(function(d){e(w,d);function w(S,C,R,k){R===void 0&&(R=[]),k===void 0&&(k=S==="script"?n.ElementType.Script:S==="style"?n.ElementType.Style:n.ElementType.Tag);var T=d.call(this,R)||this;return T.name=S,T.attribs=C,T.type=k,T}return Object.defineProperty(w.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"tagName",{get:function(){return this.name},set:function(S){this.name=S},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"attributes",{get:function(){var S=this;return Object.keys(this.attribs).map(function(C){var R,k;return{name:C,value:S.attribs[C],namespace:(R=S["x-attribsNamespace"])===null||R===void 0?void 0:R[C],prefix:(k=S["x-attribsPrefix"])===null||k===void 0?void 0:k[C]}})},enumerable:!1,configurable:!0}),w})(l);Pe.Element=f;function p(d){return(0,n.isTag)(d)}Pe.isTag=p;function b(d){return d.type===n.ElementType.CDATA}Pe.isCDATA=b;function h(d){return d.type===n.ElementType.Text}Pe.isText=h;function g(d){return d.type===n.ElementType.Comment}Pe.isComment=g;function m(d){return d.type===n.ElementType.Directive}Pe.isDirective=m;function E(d){return d.type===n.ElementType.Root}Pe.isDocument=E;function A(d){return Object.prototype.hasOwnProperty.call(d,"children")}Pe.hasChildren=A;function _(d,w){w===void 0&&(w=!1);var S;if(h(d))S=new o(d.data);else if(g(d))S=new s(d.data);else if(p(d)){var C=w?x(d.children):[],R=new f(d.name,t({},d.attribs),C);C.forEach(function(I){return I.parent=R}),d.namespace!=null&&(R.namespace=d.namespace),d["x-attribsNamespace"]&&(R["x-attribsNamespace"]=t({},d["x-attribsNamespace"])),d["x-attribsPrefix"]&&(R["x-attribsPrefix"]=t({},d["x-attribsPrefix"])),S=R}else if(b(d)){var C=w?x(d.children):[],k=new c(C);C.forEach(function(O){return O.parent=k}),S=k}else if(E(d)){var C=w?x(d.children):[],T=new u(C);C.forEach(function(O){return O.parent=T}),d["x-mode"]&&(T["x-mode"]=d["x-mode"]),S=T}else if(m(d)){var y=new a(d.name,d.data);d["x-name"]!=null&&(y["x-name"]=d["x-name"],y["x-publicId"]=d["x-publicId"],y["x-systemId"]=d["x-systemId"]),S=y}else throw new Error("Not implemented yet: ".concat(d.type));return S.startIndex=d.startIndex,S.endIndex=d.endIndex,d.sourceCodeLocation!=null&&(S.sourceCodeLocation=d.sourceCodeLocation),S}Pe.cloneNode=_;function x(d){for(var w=d.map(function(C){return _(C,!0)}),S=1;S<w.length;S++)w[S].prev=w[S-1],w[S-1].next=w[S];return w}return Pe}var Hf;function jg(){return Hf||(Hf=1,(function(e){var t=ii&&ii.__createBinding||(Object.create?(function(a,l,c,u){u===void 0&&(u=c);var f=Object.getOwnPropertyDescriptor(l,c);(!f||("get"in f?!l.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return l[c]}}),Object.defineProperty(a,u,f)}):(function(a,l,c,u){u===void 0&&(u=c),a[u]=l[c]})),n=ii&&ii.__exportStar||function(a,l){for(var c in a)c!=="default"&&!Object.prototype.hasOwnProperty.call(l,c)&&t(l,a,c)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=Fg(),i=qf();n(qf(),e);var o={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=(function(){function a(l,c,u){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof c=="function"&&(u=c,c=o),typeof l=="object"&&(c=l,l=void 0),this.callback=l??null,this.options=c??o,this.elementCB=u??null}return a.prototype.onparserinit=function(l){this.parser=l},a.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},a.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},a.prototype.onerror=function(l){this.handleCallback(l)},a.prototype.onclosetag=function(){this.lastNode=null;var l=this.tagStack.pop();this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(l)},a.prototype.onopentag=function(l,c){var u=this.options.xmlMode?r.ElementType.Tag:void 0,f=new i.Element(l,c,void 0,u);this.addNode(f),this.tagStack.push(f)},a.prototype.ontext=function(l){var c=this.lastNode;if(c&&c.type===r.ElementType.Text)c.data+=l,this.options.withEndIndices&&(c.endIndex=this.parser.endIndex);else{var u=new i.Text(l);this.addNode(u),this.lastNode=u}},a.prototype.oncomment=function(l){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=l;return}var c=new i.Comment(l);this.addNode(c),this.lastNode=c},a.prototype.oncommentend=function(){this.lastNode=null},a.prototype.oncdatastart=function(){var l=new i.Text(""),c=new i.CDATA([l]);this.addNode(c),l.parent=c,this.lastNode=l},a.prototype.oncdataend=function(){this.lastNode=null},a.prototype.onprocessinginstruction=function(l,c){var u=new i.ProcessingInstruction(l,c);this.addNode(u)},a.prototype.handleCallback=function(l){if(typeof this.callback=="function")this.callback(l,this.dom);else if(l)throw l},a.prototype.addNode=function(l){var c=this.tagStack[this.tagStack.length-1],u=c.children[c.children.length-1];this.options.withStartIndices&&(l.startIndex=this.parser.startIndex),this.options.withEndIndices&&(l.endIndex=this.parser.endIndex),c.children.push(l),u&&(l.prev=u,u.next=l),l.parent=c,this.lastNode=null},a})();e.DomHandler=s,e.default=s})(ii)),ii}var hc={},Vf;function nS(){return Vf||(Vf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t,n){return t[n.toLowerCase()]=n,t},{}),e.CARRIAGE_RETURN="\r",e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,"g"),e.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,"g")})(hc)),hc}var Wf;function zg(){if(Wf)return ri;Wf=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.formatAttributes=r,ri.escapeSpecialCharacters=o,ri.revertEscapedCharacters=s,ri.formatDOM=a;var e=jg(),t=nS();function n(l){return t.CASE_SENSITIVE_TAG_NAMES_MAP[l]}function r(l){for(var c={},u=0,f=l.length;u<f;u++){var p=l[u];c[p.name]=p.value}return c}function i(l){l=l.toLowerCase();var c=n(l);return c||l}function o(l){return l.replace(t.CARRIAGE_RETURN_REGEX,t.CARRIAGE_RETURN_PLACEHOLDER)}function s(l){return l.replace(t.CARRIAGE_RETURN_PLACEHOLDER_REGEX,t.CARRIAGE_RETURN)}function a(l,c,u){c===void 0&&(c=null);for(var f=[],p,b=0,h=l.length;b<h;b++){var g=l[b];switch(g.nodeType){case 1:{var m=i(g.nodeName);p=new e.Element(m,r(g.attributes)),p.children=a(m==="template"?g.content.childNodes:g.childNodes,p);break}case 3:p=new e.Text(s(g.nodeValue));break;case 8:p=new e.Comment(g.nodeValue);break;default:continue}var E=f[b-1]||null;E&&(E.next=p),p.parent=c,p.prev=E,p.next=null,f.push(p)}return u&&(p=new e.ProcessingInstruction(u.substring(0,u.indexOf(" ")).toLowerCase(),u),p.next=f[0]||null,p.parent=c,f.unshift(p),f[1]&&(f[1].prev=f[0])),f}return ri}var Kf;function rS(){if(Kf)return ra;Kf=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.default=g;var e=zg(),t="html",n="head",r="body",i=/<([a-zA-Z]+[0-9]?)/,o=/<head[^]*>/i,s=/<body[^]*>/i,a=function(m,E){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},l=function(m,E){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c=typeof window=="object"&&window.DOMParser;if(typeof c=="function"){var u=new c,f="text/html";l=function(m,E){return E&&(m="<".concat(E,">").concat(m,"</").concat(E,">")),u.parseFromString(m,f)},a=l}if(typeof document=="object"&&document.implementation){var p=document.implementation.createHTMLDocument();a=function(m,E){if(E){var A=p.documentElement.querySelector(E);return A&&(A.innerHTML=m),p}return p.documentElement.innerHTML=m,p}}var b=typeof document=="object"&&document.createElement("template"),h;b&&b.content&&(h=function(m){return b.innerHTML=m,b.content.childNodes});function g(m){var E,A;m=(0,e.escapeSpecialCharacters)(m);var _=m.match(i),x=_&&_[1]?_[1].toLowerCase():"";switch(x){case t:{var d=l(m);if(!o.test(m)){var w=d.querySelector(n);(E=w?.parentNode)===null||E===void 0||E.removeChild(w)}if(!s.test(m)){var w=d.querySelector(r);(A=w?.parentNode)===null||A===void 0||A.removeChild(w)}return d.querySelectorAll(t)}case n:case r:{var S=a(m).querySelectorAll(x);return s.test(m)&&o.test(m)?S[0].parentNode.childNodes:S}default:{if(h)return h(m);var w=a(m,r).querySelector(r);return w.childNodes}}}return ra}var Gf;function iS(){if(Gf)return Bi;Gf=1;var e=Bi&&Bi.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=i;var t=e(rS()),n=zg(),r=/<(![a-zA-Z\s]+)>/;function i(o){if(typeof o!="string")throw new TypeError("First argument must be a string");if(!o)return[];var s=o.match(r),a=s?s[1]:void 0;return(0,n.formatDOM)((0,t.default)(o),null,a)}return Bi}var ia={},hn={},Mo={},Qf;function oS(){if(Qf)return Mo;Qf=1;var e=0;Mo.SAME=e;var t=1;return Mo.CAMELCASE=t,Mo.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1},Mo}var Yf;function sS(){if(Yf)return hn;Yf=1;const e=0,t=1,n=2,r=3,i=4,o=5,s=6;function a(d){return c.hasOwnProperty(d)?c[d]:null}function l(d,w,S,C,R,k,T){this.acceptsBooleans=w===n||w===r||w===i,this.attributeName=C,this.attributeNamespace=R,this.mustUseProperty=S,this.propertyName=d,this.type=w,this.sanitizeURL=k,this.removeEmptyString=T}const c={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(d=>{c[d]=new l(d,e,!1,d,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([d,w])=>{c[d]=new l(d,t,!1,w,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(d=>{c[d]=new l(d,n,!1,d.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(d=>{c[d]=new l(d,n,!1,d,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(d=>{c[d]=new l(d,r,!1,d.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(d=>{c[d]=new l(d,r,!0,d,null,!1,!1)}),["capture","download"].forEach(d=>{c[d]=new l(d,i,!1,d,null,!1,!1)}),["cols","rows","size","span"].forEach(d=>{c[d]=new l(d,s,!1,d,null,!1,!1)}),["rowSpan","start"].forEach(d=>{c[d]=new l(d,o,!1,d.toLowerCase(),null,!1,!1)});const f=/[\-\:]([a-z])/g,p=d=>d[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(d=>{const w=d.replace(f,p);c[w]=new l(w,t,!1,d,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(d=>{const w=d.replace(f,p);c[w]=new l(w,t,!1,d,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(d=>{const w=d.replace(f,p);c[w]=new l(w,t,!1,d,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(d=>{c[d]=new l(d,t,!1,d.toLowerCase(),null,!1,!1)});const b="xlinkHref";c[b]=new l("xlinkHref",t,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(d=>{c[d]=new l(d,t,!1,d.toLowerCase(),null,!0,!0)});const{CAMELCASE:h,SAME:g,possibleStandardNames:m}=oS(),A=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+A+"]*$")),x=Object.keys(m).reduce((d,w)=>{const S=m[w];return S===g?d[w]=w:S===h?d[w.toLowerCase()]=w:d[w]=S,d},{});return hn.BOOLEAN=r,hn.BOOLEANISH_STRING=n,hn.NUMERIC=o,hn.OVERLOADED_BOOLEAN=i,hn.POSITIVE_NUMERIC=s,hn.RESERVED=e,hn.STRING=t,hn.getPropertyInfo=a,hn.isCustomAttribute=_,hn.possibleStandardNames=x,hn}var Do={},Fi={},gc,Jf;function aS(){if(Jf)return gc;Jf=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
|
|
99
|
+
`,c="/",u="*",f="",p="comment",b="declaration";function h(m,E){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];E=E||{};var A=1,_=1;function x(O){var L=O.match(t);L&&(A+=L.length);var z=O.lastIndexOf(l);_=~z?O.length-z:_+O.length}function d(){var O={line:A,column:_};return function(L){return L.position=new w(O),R(),L}}function w(O){this.start=O,this.end={line:A,column:_},this.source=E.source}w.prototype.content=m;function S(O){var L=new Error(E.source+":"+A+":"+_+": "+O);if(L.reason=O,L.filename=E.source,L.line=A,L.column=_,L.source=m,!E.silent)throw L}function C(O){var L=O.exec(m);if(L){var z=L[0];return x(z),m=m.slice(z.length),L}}function R(){C(n)}function k(O){var L;for(O=O||[];L=T();)L!==!1&&O.push(L);return O}function T(){var O=d();if(!(c!=m.charAt(0)||u!=m.charAt(1))){for(var L=2;f!=m.charAt(L)&&(u!=m.charAt(L)||c!=m.charAt(L+1));)++L;if(L+=2,f===m.charAt(L-1))return S("End of comment missing");var z=m.slice(2,L-2);return _+=2,x(z),m=m.slice(L),_+=2,O({type:p,comment:z})}}function y(){var O=d(),L=C(r);if(L){if(T(),!C(i))return S("property missing ':'");var z=C(o),X=O({type:b,property:g(L[0].replace(e,f)),value:z?g(z[0].replace(e,f)):f});return C(s),X}}function I(){var O=[];k(O);for(var L;L=y();)L!==!1&&(O.push(L),k(O));return O}return R(),I()}function g(m){return m?m.replace(a,f):f}return gc=h,gc}var Xf;function lS(){if(Xf)return Fi;Xf=1;var e=Fi&&Fi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.default=n;const t=e(aS());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),a=typeof i=="function";return s.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;a?i(c,u,l):u&&(o=o||{},o[c]=u)}),o}return Fi}var Lo={},Zf;function cS(){if(Zf)return Lo;Zf=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(c){return!c||n.test(c)||e.test(c)},s=function(c,u){return u.toUpperCase()},a=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),o(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(i,a):c=c.replace(r,a),c.replace(t,s))};return Lo.camelCase=l,Lo}var $o,ep;function uS(){if(ep)return $o;ep=1;var e=$o&&$o.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(lS()),n=cS();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,l){a&&l&&(s[(0,n.camelCase)(a,o)]=l)}),s}return r.default=r,$o=r,$o}var tp;function Ug(){return tp||(tp=1,(function(e){var t=Do&&Do.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=o,e.setStyleProp=a;var n=D,r=t(uS()),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function o(u,f){return u.includes("-")?!i.has(u):!!(f&&typeof f.is=="string")}var s={reactCompat:!0};function a(u,f){if(typeof u=="string"){if(!u.trim()){f.style={};return}try{f.style=(0,r.default)(u,s)}catch{f.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(".")[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var l=function(u){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(u.name)};e.canTextBeChildOfNode=l;var c=function(u){return u};e.returnFirstArg=c})(Do)),Do}var np;function qg(){if(np)return ia;np=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=o;var e=sS(),t=Ug(),n=["checked","value"],r=["input","select","textarea"],i={reset:!0,submit:!0};function o(a,l){a===void 0&&(a={});var c={},u=!!(a.type&&i[a.type]);for(var f in a){var p=a[f];if((0,e.isCustomAttribute)(f)){c[f]=p;continue}var b=f.toLowerCase(),h=s(b);if(h){var g=(0,e.getPropertyInfo)(h);switch(n.includes(h)&&r.includes(l)&&!u&&(h=s("default"+b)),c[h]=p,g&&g.type){case e.BOOLEAN:c[h]=!0;break;case e.OVERLOADED_BOOLEAN:p===""&&(c[h]=!0);break}continue}t.PRESERVE_CUSTOM_ATTRIBUTES&&(c[f]=p)}return(0,t.setStyleProp)(a.style,c),c}function s(a){return e.possibleStandardNames[a]}return ia}var ji={},rp;function dS(){if(rp)return ji;rp=1;var e=ji&&ji.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ji,"__esModule",{value:!0}),ji.default=o;var t=D,n=e(qg()),r=Ug(),i={cloneElement:t.cloneElement,createElement:t.createElement,isValidElement:t.isValidElement};function o(a,l){l===void 0&&(l={});for(var c=[],u=typeof l.replace=="function",f=l.transform||r.returnFirstArg,p=l.library||i,b=p.cloneElement,h=p.createElement,g=p.isValidElement,m=a.length,E=0;E<m;E++){var A=a[E];if(u){var _=l.replace(A,E);if(g(_)){m>1&&(_=b(_,{key:_.key||E})),c.push(f(_,A,E));continue}}if(A.type==="text"){var x=!A.data.trim().length;if(x&&A.parent&&!(0,r.canTextBeChildOfNode)(A.parent)||l.trim&&x)continue;c.push(f(A.data,A,E));continue}var d=A,w={};s(d)?((0,r.setStyleProp)(d.attribs.style,d.attribs),w=d.attribs):d.attribs&&(w=(0,n.default)(d.attribs,d.name));var S=void 0;switch(A.type){case"script":case"style":A.children[0]&&(w.dangerouslySetInnerHTML={__html:A.children[0].data});break;case"tag":A.name==="textarea"&&A.children[0]?w.defaultValue=A.children[0].data:A.children&&A.children.length&&(S=o(A.children,l));break;default:continue}m>1&&(w.key=E),c.push(f(h(A.name,w,S),A,E))}return c.length===1?c[0]:c}function s(a){return r.PRESERVE_CUSTOM_ATTRIBUTES&&a.type==="tag"&&(0,r.isCustomComponent)(a.name,a.attribs)}return ji}var ip;function fS(){return ip||(ip=1,(function(e){var t=No&&No.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=a;var n=t(iS());e.htmlToDOM=n.default;var r=t(qg());e.attributesToProps=r.default;var i=t(dS());e.domToReact=i.default;var o=jg();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return o.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return o.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return o.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return o.Text}});var s={lowerCaseAttributeNames:!1};function a(l,c){if(typeof l!="string")throw new TypeError("First argument must be a string");return l?(0,i.default)((0,n.default)(l,c?.htmlparser2||s),c):[]}})(No)),No}var pS=fS();const op=Nu(pS),hS=op.default||op,sp=({html:e=""})=>{const t=["b","i","strong","em","u","br","span","p","ul","ol","li","blockquote","a","h1","h2","h3","h4","h5","h6","img","table","thead","tbody","tr","th","td","code","pre","div"],n=["href","title","target","rel","src","alt","title","width","height","class","id","style","colspan","rowspan","align","data-*","aria-*","role"];let r=tS.sanitize(e,{ALLOWED_TAGS:t,ALLOWED_ATTR:n});const i=/^\s*(?:<br\s*\/?\s*>)+|(?:<br\s*\/?\s*>)+\s*$/gi;return r=r.replace(i,""),M("span",{children:hS(r)})},{min:gS,max:mS}=Math,mi=(e,t=0,n=1)=>gS(mS(t,e),n),Wu=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let t=0;t<=3;t++)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]=mi(e[t],0,255)):t===3&&(e[t]=mi(e[t],0,1));return e},Hg={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Hg[`[object ${e}]`]=e.toLowerCase();function $e(e){return Hg[Object.prototype.toString.call(e)]||"object"}const Ie=(e,t=null)=>e.length>=3?Array.prototype.slice.call(e):$e(e[0])=="object"&&t?t.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),po=e=>{if(e.length<2)return null;const t=e.length-1;return $e(e[t])=="string"?e[t].toLowerCase():null},{PI:El,min:Vg,max:Wg}=Math,bn=e=>Math.round(e*100)/100,cu=e=>Math.round(e*100)/100,gr=El*2,mc=El/3,yS=El/180,bS=180/El;function Kg(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const Re={format:{},autodetect:[]};class se{constructor(...t){const n=this;if($e(t[0])==="object"&&t[0].constructor&&t[0].constructor===this.constructor)return t[0];let r=po(t),i=!1;if(!r){i=!0,Re.sorted||(Re.autodetect=Re.autodetect.sort((o,s)=>s.p-o.p),Re.sorted=!0);for(let o of Re.autodetect)if(r=o.test(...t),r)break}if(Re.format[r]){const o=Re.format[r].apply(null,i?t:t.slice(0,-1));n._rgb=Wu(o)}else throw new Error("unknown format: "+t);n._rgb.length===3&&n._rgb.push(1)}toString(){return $e(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const wS="3.2.0",Le=(...e)=>new se(...e);Le.version=wS;const ro={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},_S=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,vS=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Gg=e=>{if(e.match(_S)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const t=parseInt(e,16),n=t>>16,r=t>>8&255,i=t&255;return[n,r,i,1]}if(e.match(vS)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const t=parseInt(e,16),n=t>>24&255,r=t>>16&255,i=t>>8&255,o=Math.round((t&255)/255*100)/100;return[n,r,i,o]}throw new Error(`unknown hex color: ${e}`)},{round:oa}=Math,Qg=(...e)=>{let[t,n,r,i]=Ie(e,"rgba"),o=po(e)||"auto";i===void 0&&(i=1),o==="auto"&&(o=i<1?"rgba":"rgb"),t=oa(t),n=oa(n),r=oa(r);let a="000000"+(t<<16|n<<8|r).toString(16);a=a.substr(a.length-6);let l="0"+oa(i*255).toString(16);switch(l=l.substr(l.length-2),o.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}};se.prototype.name=function(){const e=Qg(this._rgb,"rgb");for(let t of Object.keys(ro))if(ro[t]===e)return t.toLowerCase();return e};Re.format.named=e=>{if(e=e.toLowerCase(),ro[e])return Gg(ro[e]);throw new Error("unknown color name: "+e)};Re.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&ro[e.toLowerCase()])return"named"}});se.prototype.alpha=function(e,t=!1){return e!==void 0&&$e(e)==="number"?t?(this._rgb[3]=e,this):new se([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]};se.prototype.clipped=function(){return this._rgb._clipped||!1};const er={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},SS=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function vr(e){const t=SS.get(String(e).toLowerCase());if(!t)throw new Error("unknown Lab illuminant "+e);er.labWhitePoint=e,er.Xn=t[0],er.Zn=t[1]}function as(){return er.labWhitePoint}const Ku=(...e)=>{e=Ie(e,"lab");const[t,n,r]=e,[i,o,s]=ES(t,n,r),[a,l,c]=Yg(i,o,s);return[a,l,c,e.length>3?e[3]:1]},ES=(e,t,n)=>{const{kE:r,kK:i,kKE:o,Xn:s,Yn:a,Zn:l}=er,c=(e+16)/116,u=.002*t+c,f=c-.005*n,p=u*u*u,b=f*f*f,h=p>r?p:(116*u-16)/i,g=e>o?Math.pow((e+16)/116,3):e/i,m=b>r?b:(116*f-16)/i,E=h*s,A=g*a,_=m*l;return[E,A,_]},yc=e=>{const t=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*t},Yg=(e,t,n)=>{const{MtxAdaptMa:r,MtxAdaptMaI:i,MtxXYZ2RGB:o,RefWhiteRGB:s,Xn:a,Yn:l,Zn:c}=er,u=a*r.m00+l*r.m10+c*r.m20,f=a*r.m01+l*r.m11+c*r.m21,p=a*r.m02+l*r.m12+c*r.m22,b=s.X*r.m00+s.Y*r.m10+s.Z*r.m20,h=s.X*r.m01+s.Y*r.m11+s.Z*r.m21,g=s.X*r.m02+s.Y*r.m12+s.Z*r.m22,m=(e*r.m00+t*r.m10+n*r.m20)*(b/u),E=(e*r.m01+t*r.m11+n*r.m21)*(h/f),A=(e*r.m02+t*r.m12+n*r.m22)*(g/p),_=m*i.m00+E*i.m10+A*i.m20,x=m*i.m01+E*i.m11+A*i.m21,d=m*i.m02+E*i.m12+A*i.m22,w=yc(_*o.m00+x*o.m10+d*o.m20),S=yc(_*o.m01+x*o.m11+d*o.m21),C=yc(_*o.m02+x*o.m12+d*o.m22);return[w*255,S*255,C*255]},Gu=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),[o,s,a]=Jg(t,n,r),[l,c,u]=xS(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function xS(e,t,n){const{Xn:r,Yn:i,Zn:o,kE:s,kK:a}=er,l=e/r,c=t/i,u=n/o,f=l>s?Math.pow(l,1/3):(a*l+16)/116,p=c>s?Math.pow(c,1/3):(a*c+16)/116,b=u>s?Math.pow(u,1/3):(a*u+16)/116;return[116*p-16,500*(f-p),200*(p-b)]}function bc(e){const t=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*t}const Jg=(e,t,n)=>{e=bc(e/255),t=bc(t/255),n=bc(n/255);const{MtxRGB2XYZ:r,MtxAdaptMa:i,MtxAdaptMaI:o,Xn:s,Yn:a,Zn:l,As:c,Bs:u,Cs:f}=er;let p=e*r.m00+t*r.m10+n*r.m20,b=e*r.m01+t*r.m11+n*r.m21,h=e*r.m02+t*r.m12+n*r.m22;const g=s*i.m00+a*i.m10+l*i.m20,m=s*i.m01+a*i.m11+l*i.m21,E=s*i.m02+a*i.m12+l*i.m22;let A=p*i.m00+b*i.m10+h*i.m20,_=p*i.m01+b*i.m11+h*i.m21,x=p*i.m02+b*i.m12+h*i.m22;return A*=g/c,_*=m/u,x*=E/f,p=A*o.m00+_*o.m10+x*o.m20,b=A*o.m01+_*o.m11+x*o.m21,h=A*o.m02+_*o.m12+x*o.m22,[p,b,h]};se.prototype.lab=function(){return Gu(this._rgb)};const CS=(...e)=>new se(...e,"lab");Object.assign(Le,{lab:CS,getLabWhitePoint:as,setLabWhitePoint:vr});Re.format.lab=Ku;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"lab"),$e(e)==="array"&&e.length===3)return"lab"}});se.prototype.darken=function(e=1){const t=this,n=t.lab();return n[0]-=er.Kn*e,new se(n,"lab").alpha(t.alpha(),!0)};se.prototype.brighten=function(e=1){return this.darken(-e)};se.prototype.darker=se.prototype.darken;se.prototype.brighter=se.prototype.brighten;se.prototype.get=function(e){const[t,n]=e.split("."),r=this[t]();if(n){const i=t.indexOf(n)-(t.substr(0,2)==="ok"?2:0);if(i>-1)return r[i];throw new Error(`unknown channel ${n} in mode ${t}`)}else return r};const{pow:TS}=Math,AS=1e-7,kS=20;se.prototype.luminance=function(e,t="rgb"){if(e!==void 0&&$e(e)==="number"){if(e===0)return new se([0,0,0,this._rgb[3]],"rgb");if(e===1)return new se([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),r=kS;const i=(s,a)=>{const l=s.interpolate(a,.5,t),c=l.luminance();return Math.abs(e-c)<AS||!r--?l:c>e?i(s,l):i(l,a)},o=(n>e?i(new se([0,0,0]),this):i(this,new se([255,255,255]))).rgb();return new se([...o,this._rgb[3]])}return RS(...this._rgb.slice(0,3))};const RS=(e,t,n)=>(e=wc(e),t=wc(t),n=wc(n),.2126*e+.7152*t+.0722*n),wc=e=>(e/=255,e<=.03928?e/12.92:TS((e+.055)/1.055,2.4)),Lt={},io=(e,t,n=.5,...r)=>{let i=r[0]||"lrgb";if(!Lt[i]&&!r.length&&(i=Object.keys(Lt)[0]),!Lt[i])throw new Error(`interpolation mode ${i} is not defined`);return $e(e)!=="object"&&(e=new se(e)),$e(t)!=="object"&&(t=new se(t)),Lt[i](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))};se.prototype.mix=se.prototype.interpolate=function(e,t=.5,...n){return io(this,e,t,...n)};se.prototype.premultiply=function(e=!1){const t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new se([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};const{sin:OS,cos:IS}=Math,Xg=(...e)=>{let[t,n,r]=Ie(e,"lch");return isNaN(r)&&(r=0),r=r*yS,[t,IS(r)*n,OS(r)*n]},Qu=(...e)=>{e=Ie(e,"lch");const[t,n,r]=e,[i,o,s]=Xg(t,n,r),[a,l,c]=Ku(i,o,s);return[a,l,c,e.length>3?e[3]:1]},PS=(...e)=>{const t=Kg(Ie(e,"hcl"));return Qu(...t)},{sqrt:NS,atan2:MS,round:DS}=Math,Zg=(...e)=>{const[t,n,r]=Ie(e,"lab"),i=NS(n*n+r*r);let o=(MS(r,n)*bS+360)%360;return DS(i*1e4)===0&&(o=Number.NaN),[t,i,o]},Yu=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),[o,s,a]=Gu(t,n,r),[l,c,u]=Zg(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]};se.prototype.lch=function(){return Yu(this._rgb)};se.prototype.hcl=function(){return Kg(Yu(this._rgb))};const LS=(...e)=>new se(...e,"lch"),$S=(...e)=>new se(...e,"hcl");Object.assign(Le,{lch:LS,hcl:$S});Re.format.lch=Qu;Re.format.hcl=PS;["lch","hcl"].forEach(e=>Re.autodetect.push({p:2,test:(...t)=>{if(t=Ie(t,e),$e(t)==="array"&&t.length===3)return e}}));se.prototype.saturate=function(e=1){const t=this,n=t.lch();return n[1]+=er.Kn*e,n[1]<0&&(n[1]=0),new se(n,"lch").alpha(t.alpha(),!0)};se.prototype.desaturate=function(e=1){return this.saturate(-e)};se.prototype.set=function(e,t,n=!1){const[r,i]=e.split("."),o=this[r]();if(i){const s=r.indexOf(i)-(r.substr(0,2)==="ok"?2:0);if(s>-1){if($e(t)=="string")switch(t.charAt(0)){case"+":o[s]+=+t;break;case"-":o[s]+=+t;break;case"*":o[s]*=+t.substr(1);break;case"/":o[s]/=+t.substr(1);break;default:o[s]=+t}else if($e(t)==="number")o[s]=t;else throw new Error("unsupported value for Color.set");const a=new se(o,r);return n?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${i} in mode ${r}`)}else return o};se.prototype.tint=function(e=.5,...t){return io(this,"white",e,...t)};se.prototype.shade=function(e=.5,...t){return io(this,"black",e,...t)};const BS=(e,t,n)=>{const r=e._rgb,i=t._rgb;return new se(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"rgb")};Lt.rgb=BS;const{sqrt:_c,pow:zi}=Math,FS=(e,t,n)=>{const[r,i,o]=e._rgb,[s,a,l]=t._rgb;return new se(_c(zi(r,2)*(1-n)+zi(s,2)*n),_c(zi(i,2)*(1-n)+zi(a,2)*n),_c(zi(o,2)*(1-n)+zi(l,2)*n),"rgb")};Lt.lrgb=FS;const jS=(e,t,n)=>{const r=e.lab(),i=t.lab();return new se(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"lab")};Lt.lab=jS;const ho=(e,t,n,r)=>{let i,o;r==="hsl"?(i=e.hsl(),o=t.hsl()):r==="hsv"?(i=e.hsv(),o=t.hsv()):r==="hcg"?(i=e.hcg(),o=t.hcg()):r==="hsi"?(i=e.hsi(),o=t.hsi()):r==="lch"||r==="hcl"?(r="hcl",i=e.hcl(),o=t.hcl()):r==="oklch"&&(i=e.oklch().reverse(),o=t.oklch().reverse());let s,a,l,c,u,f;(r.substr(0,1)==="h"||r==="oklch")&&([s,l,u]=i,[a,c,f]=o);let p,b,h,g;return!isNaN(s)&&!isNaN(a)?(a>s&&a-s>180?g=a-(s+360):a<s&&s-a>180?g=a+360-s:g=a-s,b=s+n*g):isNaN(s)?isNaN(a)?b=Number.NaN:(b=a,(u==1||u==0)&&r!="hsv"&&(p=c)):(b=s,(f==1||f==0)&&r!="hsv"&&(p=l)),p===void 0&&(p=l+n*(c-l)),h=u+n*(f-u),r==="oklch"?new se([h,p,b],r):new se([b,p,h],r)},em=(e,t,n)=>ho(e,t,n,"lch");Lt.lch=em;Lt.hcl=em;const zS=e=>{if($e(e)=="number"&&e>=0&&e<=16777215){const t=e>>16,n=e>>8&255,r=e&255;return[t,n,r,1]}throw new Error("unknown num color: "+e)},US=(...e)=>{const[t,n,r]=Ie(e,"rgb");return(t<<16)+(n<<8)+r};se.prototype.num=function(){return US(this._rgb)};const qS=(...e)=>new se(...e,"num");Object.assign(Le,{num:qS});Re.format.num=zS;Re.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&$e(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const HS=(e,t,n)=>{const r=e.num(),i=t.num();return new se(r+n*(i-r),"num")};Lt.num=HS;const{floor:VS}=Math,WS=(...e)=>{e=Ie(e,"hcg");let[t,n,r]=e,i,o,s;r=r*255;const a=n*255;if(n===0)i=o=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const l=VS(t),c=t-l,u=r*(1-n),f=u+a*(1-c),p=u+a*c,b=u+a;switch(l){case 0:[i,o,s]=[b,p,u];break;case 1:[i,o,s]=[f,b,u];break;case 2:[i,o,s]=[u,b,p];break;case 3:[i,o,s]=[u,f,b];break;case 4:[i,o,s]=[p,u,b];break;case 5:[i,o,s]=[b,u,f];break}}return[i,o,s,e.length>3?e[3]:1]},KS=(...e)=>{const[t,n,r]=Ie(e,"rgb"),i=Vg(t,n,r),o=Wg(t,n,r),s=o-i,a=s*100/255,l=i/(255-s)*100;let c;return s===0?c=Number.NaN:(t===o&&(c=(n-r)/s),n===o&&(c=2+(r-t)/s),r===o&&(c=4+(t-n)/s),c*=60,c<0&&(c+=360)),[c,a,l]};se.prototype.hcg=function(){return KS(this._rgb)};const GS=(...e)=>new se(...e,"hcg");Le.hcg=GS;Re.format.hcg=WS;Re.autodetect.push({p:1,test:(...e)=>{if(e=Ie(e,"hcg"),$e(e)==="array"&&e.length===3)return"hcg"}});const QS=(e,t,n)=>ho(e,t,n,"hcg");Lt.hcg=QS;const{cos:Ui}=Math,YS=(...e)=>{e=Ie(e,"hsi");let[t,n,r]=e,i,o,s;return isNaN(t)&&(t=0),isNaN(n)&&(n=0),t>360&&(t-=360),t<0&&(t+=360),t/=360,t<1/3?(s=(1-n)/3,i=(1+n*Ui(gr*t)/Ui(mc-gr*t))/3,o=1-(s+i)):t<2/3?(t-=1/3,i=(1-n)/3,o=(1+n*Ui(gr*t)/Ui(mc-gr*t))/3,s=1-(i+o)):(t-=2/3,o=(1-n)/3,s=(1+n*Ui(gr*t)/Ui(mc-gr*t))/3,i=1-(o+s)),i=mi(r*i*3),o=mi(r*o*3),s=mi(r*s*3),[i*255,o*255,s*255,e.length>3?e[3]:1]},{min:JS,sqrt:XS,acos:ZS}=Math,eE=(...e)=>{let[t,n,r]=Ie(e,"rgb");t/=255,n/=255,r/=255;let i;const o=JS(t,n,r),s=(t+n+r)/3,a=s>0?1-o/s:0;return a===0?i=NaN:(i=(t-n+(t-r))/2,i/=XS((t-n)*(t-n)+(t-r)*(n-r)),i=ZS(i),r>n&&(i=gr-i),i/=gr),[i*360,a,s]};se.prototype.hsi=function(){return eE(this._rgb)};const tE=(...e)=>new se(...e,"hsi");Le.hsi=tE;Re.format.hsi=YS;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"hsi"),$e(e)==="array"&&e.length===3)return"hsi"}});const nE=(e,t,n)=>ho(e,t,n,"hsi");Lt.hsi=nE;const uu=(...e)=>{e=Ie(e,"hsl");const[t,n,r]=e;let i,o,s;if(n===0)i=o=s=r*255;else{const a=[0,0,0],l=[0,0,0],c=r<.5?r*(1+n):r+n-r*n,u=2*r-c,f=t/360;a[0]=f+1/3,a[1]=f,a[2]=f-1/3;for(let p=0;p<3;p++)a[p]<0&&(a[p]+=1),a[p]>1&&(a[p]-=1),6*a[p]<1?l[p]=u+(c-u)*6*a[p]:2*a[p]<1?l[p]=c:3*a[p]<2?l[p]=u+(c-u)*(2/3-a[p])*6:l[p]=u;[i,o,s]=[l[0]*255,l[1]*255,l[2]*255]}return e.length>3?[i,o,s,e[3]]:[i,o,s,1]},tm=(...e)=>{e=Ie(e,"rgba");let[t,n,r]=e;t/=255,n/=255,r/=255;const i=Vg(t,n,r),o=Wg(t,n,r),s=(o+i)/2;let a,l;return o===i?(a=0,l=Number.NaN):a=s<.5?(o-i)/(o+i):(o-i)/(2-o-i),t==o?l=(n-r)/(o-i):n==o?l=2+(r-t)/(o-i):r==o&&(l=4+(t-n)/(o-i)),l*=60,l<0&&(l+=360),e.length>3&&e[3]!==void 0?[l,a,s,e[3]]:[l,a,s]};se.prototype.hsl=function(){return tm(this._rgb)};const rE=(...e)=>new se(...e,"hsl");Le.hsl=rE;Re.format.hsl=uu;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"hsl"),$e(e)==="array"&&e.length===3)return"hsl"}});const iE=(e,t,n)=>ho(e,t,n,"hsl");Lt.hsl=iE;const{floor:oE}=Math,sE=(...e)=>{e=Ie(e,"hsv");let[t,n,r]=e,i,o,s;if(r*=255,n===0)i=o=s=r;else{t===360&&(t=0),t>360&&(t-=360),t<0&&(t+=360),t/=60;const a=oE(t),l=t-a,c=r*(1-n),u=r*(1-n*l),f=r*(1-n*(1-l));switch(a){case 0:[i,o,s]=[r,f,c];break;case 1:[i,o,s]=[u,r,c];break;case 2:[i,o,s]=[c,r,f];break;case 3:[i,o,s]=[c,u,r];break;case 4:[i,o,s]=[f,c,r];break;case 5:[i,o,s]=[r,c,u];break}}return[i,o,s,e.length>3?e[3]:1]},{min:aE,max:lE}=Math,cE=(...e)=>{e=Ie(e,"rgb");let[t,n,r]=e;const i=aE(t,n,r),o=lE(t,n,r),s=o-i;let a,l,c;return c=o/255,o===0?(a=Number.NaN,l=0):(l=s/o,t===o&&(a=(n-r)/s),n===o&&(a=2+(r-t)/s),r===o&&(a=4+(t-n)/s),a*=60,a<0&&(a+=360)),[a,l,c]};se.prototype.hsv=function(){return cE(this._rgb)};const uE=(...e)=>new se(...e,"hsv");Le.hsv=uE;Re.format.hsv=sE;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"hsv"),$e(e)==="array"&&e.length===3)return"hsv"}});const dE=(e,t,n)=>ho(e,t,n,"hsv");Lt.hsv=dE;function Ma(e,t){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(t[0])||(t=t.map(s=>[s]));let r=t[0].length,i=t[0].map((s,a)=>t.map(l=>l[a])),o=e.map(s=>i.map(a=>Array.isArray(s)?s.reduce((l,c,u)=>l+c*(a[u]||0),0):a.reduce((l,c)=>l+c*s,0)));return n===1&&(o=o[0]),r===1?o.map(s=>s[0]):o}const Ju=(...e)=>{e=Ie(e,"lab");const[t,n,r,...i]=e,[o,s,a]=fE([t,n,r]),[l,c,u]=Yg(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]};function fE(e){var t=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],r=Ma(n,e);return Ma(t,r.map(i=>i**3))}const Xu=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),o=Jg(t,n,r);return[...pE(o),...i.length>0&&i[0]<1?[i[0]]:[]]};function pE(e){const t=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],r=Ma(t,e);return Ma(n,r.map(i=>Math.cbrt(i)))}se.prototype.oklab=function(){return Xu(this._rgb)};const hE=(...e)=>new se(...e,"oklab");Object.assign(Le,{oklab:hE});Re.format.oklab=Ju;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"oklab"),$e(e)==="array"&&e.length===3)return"oklab"}});const gE=(e,t,n)=>{const r=e.oklab(),i=t.oklab();return new se(r[0]+n*(i[0]-r[0]),r[1]+n*(i[1]-r[1]),r[2]+n*(i[2]-r[2]),"oklab")};Lt.oklab=gE;const mE=(e,t,n)=>ho(e,t,n,"oklch");Lt.oklch=mE;const{pow:vc,sqrt:Sc,PI:Ec,cos:ap,sin:lp,atan2:yE}=Math,bE=(e,t="lrgb",n=null)=>{const r=e.length;n||(n=Array.from(new Array(r)).map(()=>1));const i=r/n.reduce(function(f,p){return f+p});if(n.forEach((f,p)=>{n[p]*=i}),e=e.map(f=>new se(f)),t==="lrgb")return wE(e,n);const o=e.shift(),s=o.get(t),a=[];let l=0,c=0;for(let f=0;f<s.length;f++)if(s[f]=(s[f]||0)*n[0],a.push(isNaN(s[f])?0:n[0]),t.charAt(f)==="h"&&!isNaN(s[f])){const p=s[f]/180*Ec;l+=ap(p)*n[0],c+=lp(p)*n[0]}let u=o.alpha()*n[0];e.forEach((f,p)=>{const b=f.get(t);u+=f.alpha()*n[p+1];for(let h=0;h<s.length;h++)if(!isNaN(b[h]))if(a[h]+=n[p+1],t.charAt(h)==="h"){const g=b[h]/180*Ec;l+=ap(g)*n[p+1],c+=lp(g)*n[p+1]}else s[h]+=b[h]*n[p+1]});for(let f=0;f<s.length;f++)if(t.charAt(f)==="h"){let p=yE(c/a[f],l/a[f])/Ec*180;for(;p<0;)p+=360;for(;p>=360;)p-=360;s[f]=p}else s[f]=s[f]/a[f];return u/=r,new se(s,t).alpha(u>.99999?1:u,!0)},wE=(e,t)=>{const n=e.length,r=[0,0,0,0];for(let i=0;i<e.length;i++){const o=e[i],s=t[i]/n,a=o._rgb;r[0]+=vc(a[0],2)*s,r[1]+=vc(a[1],2)*s,r[2]+=vc(a[2],2)*s,r[3]+=a[3]*s}return r[0]=Sc(r[0]),r[1]=Sc(r[1]),r[2]=Sc(r[2]),r[3]>.9999999&&(r[3]=1),new se(Wu(r))},{pow:_E}=Math;function Da(e){let t="rgb",n=Le("#ccc"),r=0,i=[0,1],o=[0,1],s=[],a=[0,0],l=!1,c=[],u=!1,f=0,p=1,b=!1,h={},g=!0,m=1;const E=function(C){if(C=C||["#fff","#000"],C&&$e(C)==="string"&&Le.brewer&&Le.brewer[C.toLowerCase()]&&(C=Le.brewer[C.toLowerCase()]),$e(C)==="array"){C.length===1&&(C=[C[0],C[0]]),C=C.slice(0);for(let R=0;R<C.length;R++)C[R]=Le(C[R]);s.length=0;for(let R=0;R<C.length;R++)s.push(R/(C.length-1))}return w(),c=C},A=function(C){if(l!=null){const R=l.length-1;let k=0;for(;k<R&&C>=l[k];)k++;return k-1}return 0};let _=C=>C,x=C=>C;const d=function(C,R){let k,T;if(R==null&&(R=!1),isNaN(C)||C===null)return n;R?T=C:l&&l.length>2?T=A(C)/(l.length-2):p!==f?T=(C-f)/(p-f):T=1,T=x(T),R||(T=_(T)),m!==1&&(T=_E(T,m)),T=a[0]+T*(1-a[0]-a[1]),T=mi(T,0,1);const y=Math.floor(T*1e4);if(g&&h[y])k=h[y];else{if($e(c)==="array")for(let I=0;I<s.length;I++){const O=s[I];if(T<=O){k=c[I];break}if(T>=O&&I===s.length-1){k=c[I];break}if(T>O&&T<s[I+1]){T=(T-O)/(s[I+1]-O),k=Le.interpolate(c[I],c[I+1],T,t);break}}else $e(c)==="function"&&(k=c(T));g&&(h[y]=k)}return k};var w=()=>h={};E(e);const S=function(C){const R=Le(d(C));return u&&R[u]?R[u]():R};return S.classes=function(C){if(C!=null){if($e(C)==="array")l=C,i=[C[0],C[C.length-1]];else{const R=Le.analyze(i);C===0?l=[R.min,R.max]:l=Le.limits(R,"e",C)}return S}return l},S.domain=function(C){if(!arguments.length)return o;o=C.slice(0),f=C[0],p=C[C.length-1],s=[];const R=c.length;if(C.length===R&&f!==p)for(let k of Array.from(C))s.push((k-f)/(p-f));else{for(let k=0;k<R;k++)s.push(k/(R-1));if(C.length>2){const k=C.map((y,I)=>I/(C.length-1)),T=C.map(y=>(y-f)/(p-f));T.every((y,I)=>k[I]===y)||(x=y=>{if(y<=0||y>=1)return y;let I=0;for(;y>=T[I+1];)I++;const O=(y-T[I])/(T[I+1]-T[I]);return k[I]+O*(k[I+1]-k[I])})}}return i=[f,p],S},S.mode=function(C){return arguments.length?(t=C,w(),S):t},S.range=function(C,R){return E(C),S},S.out=function(C){return u=C,S},S.spread=function(C){return arguments.length?(r=C,S):r},S.correctLightness=function(C){return C==null&&(C=!0),b=C,w(),b?_=function(R){const k=d(0,!0).lab()[0],T=d(1,!0).lab()[0],y=k>T;let I=d(R,!0).lab()[0];const O=k+(T-k)*R;let L=I-O,z=0,X=1,H=20;for(;Math.abs(L)>.01&&H-- >0;)(function(){return y&&(L*=-1),L<0?(z=R,R+=(X-R)*.5):(X=R,R+=(z-R)*.5),I=d(R,!0).lab()[0],L=I-O})();return R}:_=R=>R,S},S.padding=function(C){return C!=null?($e(C)==="number"&&(C=[C,C]),a=C,S):a},S.colors=function(C,R){arguments.length<2&&(R="hex");let k=[];if(arguments.length===0)k=c.slice(0);else if(C===1)k=[S(.5)];else if(C>1){const T=i[0],y=i[1]-T;k=vE(0,C).map(I=>S(T+I/(C-1)*y))}else{e=[];let T=[];if(l&&l.length>2)for(let y=1,I=l.length,O=1<=I;O?y<I:y>I;O?y++:y--)T.push((l[y-1]+l[y])*.5);else T=i;k=T.map(y=>S(y))}return Le[R]&&(k=k.map(T=>T[R]())),k},S.cache=function(C){return C!=null?(g=C,S):g},S.gamma=function(C){return C!=null?(m=C,S):m},S.nodata=function(C){return C!=null?(n=Le(C),S):n},S}function vE(e,t,n){let r=[],i=e<t,o=t;for(let s=e;i?s<o:s>o;i?s++:s--)r.push(s);return r}const SE=function(e){let t=[1,1];for(let n=1;n<e;n++){let r=[1];for(let i=1;i<=t.length;i++)r[i]=(t[i]||0)+t[i-1];t=r}return t},EE=function(e){let t,n,r,i;if(e=e.map(o=>new se(o)),e.length===2)[n,r]=e.map(o=>o.lab()),t=function(o){const s=[0,1,2].map(a=>n[a]+o*(r[a]-n[a]));return new se(s,"lab")};else if(e.length===3)[n,r,i]=e.map(o=>o.lab()),t=function(o){const s=[0,1,2].map(a=>(1-o)*(1-o)*n[a]+2*(1-o)*o*r[a]+o*o*i[a]);return new se(s,"lab")};else if(e.length===4){let o;[n,r,i,o]=e.map(s=>s.lab()),t=function(s){const a=[0,1,2].map(l=>(1-s)*(1-s)*(1-s)*n[l]+3*(1-s)*(1-s)*s*r[l]+3*(1-s)*s*s*i[l]+s*s*s*o[l]);return new se(a,"lab")}}else if(e.length>=5){let o,s,a;o=e.map(l=>l.lab()),a=e.length-1,s=SE(a),t=function(l){const c=1-l,u=[0,1,2].map(f=>o.reduce((p,b,h)=>p+s[h]*c**(a-h)*l**h*b[f],0));return new se(u,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return t},xE=e=>{const t=EE(e);return t.scale=()=>Da(t),t},{round:nm}=Math;se.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(nm)};se.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((t,n)=>n<3?e===!1?t:nm(t):t)};const CE=(...e)=>new se(...e,"rgb");Object.assign(Le,{rgb:CE});Re.format.rgb=(...e)=>{const t=Ie(e,"rgba");return t[3]===void 0&&(t[3]=1),t};Re.autodetect.push({p:3,test:(...e)=>{if(e=Ie(e,"rgba"),$e(e)==="array"&&(e.length===3||e.length===4&&$e(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const Mn=(e,t,n)=>{if(!Mn[n])throw new Error("unknown blend mode "+n);return Mn[n](e,t)},Kr=e=>(t,n)=>{const r=Le(n).rgb(),i=Le(t).rgb();return Le.rgb(e(r,i))},Gr=e=>(t,n)=>{const r=[];return r[0]=e(t[0],n[0]),r[1]=e(t[1],n[1]),r[2]=e(t[2],n[2]),r},TE=e=>e,AE=(e,t)=>e*t/255,kE=(e,t)=>e>t?t:e,RE=(e,t)=>e>t?e:t,OE=(e,t)=>255*(1-(1-e/255)*(1-t/255)),IE=(e,t)=>t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255)),PE=(e,t)=>255*(1-(1-t/255)/(e/255)),NE=(e,t)=>e===255?255:(e=255*(t/255)/(1-e/255),e>255?255:e);Mn.normal=Kr(Gr(TE));Mn.multiply=Kr(Gr(AE));Mn.screen=Kr(Gr(OE));Mn.overlay=Kr(Gr(IE));Mn.darken=Kr(Gr(kE));Mn.lighten=Kr(Gr(RE));Mn.dodge=Kr(Gr(NE));Mn.burn=Kr(Gr(PE));const{pow:ME,sin:DE,cos:LE}=Math;function $E(e=300,t=-1.5,n=1,r=1,i=[0,1]){let o=0,s;$e(i)==="array"?s=i[1]-i[0]:(s=0,i=[i,i]);const a=function(l){const c=gr*((e+120)/360+t*l),u=ME(i[0]+s*l,r),p=(o!==0?n[0]+l*o:n)*u*(1-u)/2,b=LE(c),h=DE(c),g=u+p*(-.14861*b+1.78277*h),m=u+p*(-.29227*b-.90649*h),E=u+p*(1.97294*b);return Le(Wu([g*255,m*255,E*255,1]))};return a.start=function(l){return l==null?e:(e=l,a)},a.rotations=function(l){return l==null?t:(t=l,a)},a.gamma=function(l){return l==null?r:(r=l,a)},a.hue=function(l){return l==null?n:(n=l,$e(n)==="array"?(o=n[1]-n[0],o===0&&(n=n[1])):o=0,a)},a.lightness=function(l){return l==null?i:($e(l)==="array"?(i=l,s=l[1]-l[0]):(i=[l,l],s=0),a)},a.scale=()=>Le.scale(a),a.hue(n),a}const BE="0123456789abcdef",{floor:FE,random:jE}=Math,zE=(e=jE)=>{let t="#";for(let n=0;n<6;n++)t+=BE.charAt(FE(e()*16));return new se(t,"hex")},{log:cp,pow:UE,floor:qE,abs:HE}=Math;function rm(e,t=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return $e(e)==="object"&&(e=Object.values(e)),e.forEach(r=>{t&&$e(r)==="object"&&(r=r[t]),r!=null&&!isNaN(r)&&(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(r,i)=>im(n,r,i),n}function im(e,t="equal",n=7){$e(e)=="array"&&(e=rm(e));const{min:r,max:i}=e,o=e.values.sort((a,l)=>a-l);if(n===1)return[r,i];const s=[];if(t.substr(0,1)==="c"&&(s.push(r),s.push(i)),t.substr(0,1)==="e"){s.push(r);for(let a=1;a<n;a++)s.push(r+a/n*(i-r));s.push(i)}else if(t.substr(0,1)==="l"){if(r<=0)throw new Error("Logarithmic scales are only possible for values > 0");const a=Math.LOG10E*cp(r),l=Math.LOG10E*cp(i);s.push(r);for(let c=1;c<n;c++)s.push(UE(10,a+c/n*(l-a)));s.push(i)}else if(t.substr(0,1)==="q"){s.push(r);for(let a=1;a<n;a++){const l=(o.length-1)*a/n,c=qE(l);if(c===l)s.push(o[c]);else{const u=l-c;s.push(o[c]*(1-u)+o[c+1]*u)}}s.push(i)}else if(t.substr(0,1)==="k"){let a;const l=o.length,c=new Array(l),u=new Array(n);let f=!0,p=0,b=null;b=[],b.push(r);for(let m=1;m<n;m++)b.push(r+m/n*(i-r));for(b.push(i);f;){for(let E=0;E<n;E++)u[E]=0;for(let E=0;E<l;E++){const A=o[E];let _=Number.MAX_VALUE,x;for(let d=0;d<n;d++){const w=HE(b[d]-A);w<_&&(_=w,x=d),u[x]++,c[E]=x}}const m=new Array(n);for(let E=0;E<n;E++)m[E]=null;for(let E=0;E<l;E++)a=c[E],m[a]===null?m[a]=o[E]:m[a]+=o[E];for(let E=0;E<n;E++)m[E]*=1/u[E];f=!1;for(let E=0;E<n;E++)if(m[E]!==b[E]){f=!0;break}b=m,p++,p>200&&(f=!1)}const h={};for(let m=0;m<n;m++)h[m]=[];for(let m=0;m<l;m++)a=c[m],h[a].push(o[m]);let g=[];for(let m=0;m<n;m++)g.push(h[m][0]),g.push(h[m][h[m].length-1]);g=g.sort((m,E)=>m-E),s.push(g[0]);for(let m=1;m<g.length;m+=2){const E=g[m];!isNaN(E)&&s.indexOf(E)===-1&&s.push(E)}}return s}const VE=(e,t)=>{e=new se(e),t=new se(t);const n=e.luminance(),r=t.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)};const up=.027,WE=5e-4,KE=.1,dp=1.14,sa=.022,fp=1.414,GE=(e,t)=>{e=new se(e),t=new se(t),e.alpha()<1&&(e=io(t,e,e.alpha(),"rgb"));const n=pp(...e.rgb()),r=pp(...t.rgb()),i=n>=sa?n:n+Math.pow(sa-n,fp),o=r>=sa?r:r+Math.pow(sa-r,fp),s=Math.pow(o,.56)-Math.pow(i,.57),a=Math.pow(o,.65)-Math.pow(i,.62),l=Math.abs(o-i)<WE?0:i<o?s*dp:a*dp;return(Math.abs(l)<KE?0:l>0?l-up:l+up)*100};function pp(e,t,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(t/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:dr,pow:St,min:QE,max:YE,atan2:hp,abs:gp,cos:aa,sin:mp,exp:JE,PI:yp}=Math;function XE(e,t,n=1,r=1,i=1){var o=function(te){return 360*te/(2*yp)},s=function(te){return 2*yp*te/360};e=new se(e),t=new se(t);const[a,l,c]=Array.from(e.lab()),[u,f,p]=Array.from(t.lab()),b=(a+u)/2,h=dr(St(l,2)+St(c,2)),g=dr(St(f,2)+St(p,2)),m=(h+g)/2,E=.5*(1-dr(St(m,7)/(St(m,7)+St(25,7)))),A=l*(1+E),_=f*(1+E),x=dr(St(A,2)+St(c,2)),d=dr(St(_,2)+St(p,2)),w=(x+d)/2,S=o(hp(c,A)),C=o(hp(p,_)),R=S>=0?S:S+360,k=C>=0?C:C+360,T=gp(R-k)>180?(R+k+360)/2:(R+k)/2,y=1-.17*aa(s(T-30))+.24*aa(s(2*T))+.32*aa(s(3*T+6))-.2*aa(s(4*T-63));let I=k-R;I=gp(I)<=180?I:k<=R?I+360:I-360,I=2*dr(x*d)*mp(s(I)/2);const O=u-a,L=d-x,z=1+.015*St(b-50,2)/dr(20+St(b-50,2)),X=1+.045*w,H=1+.015*w*y,Q=30*JE(-St((T-275)/25,2)),U=-(2*dr(St(w,7)/(St(w,7)+St(25,7))))*mp(2*s(Q)),ae=dr(St(O/(n*z),2)+St(L/(r*X),2)+St(I/(i*H),2)+U*(L/(r*X))*(I/(i*H)));return YE(0,QE(100,ae))}function ZE(e,t,n="lab"){e=new se(e),t=new se(t);const r=e.get(n),i=t.get(n);let o=0;for(let s in r){const a=(r[s]||0)-(i[s]||0);o+=a*a}return Math.sqrt(o)}const ex=(...e)=>{try{return new se(...e),!0}catch{return!1}},tx={cool(){return Da([Le.hsl(180,1,.9),Le.hsl(250,.7,.4)])},hot(){return Da(["#000","#f00","#ff0","#fff"]).mode("rgb")}},du={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},om=Object.keys(du),bp=new Map(om.map(e=>[e.toLowerCase(),e])),nx=typeof Proxy=="function"?new Proxy(du,{get(e,t){const n=t.toLowerCase();if(bp.has(n))return e[bp.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(om)}}):du,rx=(...e)=>{e=Ie(e,"cmyk");const[t,n,r,i]=e,o=e.length>4?e[4]:1;return i===1?[0,0,0,o]:[t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),r>=1?0:255*(1-r)*(1-i),o]},{max:wp}=Math,ix=(...e)=>{let[t,n,r]=Ie(e,"rgb");t=t/255,n=n/255,r=r/255;const i=1-wp(t,wp(n,r)),o=i<1?1/(1-i):0,s=(1-t-i)*o,a=(1-n-i)*o,l=(1-r-i)*o;return[s,a,l,i]};se.prototype.cmyk=function(){return ix(this._rgb)};const ox=(...e)=>new se(...e,"cmyk");Object.assign(Le,{cmyk:ox});Re.format.cmyk=rx;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"cmyk"),$e(e)==="array"&&e.length===4)return"cmyk"}});const sx=(...e)=>{const t=Ie(e,"hsla");let n=po(e)||"lsa";return t[0]=bn(t[0]||0)+"deg",t[1]=bn(t[1]*100)+"%",t[2]=bn(t[2]*100)+"%",n==="hsla"||t.length>3&&t[3]<1?(t[3]="/ "+(t.length>3?t[3]:1),n="hsla"):t.length=3,`${n.substr(0,3)}(${t.join(" ")})`},ax=(...e)=>{const t=Ie(e,"lab");let n=po(e)||"lab";return t[0]=bn(t[0])+"%",t[1]=bn(t[1]),t[2]=bn(t[2]),n==="laba"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lab(${t.join(" ")})`},lx=(...e)=>{const t=Ie(e,"lch");let n=po(e)||"lab";return t[0]=bn(t[0])+"%",t[1]=bn(t[1]),t[2]=isNaN(t[2])?"none":bn(t[2])+"deg",n==="lcha"||t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`lch(${t.join(" ")})`},cx=(...e)=>{const t=Ie(e,"lab");return t[0]=bn(t[0]*100)+"%",t[1]=cu(t[1]),t[2]=cu(t[2]),t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklab(${t.join(" ")})`},sm=(...e)=>{const[t,n,r,...i]=Ie(e,"rgb"),[o,s,a]=Xu(t,n,r),[l,c,u]=Zg(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]},ux=(...e)=>{const t=Ie(e,"lch");return t[0]=bn(t[0]*100)+"%",t[1]=cu(t[1]),t[2]=isNaN(t[2])?"none":bn(t[2])+"deg",t.length>3&&t[3]<1?t[3]="/ "+(t.length>3?t[3]:1):t.length=3,`oklch(${t.join(" ")})`},{round:xc}=Math,dx=(...e)=>{const t=Ie(e,"rgba");let n=po(e)||"rgb";if(n.substr(0,3)==="hsl")return sx(tm(t),n);if(n.substr(0,3)==="lab"){const r=as();vr("d50");const i=ax(Gu(t),n);return vr(r),i}if(n.substr(0,3)==="lch"){const r=as();vr("d50");const i=lx(Yu(t),n);return vr(r),i}return n.substr(0,5)==="oklab"?cx(Xu(t)):n.substr(0,5)==="oklch"?ux(sm(t)):(t[0]=xc(t[0]),t[1]=xc(t[1]),t[2]=xc(t[2]),(n==="rgba"||t.length>3&&t[3]<1)&&(t[3]="/ "+(t.length>3?t[3]:1),n="rgba"),`${n.substr(0,3)}(${t.slice(0,n==="rgb"?3:4).join(" ")})`)},am=(...e)=>{e=Ie(e,"lch");const[t,n,r,...i]=e,[o,s,a]=Xg(t,n,r),[l,c,u]=Ju(o,s,a);return[l,c,u,...i.length>0&&i[0]<1?[i[0]]:[]]},xr=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,In=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,La=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,_n=/\s*/.source,go=/\s+/.source,Zu=/\s*,\s*/.source,xl=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,mo=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,lm=new RegExp("^rgba?\\("+_n+[xr,xr,xr].join(go)+mo+"\\)$"),cm=new RegExp("^rgb\\("+_n+[xr,xr,xr].join(Zu)+_n+"\\)$"),um=new RegExp("^rgba\\("+_n+[xr,xr,xr,In].join(Zu)+_n+"\\)$"),dm=new RegExp("^hsla?\\("+_n+[xl,La,La].join(go)+mo+"\\)$"),fm=new RegExp("^hsl?\\("+_n+[xl,La,La].join(Zu)+_n+"\\)$"),pm=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,hm=new RegExp("^lab\\("+_n+[In,In,In].join(go)+mo+"\\)$"),gm=new RegExp("^lch\\("+_n+[In,In,xl].join(go)+mo+"\\)$"),mm=new RegExp("^oklab\\("+_n+[In,In,In].join(go)+mo+"\\)$"),ym=new RegExp("^oklch\\("+_n+[In,In,xl].join(go)+mo+"\\)$"),{round:bm}=Math,qi=e=>e.map((t,n)=>n<=2?mi(bm(t),0,255):t),Et=(e,t=0,n=100,r=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,r?e=t+(e+1)*.5*(n-t):e=t+e*(n-t)),+e),zt=(e,t)=>e==="none"?t:e,ed=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let t;if(Re.format.named)try{return Re.format.named(e)}catch{}if((t=e.match(lm))||(t=e.match(cm))){let n=t.slice(1,4);for(let i=0;i<3;i++)n[i]=+Et(zt(n[i],0),0,255);n=qi(n);const r=t[4]!==void 0?+Et(t[4],0,1):1;return n[3]=r,n}if(t=e.match(um)){const n=t.slice(1,5);for(let r=0;r<4;r++)n[r]=+Et(n[r],0,255);return n}if((t=e.match(dm))||(t=e.match(fm))){const n=t.slice(1,4);n[0]=+zt(n[0].replace("deg",""),0),n[1]=+Et(zt(n[1],0),0,100)*.01,n[2]=+Et(zt(n[2],0),0,100)*.01;const r=qi(uu(n)),i=t[4]!==void 0?+Et(t[4],0,1):1;return r[3]=i,r}if(t=e.match(pm)){const n=t.slice(1,4);n[1]*=.01,n[2]*=.01;const r=uu(n);for(let i=0;i<3;i++)r[i]=bm(r[i]);return r[3]=+t[4],r}if(t=e.match(hm)){const n=t.slice(1,4);n[0]=Et(zt(n[0],0),0,100),n[1]=Et(zt(n[1],0),-125,125,!0),n[2]=Et(zt(n[2],0),-125,125,!0);const r=as();vr("d50");const i=qi(Ku(n));vr(r);const o=t[4]!==void 0?+Et(t[4],0,1):1;return i[3]=o,i}if(t=e.match(gm)){const n=t.slice(1,4);n[0]=Et(n[0],0,100),n[1]=Et(zt(n[1],0),0,150,!1),n[2]=+zt(n[2].replace("deg",""),0);const r=as();vr("d50");const i=qi(Qu(n));vr(r);const o=t[4]!==void 0?+Et(t[4],0,1):1;return i[3]=o,i}if(t=e.match(mm)){const n=t.slice(1,4);n[0]=Et(zt(n[0],0),0,1),n[1]=Et(zt(n[1],0),-.4,.4,!0),n[2]=Et(zt(n[2],0),-.4,.4,!0);const r=qi(Ju(n)),i=t[4]!==void 0?+Et(t[4],0,1):1;return r[3]=i,r}if(t=e.match(ym)){const n=t.slice(1,4);n[0]=Et(zt(n[0],0),0,1),n[1]=Et(zt(n[1],0),0,.4,!1),n[2]=+zt(n[2].replace("deg",""),0);const r=qi(am(n)),i=t[4]!==void 0?+Et(t[4],0,1):1;return r[3]=i,r}};ed.test=e=>lm.test(e)||dm.test(e)||hm.test(e)||gm.test(e)||mm.test(e)||ym.test(e)||cm.test(e)||um.test(e)||fm.test(e)||pm.test(e)||e==="transparent";se.prototype.css=function(e){return dx(this._rgb,e)};const fx=(...e)=>new se(...e,"css");Le.css=fx;Re.format.css=ed;Re.autodetect.push({p:5,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&ed.test(e))return"css"}});Re.format.gl=(...e)=>{const t=Ie(e,"rgba");return t[0]*=255,t[1]*=255,t[2]*=255,t};const px=(...e)=>new se(...e,"gl");Le.gl=px;se.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};se.prototype.hex=function(e){return Qg(this._rgb,e)};const hx=(...e)=>new se(...e,"hex");Le.hex=hx;Re.format.hex=Gg;Re.autodetect.push({p:4,test:(e,...t)=>{if(!t.length&&$e(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:la}=Math,wm=e=>{const t=e/100;let n,r,i;return t<66?(n=255,r=t<6?0:-155.25485562709179-.44596950469579133*(r=t-2)+104.49216199393888*la(r),i=t<20?0:-254.76935184120902+.8274096064007395*(i=t-10)+115.67994401066147*la(i)):(n=351.97690566805693+.114206453784165*(n=t-55)-40.25366309332127*la(n),r=325.4494125711974+.07943456536662342*(r=t-50)-28.0852963507957*la(r),i=255),[n,r,i,1]},{round:gx}=Math,mx=(...e)=>{const t=Ie(e,"rgb"),n=t[0],r=t[2];let i=1e3,o=4e4;const s=.4;let a;for(;o-i>s;){a=(o+i)*.5;const l=wm(a);l[2]/l[0]>=r/n?o=a:i=a}return gx(a)};se.prototype.temp=se.prototype.kelvin=se.prototype.temperature=function(){return mx(this._rgb)};const Cc=(...e)=>new se(...e,"temp");Object.assign(Le,{temp:Cc,kelvin:Cc,temperature:Cc});Re.format.temp=Re.format.kelvin=Re.format.temperature=wm;se.prototype.oklch=function(){return sm(this._rgb)};const yx=(...e)=>new se(...e,"oklch");Object.assign(Le,{oklch:yx});Re.format.oklch=am;Re.autodetect.push({p:2,test:(...e)=>{if(e=Ie(e,"oklch"),$e(e)==="array"&&e.length===3)return"oklch"}});Object.assign(Le,{analyze:rm,average:bE,bezier:xE,blend:Mn,brewer:nx,Color:se,colors:ro,contrast:VE,contrastAPCA:GE,cubehelix:$E,deltaE:XE,distance:ZE,input:Re,interpolate:io,limits:im,mix:io,random:zE,scale:Da,scales:tx,valid:ex});const bx=e=>{if(e.length===0)return{};const t=[...e].sort(),n=Le.scale(["#006675","#3636C5","#008060","#001746","#36B37E","#00B8D9"]).mode("hsl"),r={};return t.forEach((i,o)=>{const s=o/Math.max(t.length-1,1);r[i]=n(s).darken(.2).hex()}),r},wx=e=>{const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(r,i,o,s){return i+i+o+o+s+s});const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null},_p=e=>{if(!e.startsWith("#"))return le.warn("getContrastTextColor: Invalid hex color",e),"#000000";if(e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),e.length!==7)return le.warn("getContrastTextColor: Invalid hex color length",e),"#000000";const t=wx(e);return t?(.299*t.r+.587*t.g+.114*t.b)/255>.6?"#000000":"#FFFFFF":(le.warn("getContrastTextColor: Could not convert hex to rgb",e),"#000000")},_m=(e,t=[])=>{if(t.length>0){const o=bx(t)[e]||"#6c757d";return{bg:o,text:_p(o)}}let n=0;for(let i=0;i<e.length;i++)n=e.charCodeAt(i)+((n<<5)-n);const r=Math.abs(n)%360;return{bg:Le.hsl(r,.7,.3).hex(),text:_p(Le.hsl(r,.7,.3).hex())}},_x=({value:e,size:t=120})=>{const n=r=>r>=90?"#28a745":r>=70?"#ffc107":"#dc3545";return M(P.Box,{flexDirection:"column",display:"flex",alignItems:"center",justifyContent:"center",children:ne(P.Box,{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",children:[M(ui,{variant:"determinate",value:e,size:t,thickness:4,sx:{color:n(e),"& .MuiCircularProgress-circle":{strokeLinecap:"round"}}}),M(P.Box,{position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",children:ne(P.Typography,{variant:"h3",component:"div",fontWeight:"bold",color:n(e),sx:{fontSize:"1.5rem"},children:[Math.round(e),"%"]})})]})})};function vx(e){return vl("MuiSvgIcon",e)}Ig("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Sx=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Nn(t)}`,`fontSize${Nn(n)}`]};return gg(i,vx,r)},Ex=cn("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Nn(n.color)}`],t[`fontSize${Nn(n.fontSize)}`]]}})(Sl(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),$a=Ke.forwardRef(function(t,n){const r=Og({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:p="0 0 24 24",...b}=r,h=Ke.isValidElement(i)&&i.type==="svg",g={...r,color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:h},m={};u||(m.viewBox=p);const E=Sx(g);return On.jsxs(Ex,{as:a,className:ju(E.root,o),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:n,...m,...b,...h&&i.props,ownerState:g,children:[h?i.props.children:i,f?On.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&($a.propTypes={children:xe.node,classes:xe.object,className:xe.string,color:xe.oneOfType([xe.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),xe.string]),component:xe.elementType,fontSize:xe.oneOfType([xe.oneOf(["inherit","large","medium","small"]),xe.string]),htmlColor:xe.string,inheritViewBox:xe.bool,shapeRendering:xe.string,sx:xe.oneOfType([xe.arrayOf(xe.oneOfType([xe.func,xe.object,xe.bool])),xe.func,xe.object]),titleAccess:xe.string,viewBox:xe.string});$a.muiName="SvgIcon";function td(e,t){function n(r,i){return On.jsx($a,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=$a.muiName,Ke.memo(Ke.forwardRef(n))}const xx=td(On.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Cx=td(On.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Tx=td(On.jsx("path",{d:"m12.87 15.07-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2zm-2.62 7 1.62-4.33L19.12 17z"}),"Translate"),Ax={en:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><rect width="24" height="16" fill="#fff"/><g stroke-width="0"><rect y="0" width="24" height="2" fill="#b22234"/><rect y="3" width="24" height="2" fill="#b22234"/><rect y="6" width="24" height="2" fill="#b22234"/><rect y="9" width="24" height="2" fill="#b22234"/><rect y="12" width="24" height="2" fill="#b22234"/><rect width="10" height="8" fill="#3c3b6e"/></g></svg>',de:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><rect width="24" height="16" fill="#ffce00"/><rect y="0" width="24" height="5.33" fill="#000"/><rect y="5.33" width="24" height="5.33" fill="#dd0000"/></svg>',es:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="16"><rect width="24" height="16" fill="#c60b1e"/><rect y="4" width="24" height="8" fill="#ffc400"/></svg>'},kx=e=>`url("data:image/svg+xml;utf8,${encodeURIComponent(Ax[e])}")`,Rx=({locale:e,isUrlControlled:t,userOverride:n,switchLabel:r,sourceLabel:i,localeLabels:o,onSelect:s,onReset:a,resetLabel:l,index:c=1})=>{const[u,f]=D.useState(null),p=!!u,{palette:{text:{secondary:b}}}=P.useTheme(),h=c===0?{}:{position:"absolute",right:12+c*50,top:12};return ne(Ur,{children:[M(P.Fab,{"data-testid":"language-switch",size:"small",color:"primary","aria-label":r,onClick:g=>f(g.currentTarget),disabled:t,sx:{boxShadow:"none",color:b,backgroundColor:"rgba(0, 0, 0, 0.04)","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.16)"},...h},children:M(Tx,{fontSize:"small"})}),ne(P.Menu,{anchorEl:u,open:p,onClose:()=>f(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{".MuiMenu-paper":{width:240},"li.MuiMenuItem-root":{textWrap:"auto"}},children:[Object.keys(o).map(g=>ne(P.MenuItem,{"data-testid":`language-${g}`,selected:e===g,onClick:()=>{s(g),f(null)},sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:.25},children:[ne(P.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,width:"100%"},children:[ne(P.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[M(P.Box,{component:"span","aria-hidden":"true",sx:{width:22,height:14,backgroundImage:kx(g),backgroundSize:"cover",backgroundRepeat:"no-repeat",boxShadow:"0 0 0 1px rgba(0,0,0,0.12)"}}),M(P.Divider,{orientation:"vertical",flexItem:!0}),M(P.Typography,{variant:"body2",children:o[g]})]}),M(P.Typography,{component:"span",variant:"caption",color:"text.secondary",textAlign:"right",children:g.toUpperCase()})]}),e===g&&ne(P.Typography,{variant:"caption",color:t?"warning.main":"text.secondary",children:[t?M(Cx,{fontSize:"inherit",sx:{mr:.5,verticalAlign:"middle"}}):null,i]})]},g)),M(P.Divider,{sx:{my:.5}}),ne(P.MenuItem,{onClick:()=>{a(),f(null)},disabled:t&&!n,sx:{gap:1},children:[M(xx,{fontSize:"small"}),M(P.Typography,{variant:"caption",fontSize:"0.8rem",children:l})]})]})]})};function It(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Ox=typeof Symbol=="function"&&Symbol.observable||"@@observable",vp=Ox,Tc=()=>Math.random().toString(36).substring(7).split("").join("."),Ix={INIT:`@@redux/INIT${Tc()}`,REPLACE:`@@redux/REPLACE${Tc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Tc()}`},yi=Ix;function tr(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Px(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Dx(e))return"date";if(Mx(e))return"error";const n=Nx(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Nx(e){return typeof e.constructor=="function"?e.constructor.name:null}function Mx(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Dx(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function jr(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Px(e)),t}function vm(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?It(2):`Expected the root reducer to be a function. Instead, received: '${jr(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?It(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?It(1):`Expected the enhancer to be a function. Instead, received: '${jr(n)}'`);return n(vm)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((m,E)=>{s.set(E,m)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?It(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?It(4):`Expected the listener to be a function. Instead, received: '${jr(m)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?It(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let E=!0;c();const A=a++;return s.set(A,m),function(){if(E){if(l)throw new Error(process.env.NODE_ENV==="production"?It(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");E=!1,c(),s.delete(A),o=null}}}function p(m){if(!tr(m))throw new Error(process.env.NODE_ENV==="production"?It(7):`Actions must be plain objects. Instead, the actual type was: '${jr(m)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof m.type>"u")throw new Error(process.env.NODE_ENV==="production"?It(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof m.type!="string")throw new Error(process.env.NODE_ENV==="production"?It(17):`Action "type" property must be a string. Instead, the actual type was: '${jr(m.type)}'. Value was: '${m.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?It(9):"Reducers may not dispatch actions.");try{l=!0,i=r(i,m)}finally{l=!1}return(o=s).forEach(A=>{A()}),m}function b(m){if(typeof m!="function")throw new Error(process.env.NODE_ENV==="production"?It(10):`Expected the nextReducer to be a function. Instead, received: '${jr(m)}`);r=m,p({type:yi.REPLACE})}function h(){const m=f;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(process.env.NODE_ENV==="production"?It(11):`Expected the observer to be an object. Instead, received: '${jr(E)}'`);function A(){const x=E;x.next&&x.next(u())}return A(),{unsubscribe:m(A)}},[vp](){return this}}}return p({type:yi.INIT}),{dispatch:p,subscribe:f,getState:u,replaceReducer:b,[vp]:h}}function Sp(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Lx(e,t,n,r){const i=Object.keys(t),o=n&&n.type===yi.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!tr(e))return`The ${o} has unexpected type of "${jr(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const s=Object.keys(e).filter(a=>!t.hasOwnProperty(a)&&!r[a]);if(s.forEach(a=>{r[a]=!0}),!(n&&n.type===yi.REPLACE)&&s.length>0)return`Unexpected ${s.length>1?"keys":"key"} "${s.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function $x(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:yi.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?It(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:yi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?It(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${yi.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Sm(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const a=t[s];process.env.NODE_ENV!=="production"&&typeof e[a]>"u"&&Sp(`No reducer provided for key "${a}"`),typeof e[a]=="function"&&(n[a]=e[a])}const r=Object.keys(n);let i;process.env.NODE_ENV!=="production"&&(i={});let o;try{$x(n)}catch(s){o=s}return function(a={},l){if(o)throw o;if(process.env.NODE_ENV!=="production"){const f=Lx(a,n,l,i);f&&Sp(f)}let c=!1;const u={};for(let f=0;f<r.length;f++){const p=r[f],b=n[p],h=a[p],g=b(h,l);if(typeof g>"u"){const m=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?It(14):`When called with an action of type ${m?`"${String(m)}"`:"(unknown type)"}, the slice reducer for key "${p}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[p]=g,c=c||g!==h}return c=c||r.length!==Object.keys(a).length,c?u:a}}function Ba(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Bx(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(process.env.NODE_ENV==="production"?It(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=Ba(...a)(i.dispatch),{...i,dispatch:o}}}function nd(e){return tr(e)&&"type"in e&&typeof e.type=="string"}var rd=Symbol.for("immer-nothing"),Xo=Symbol.for("immer-draftable"),Ot=Symbol.for("immer-state"),Em=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Tt(e,...t){if(process.env.NODE_ENV!=="production"){const n=Em[e],r=zr(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,wi=rn.getPrototypeOf,ls="constructor",xs="prototype",fu="configurable",Fa="enumerable",Aa="writable",cs="value",an=e=>!!e&&!!e[Ot];function ln(e){return e?xm(e)||Cs(e)||!!e[Xo]||!!e[ls]?.[Xo]||Ts(e)||As(e):!1}var Fx=rn[xs][ls].toString(),Ep=new WeakMap;function xm(e){if(!e||!oo(e))return!1;const t=wi(e);if(t===null||t===rn[xs])return!0;const n=rn.hasOwnProperty.call(t,ls)&&t[ls];if(n===Object)return!0;if(!zr(n))return!1;let r=Ep.get(n);return r===void 0&&(r=Function.toString.call(n),Ep.set(n,r)),r===Fx}function jx(e){return an(e)||Tt(15,e),e[Ot].base_}function yo(e,t,n=!0){_i(e)===0?(n?Reflect.ownKeys(e):rn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function _i(e){const t=e[Ot];return t?t.type_:Cs(e)?1:Ts(e)?2:As(e)?3:0}var Zo=(e,t,n=_i(e))=>n===2?e.has(t):rn[xs].hasOwnProperty.call(e,t),mr=(e,t,n=_i(e))=>n===2?e.get(t):e[t],ja=(e,t,n,r=_i(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function zx(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Cs=Array.isArray,Ts=e=>e instanceof Map,As=e=>e instanceof Set,oo=e=>typeof e=="object",zr=e=>typeof e=="function",Ac=e=>typeof e=="boolean",Ux=e=>oo(e)?e?.[Ot]:null,yr=e=>e.copy_||e.base_,id=e=>e.modified_?e.copy_:e.base_;function pu(e,t){if(Ts(e))return new Map(e);if(As(e))return new Set(e);if(Cs(e))return Array[xs].slice.call(e);const n=xm(e);if(t===!0||t==="class_only"&&!n){const r=rn.getOwnPropertyDescriptors(e);delete r[Ot];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a[Aa]===!1&&(a[Aa]=!0,a[fu]=!0),(a.get||a.set)&&(r[s]={[fu]:!0,[Aa]:!0,[Fa]:a[Fa],[cs]:e[s]})}return rn.create(wi(e),r)}else{const r=wi(e);if(r!==null&&n)return{...e};const i=rn.create(r);return rn.assign(i,e)}}function od(e,t=!1){return Cl(e)||an(e)||!ln(e)||(_i(e)>1&&rn.defineProperties(e,{set:ca,add:ca,clear:ca,delete:ca}),rn.freeze(e),t&&yo(e,(n,r)=>{od(r,!0)},!1)),e}function qx(){Tt(2)}var ca={[cs]:qx};function Cl(e){return e===null||!oo(e)?!0:rn.isFrozen(e)}var za="MapSet",Ua="Patches",qa={};function so(e){const t=qa[e];return t||Tt(0,e),t}var Hx=e=>!!qa[e];function Vx(e,t){qa[e]||(qa[e]=t)}var us,Cm=()=>us,Wx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Hx(za)?so(za):void 0});function xp(e,t){t&&(e.patchPlugin_=so(Ua),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hu(e){gu(e),e.drafts_.forEach(Kx),e.drafts_=null}function gu(e){e===us&&(us=e.parent_)}var Cp=e=>us=Wx(us,e);function Kx(e){const t=e[Ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Tp(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Ot].modified_&&(hu(t),Tt(4)),ln(e)&&(e=Ap(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Ot].base_,e,t)}else e=Ap(t,n);return Gx(t,e,!0),hu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==rd?e:void 0}function Ap(e,t){if(Cl(t))return t;const n=t[Ot];if(!n)return sd(t,e.handledSet_,e);if(!Tl(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);km(n,e)}return n.copy_}function Gx(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&od(t,n)}function Tm(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Tl=(e,t)=>e.scope_===t,Qx=[];function Am(e,t,n,r){const i=yr(e),o=e.type_;if(r!==void 0&&mr(i,r,o)===t){ja(i,r,n,o);return}if(!e.draftLocations_){const a=e.draftLocations_=new Map;yo(i,(l,c)=>{if(an(c)){const u=a.get(c)||[];u.push(l),a.set(c,u)}})}const s=e.draftLocations_.get(t)??Qx;for(const a of s)ja(i,a,n,o)}function Yx(e,t,n){e.callbacks_.push(function(i){const o=t;if(!o||!Tl(o,i))return;i.mapSetPlugin_?.fixSetContents(o);const s=id(o);Am(e,o.draft_??o,s,n),km(o,i)})}function km(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||(e.assigned_?.size??0)>0)){const{patchPlugin_:r}=t;if(r){const i=r.getPath(e);i&&r.generatePatches_(e,i,t)}Tm(e)}}function Jx(e,t,n){const{scope_:r}=e;if(an(n)){const i=n[Ot];Tl(i,r)&&i.callbacks_.push(function(){ka(e);const s=id(i);Am(e,n,s,t)})}else ln(n)&&e.callbacks_.push(function(){const o=yr(e);mr(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&sd(mr(e.copy_,t,e.type_),r.handledSet_,r)})}function sd(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||an(e)||t.has(e)||!ln(e)||Cl(e)||(t.add(e),yo(e,(r,i)=>{if(an(i)){const o=i[Ot];if(Tl(o,n)){const s=id(o);ja(e,r,s,e.type_),Tm(o)}}else ln(i)&&sd(i,t,n)})),e}function Xx(e,t){const n=Cs(e),r={type_:n?1:0,scope_:t?t.scope_:Cm(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=ad;n&&(i=[r],o=ds);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}var ad={get(e,t){if(t===Ot)return e;const n=yr(e);if(!Zo(n,t,e.type_))return Zx(e,n,t);const r=n[t];if(e.finalized_||!ln(r))return r;if(r===kc(e.base_,t)){ka(e);const i=e.type_===1?+t:t,o=yu(e.scope_,r,e,i);return e.copy_[i]=o}return r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=Rm(yr(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=kc(yr(e),t),o=i?.[Ot];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(zx(n,i)&&(n!==void 0||Zo(e.base_,t,e.type_)))return!0;ka(e),mu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Jx(e,t,n)),!0},deleteProperty(e,t){return ka(e),kc(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),mu(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Aa]:!0,[fu]:e.type_!==1||t!=="length",[Fa]:r[Fa],[cs]:n[t]}},defineProperty(){Tt(11)},getPrototypeOf(e){return wi(e.base_)},setPrototypeOf(){Tt(12)}},ds={};yo(ad,(e,t)=>{ds[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}});ds.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Tt(13),ds.set.call(this,e,t,void 0)};ds.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Tt(14),ad.set.call(this,e[0],t,n,e[0])};function kc(e,t){const n=e[Ot];return(n?yr(n):e)[t]}function Zx(e,t,n){const r=Rm(t,n);return r?cs in r?r[cs]:r.get?.call(e.draft_):void 0}function Rm(e,t){if(!(t in e))return;let n=wi(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=wi(n)}}function mu(e){e.modified_||(e.modified_=!0,e.parent_&&mu(e.parent_))}function ka(e){e.copy_||(e.assigned_=new Map,e.copy_=pu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eC=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,n,r)=>{if(zr(t)&&!zr(n)){const o=n;n=t;const s=this;return function(l=o,...c){return s.produce(l,u=>n.call(this,u,...c))}}zr(n)||Tt(6),r!==void 0&&!zr(r)&&Tt(7);let i;if(ln(t)){const o=Cp(this),s=yu(o,t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?hu(o):gu(o)}return xp(o,r),Tp(i,o)}else if(!t||!oo(t)){if(i=n(t),i===void 0&&(i=t),i===rd&&(i=void 0),this.autoFreeze_&&od(i,!0),r){const o=[],s=[];so(Ua).generateReplacementPatches_(t,i,{patches_:o,inversePatches_:s}),r(o,s)}return i}else Tt(1,t)},this.produceWithPatches=(t,n)=>{if(zr(t))return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},Ac(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),Ac(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),Ac(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ln(e)||Tt(8),an(e)&&(e=Om(e));const t=Cp(this),n=yu(t,e,void 0);return n[Ot].isManual_=!0,gu(t),n}finishDraft(e,t){const n=e&&e[Ot];(!n||!n.isManual_)&&Tt(9);const{scope_:r}=n;return xp(r,t),Tp(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=so(Ua).applyPatches_;return an(e)?r(e,t):this.produce(e,i=>r(i,t))}};function yu(e,t,n,r){const[i,o]=Ts(t)?so(za).proxyMap_(t,n):As(t)?so(za).proxySet_(t,n):Xx(t,n);return(n?.scope_??Cm()).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&r!==void 0?Yx(n,o,r):o.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:c}=l;o.modified_&&c&&c.generatePatches_(o,[],l)}),i}function Om(e){return an(e)||Tt(10,e),Im(e)}function Im(e){if(!ln(e)||Cl(e))return e;const t=e[Ot];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=pu(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=pu(e,!0);return yo(n,(i,o)=>{ja(n,i,Im(o))},r),t&&(t.finalized_=!1),n}function tC(){process.env.NODE_ENV!=="production"&&Em.push('Sets cannot have "replace" patches.',function(h){return"Unsupported patch operation: "+h},function(h){return"Cannot apply patch, path doesn't resolve: "+h},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");function t(h,g=[]){if("key_"in h&&h.key_!==void 0){const m=h.parent_.copy_??h.parent_.base_,E=Ux(mr(m,h.key_)),A=mr(m,h.key_);if(A===void 0||A!==h.draft_&&A!==h.base_&&A!==h.copy_||E!=null&&E.base_!==h.base_)return null;const _=h.parent_.type_===3;let x;if(_){const d=h.parent_;x=Array.from(d.drafts_.keys()).indexOf(h.key_)}else x=h.key_;if(!(_&&m.size>x||Zo(m,x)))return null;g.push(x)}if(h.parent_)return t(h.parent_,g);g.reverse();try{n(h.copy_,g)}catch{return null}return g}function n(h,g){let m=h;for(let E=0;E<g.length-1;E++){const A=g[E];if(m=mr(m,A),!oo(m)||m===null)throw new Error(`Cannot resolve path at '${g.join("/")}'`)}return m}const r="replace",i="add",o="remove";function s(h,g,m){if(h.scope_.processedForPatches_.has(h))return;h.scope_.processedForPatches_.add(h);const{patches_:E,inversePatches_:A}=m;switch(h.type_){case 0:case 2:return l(h,g,E,A);case 1:return a(h,g,E,A);case 3:return c(h,g,E,A)}}function a(h,g,m,E){let{base_:A,assigned_:_}=h,x=h.copy_;x.length<A.length&&([A,x]=[x,A],[m,E]=[E,m]);for(let d=0;d<A.length;d++){const w=x[d],S=A[d];if(_?.get(d.toString())&&w!==S){const C=w?.[Ot];if(C&&C.modified_)continue;const R=g.concat([d]);m.push({op:r,path:R,value:b(w)}),E.push({op:r,path:R,value:b(S)})}}for(let d=A.length;d<x.length;d++){const w=g.concat([d]);m.push({op:i,path:w,value:b(x[d])})}for(let d=x.length-1;A.length<=d;--d){const w=g.concat([d]);E.push({op:o,path:w})}}function l(h,g,m,E){const{base_:A,copy_:_,type_:x}=h;yo(h.assigned_,(d,w)=>{const S=mr(A,d,x),C=mr(_,d,x),R=w?Zo(A,d)?r:i:o;if(S===C&&R===r)return;const k=g.concat(d);m.push(R===o?{op:R,path:k}:{op:R,path:k,value:b(C)}),E.push(R===i?{op:o,path:k}:R===o?{op:i,path:k,value:b(S)}:{op:r,path:k,value:b(S)})})}function c(h,g,m,E){let{base_:A,copy_:_}=h,x=0;A.forEach(d=>{if(!_.has(d)){const w=g.concat([x]);m.push({op:o,path:w,value:d}),E.unshift({op:i,path:w,value:d})}x++}),x=0,_.forEach(d=>{if(!A.has(d)){const w=g.concat([x]);m.push({op:i,path:w,value:d}),E.unshift({op:o,path:w,value:d})}x++})}function u(h,g,m){const{patches_:E,inversePatches_:A}=m;E.push({op:r,path:[],value:g===rd?void 0:g}),A.push({op:r,path:[],value:h})}function f(h,g){return g.forEach(m=>{const{path:E,op:A}=m;let _=h;for(let S=0;S<E.length-1;S++){const C=_i(_);let R=E[S];typeof R!="string"&&typeof R!="number"&&(R=""+R),(C===0||C===1)&&(R==="__proto__"||R===ls)&&Tt(19),zr(_)&&R===xs&&Tt(19),_=mr(_,R),oo(_)||Tt(18,E.join("/"))}const x=_i(_),d=p(m.value),w=E[E.length-1];switch(A){case r:switch(x){case 2:return _.set(w,d);case 3:Tt(16);default:return _[w]=d}case i:switch(x){case 1:return w==="-"?_.push(d):_.splice(w,0,d);case 2:return _.set(w,d);case 3:return _.add(d);default:return _[w]=d}case o:switch(x){case 1:return _.splice(w,1);case 2:return _.delete(w);case 3:return _.delete(m.value);default:return delete _[w]}default:Tt(17,A)}}),h}function p(h){if(!ln(h))return h;if(Cs(h))return h.map(p);if(Ts(h))return new Map(Array.from(h.entries()).map(([m,E])=>[m,p(E)]));if(As(h))return new Set(Array.from(h).map(p));const g=Object.create(wi(h));for(const m in h)g[m]=p(h[m]);return Zo(h,Xo)&&(g[Xo]=h[Xo]),g}function b(h){return an(h)?p(h):h}Vx(Ua,{applyPatches_:f,generatePatches_:s,generateReplacementPatches_:u,getPath:t})}var fs=new eC,ks=fs.produce,Pm=fs.produceWithPatches.bind(fs),kp=fs.applyPatches.bind(fs),nC=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const i={};e(i)===i&&(r=!0)}catch{}if(r){let i;try{throw new Error}catch(o){({stack:i}=o)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
100
100
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
101
101
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
102
102
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},rC=(e,t,n)=>{const{memoize:r,memoizeOptions:i}=t,{inputSelectorResults:o,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...i);if(!(a.apply(null,o)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
103
103
|
This means your output selector will likely run more frequently than intended.
|
|
104
104
|
Avoid returning a new reference inside your input selector, e.g.
|
|
105
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:o,secondInputs:s,stack:c})}},iC={inputStabilityCheck:"once",identityFunctionCheck:"once"};function oC(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sC(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function aC(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Rp=e=>Array.isArray(e)?e:[e];function lC(e){const t=Array.isArray(e[0])?e[0]:e;return aC(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Op(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var cC=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...iC,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:nC},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:rC}}},uC=class{constructor(e){this.value=e}deref(){return this.value}},dC=typeof WeakRef<"u"?WeakRef:uC,fC=0,Ip=1;function
|
|
105
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:o,secondInputs:s,stack:c})}},iC={inputStabilityCheck:"once",identityFunctionCheck:"once"};function oC(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function sC(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function aC(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Rp=e=>Array.isArray(e)?e:[e];function lC(e){const t=Array.isArray(e[0])?e[0]:e;return aC(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Op(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var cC=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...iC,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:nC},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:rC}}},uC=class{constructor(e){this.value=e}deref(){return this.value}},dC=typeof WeakRef<"u"?WeakRef:uC,fC=0,Ip=1;function ua(){return{s:fC,v:void 0,o:null,p:null}}function Ha(e,t={}){let n=ua();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let a=n;const{length:l}=arguments;for(let f=0,p=l;f<p;f++){const b=arguments[f];if(typeof b=="function"||typeof b=="object"&&b!==null){let h=a.o;h===null&&(a.o=h=new WeakMap);const g=h.get(b);g===void 0?(a=ua(),h.set(b,a)):a=g}else{let h=a.p;h===null&&(a.p=h=new Map);const g=h.get(b);g===void 0?(a=ua(),h.set(b,a)):a=g}}const c=a;let u;if(a.s===Ip)u=a.v;else if(u=e.apply(null,arguments),o++,r){const f=i?.deref?.()??i;f!=null&&r(f,u)&&(u=f,o!==0&&o--),i=typeof u=="object"&&u!==null||typeof u=="function"?new dC(u):u}return c.s=Ip,c.v=u,u}return s.clearCache=()=>{n=ua(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function pC(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),oC(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:b=Ha,argsMemoizeOptions:h=[],devModeChecks:g={}}=u,m=Rp(p),E=Rp(h),A=lC(i),_=f(function(){return o++,c.apply(null,arguments)},...m);let x=!0;const d=b(function(){s++;const S=Op(A,arguments);if(a=_.apply(null,S),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:R}=cC(x,g);if(C.shouldRun&&C.run(c,S,a),R.shouldRun){const k=Op(A,arguments);R.run({inputSelectorResults:S,inputSelectorResultsCopy:k},{memoize:f,memoizeOptions:m},arguments)}x&&(x=!1)}return a},...E);return Object.assign(d,{resultFunc:c,memoizedResultFunc:_,dependencies:A,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var ld=pC(Ha),hC=Object.assign((e,t=ld)=>{sC(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>hC});function Nm(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var gC=Nm(),mC=Nm,yC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ba:Ba.apply(null,arguments)},Mm=e=>e&&typeof e.match=="function";function Pn(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(process.env.NODE_ENV==="production"?ze(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>nd(r)&&r.type===e,n}function bC(e){return typeof e=="function"&&"type"in e&&Mm(e)}function wC(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
106
106
|
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}function _C(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=bC}=e;return()=>n=>r=>(t(r)&&console.warn(wC(r.type)),n(r))}function Dm(e,t){let n=0;return{measureTime(r){const i=Date.now();try{return r()}finally{const o=Date.now();n+=o-i}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
|
|
107
107
|
If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
|
|
108
|
-
It is disabled in production builds, so you don't need to worry about that.`)}}}var Lm=class
|
|
108
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var Lm=class Wo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Wo.prototype)}static get[Symbol.species](){return Wo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Wo(...t[0].concat(this)):new Wo(...t.concat(this))}};function Pp(e){return ln(e)?ks(e,()=>{}):e}function da(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function vC(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function SC(e,t,n){const r=$m(e,t,n);return{detectMutations(){return Bm(e,t,r,n)}}}function $m(e,t=[],n,r="",i=new Set){const o={value:n};if(!e(n)&&!i.has(n)){i.add(n),o.children={};const s=t.length>0;for(const a in n){const l=r?r+"."+a:a;s&&t.some(u=>u instanceof RegExp?u.test(l):l===u)||(o.children[a]=$m(e,t,n[a],l))}}return o}function Bm(e,t=[],n,r,i=!1,o=""){const s=n?n.value:void 0,a=s===r;if(i&&!a&&!Number.isNaN(r))return{wasMutated:!0,path:o};if(e(s)||e(r))return{wasMutated:!1};const l={};for(let u in n.children)l[u]=!0;for(let u in r)l[u]=!0;const c=t.length>0;for(let u in l){const f=o?o+"."+u:u;if(c&&t.some(h=>h instanceof RegExp?h.test(f):f===h))continue;const p=Bm(e,t,n.children[u],r[u],a,f);if(p.wasMutated)return p}return{wasMutated:!1}}function EC(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(a,l,c,u){return JSON.stringify(a,n(l,u),c)},n=function(a,l){let c=[],u=[];return l||(l=function(f,p){return c[0]===p?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(p)).join(".")+"]"}),function(f,p){if(c.length>0){var b=c.indexOf(this);~b?c.splice(b+1):c.push(this),~b?u.splice(b,1/0,f):u.push(f),~c.indexOf(p)&&(p=l.call(this,f,p))}else c.push(p);return a==null?p:a.call(this,f,p)}},{isImmutable:r=vC,ignoredPaths:i,warnAfter:o=32}=e;const s=SC.bind(null,r,i);return({getState:a})=>{let l=a(),c=s(l),u;return f=>p=>{const b=Dm(o,"ImmutableStateInvariantMiddleware");b.measureTime(()=>{if(l=a(),u=c.detectMutations(),c=s(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?ze(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const h=f(p);return b.measureTime(()=>{if(l=a(),u=c.detectMutations(),c=s(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?ze(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(p)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),b.warnIfExceeded(),h}}}}function Fm(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||tr(e)}function bu(e,t="",n=Fm,r,i=[],o){let s;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||o?.has(e))return!1;const a=r!=null?r(e):Object.entries(e),l=i.length>0;for(const[c,u]of a){const f=t?t+"."+c:c;if(!(l&&i.some(b=>b instanceof RegExp?b.test(f):f===b))){if(!n(u))return{keyPath:f,value:u};if(typeof u=="object"&&(s=bu(u,f,n,r,i,o),s))return s}}return o&&jm(e)&&o.add(e),!1}function jm(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!jm(t))return!1;return!0}function xC(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=Fm,getEntries:n,ignoredActions:r=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:o=[],warnAfter:s=32,ignoreState:a=!1,ignoreActions:l=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return f=>p=>b=>{if(!nd(b))return p(b);const h=p(b),g=Dm(s,"SerializableStateInvariantMiddleware");return!l&&!(r.length&&r.indexOf(b.type)!==-1)&&g.measureTime(()=>{const m=bu(b,"",t,n,i,u);if(m){const{keyPath:E,value:A}=m;console.error(`A non-serializable value was detected in an action, in the path: \`${E}\`. Value:`,A,`
|
|
109
109
|
Take a look at the logic that dispatched this action: `,b,`
|
|
110
110
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
111
111
|
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),a||(g.measureTime(()=>{const m=f.getState(),E=bu(m,"",t,n,o,u);if(E){const{keyPath:A,value:_}=E;console.error(`A non-serializable value was detected in the state, in the path: \`${A}\`. Value:`,_,`
|
|
112
112
|
Take a look at the reducer(s) handling this action type: ${b.type}.
|
|
113
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),g.warnIfExceeded()),h}}}function pa(e){return typeof e=="boolean"}var CC=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new Lm;if(n&&(pa(n)?s.push(gC):s.push(mC(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let a={};pa(r)||(a=r),s.unshift(EC(a))}if(i){let a={};pa(i)||(a=i),s.push(xC(a))}if(o){let a={};pa(o)||(a=o),s.unshift(_C(a))}}return s},kl="RTK_autoBatch",Lo=()=>e=>({payload:e,meta:{[kl]:!0}}),Np=e=>t=>{setTimeout(t,e)},TC=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Np(10):e.type==="callback"?e.queueNotification:Np(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),p=r.subscribe(f);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[kl],o=!i,o&&(s||(s=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},AC=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Lm(e);return r&&i.push(TC(typeof r=="object"?r:void 0)),i};function kC(e){const t=CC(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(Zn(n))l=Sm(n);else throw new Error(process.env.NODE_ENV==="production"?Be(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Be(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Be(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(g=>typeof g!="function"))throw new Error(process.env.NODE_ENV==="production"?Be(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let g=new Set;c.forEach(m=>{if(g.has(m))throw new Error(process.env.NODE_ENV==="production"?Be(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");g.add(m)})}let u=Fa;i&&(u=yC({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=Bx(...c),p=AC(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Be(5):"`enhancers` field must be a callback");let b=typeof a=="function"?a(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(b))throw new Error(process.env.NODE_ENV==="production"?Be(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&b.some(g=>typeof g!="function"))throw new Error(process.env.NODE_ENV==="production"?Be(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!b.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const h=u(...b);return vm(l,s,h)}function zm(e){const t={},n=[];let r;const i={addCase(o,s){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Be(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Be(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a=typeof o=="string"?o:o.type;if(!a)throw new Error(process.env.NODE_ENV==="production"?Be(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error(process.env.NODE_ENV==="production"?Be(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=s,i},addAsyncThunk(o,s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Be(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Be(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Be(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function RC(e){return typeof e=="function"}function OC(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Be(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=zm(t),o;if(RC(e))o=()=>Pp(e());else{const a=Pp(e);o=()=>a}function s(a=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(an(u)){const b=f(u,l);return b===void 0?u:b}else{if(ln(u))return Ts(u,p=>f(p,l));{const p=f(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var Um=(e,t)=>Mm(e)?e.match(t):e(t);function Tr(...e){return t=>e.some(n=>Um(n,t))}function Xo(...e){return t=>e.every(n=>Um(n,t))}function Rl(e,t){if(!e||!e.meta)return!1;const n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function As(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function cd(...e){return e.length===0?t=>Rl(t,["pending"]):As(e)?Tr(...e.map(t=>t.pending)):cd()(e[0])}function so(...e){return e.length===0?t=>Rl(t,["rejected"]):As(e)?Tr(...e.map(t=>t.rejected)):so()(e[0])}function Ol(...e){const t=n=>n&&n.meta&&n.meta.rejectedWithValue;return e.length===0?Xo(so(...e),t):As(e)?Xo(so(...e),t):Ol()(e[0])}function Hr(...e){return e.length===0?t=>Rl(t,["fulfilled"]):As(e)?Tr(...e.map(t=>t.fulfilled)):Hr()(e[0])}function wu(...e){return e.length===0?t=>Rl(t,["pending","fulfilled","rejected"]):As(e)?Tr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):wu()(e[0])}var IC="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ud=(e=21)=>{let t="",n=e;for(;n--;)t+=IC[Math.random()*64|0];return t},PC=["name","message","stack","code"],Rc=class{constructor(e,t){this.payload=e,this.meta=t}_type},Mp=class{constructor(e,t){this.payload=e,this.meta=t}_type},NC=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of PC)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Dp="External signal was aborted",ds=(()=>{function e(t,n,r){const i=Nn(t+"/fulfilled",(l,c,u,f)=>({payload:l,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=Nn(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=Nn(t+"/rejected",(l,c,u,f,p)=>({payload:f,error:(r&&r.serializeError||NC)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,f,p)=>{const b=r?.idGenerator?r.idGenerator(l):ud(),h=new AbortController;let g,m;function E(_){m=_,h.abort()}c&&(c.aborted?E(Dp):c.addEventListener("abort",()=>E(Dp),{once:!0}));const A=(async function(){let _;try{let d=r?.condition?.(l,{getState:f,extra:p});if(DC(d)&&(d=await d),d===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const w=new Promise((S,C)=>{g=()=>{C({name:"AbortError",message:m||"Aborted"})},h.signal.addEventListener("abort",g,{once:!0})});u(o(b,l,r?.getPendingMeta?.({requestId:b,arg:l},{getState:f,extra:p}))),_=await Promise.race([w,Promise.resolve(n(l,{dispatch:u,getState:f,extra:p,requestId:b,signal:h.signal,abort:E,rejectWithValue:(S,C)=>new Rc(S,C),fulfillWithValue:(S,C)=>new Mp(S,C)})).then(S=>{if(S instanceof Rc)throw S;return S instanceof Mp?i(S.payload,b,l,S.meta):i(S,b,l)})])}catch(d){_=d instanceof Rc?s(null,b,l,d.payload,d.meta):s(d,b,l)}finally{g&&h.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&s.match(_)&&_.meta.condition||u(_),_})();return Object.assign(A,{abort:E,requestId:b,arg:l,unwrap(){return A.then(MC)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:Tr(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function MC(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function DC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var LC=Symbol.for("rtk-slice-createasyncthunk");function $C(e,t){return`${e}/${t}`}function BC({creators:e}={}){const t=e?.asyncThunk?.[LC];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?Be(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof r.reducers=="function"?r.reducers(jC()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(_,x){const d=typeof _=="string"?_:_.type;if(!d)throw new Error(process.env.NODE_ENV==="production"?Be(12):"`context.addCase` cannot be called with an empty action type");if(d in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Be(13):"`context.addCase` cannot be called with two reducers for the same action type: "+d);return l.sliceCaseReducersByType[d]=x,c},addMatcher(_,x){return l.sliceMatchers.push({matcher:_,reducer:x}),c},exposeAction(_,x){return l.actionCreators[_]=x,c},exposeCaseReducer(_,x){return l.sliceCaseReducersByName[_]=x,c}};a.forEach(_=>{const x=s[_],d={reducerName:_,type:$C(i,_),createNotation:typeof r.reducers=="function"};UC(x)?HC(d,x,c,t):zC(d,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Be(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[_={},x=[],d=void 0]=typeof r.extraReducers=="function"?zm(r.extraReducers):[r.extraReducers],w={..._,...l.sliceCaseReducersByType};return OC(r.initialState,S=>{for(let C in w)S.addCase(C,w[C]);for(let C of l.sliceMatchers)S.addMatcher(C.matcher,C.reducer);for(let C of x)S.addMatcher(C.matcher,C.reducer);d&&S.addDefaultCase(d)})}const f=_=>_,p=new Map,b=new WeakMap;let h;function g(_,x){return h||(h=u()),h(_,x)}function m(){return h||(h=u()),h.getInitialState()}function E(_,x=!1){function d(S){let C=S[_];if(typeof C>"u"){if(x)C=fa(b,d,m);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Be(15):"selectSlice returned undefined for an uninjected slice reducer")}return C}function w(S=f){const C=fa(p,x,()=>new WeakMap);return fa(C,S,()=>{const R={};for(const[k,T]of Object.entries(r.selectors??{}))R[k]=FC(T,S,()=>fa(b,S,m),x);return R})}return{reducerPath:_,getSelectors:w,get selectors(){return w(d)},selectSlice:d}}const A={name:i,reducer:g,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:m,...E(o),injectInto(_,{reducerPath:x,...d}={}){const w=x??o;return _.inject({reducerPath:w,reducer:g},d),{...A,...E(w,!0)}}};return A}}function FC(e,t,n,r){function i(o,...s){let a=t(o);if(typeof a>"u"){if(r)a=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Be(16):"selectState returned undefined for an uninjected slice reducer")}return e(a,...s)}return i.unwrapped=e,i}var On=BC();function jC(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function zC({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!qC(r))throw new Error(process.env.NODE_ENV==="production"?Be(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Nn(e,s):Nn(e))}function UC(e){return e._reducerDefinitionType==="asyncThunk"}function qC(e){return e._reducerDefinitionType==="reducerWithPrepare"}function HC({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Be(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,f=i(e,o,u);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:s||ha,pending:a||ha,rejected:l||ha,settled:c||ha})}function ha(){}function Be(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const st=e=>typeof window>"u"?null:localStorage.getItem(e),bn=(e,t)=>{typeof window>"u"||localStorage.setItem(e,t)},vr=e=>{typeof window>"u"||localStorage.removeItem(e)},qm=["en","de","es"],Ei="en",_u="dqm.locale",VC="dqmUiLang",Oa=e=>{if(!e)return null;const n=e.toLowerCase().split("-")[0];return qm.includes(n)?n:null},vu=(e,t,n,r=Ei)=>{const i=new URLSearchParams(e||""),o=Oa(i.get(VC));if(o)return{locale:o,source:"url",userOverride:!1};const s=Oa(t);if(s)return{locale:s,source:"user",userOverride:!0};const a=Oa(n);return a?{locale:a,source:"navigator",userOverride:!1}:{locale:r,source:"default",userOverride:!1}},qi=e=>{e?bn(_u,e):vr(_u)},Hm=()=>st(_u),ke=e=>typeof e=="string",$o=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Lp=e=>e==null?"":""+e,WC=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},KC=/###/g,$p=e=>e&&e.indexOf("###")>-1?e.replace(KC,"."):e,Bp=e=>!e||ke(e),Zo=(e,t,n)=>{const r=ke(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Bp(e))return{};const o=$p(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Bp(e)?{}:{obj:e,k:$p(r[i])}},Fp=(e,t,n)=>{const{obj:r,k:i}=Zo(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=Zo(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=Zo(e,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},GC=(e,t,n,r)=>{const{obj:i,k:o}=Zo(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Wa=(e,t)=>{const{obj:n,k:r}=Zo(e,t);if(n)return n[r]},QC=(e,t,n)=>{const r=Wa(e,n);return r!==void 0?r:Wa(t,n)},Vm=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?ke(e[r])||e[r]instanceof String||ke(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Vm(e[r],t[r],n):e[r]=t[r]);return e},Hi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var YC={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const JC=e=>ke(e)?e.replace(/[&<>"'\/]/g,t=>YC[t]):e;class XC{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ZC=[" ",",","?","!",";"],eT=new XC(20),tT=(e,t,n)=>{t=t||"",n=n||"";const r=ZC.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=eT.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},Su=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,a="";for(let l=o;l<r.length;++l)if(l!==o&&(a+=n),a+=r[l],s=i[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<r.length-1)continue;o+=l-o+1;break}i=s}return i},Ka=e=>e&&e.replace("_","-"),nT={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Ga{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||nT,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(ke(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ga(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ga(this.logger,t)}}var Yn=new Ga;class Il{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[a,l]=s;for(let c=0;c<l;c++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,l]=s;for(let c=0;c<l;c++)a.apply(a,[t,...r])})}}class jp extends Il{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):ke(r)&&o?a.push(...r.split(o)):a.push(r)));const l=Wa(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!s||!ke(r)?l:Su(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Fp(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(ke(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=Wa(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Vm(l,r,o):l={...l,...r},Fp(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Wm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const zp={};class Qa extends Il{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),WC(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Yn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!tT(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:ke(o)?[o]:o};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return{key:t,namespaces:ke(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const x=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${x}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${x}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(t,n);let p=f&&f.res;const b=f&&f.usedKey||s,h=f&&f.exactUsedKey||s,g=Object.prototype.toString.apply(p),m=["[object Number]","[object Function]","[object RegExp]"],E=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,_=!ke(p)&&typeof p!="boolean"&&typeof p!="number";if(A&&p&&_&&m.indexOf(g)<0&&!(ke(E)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,p,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(f.res=x,f.usedParams=this.getUsedParamsDetails(n),f):x}if(o){const x=Array.isArray(p),d=x?[]:{},w=x?h:b;for(const S in p)if(Object.prototype.hasOwnProperty.call(p,S)){const C=`${w}${o}${S}`;d[S]=this.translate(C,{...n,joinArrays:!1,ns:a}),d[S]===C&&(d[S]=p[S])}p=d}}else if(A&&ke(E)&&Array.isArray(p))p=p.join(E),p&&(p=this.extendTranslation(p,t,n,r));else{let x=!1,d=!1;const w=n.count!==void 0&&!ke(n.count),S=Qa.hasDefaultValue(n),C=w?this.pluralResolver.getSuffix(c,n.count,n):"",R=n.ordinal&&w?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",k=w&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),T=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${C}`]||n[`defaultValue${R}`]||n.defaultValue;!this.isValidLookup(p)&&S&&(x=!0,p=T),this.isValidLookup(p)||(d=!0,p=s);const I=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&d?void 0:p,O=S&&T!==p&&this.options.updateMissing;if(d||x||O){if(this.logger.log(O?"updateKey":"missingKey",c,l,s,O?T:p),o){const V=this.resolve(s,{...n,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let V=0;V<U.length;V++)L.push(U[V]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(n.lng||this.language):L.push(n.lng||this.language);const Z=(V,Q,F)=>{const z=S&&F!==p?F:I;this.options.missingKeyHandler?this.options.missingKeyHandler(V,l,Q,z,O,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(V,l,Q,z,O,n),this.emit("missingKey",V,l,Q,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?L.forEach(V=>{const Q=this.pluralResolver.getSuffixes(V,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(F=>{Z([V],s+F,n[`defaultValue${F}`]||T)})}):Z(L,s,T))}p=this.extendTranslation(p,t,n,f,r),d&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${s}`),(d||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,x?p:void 0):p=this.options.parseMissingKeyHandler(p))}return i?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=ke(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const p=t.match(this.interpolator.nestingRegexp);u=p&&p.length}let f=r.replace&&!ke(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),c){const p=t.match(this.interpolator.nestingRegexp),b=p&&p.length;u<b&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,b=new Array(p),h=0;h<p;h++)b[h]=arguments[h];return o&&o[0]===b[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${n[0]}`),null):s.translate(...b,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,l=ke(a)?[a]:a;return t!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(t=Wm.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return ke(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!ke(n.count),b=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(ke(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(m=>{this.isValidLookup(r)||(a=m,!zp[`${g[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(zp[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(E=>{if(this.isValidLookup(r))return;s=E;const A=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(A,u,E,m,n);else{let x;p&&(x=this.pluralResolver.getSuffix(E,n.count,n));const d=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(A.push(u+x),n.ordinal&&x.indexOf(w)===0&&A.push(u+x.replace(w,this.options.pluralSeparator)),b&&A.push(u+d)),h){const S=`${u}${this.options.contextSeparator}${n.context}`;A.push(S),p&&(A.push(S+x),n.ordinal&&x.indexOf(w)===0&&A.push(S+x.replace(w,this.options.pluralSeparator)),b&&A.push(S+d))}}let _;for(;_=A.pop();)this.isValidLookup(r)||(o=_,r=this.getResource(E,m,_,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!ke(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Oc=e=>e.charAt(0).toUpperCase()+e.slice(1);class Up{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yn.create("languageUtils")}getScriptPartFromCode(t){if(t=Ka(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Ka(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(ke(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Oc(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Oc(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Oc(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),ke(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return ke(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):ke(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let rT=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iT={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const oT=["v1","v2","v3"],sT=["v4"],qp={zero:0,one:1,two:2,few:3,many:4,other:5},aT=()=>{const e={};return rT.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:iT[t.fc]}})}),e};class lT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Yn.create("pluralResolver"),(!this.options.compatibilityJSON||sT.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=aT(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=Ka(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[o]=s,s}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>qp[i]-qp[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!oT.includes(this.options.compatibilityJSON)}}const Hp=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=QC(e,t,n);return!o&&i&&ke(n)&&(o=Su(e,n,r),o===void 0&&(o=Su(t,n,r))),o},Ic=e=>e.replace(/\$/g,"$$$$");class cT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:b,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:E,alwaysFormat:A}=t.interpolation;this.escape=n!==void 0?n:JC,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Hi(o):s||"{{",this.suffix=a?Hi(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?Hi(p):b||Hi("$t("),this.nestingSuffix=h?Hi(h):g||Hi(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=E||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=b=>{if(b.indexOf(this.formatSeparator)<0){const E=Hp(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,{...i,...n,interpolationkey:b}):E}const h=b.split(this.formatSeparator),g=h.shift().trim(),m=h.join(this.formatSeparator).trim();return this.format(Hp(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...i,...n,interpolationkey:g})};this.resetRegExp();const u=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>Ic(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?Ic(this.escape(b)):Ic(b)}].forEach(b=>{for(a=0;o=b.regex.exec(t);){const h=o[1].trim();if(s=c(h),s===void 0)if(typeof u=="function"){const m=u(t,o,i);s=ke(m)?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,h))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),s="";else!ke(s)&&!this.useRawValueToEscape&&(s=Lp(s));const g=b.safeValue(s);if(t=t.replace(o[0],g),f?(b.regex.lastIndex+=s.length,b.regex.lastIndex-=o[0].length):b.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,s);const b=p.match(/'/g),h=p.match(/"/g);(b&&b.length%2===0&&!h||h.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${p}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!ke(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&!ke(o))return o;ke(o)||(o=Lp(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const uT=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Vi=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(Ka(r),i),t[s]=a),a(n)}};class dT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Yn.create("formatter"),this.options=t,this.formats={number:Vi((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Vi((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Vi((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Vi((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Vi((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Vi(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:u}=uT(l);if(this.formats[c]){let f=a;try{const p=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},b=p.locale||p.lng||i.locale||i.lng||r;f=this.formats[c](a,b,{...u,...i,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}const fT=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class pT extends Il{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Yn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;n.forEach(f=>{const p=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,u=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{GC(l.loaded,[o],s),fT(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ke(t)&&(t=this.languageUtils.toResolveHierarchy(t)),ke(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}else c(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const Vp=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),ke(e[1])&&(t.defaultValue=e[1]),ke(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Wp=e=>(ke(e.ns)&&(e.ns=[e.ns]),ke(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ke(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ga=()=>{},hT=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class fs extends Il{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Wp(t),this.services={},this.logger=Yn,this.modules={external:[]},hT(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(ke(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Vp();this.options={...i,...this.options,...Wp(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Yn.init(o(this.modules.logger),this.options):Yn.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=dT);const f=new Up(this.options);this.store=new jp(this.options.resources,this.options);const p=this.services;p.logger=Yn,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new lT(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=o(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new cT(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new pT(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(b){for(var h=arguments.length,g=new Array(h>1?h-1:0),m=1;m<h;m++)g[m-1]=arguments[m];t.emit(b,...g)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Qa(this.services,this.options),this.translator.on("*",function(b){for(var h=arguments.length,g=new Array(h>1?h-1:0),m=1;m<h;m++)g[m-1]=arguments[m];t.emit(b,...g)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ga),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=$o(),c=()=>{const u=(f,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),r(f,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ga;const i=ke(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=$o();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ga),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Wm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=$o();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=ke(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),f=2;f<c;f++)u[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([s,a].concat(u))}else l={...a};l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const p=i.options.keySeparator||".";let b;return l.keyPrefix&&Array.isArray(s)?b=s.map(h=>`${l.keyPrefix}${p}${h}`):b=l.keyPrefix?`${l.keyPrefix}${p}${s}`:s,i.t(b,l)};return ke(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=$o();return this.options.ns?(ke(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$o();ke(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Up(Vp());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new fs(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ga;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new fs(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new jp(this.store.data,i),o.services.resourceStore=o.store),o.translator=new Qa(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];o.emit(a,...c)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const at=fs.createInstance();at.createInstance=fs.createInstance;at.createInstance;at.dir;at.init;at.loadResources;at.reloadResources;at.use;at.changeLanguage;at.getFixedT;at.t;at.exists;at.setDefaultNamespace;at.hasLoadedNamespace;at.loadNamespaces;at.loadLanguages;const gT={language:"Language",language_switch_label:"Language",language_en:"English",language_de:"German",language_es:"Spanish",source_url:"URL overridden",source_user:"Custom selected",source_navigator:"Browser setting",source_default:"Default locale",reset:"Reset",logout:"Logout"},mT={language:"Sprache",language_switch_label:"Sprache",language_en:"Englisch",language_de:"Deutsch",language_es:"Spanisch",source_url:"URL-Override",source_user:"Durch Benutzer ausgewählt",source_navigator:"Browser-Einstellung",source_default:"Standard-Sprache",reset:"Zurücksetzen",logout:"Abmelden"},yT={language:"Idioma",language_switch_label:"Idioma",language_en:"Inglés",language_de:"Alemán",language_es:"Español",source_url:"URL sobrescrita",source_user:"Seleccionado manualmente",source_navigator:"Configuración del navegador",source_default:"Idioma predeterminado",reset:"Restablecer",logout:"Cerrar sesión"},bT={title:"Digital Quality and Accessibility",ready_title:"Ready to Analyze",ready_body:'Click "Run Quality Check" to analyze the current page for accessibility and quality issues.',run_quality_check:"Run Quality Check",analyzing:"Analyzing...",access_denied:"Access Denied",config_required:"Configuration Required",auth_error:"Authentication Error",close:"Close",close_sidebar:"Close sidebar",fab_tooltip:"DQM Quality Analysis",ai_settings:"AI Assistant",ai_backend_api:"ChatGPT (API)",summary_label:"Summary",summary_stats:"AI stats – attempts: {{attempts}}, empty: {{empty}}, mode: {{mode}}, duration: {{duration}}ms",openai_info:"Uses an OpenAI-compatible Chat Completions API. A browser call usually requires a CORS-enabled proxy.",openai_model:"OpenAI model",openai_base_url:"OpenAI base URL",openai_api_key:"OpenAI API key",openai_missing_key:"OpenAI API key is missing.",translation_enable:"Auto-translate DQM results",summary_enable:"AI summary card",ai_model_hint:"Model choice affects translation and summary quality/speed.",ai_cache_clear:"Clear AI cache",translation_not_needed:"UI language is English; translation is not needed.",translation_target_lang:"Target language: {{lang}}",translation_when:"AI features run automatically after an analysis completes, when you change the UI language, or when you enable them here.",ai_limitations:"AI can be wrong or hallucinate – please verify results.",summary_api_only:"AI features use ChatGPT (API) for translation and summaries.",summary_disclaimer:"Note: Summaries may contain errors or hallucinations. Please verify.",translation_full_power:"Full translation (may take longer)",translation_model:"Model: {{model}}",translation_downloading:"Initializing AI…",translation_translating:"Translating results…",translation_progress:"{{done}} / {{total}} checkpoints",translation_ready:"Translation is ready.",translation_partial:"Translation stopped early to keep performance snappy. Some items remain untranslated.",translation_incomplete:"Some items could not be translated reliably and remain unchanged.",translation_restart:"Translate missing items",summary_restart:"Restart summary",summary_title:"AI Summary",summary_regenerate:"Regenerate",summary_generating:"Generating summary…",summary_failed:"Summary failed",summary_empty:"No summary available yet.",summary_disabled:"Enable the AI summary in the AI Assistant settings to get an executive overview of the most important issues.",overall_quality:"Overall Quality",passed:"Passed",failed:"Failed",show_all_errors:"Show Page with all Errors",quality_breakdown:"Quality Breakdown",all_passed:"All Passed",x_of_y_passed:"{{passed}} of {{total}} passed",percent_passed:"{{percent}}% passed",failed_checkpoints:"Failed Checkpoints",filter_by_category:"Filter by Category",showing_categories:"Showing {{count}} of {{total}} categories",showing_all_categories:"Showing all of {{total}} categories",show_all:"Show All",view_in_browser:"View in Browser",view_source:"View Source",analysis_failed:"Analysis Failed",retry:"Retry",no_highlighted_content:"No highlighted content available.",failed_load_browser:"Failed to load browser view. Please try again.",loading_views:"Loading both views...",highlighted_errors:"Highlighted Errors",browser_view:"Browser View",source_view:"Source View",x_of_y:"{{current}} of {{total}}",prev_highlight:"Previous highlight",next_highlight:"Next highlight",reload_highlights:"Reload highlights",open_in_new_tab:"Open in new tab",enable_js:"Enable JavaScript",disable_js:"Disable JavaScript",no_source_content:"No source content available for this checkpoint.",failed_load_all_errors:"Failed to load page with all errors. Please try again.",failed_load_highlights:"Failed to load highlighted content. Please try again.",failed_load_source:"Failed to load source view. Please try again.",dqm_disabled:"DQM is disabled. Permission denied.",dqm_not_configured:"DQM is not configured. Please provide API credentials via props, localStorage, or configure an authentication backend."},wT={title:"Digitale Qualität und Barrierefreiheit",ready_title:"Bereit für Analyse",ready_body:'Klicken Sie auf "Qualitätsprüfung starten", um die aktuelle Seite auf Barrierefreiheits- und Qualitätsprobleme zu prüfen.',run_quality_check:"Qualitätsprüfung starten",analyzing:"Analyse läuft...",access_denied:"Zugriff verweigert",config_required:"Konfiguration erforderlich",auth_error:"Authentifizierungsfehler",close:"Schließen",close_sidebar:"Seitenleiste schließen",fab_tooltip:"DQM Qualitätsanalyse",ai_settings:"KI-Assistent",ai_backend_api:"ChatGPT (API)",summary_label:"Zusammenfassung",summary_stats:"KI-Statistik – Versuche: {{attempts}}, leer: {{empty}}, Modus: {{mode}}, Dauer: {{duration}}ms",openai_info:"Nutzt eine OpenAI-kompatible Chat-Completions-API. Ein Browser-Aufruf benötigt meist einen CORS-fähigen Proxy.",openai_model:"OpenAI-Modell",openai_base_url:"OpenAI Base-URL",openai_api_key:"OpenAI API-Key",openai_missing_key:"OpenAI API-Key fehlt.",translation_enable:"DQM-Ergebnisse automatisch übersetzen",summary_enable:"KI-Zusammenfassung",ai_model_hint:"Die Modellauswahl beeinflusst Übersetzung und Zusammenfassung (Qualität/Tempo).",ai_cache_clear:"KI-Cache löschen",translation_not_needed:"Die UI-Sprache ist Englisch; eine Übersetzung ist nicht nötig.",translation_target_lang:"Zielsprache: {{lang}}",translation_when:"KI-Funktionen laufen automatisch nach Abschluss der Analyse, beim Wechsel der UI-Sprache oder sobald Sie sie hier aktivieren.",ai_limitations:"KI kann sich irren oder halluzinieren – bitte Ergebnisse prüfen.",summary_api_only:"KI-Funktionen nutzen ChatGPT (API) für Übersetzungen und Zusammenfassungen.",summary_disclaimer:"Hinweis: Zusammenfassungen können Fehler oder Halluzinationen enthalten. Bitte fachlich prüfen.",translation_full_power:"Vollständige Übersetzung (kann länger dauern)",translation_model:"Modell: {{model}}",translation_downloading:"KI wird initialisiert…",translation_translating:"Ergebnisse werden übersetzt…",translation_progress:"{{done}} / {{total}} Prüfpunkte",translation_ready:"Übersetzung ist bereit.",translation_partial:"Die Übersetzung wurde vorzeitig beendet, um die Performance hoch zu halten. Einige Inhalte bleiben unübersetzt.",translation_incomplete:"Einige Inhalte konnten nicht zuverlässig übersetzt werden und bleiben unverändert.",translation_restart:"Fehlende Übersetzungen nachholen",summary_restart:"Zusammenfassung neu starten",summary_title:"KI-Zusammenfassung",summary_regenerate:"Neu generieren",summary_generating:"Zusammenfassung wird erstellt…",summary_failed:"Zusammenfassung fehlgeschlagen",summary_empty:"Noch keine Zusammenfassung verfügbar.",summary_disabled:"Aktivieren Sie die KI-Zusammenfassung in den KI-Assistent-Einstellungen, um eine kompakte Übersicht der wichtigsten Punkte zu erhalten.",overall_quality:"Gesamtqualität",passed:"Bestanden",failed:"Fehlgeschlagen",show_all_errors:"Seite mit allen Fehlern anzeigen",quality_breakdown:"Qualitätsübersicht",all_passed:"Alle bestanden",x_of_y_passed:"{{passed}} von {{total}} bestanden",percent_passed:"{{percent}}% bestanden",failed_checkpoints:"Fehlgeschlagene Prüfpunkte",filter_by_category:"Nach Kategorie filtern",showing_categories:"{{count}} von {{total}} Kategorien angezeigt",showing_all_categories:"Alle {{total}} Kategorien angezeigt",show_all:"Alle anzeigen",view_in_browser:"Im Browser anzeigen",view_source:"Quellcode anzeigen",analysis_failed:"Analyse fehlgeschlagen",retry:"Wiederholen",no_highlighted_content:"Keine hervorgehobenen Inhalte verfügbar.",failed_load_browser:"Browseransicht konnte nicht geladen werden. Bitte erneut versuchen.",loading_views:"Beide Ansichten werden geladen...",highlighted_errors:"Hervorgehobene Fehler",browser_view:"Browseransicht",source_view:"Quellansicht",x_of_y:"{{current}} von {{total}}",prev_highlight:"Vorheriger Fehler",next_highlight:"Nächster Fehler",reload_highlights:"Hervorhebungen neu laden",open_in_new_tab:"In neuem Tab öffnen",enable_js:"JavaScript aktivieren",disable_js:"JavaScript deaktivieren",no_source_content:"Kein Quellcode für diesen Prüfpunkt verfügbar.",failed_load_all_errors:"Seite mit allen Fehlern konnte nicht geladen werden. Bitte erneut versuchen.",failed_load_highlights:"Hervorgehobene Inhalte konnten nicht geladen werden. Bitte erneut versuchen.",failed_load_source:"Quellansicht konnte nicht geladen werden. Bitte erneut versuchen.",dqm_disabled:"DQM ist deaktiviert. Zugriff verweigert.",dqm_not_configured:"DQM ist nicht konfiguriert. Bitte geben Sie API-Zugangsdaten über Props, localStorage oder ein Authentifizierungs-Backend an."},_T={title:"Calidad digital y accesibilidad",ready_title:"Listo para analizar",ready_body:'Haz clic en "Ejecutar comprobación de calidad" para analizar la página actual en busca de problemas de accesibilidad y calidad.',run_quality_check:"Ejecutar comprobación de calidad",analyzing:"Analizando...",access_denied:"Acceso denegado",config_required:"Configuración requerida",auth_error:"Error de autenticación",close:"Cerrar",close_sidebar:"Cerrar barra lateral",fab_tooltip:"Análisis de calidad DQM",ai_settings:"Asistente de IA",ai_backend_api:"ChatGPT (API)",summary_label:"Resumen",summary_stats:"Estadísticas IA – intentos: {{attempts}}, vacías: {{empty}}, modo: {{mode}}, duración: {{duration}}ms",openai_info:"Usa una API compatible con OpenAI Chat Completions. Normalmente, una llamada desde el navegador requiere un proxy con CORS.",openai_model:"Modelo de OpenAI",openai_base_url:"URL base de OpenAI",openai_api_key:"Clave API de OpenAI",openai_missing_key:"Falta la clave API de OpenAI.",translation_enable:"Traducir automáticamente los resultados de DQM",summary_enable:"Tarjeta de resumen de IA",ai_model_hint:"La elección del modelo afecta la traducción y el resumen (calidad/velocidad).",ai_cache_clear:"Borrar caché de IA",translation_not_needed:"El idioma de la interfaz es inglés; no es necesario traducir.",translation_target_lang:"Idioma de destino: {{lang}}",translation_when:"Las funciones de IA se ejecutan automáticamente al finalizar un análisis, al cambiar el idioma de la UI o al activarlas aquí.",ai_limitations:"La IA puede equivocarse o alucinar; verifica los resultados.",summary_api_only:"Las funciones de IA utilizan ChatGPT (API) para traducciones y resúmenes.",summary_disclaimer:"Nota: los resúmenes pueden contener errores o alucinaciones. Verifica el contenido.",translation_full_power:"Traducción completa (puede tardar más)",translation_model:"Modelo: {{model}}",translation_downloading:"Inicializando IA…",translation_translating:"Traduciendo resultados…",translation_progress:"{{done}} / {{total}} checkpoints",translation_ready:"La traducción está lista.",translation_partial:"La traducción se detuvo antes para mantener un buen rendimiento. Algunos elementos quedan sin traducir.",translation_incomplete:"Algunos elementos no se pudieron traducir de forma fiable y permanecen sin cambios.",translation_restart:"Traducir elementos faltantes",summary_restart:"Reiniciar resumen",summary_title:"Resumen de IA",summary_regenerate:"Regenerar",summary_generating:"Generando resumen…",summary_failed:"Falló el resumen",summary_empty:"Aún no hay resumen disponible.",summary_disabled:"Activa el resumen de IA en los ajustes del asistente para obtener una visión general de los puntos más importantes.",overall_quality:"Calidad general",passed:"Aprobado",failed:"Fallido",show_all_errors:"Mostrar página con todos los errores",quality_breakdown:"Desglose de calidad",all_passed:"Todo aprobado",x_of_y_passed:"{{passed}} de {{total}} aprobados",percent_passed:"{{percent}}% aprobados",failed_checkpoints:"Checkpoints fallidos",filter_by_category:"Filtrar por categoría",showing_categories:"Mostrando {{count}} de {{total}} categorías",showing_all_categories:"Mostrando todas las {{total}} categorías",show_all:"Mostrar todo",view_in_browser:"Ver en el navegador",view_source:"Ver fuente",analysis_failed:"El análisis falló",retry:"Reintentar",no_highlighted_content:"No hay contenido resaltado disponible.",failed_load_browser:"No se pudo cargar la vista del navegador. Inténtalo de nuevo.",loading_views:"Cargando ambas vistas...",highlighted_errors:"Errores resaltados",browser_view:"Vista del navegador",source_view:"Vista de fuente",x_of_y:"{{current}} de {{total}}",prev_highlight:"Resaltado anterior",next_highlight:"Siguiente resaltado",reload_highlights:"Recargar resaltados",open_in_new_tab:"Abrir en una pestaña nueva",enable_js:"Habilitar JavaScript",disable_js:"Deshabilitar JavaScript",no_source_content:"No hay contenido de fuente disponible para este checkpoint.",failed_load_all_errors:"No se pudo cargar la página con todos los errores. Inténtalo de nuevo.",failed_load_highlights:"No se pudo cargar el contenido resaltado. Inténtalo de nuevo.",failed_load_source:"No se pudo cargar la vista de fuente. Inténtalo de nuevo.",dqm_disabled:"DQM está deshabilitado. Permiso denegado.",dqm_not_configured:"DQM no está configurado. Proporciona credenciales de API vía props, localStorage o configura un backend de autenticación."},vT={heading:"DQM Authentication",subheading:"Please authenticate to access quality analysis",enter_credentials:"Enter credentials directly",website_id:"Website ID",website_id_helper:"Your website identifier",api_key:"API Key",api_key_helper:"Your Crownpeak DQM API key",continue:"Continue",or:"OR",login_backend:"Login with Backend Session",no_credentials:"Don't have credentials?",get_started:"Get started with Crownpeak DQM",errors:{missing_fields:"Please enter both API Key and Website ID",non_ascii_key:"API key contains non-ASCII characters",backend_missing:"Backend URL not configured",failed_redirect:"Failed to redirect to login page"}},ST={heading:"DQM-Authentifizierung",subheading:"Bitte authentifizieren Sie sich für die Qualitätsanalyse",enter_credentials:"Zugangsdaten direkt eingeben",website_id:"Website-ID",website_id_helper:"Ihre Website-Kennung",api_key:"API-Schlüssel",api_key_helper:"Ihr Crownpeak DQM API-Schlüssel",continue:"Weiter",or:"ODER",login_backend:"Mit Backend-Sitzung anmelden",no_credentials:"Keine Zugangsdaten?",get_started:"Jetzt mit Crownpeak DQM starten",errors:{missing_fields:"Bitte API-Schlüssel und Website-ID eingeben",non_ascii_key:"API-Schlüssel enthält Nicht-ASCII-Zeichen",backend_missing:"Backend-URL nicht konfiguriert",failed_redirect:"Weiterleitung zur Login-Seite fehlgeschlagen"}},ET={heading:"Autenticación DQM",subheading:"Autentícate para acceder al análisis de calidad",enter_credentials:"Introducir credenciales directamente",website_id:"ID del sitio web",website_id_helper:"Tu identificador de sitio web",api_key:"Clave API",api_key_helper:"Tu clave API de Crownpeak DQM",continue:"Continuar",or:"O",login_backend:"Iniciar sesión con sesión del backend",no_credentials:"¿No tienes credenciales?",get_started:"Comienza con Crownpeak DQM",errors:{missing_fields:"Introduce tanto la clave API como el ID del sitio web",non_ascii_key:"La clave API contiene caracteres no ASCII",backend_missing:"La URL del backend no está configurada",failed_redirect:"No se pudo redirigir a la página de inicio de sesión"}},xT={login_title:"DQM Widget Test",login_subtitle:"Enter your DQM credentials to view the landing page",login_website_id:"Website ID",login_api_key:"DQM API Key",login_cta:"View Landing Page",hero_title:"Your Digital Quality Command Center",hero_subtitle:"Run accessibility and quality checks in seconds with guided highlights and actionable remediation steps.",hero_cta:"Run a Demo Scan",features_title:"Everything you need to ship accessible experiences",feature1_title:"One-click quality scans",feature1_body:"Trigger Crownpeak DQM analysis directly from your page without leaving your workflow.",feature2_title:"Guided remediation",feature2_body:"Jump to highlighted issues with source and browser views for faster fixes.",feature3_title:"Team-ready insights",feature3_body:"Share actionable reports, trends, and checkpoints with your team.",stats_title:"Trusted by teams everywhere",stat_active_customers:"Active customers",stat_uptime:"Uptime guarantee",stat_countries:"Countries served",stat_support:"Expert support",testimonials_title:"What teams are saying",testimonial1_quote:"The DQM sidebar cut our accessibility triage time in half. Highlights and source view are game changers.",testimonial1_name:"Jordan Lee",testimonial1_title:"Lead Accessibility Engineer, Northwind",testimonial2_quote:"We finally have a repeatable process to ship compliant pages. The guided navigation keeps everyone aligned.",testimonial2_name:"Priya Desai",testimonial2_title:"Digital Experience Manager, Fabrikam",testimonial3_quote:"Fast, reliable, and easy to roll out across teams. DQM makes quality measurable.",testimonial3_name:"Alex Müller",testimonial3_title:"Product Director, Contoso",pricing_title:"Simple, transparent pricing",pricing_subtitle:"Choose the plan that works best for your team",plan_starter:"Starter",plan_starter_feat1:"10 GB storage",plan_starter_feat2:"100 GB bandwidth",plan_starter_feat3:"Email support",plan_starter_feat4:"99.9% uptime",plan_cta_outline:"Get started",plan_badge_popular:"Popular",plan_pro:"Professional",plan_pro_feat1:"100 GB storage",plan_pro_feat2:"1 TB bandwidth",plan_pro_feat3:"Priority support",plan_pro_feat4:"99.99% uptime",plan_pro_feat5:"Advanced analytics",plan_cta_primary:"Get started",plan_enterprise:"Enterprise",plan_enterprise_price:"Custom",plan_ent_feat1:"Unlimited storage",plan_ent_feat2:"Unlimited bandwidth",plan_ent_feat3:"24/7 phone support",plan_ent_feat4:"99.99% uptime SLA",plan_ent_feat5:"Dedicated manager",plan_cta_contact:"Contact Sales",cta_title:"Ready to get started?",cta_subtitle:"Join thousands of companies already using Cloudify. No credit card required.",cta_button:"Start your free trial",footer_brand:"Cloudify",footer_tagline:"Modern cloud infrastructure for the next generation of applications.",footer_icon_speed:"Performance insights",footer_icon_security:"Security highlights",footer_icon_growth:"Growth metrics",footer_col_product:"Product",footer_col_company:"Company",footer_col_resources:"Resources",footer_col_support:"Support",footer_link_features:"Features",footer_link_pricing:"Pricing",footer_link_integrations:"Integrations",footer_link_docs:"Documentation",footer_link_contact:"Contact Us",footer_link_about:"About",footer_link_blog:"Blog",footer_link_careers:"Careers",footer_link_press:"Press",footer_link_presskit:"Press Kit",footer_link_faq:"FAQ",footer_link_guides:"Guides",footer_link_api:"API Docs",footer_link_community:"Community",footer_link_status:"Status",footer_link_help:"Help Center",footer_link_terms:"Terms of Service",footer_link_privacy:"Privacy Policy",footer_link_cookies:"Cookie Policy",footer_copyright:"© 2025 Cloudify. All rights reserved. |",editor_title:"HTML Editor",debug_mode:"Debug Mode Active",debug_desc:"The DQM Widget will analyze the custom HTML from the editor instead of the page content. Your HTML is automatically saved to IndexedDB.",tab_editor:"HTML Editor",tab_preview:"Preview",loading_html:"Loading HTML from IndexedDB...",reset_default:"Reset to Default",preview_html:"Preview HTML",auto_saved:"Auto-saved to IndexedDB",close:"Close",analyze_custom_html:"Analyze Custom HTML"},CT={login_title:"DQM Widget Test",login_subtitle:"Geben Sie Ihre DQM-Zugangsdaten ein, um die Landing Page zu sehen",login_website_id:"Website-ID",login_api_key:"DQM API-Schlüssel",login_cta:"Landing Page anzeigen",hero_title:"Ihr Command Center für digitale Qualität",hero_subtitle:"Führen Sie Barrierefreiheits- und Qualitätschecks in Sekunden durch – mit geführten Highlights und klaren Handlungsschritten.",hero_cta:"Demo-Scan starten",features_title:"Alles für barrierefreie Erlebnisse",feature1_title:"Qualitätschecks mit einem Klick",feature1_body:"Starten Sie Crownpeak DQM direkt von der Seite aus, ohne den Workflow zu verlassen.",feature2_title:"Geführte Behebung",feature2_body:"Springen Sie zu markierten Problemen mit Quell- und Browseransicht für schnellere Fixes.",feature3_title:"Teamfähige Insights",feature3_body:"Teilen Sie Berichte, Trends und Checkpoints mit Ihrem Team.",stats_title:"Vertrauen von Teams weltweit",stat_active_customers:"Aktive Kunden",stat_uptime:"Verfügbarkeitsgarantie",stat_countries:"Länder im Einsatz",stat_support:"Experten-Support",testimonials_title:"Das sagen Teams",testimonial1_quote:"Die DQM-Sidebar hat unsere Accessibility-Triage halbiert. Highlights und Quellansicht sind ein Game Changer.",testimonial1_name:"Jordan Lee",testimonial1_title:"Lead Accessibility Engineer, Northwind",testimonial2_quote:"Endlich ein reproduzierbarer Prozess für konforme Seiten. Die geführte Navigation hält alle auf Kurs.",testimonial2_name:"Priya Desai",testimonial2_title:"Digital Experience Manager, Fabrikam",testimonial3_quote:"Schnell, zuverlässig und leicht auszurollen. DQM macht Qualität messbar.",testimonial3_name:"Alex Müller",testimonial3_title:"Product Director, Contoso",pricing_title:"Einfache, transparente Preise",pricing_subtitle:"Wählen Sie den passenden Plan für Ihr Team",plan_starter:"Starter",plan_starter_feat1:"10 GB Speicher",plan_starter_feat2:"100 GB Bandbreite",plan_starter_feat3:"E-Mail-Support",plan_starter_feat4:"99,9 % Verfügbarkeit",plan_cta_outline:"Jetzt starten",plan_badge_popular:"Beliebt",plan_pro:"Professional",plan_pro_feat1:"100 GB Speicher",plan_pro_feat2:"1 TB Bandbreite",plan_pro_feat3:"Priorisierter Support",plan_pro_feat4:"99,99 % Verfügbarkeit",plan_pro_feat5:"Erweiterte Analysen",plan_cta_primary:"Jetzt starten",plan_enterprise:"Enterprise",plan_enterprise_price:"Individuell",plan_ent_feat1:"Unbegrenzter Speicher",plan_ent_feat2:"Unbegrenzte Bandbreite",plan_ent_feat3:"24/7 Telefon-Support",plan_ent_feat4:"99,99 % SLA",plan_ent_feat5:"Dedizierter Manager",plan_cta_contact:"Vertrieb kontaktieren",cta_title:"Bereit zum Start?",cta_subtitle:"Schließen Sie sich Tausenden Unternehmen an, die bereits Cloudify nutzen. Keine Kreditkarte erforderlich.",cta_button:"Kostenlosen Test starten",footer_brand:"Cloudify",footer_tagline:"Moderne Cloud-Infrastruktur für die nächste Generation von Anwendungen.",footer_icon_speed:"Performance-Insights",footer_icon_security:"Sicherheits-Highlights",footer_icon_growth:"Wachstumsmetriken",footer_col_product:"Produkt",footer_col_company:"Unternehmen",footer_col_resources:"Ressourcen",footer_col_support:"Support",footer_link_features:"Funktionen",footer_link_pricing:"Preise",footer_link_integrations:"Integrationen",footer_link_docs:"Dokumentation",footer_link_contact:"Kontakt",footer_link_about:"Über uns",footer_link_blog:"Blog",footer_link_careers:"Karriere",footer_link_press:"Presse",footer_link_presskit:"Pressekit",footer_link_faq:"FAQ",footer_link_guides:"Leitfäden",footer_link_api:"API-Dokumentation",footer_link_community:"Community",footer_link_status:"Status",footer_link_help:"Hilfecenter",footer_link_terms:"Nutzungsbedingungen",footer_link_privacy:"Datenschutz",footer_link_cookies:"Cookie-Richtlinie",footer_copyright:"© 2025 Cloudify. Alle Rechte vorbehalten. |",editor_title:"HTML-Editor",debug_mode:"Debug-Modus aktiv",debug_desc:"Das DQM-Widget analysiert den benutzerdefinierten HTML-Code aus dem Editor anstelle des Seiteninhalts. Ihr HTML wird automatisch in IndexedDB gespeichert.",tab_editor:"HTML-Editor",tab_preview:"Vorschau",loading_html:"HTML wird aus IndexedDB geladen...",reset_default:"Auf Standard zurücksetzen",preview_html:"HTML ansehen",auto_saved:"Automatisch in IndexedDB gespeichert",close:"Schließen",analyze_custom_html:"Benutzerdefiniertes HTML analysieren"},TT={login_title:"Prueba del widget DQM",login_subtitle:"Introduce tus credenciales de DQM para ver la página de destino",login_website_id:"ID del sitio web",login_api_key:"Clave API de DQM",login_cta:"Ver página de destino",hero_title:"Tu centro de mando de calidad digital",hero_subtitle:"Ejecuta comprobaciones de accesibilidad y calidad en segundos con resaltados guiados y pasos de corrección accionables.",hero_cta:"Ejecutar un escaneo de demostración",features_title:"Todo lo que necesitas para publicar experiencias accesibles",feature1_title:"Escaneos de calidad con un clic",feature1_body:"Dispara el análisis de Crownpeak DQM directamente desde tu página sin salir de tu flujo de trabajo.",feature2_title:"Corrección guiada",feature2_body:"Ve a los problemas resaltados con vistas de fuente y navegador para corregir más rápido.",feature3_title:"Información lista para el equipo",feature3_body:"Comparte informes accionables, tendencias y checkpoints con tu equipo.",stats_title:"Confiado por equipos en todas partes",stat_active_customers:"Clientes activos",stat_uptime:"Garantía de disponibilidad",stat_countries:"Países atendidos",stat_support:"Soporte experto",testimonials_title:"Lo que dicen los equipos",testimonial1_quote:"La barra lateral de DQM redujo nuestro tiempo de triaje de accesibilidad a la mitad. Los resaltados y la vista de fuente son clave.",testimonial1_name:"Jordan Lee",testimonial1_title:"Ingeniero/a líder de accesibilidad, Northwind",testimonial2_quote:"Por fin tenemos un proceso repetible para publicar páginas conformes. La navegación guiada mantiene a todos alineados.",testimonial2_name:"Priya Desai",testimonial2_title:"Gerente de experiencia digital, Fabrikam",testimonial3_quote:"Rápido, fiable y fácil de desplegar en equipos. DQM hace la calidad medible.",testimonial3_name:"Alex Müller",testimonial3_title:"Director/a de producto, Contoso",pricing_title:"Precios simples y transparentes",pricing_subtitle:"Elige el plan que funcione para tu equipo",plan_starter:"Inicial",plan_starter_feat1:"10 GB de almacenamiento",plan_starter_feat2:"100 GB de ancho de banda",plan_starter_feat3:"Soporte por email",plan_starter_feat4:"99.9% de disponibilidad",plan_cta_outline:"Comenzar",plan_badge_popular:"Popular",plan_pro:"Profesional",plan_pro_feat1:"100 GB de almacenamiento",plan_pro_feat2:"1 TB de ancho de banda",plan_pro_feat3:"Soporte prioritario",plan_pro_feat4:"99.99% de disponibilidad",plan_pro_feat5:"Analítica avanzada",plan_cta_primary:"Comenzar",plan_enterprise:"Empresarial",plan_enterprise_price:"Personalizado",plan_ent_feat1:"Almacenamiento ilimitado",plan_ent_feat2:"Ancho de banda ilimitado",plan_ent_feat3:"Soporte telefónico 24/7",plan_ent_feat4:"SLA de 99.99% de disponibilidad",plan_ent_feat5:"Gerente dedicado",plan_cta_contact:"Contactar ventas",cta_title:"¿Listo para empezar?",cta_subtitle:"Únete a miles de empresas que ya usan Cloudify. No se requiere tarjeta de crédito.",cta_button:"Comenzar prueba gratuita",footer_brand:"Cloudify",footer_tagline:"Infraestructura moderna para la próxima generación de aplicaciones.",footer_icon_speed:"Información de rendimiento",footer_icon_security:"Aspectos de seguridad",footer_icon_growth:"Métricas de crecimiento",footer_col_product:"Producto",footer_col_company:"Compañía",footer_col_resources:"Recursos",footer_col_support:"Soporte",footer_link_features:"Funciones",footer_link_pricing:"Precios",footer_link_integrations:"Integraciones",footer_link_docs:"Documentación",footer_link_contact:"Contáctanos",footer_link_about:"Acerca de",footer_link_blog:"Blog",footer_link_careers:"Carreras",footer_link_press:"Prensa",footer_link_presskit:"Kit de prensa",footer_link_faq:"Preguntas frecuentes",footer_link_guides:"Guías",footer_link_api:"Docs de API",footer_link_community:"Comunidad",footer_link_status:"Estado",footer_link_help:"Centro de ayuda",footer_link_terms:"Términos del servicio",footer_link_privacy:"Política de privacidad",footer_link_cookies:"Política de cookies",footer_copyright:"© 2025 Cloudify. Todos los derechos reservados. |",editor_title:"Editor HTML",debug_mode:"Modo de depuración activo",debug_desc:"El widget DQM analizará el HTML personalizado del editor en lugar del contenido de la página. Tu HTML se guarda automáticamente en IndexedDB.",tab_editor:"Editor HTML",tab_preview:"Vista previa",loading_html:"Cargando HTML desde IndexedDB...",reset_default:"Restablecer a valores predeterminados",preview_html:"Vista previa HTML",auto_saved:"Guardado automático en IndexedDB",close:"Cerrar",analyze_custom_html:"Analizar HTML personalizado"},Ya={en:{common:gT,sidebar:bT,auth:vT,demo:xT},de:{common:mT,sidebar:wT,auth:ST,demo:CT},es:{common:yT,sidebar:_T,auth:ET,demo:TT}},Kp={"de-AT":"de","de-CH":"de","de-DE":"de","es-ES":"es","es-MX":"es","es-AR":"es","en-US":"en","en-GB":"en","en-AU":"en"},AT=e=>{if(e in Ya)return e;if(e in Kp)return Kp[e];const t=e.split("-")[0];return t in Ya?t:"en"};at.use(H0).init({resources:Ya,lng:Ei,fallbackLng:{"de-AT":["de","en"],"de-CH":["de","en"],"es-MX":["es","en"],"es-AR":["es","en"],default:["en"]},interpolation:{escapeValue:!1},defaultNS:"common",supportedLngs:Object.keys(Ya),load:"languageOnly"});const kT=()=>typeof window>"u"?{locale:Ei,source:"default",userOverride:!1}:vu(window.location.search,Hm(),navigator.language,Ei),Eu=kT();typeof window<"u"&&at.language!==Eu.locale&&at.changeLanguage(Eu.locale);const Km=On({name:"locale",initialState:Eu,reducers:{setResolvedLocale:(e,t)=>{const n=t.payload;e.locale=n.locale,e.source=n.source,e.userOverride=n.userOverride,n.userOverride?qi(n.locale):n.source!=="user"&&qi(null),at.language!==n.locale&&at.changeLanguage(n.locale)},setUserLocale:(e,t)=>{e.locale=t.payload,e.source="user",e.userOverride=!0,qi(t.payload),at.language!==t.payload&&at.changeLanguage(t.payload)},applyNavigatorLocale:e=>{if(typeof window>"u"||e.userOverride||e.source==="url")return;const t=vu(window.location.search,Hm(),navigator.language,Ei);e.locale=t.locale,e.source=t.source,e.userOverride=t.userOverride,t.userOverride?qi(t.locale):qi(null),at.language!==t.locale&&at.changeLanguage(t.locale)},resetLocale:e=>{if(typeof window>"u")return;qi(null);const t=vu(window.location.search,null,navigator.language,Ei);e.locale=t.locale,e.source=t.source,e.userOverride=t.userOverride,at.language!==t.locale&&at.changeLanguage(t.locale)}}}),{setResolvedLocale:A2,setUserLocale:RT,applyNavigatorLocale:OT,resetLocale:IT}=Km.actions,PT=Km.reducer,Gp={url:"common:source_url",user:"common:source_user",navigator:"common:source_navigator",default:"common:source_default"},NT=({index:e=1})=>{const{t}=kr(["common"]),r=D.useContext(xr)?.store,[i,o]=D.useState(()=>r?.getState()?.locale);D.useEffect(()=>r?(o(r.getState().locale),r.subscribe(()=>{o(r.getState().locale)})):void 0,[r]);const s=D.useMemo(()=>({en:t("common:language_en"),de:t("common:language_de"),es:t("common:language_es")}),[t]);if(!r||!i)return null;const{locale:a,source:l,userOverride:c}=i,u=g=>{r.dispatch(RT(g))},f=()=>{r.dispatch(IT()),r.dispatch(OT())},p=l==="url",b=Gp[l]??Gp.default,h=t(b);return M(Rx,{locale:a,isUrlControlled:p,userOverride:!!c,switchLabel:t("common:language_switch_label"),sourceLabel:h,localeLabels:s,onSelect:u,onReset:f,resetLabel:t("common:reset"),index:e})},dr=(e,t)=>{typeof window>"u"||localStorage.setItem(e,t)},ma=e=>{typeof window>"u"||localStorage.removeItem(e)},MT=({config:e,onAuthSuccess:t,onAuthError:n,initialError:r})=>{const{t:i}=kr(["auth","common"]),[o,s]=D.useState(""),[a,l]=D.useState(""),[c,u]=D.useState(!1),[f,p]=D.useState(r||null),b=!!e.authBackendUrl,h=!b,g=b;fe.debug("[DQMLogin] Component rendered",{config:e,initialError:r,error:f,hasBackendAuth:b,showDirectCredentials:h,showBackendLogin:g}),D.useEffect(()=>{if(!e.authBackendUrl)return;const A=new URLSearchParams(window.location.search),_=A.get("sessionToken"),x=A.get("websiteId");if(_&&x){fe.debug("[DQMLogin] 🎉 Found session token in URL, processing redirect"),typeof window<"u"&&e.useLocalStorage!==!1&&(dr("dqm_sessionToken",_),dr("dqm_websiteID",x),dr("dqm_sessionType","backend"),ma("dqm_apiKey"),fe.debug("[DQMLogin] Backend session saved to localStorage"));const d=window.location.origin+window.location.pathname;window.history.replaceState({},document.title,d),t({apiKey:"BACKEND_SESSION",websiteId:x,sessionToken:_,sessionType:"backend"})}},[e.authBackendUrl,e.useLocalStorage,t]);const m=async()=>{if(!o||!a){p(i("auth:errors.missing_fields"));return}u(!0),p(null);try{if(!/^[\x00-\x7F]*$/.test(o))throw new Error(i("auth:errors.non_ascii_key"));if(e.authBackendUrl){const A=await fetch(`${e.authBackendUrl}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({apiKey:o,websiteId:a})});if(!A.ok){const x=await A.json().catch(()=>({}));throw new Error(x.message||`Authentication failed: ${A.statusText}`)}const _=await A.json();if(!_.sessionToken)throw new Error("Invalid response from authentication backend - missing session token");typeof window<"u"&&e.useLocalStorage!==!1&&(dr("dqm_sessionToken",_.sessionToken),dr("dqm_sessionType","backend"),ma("dqm_apiKey"),ma("dqm_websiteID"),fe.debug("[DQMLogin] Backend session saved to localStorage")),t({apiKey:"BACKEND_SESSION",websiteId:_.websiteId||"BACKEND_SESSION",sessionToken:_.sessionToken,sessionType:"backend"})}else typeof window<"u"&&e.useLocalStorage!==!1&&(dr("dqm_apiKey",o),dr("dqm_websiteID",a),dr("dqm_sessionType","direct"),ma("dqm_sessionToken"),fe.debug("[DQMLogin] Direct credentials saved to localStorage")),t({apiKey:o,websiteId:a,sessionType:"direct"})}catch(A){const _=A instanceof Error?A.message:"Authentication failed";p(_),n(A instanceof Error?A:new Error(_))}finally{u(!1)}},E=()=>{if(!e.authBackendUrl){p(i("auth:errors.backend_missing"));return}u(!0),p(null);try{const A=window.location.href;typeof window<"u"&&e.useLocalStorage!==!1&&dr("dqm_return_url",A),fe.debug("[DQMLogin] 🔄 Redirecting to login page"),fe.debug("[DQMLogin] Return URL:",A);const _=new URL(`${e.authBackendUrl}/auth/login`);_.searchParams.set("returnUrl",A),window.location.href=_.toString()}catch(A){const _=A instanceof Error?A.message:i("auth:errors.failed_redirect");p(_),n(A instanceof Error?A:new Error(_)),u(!1)}};return ne(P.Box,{sx:{display:"flex",flexDirection:"column",gap:3,p:3,width:"100%"},children:[ne(P.Box,{sx:{textAlign:"center"},children:[M(gt.Lock,{sx:{fontSize:50,color:"#711bc1",mb:2}}),M(P.Typography,{variant:"h5",gutterBottom:!0,fontWeight:700,children:i("auth:heading")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:i("auth:subheading")})]}),f&&M(P.Alert,{severity:"error",onClose:()=>p(null),children:f}),h&&ne(P.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[M(P.Typography,{variant:"subtitle2",color:"text.secondary",children:i("auth:enter_credentials")}),M(P.TextField,{label:i("auth:website_id"),autoComplete:"username",value:a,onChange:A=>l(A.target.value),disabled:c,fullWidth:!0,required:!0,helperText:i("auth:website_id_helper")}),M(P.TextField,{label:i("auth:api_key"),type:"password",value:o,onChange:A=>s(A.target.value),disabled:c,fullWidth:!0,required:!0,helperText:i("auth:api_key_helper")}),M(P.Button,{variant:"outlined",onClick:m,disabled:c||!o||!a,fullWidth:!0,size:"large",children:c?M(P.CircularProgress,{size:24}):i("auth:continue")})]}),g&&h&&M(P.Divider,{children:i("auth:or")}),g&&M(P.Button,{variant:"contained",startIcon:M(gt.Login,{}),onClick:E,disabled:c,fullWidth:!0,size:"large",sx:{background:"linear-gradient(135deg, #711bc1 0%, #8e44d6 100%)","&:hover":{background:"linear-gradient(135deg, #5a0f9a 0%, #7339b8 100%)"}},children:c?M(P.CircularProgress,{size:24,color:"inherit"}):i("auth:login_backend")}),ne(P.Typography,{variant:"caption",color:"text.secondary",sx:{textAlign:"center"},children:[i("auth:no_credentials")," ",M(P.Link,{href:"https://www.crownpeak.com/firstspirit/products/digital-accessibility/digital-accessibility-and-quality-management-dqm/",target:"_blank",children:i("auth:get_started")})]})]})},DT={present:!1,rect:null,position:null,contentOffset:{top:0,bottom:0,left:0,right:0}};function LT(e){const t=window.innerWidth,n=window.innerHeight,r=e.width>=t*.9,i=e.height>=n*.9;if(r){if(e.top<=10)return"top";if(e.bottom>=n-10)return"bottom"}if(i){if(e.left<=10)return"left";if(e.right>=t-10)return"right"}return e.top<=10?"top":e.bottom>=n-10?"bottom":e.left<=10?"left":e.right>=t-10?"right":"center"}function $T(e,t){const n={top:0,bottom:0,left:0,right:0};switch(t){case"top":n.top=e.height;break;case"bottom":n.bottom=e.height;break;case"left":n.left=e.width;break;case"right":n.right=e.width;break}return n}function BT(e,t){return e.present!==t.present||e.position!==t.position?!1:e.rect===null&&t.rect===null?!0:e.rect===null||t.rect===null?!1:e.rect.height===t.rect.height&&e.rect.width===t.rect.width&&e.rect.top===t.rect.top&&e.rect.bottom===t.rect.bottom&&e.rect.left===t.rect.left&&e.rect.right===t.rect.right&&e.contentOffset.top===t.contentOffset.top&&e.contentOffset.bottom===t.contentOffset.bottom&&e.contentOffset.left===t.contentOffset.left&&e.contentOffset.right===t.contentOffset.right}function FT(e,t){const{root:n,check:r,pollMs:i=0}=t||{},o=D.useCallback(()=>{const c=(n??document).querySelector?.(e)??null;if(!(r?r(c):!!c)||!c)return DT;const f=c.getBoundingClientRect(),p=LT(f),b=$T(f,p);return{present:!0,rect:{height:f.height,width:f.width,top:f.top,bottom:f.bottom,left:f.left,right:f.right},position:p,contentOffset:b}},[n,e,r]),[s,a]=D.useState(()=>o());return D.useEffect(()=>{let l=null;const c=()=>{l!=null&&cancelAnimationFrame(l),l=requestAnimationFrame(()=>{const b=o();a(h=>BT(h,b)?h:b)})},u=n??document.documentElement,f=new MutationObserver(c);f.observe(u,{childList:!0,subtree:!0,attributes:!0}),c(),window.addEventListener("load",c),window.addEventListener("resize",c);let p=null;return i&&i>0&&(p=window.setInterval(c,i)),()=>{f.disconnect(),l!=null&&cancelAnimationFrame(l),p!=null&&clearInterval(p),window.removeEventListener("load",c),window.removeEventListener("resize",c)}},[o,n,i]),s}const Gm=e=>{const{selector:t,validateIframe:n=!0,pollMs:r=1e3,manualOffset:i}=e||{},o=t!=null&&t!=="",s=D.useCallback(l=>l?n&&l.tagName.toLowerCase()==="iframe"?!!l.contentWindow:!0:!1,[n]),a=FT(o?t:"__disabled__",o?{check:s,pollMs:r}:{pollMs:0});if(!o)return{present:!1,height:0,width:0,position:null,contentOffset:{top:0,bottom:0,left:0,right:0},isManualOffset:!1};if(!a.present)return{present:!1,height:0,width:0,position:null,contentOffset:{top:0,bottom:0,left:0,right:0},isManualOffset:!1};if(i){const l={top:0,bottom:0,left:0,right:0};return l[i.position]=i.pixels,{present:!0,height:i.position==="top"||i.position==="bottom"?i.pixels:0,width:i.position==="left"||i.position==="right"?i.pixels:0,position:i.position,contentOffset:l,isManualOffset:!0}}return{present:a.present,height:a.rect?.height??0,width:a.rect?.width??0,position:a.position,contentOffset:a.contentOffset,isManualOffset:!1}},Qm=D.createContext(null),Ym=()=>{const e=D.useContext(Qm);if(!e)throw new Error("useAI must be used within an AIProvider");return e},Jm=({children:e,translationConfig:t,summaryConfig:n})=>{const{i18n:r}=kr(),[i,o]=D.useState(()=>{if(typeof window>"u")return t?.enabledByDefault===!0;const O=st("dqm_translate_results_enabled");return O==null?t?.enabledByDefault===!0:O==="true"}),[s,a]=D.useState(()=>typeof window>"u"?"fast":st("dqm_translate_results_mode")==="full"?"full":"fast"),[l,c]=D.useState(!1),[u,f]=D.useState(()=>{if(typeof window>"u")return!0;const O=st("dqm_ai_summary_enabled");return O==="true"?!0:O!=="false"}),[p,b]=D.useState(()=>typeof window>"u"?"":st("dqm_openai_apiKey")??""),[h,g]=D.useState(()=>typeof window>"u"?"gpt-4.1-mini":st("dqm_openai_model")??"gpt-4.1-mini"),[m,E]=D.useState(()=>typeof window>"u"?"https://api.openai.com/v1":st("dqm_openai_baseUrl")??"https://api.openai.com/v1"),A=D.useCallback(O=>{o(O)},[]),_=D.useCallback(O=>{a(O)},[]),x=D.useCallback(O=>{f(O)},[]),d=D.useCallback(O=>{b(O)},[]),w=D.useCallback(O=>{g(O)},[]),S=D.useCallback(O=>{E(O)},[]);D.useEffect(()=>{typeof window>"u"||bn("dqm_translate_results_enabled",i?"true":"false")},[i]),D.useEffect(()=>{typeof window>"u"||bn("dqm_translate_results_mode",s)},[s]),D.useEffect(()=>{typeof window>"u"||bn("dqm_ai_summary_enabled",u?"true":"false")},[u]),D.useEffect(()=>{typeof window>"u"||bn("dqm_openai_apiKey",p)},[p]),D.useEffect(()=>{typeof window>"u"||bn("dqm_openai_model",h)},[h]),D.useEffect(()=>{typeof window>"u"||bn("dqm_openai_baseUrl",m)},[m]);const C=D.useMemo(()=>(r.language||"en").split("-")[0],[r.language]),R=C!=="en",k=u||i||C==="en",T=D.useMemo(()=>{const O=t?.computeBudgetMs??15e3;return s==="full"?12e4:O},[t?.computeBudgetMs,s]),y=D.useMemo(()=>h.trim()||"gpt-4.1-mini",[h]),I=D.useMemo(()=>({translationEnabled:i,setTranslationEnabled:A,translationMode:s,setTranslationMode:_,translationDialogOpen:l,setTranslationDialogOpen:c,summaryEnabled:u,setSummaryEnabled:x,openAiApiKey:p,setOpenAiApiKey:d,openAiModel:h,setOpenAiModel:w,openAiBaseUrl:m,setOpenAiBaseUrl:S,targetLang:C,translationNeeded:R,aiEnabled:k,computeBudgetMs:T,effectiveModelId:y,translationConfig:t,summaryConfig:n}),[i,A,s,_,l,u,x,p,d,h,w,m,S,C,R,k,T,y,t,n]);return M(Qm.Provider,{value:I,children:e})},Xm="dqm.ai.translationCache",jT=1,Zm=()=>typeof indexedDB<"u",zT=()=>new Promise((e,t)=>{if(!Zm()){e();return}const n=indexedDB.deleteDatabase(Xm);n.onsuccess=()=>e(),n.onerror=()=>t(n.error??new Error("Failed to delete IndexedDB")),n.onblocked=()=>t(new Error("IndexedDB deletion blocked by open connections"))}),UT=()=>new Promise((e,t)=>{const n=indexedDB.open(Xm,jT);n.onupgradeneeded=()=>{const r=n.result;r.objectStoreNames.contains("checkpoint")||r.createObjectStore("checkpoint",{keyPath:"key"}),r.objectStoreNames.contains("label")||r.createObjectStore("label",{keyPath:"key"})},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error??new Error("Failed to open IndexedDB"))}),ai=async(e,t,n)=>{const r=await UT();return await new Promise((i,o)=>{const s=r.transaction(e,t),a=s.objectStore(e);n(a).then(i).catch(o),s.oncomplete=()=>r.close(),s.onerror=()=>{o(s.error??new Error("IndexedDB transaction failed")),r.close()}})},li=e=>new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error??new Error("IndexedDB request failed"))}),Ja=e=>{let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")},Vo=(e,t,n)=>`checkpoint|${e}|${t}|${n}`,Qi=e=>Ja(JSON.stringify({name:e?.name??"",description:e?.description??"",category:e?.category??"",topics:e?.topics??[]})),Wi=(e,t,n,r)=>`label|${e}|${t}|${n}|${r}`,qT=()=>Zm()?{getCheckpointMany:async e=>e.length===0?new Map:await ai("checkpoint","readonly",async t=>{const n=await Promise.all(e.map(async r=>{const i=await li(t.get(r));return i?[r,i]:null}));return new Map(n.filter(r=>r!==null))}),putCheckpointMany:async e=>{e.length!==0&&await ai("checkpoint","readwrite",async t=>{await Promise.all(e.map(n=>li(t.put(n))))})},deleteCheckpointMany:async e=>{e.length!==0&&await ai("checkpoint","readwrite",async t=>{await Promise.all(e.map(n=>li(t.delete(n))))})},getLabelMany:async e=>e.length===0?new Map:await ai("label","readonly",async t=>{const n=await Promise.all(e.map(async r=>{const i=await li(t.get(r));return i?[r,i]:null}));return new Map(n.filter(r=>r!==null))}),putLabelMany:async e=>{e.length!==0&&await ai("label","readwrite",async t=>{await Promise.all(e.map(n=>li(t.put(n))))})},clearAll:async()=>{try{await zT()}catch{await ai("checkpoint","readwrite",async e=>{await li(e.clear())}),await ai("label","readwrite",async e=>{await li(e.clear())})}}}:{getCheckpointMany:async()=>new Map,putCheckpointMany:async()=>{},deleteCheckpointMany:async()=>{},getLabelMany:async()=>new Map,putLabelMany:async()=>{},clearAll:async()=>{}},ey=()=>{const e=D.useMemo(()=>qT(),[]),t=D.useMemo(()=>new Map,[]),[n,r]=D.useState(null),i=D.useCallback(async()=>{if(typeof navigator>"u"||!navigator.storage?.persisted){r(null);return}try{const a=await navigator.storage.persisted();r(typeof a=="boolean"?a:null)}catch{r(null)}},[]),o=D.useCallback(async()=>{await e.clearAll(),t.clear()},[t,e]),s=D.useCallback(()=>{t.clear()},[t]);return{cache:e,assetCache:t,storagePersisted:n,refreshStorageState:i,clearAll:o,clearAssetCache:s}},HT=e=>{const t=(e.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,""),n=e.model,r=e.apiKey;return{chatJson:async({system:i,user:o,maxTokens:s,schema:a,signal:l})=>{const c=a?`
|
|
113
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),g.warnIfExceeded()),h}}}function fa(e){return typeof e=="boolean"}var CC=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new Lm;if(n&&(fa(n)?s.push(gC):s.push(mC(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let a={};fa(r)||(a=r),s.unshift(EC(a))}if(i){let a={};fa(i)||(a=i),s.push(xC(a))}if(o){let a={};fa(o)||(a=o),s.unshift(_C(a))}}return s},Al="RTK_autoBatch",Bo=()=>e=>({payload:e,meta:{[Al]:!0}}),Np=e=>t=>{setTimeout(t,e)},TC=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Np(10):e.type==="callback"?e.queueNotification:Np(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const f=()=>i&&u(),p=r.subscribe(f);return a.add(u),()=>{p(),a.delete(u)}},dispatch(u){try{return i=!u?.meta?.[Al],o=!i,o&&(s||(s=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},AC=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Lm(e);return r&&i.push(TC(typeof r=="object"?r:void 0)),i};function kC(e){const t=CC(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(tr(n))l=Sm(n);else throw new Error(process.env.NODE_ENV==="production"?ze(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?ze(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?ze(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(g=>typeof g!="function"))throw new Error(process.env.NODE_ENV==="production"?ze(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let g=new Set;c.forEach(m=>{if(g.has(m))throw new Error(process.env.NODE_ENV==="production"?ze(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");g.add(m)})}let u=Ba;i&&(u=yC({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=Bx(...c),p=AC(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?ze(5):"`enhancers` field must be a callback");let b=typeof a=="function"?a(p):p();if(process.env.NODE_ENV!=="production"&&!Array.isArray(b))throw new Error(process.env.NODE_ENV==="production"?ze(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&b.some(g=>typeof g!="function"))throw new Error(process.env.NODE_ENV==="production"?ze(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!b.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const h=u(...b);return vm(l,s,h)}function zm(e){const t={},n=[];let r;const i={addCase(o,s){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?ze(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?ze(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a=typeof o=="string"?o:o.type;if(!a)throw new Error(process.env.NODE_ENV==="production"?ze(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error(process.env.NODE_ENV==="production"?ze(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=s,i},addAsyncThunk(o,s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?ze(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?ze(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?ze(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function RC(e){return typeof e=="function"}function OC(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?ze(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=zm(t),o;if(RC(e))o=()=>Pp(e());else{const a=Pp(e);o=()=>a}function s(a=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(an(u)){const b=f(u,l);return b===void 0?u:b}else{if(ln(u))return ks(u,p=>f(p,l));{const p=f(u,l);if(p===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return u},a)}return s.getInitialState=o,s}var Um=(e,t)=>Mm(e)?e.match(t):e(t);function Ar(...e){return t=>e.some(n=>Um(n,t))}function es(...e){return t=>e.every(n=>Um(n,t))}function kl(e,t){if(!e||!e.meta)return!1;const n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Rs(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function cd(...e){return e.length===0?t=>kl(t,["pending"]):Rs(e)?Ar(...e.map(t=>t.pending)):cd()(e[0])}function ao(...e){return e.length===0?t=>kl(t,["rejected"]):Rs(e)?Ar(...e.map(t=>t.rejected)):ao()(e[0])}function Rl(...e){const t=n=>n&&n.meta&&n.meta.rejectedWithValue;return e.length===0?es(ao(...e),t):Rs(e)?es(ao(...e),t):Rl()(e[0])}function Vr(...e){return e.length===0?t=>kl(t,["fulfilled"]):Rs(e)?Ar(...e.map(t=>t.fulfilled)):Vr()(e[0])}function wu(...e){return e.length===0?t=>kl(t,["pending","fulfilled","rejected"]):Rs(e)?Ar(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):wu()(e[0])}var IC="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ud=(e=21)=>{let t="",n=e;for(;n--;)t+=IC[Math.random()*64|0];return t},PC=["name","message","stack","code"],Rc=class{constructor(e,t){this.payload=e,this.meta=t}_type},Mp=class{constructor(e,t){this.payload=e,this.meta=t}_type},NC=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of PC)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Dp="External signal was aborted",ps=(()=>{function e(t,n,r){const i=Pn(t+"/fulfilled",(l,c,u,f)=>({payload:l,meta:{...f||{},arg:u,requestId:c,requestStatus:"fulfilled"}})),o=Pn(t+"/pending",(l,c,u)=>({payload:void 0,meta:{...u||{},arg:c,requestId:l,requestStatus:"pending"}})),s=Pn(t+"/rejected",(l,c,u,f,p)=>({payload:f,error:(r&&r.serializeError||NC)(l||"Rejected"),meta:{...p||{},arg:u,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function a(l,{signal:c}={}){return(u,f,p)=>{const b=r?.idGenerator?r.idGenerator(l):ud(),h=new AbortController;let g,m;function E(_){m=_,h.abort()}c&&(c.aborted?E(Dp):c.addEventListener("abort",()=>E(Dp),{once:!0}));const A=(async function(){let _;try{let d=r?.condition?.(l,{getState:f,extra:p});if(DC(d)&&(d=await d),d===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const w=new Promise((S,C)=>{g=()=>{C({name:"AbortError",message:m||"Aborted"})},h.signal.addEventListener("abort",g,{once:!0})});u(o(b,l,r?.getPendingMeta?.({requestId:b,arg:l},{getState:f,extra:p}))),_=await Promise.race([w,Promise.resolve(n(l,{dispatch:u,getState:f,extra:p,requestId:b,signal:h.signal,abort:E,rejectWithValue:(S,C)=>new Rc(S,C),fulfillWithValue:(S,C)=>new Mp(S,C)})).then(S=>{if(S instanceof Rc)throw S;return S instanceof Mp?i(S.payload,b,l,S.meta):i(S,b,l)})])}catch(d){_=d instanceof Rc?s(null,b,l,d.payload,d.meta):s(d,b,l)}finally{g&&h.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&s.match(_)&&_.meta.condition||u(_),_})();return Object.assign(A,{abort:E,requestId:b,arg:l,unwrap(){return A.then(MC)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:Ar(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function MC(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function DC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var LC=Symbol.for("rtk-slice-createasyncthunk");function $C(e,t){return`${e}/${t}`}function BC({creators:e}={}){const t=e?.asyncThunk?.[LC];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?ze(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const s=(typeof r.reducers=="function"?r.reducers(jC()):r.reducers)||{},a=Object.keys(s),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(_,x){const d=typeof _=="string"?_:_.type;if(!d)throw new Error(process.env.NODE_ENV==="production"?ze(12):"`context.addCase` cannot be called with an empty action type");if(d in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?ze(13):"`context.addCase` cannot be called with two reducers for the same action type: "+d);return l.sliceCaseReducersByType[d]=x,c},addMatcher(_,x){return l.sliceMatchers.push({matcher:_,reducer:x}),c},exposeAction(_,x){return l.actionCreators[_]=x,c},exposeCaseReducer(_,x){return l.sliceCaseReducersByName[_]=x,c}};a.forEach(_=>{const x=s[_],d={reducerName:_,type:$C(i,_),createNotation:typeof r.reducers=="function"};UC(x)?HC(d,x,c,t):zC(d,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?ze(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[_={},x=[],d=void 0]=typeof r.extraReducers=="function"?zm(r.extraReducers):[r.extraReducers],w={..._,...l.sliceCaseReducersByType};return OC(r.initialState,S=>{for(let C in w)S.addCase(C,w[C]);for(let C of l.sliceMatchers)S.addMatcher(C.matcher,C.reducer);for(let C of x)S.addMatcher(C.matcher,C.reducer);d&&S.addDefaultCase(d)})}const f=_=>_,p=new Map,b=new WeakMap;let h;function g(_,x){return h||(h=u()),h(_,x)}function m(){return h||(h=u()),h.getInitialState()}function E(_,x=!1){function d(S){let C=S[_];if(typeof C>"u"){if(x)C=da(b,d,m);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?ze(15):"selectSlice returned undefined for an uninjected slice reducer")}return C}function w(S=f){const C=da(p,x,()=>new WeakMap);return da(C,S,()=>{const R={};for(const[k,T]of Object.entries(r.selectors??{}))R[k]=FC(T,S,()=>da(b,S,m),x);return R})}return{reducerPath:_,getSelectors:w,get selectors(){return w(d)},selectSlice:d}}const A={name:i,reducer:g,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:m,...E(o),injectInto(_,{reducerPath:x,...d}={}){const w=x??o;return _.inject({reducerPath:w,reducer:g},d),{...A,...E(w,!0)}}};return A}}function FC(e,t,n,r){function i(o,...s){let a=t(o);if(typeof a>"u"){if(r)a=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?ze(16):"selectState returned undefined for an uninjected slice reducer")}return e(a,...s)}return i.unwrapped=e,i}var Rn=BC();function jC(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function zC({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!qC(r))throw new Error(process.env.NODE_ENV==="production"?ze(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Pn(e,s):Pn(e))}function UC(e){return e._reducerDefinitionType==="asyncThunk"}function qC(e){return e._reducerDefinitionType==="reducerWithPrepare"}function HC({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?ze(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,f=i(e,o,u);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),a&&r.addCase(f.pending,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:s||pa,pending:a||pa,rejected:l||pa,settled:c||pa})}function pa(){}function ze(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const lt=e=>typeof window>"u"?null:localStorage.getItem(e),yn=(e,t)=>{typeof window>"u"||localStorage.setItem(e,t)},Sr=e=>{typeof window>"u"||localStorage.removeItem(e)},qm=["en","de","es"],vi="en",_u="dqm.locale",VC="dqmUiLang",Ra=e=>{if(!e)return null;const n=e.toLowerCase().split("-")[0];return qm.includes(n)?n:null},vu=(e,t,n,r=vi)=>{const i=new URLSearchParams(e||""),o=Ra(i.get(VC));if(o)return{locale:o,source:"url",userOverride:!1};const s=Ra(t);if(s)return{locale:s,source:"user",userOverride:!0};const a=Ra(n);return a?{locale:a,source:"navigator",userOverride:!1}:{locale:r,source:"default",userOverride:!1}},Hi=e=>{e?yn(_u,e):Sr(_u)},Hm=()=>lt(_u),Ae=e=>typeof e=="string",Fo=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},Lp=e=>e==null?"":""+e,WC=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},KC=/###/g,$p=e=>e&&e.indexOf("###")>-1?e.replace(KC,"."):e,Bp=e=>!e||Ae(e),ts=(e,t,n)=>{const r=Ae(t)?t.split("."):t;let i=0;for(;i<r.length-1;){if(Bp(e))return{};const o=$p(r[i]);!e[o]&&n&&(e[o]=new n),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={},++i}return Bp(e)?{}:{obj:e,k:$p(r[i])}},Fp=(e,t,n)=>{const{obj:r,k:i}=ts(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],s=t.slice(0,t.length-1),a=ts(e,s,Object);for(;a.obj===void 0&&s.length;)o=`${s[s.length-1]}.${o}`,s=s.slice(0,s.length-1),a=ts(e,s,Object),a&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=n},GC=(e,t,n,r)=>{const{obj:i,k:o}=ts(e,t,Object);i[o]=i[o]||[],i[o].push(n)},Va=(e,t)=>{const{obj:n,k:r}=ts(e,t);if(n)return n[r]},QC=(e,t,n)=>{const r=Va(e,n);return r!==void 0?r:Va(t,n)},Vm=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Ae(e[r])||e[r]instanceof String||Ae(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Vm(e[r],t[r],n):e[r]=t[r]);return e},Vi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var YC={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const JC=e=>Ae(e)?e.replace(/[&<>"'\/]/g,t=>YC[t]):e;class XC{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ZC=[" ",",","?","!",";"],eT=new XC(20),tT=(e,t,n)=>{t=t||"",n=n||"";const r=ZC.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=eT.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!i.test(e);if(!o){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o},Su=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let o=0;o<r.length;){if(!i||typeof i!="object")return;let s,a="";for(let l=o;l<r.length;++l)if(l!==o&&(a+=n),a+=r[l],s=i[a],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<r.length-1)continue;o+=l-o+1;break}i=s}return i},Wa=e=>e&&e.replace("_","-"),nT={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Ka{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||nT,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(Ae(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Ka(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Ka(this.logger,t)}}var Xn=new Ka;class Ol{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[a,l]=s;for(let c=0;c<l;c++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[a,l]=s;for(let c=0;c<l;c++)a.apply(a,[t,...r])})}}class jp extends Ol{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,n],r&&(Array.isArray(r)?a.push(...r):Ae(r)&&o?a.push(...r.split(o)):a.push(r)));const l=Va(this.data,a);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=a[0],n=a[1],r=a.slice(2).join(".")),l||!s||!Ae(r)?l:Su(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[t,n];r&&(a=a.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(a=t.split("."),i=n,n=a[1]),this.addNamespaces(n),Fp(this.data,a,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(Ae(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[t,n];t.indexOf(".")>-1&&(a=t.split("."),i=r,r=n,n=a[1]),this.addNamespaces(n);let l=Va(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Vm(l,r,o):l={...l,...r},Fp(this.data,a,l),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Wm={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,i))}),t}};const zp={};class Ga extends Ol{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),WC(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!tT(t,r,i);if(s&&!a){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Ae(o)?[o]:o};const c=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),t=c.join(i)}return{key:t,namespaces:Ae(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:a}=this.extractFromKey(t[t.length-1],n),l=a[a.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const x=n.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${x}${s}`,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${x}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(t,n);let p=f&&f.res;const b=f&&f.usedKey||s,h=f&&f.exactUsedKey||s,g=Object.prototype.toString.apply(p),m=["[object Number]","[object Function]","[object RegExp]"],E=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,_=!Ae(p)&&typeof p!="boolean"&&typeof p!="number";if(A&&p&&_&&m.indexOf(g)<0&&!(Ae(E)&&Array.isArray(p))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,p,{...n,ns:a}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(f.res=x,f.usedParams=this.getUsedParamsDetails(n),f):x}if(o){const x=Array.isArray(p),d=x?[]:{},w=x?h:b;for(const S in p)if(Object.prototype.hasOwnProperty.call(p,S)){const C=`${w}${o}${S}`;d[S]=this.translate(C,{...n,joinArrays:!1,ns:a}),d[S]===C&&(d[S]=p[S])}p=d}}else if(A&&Ae(E)&&Array.isArray(p))p=p.join(E),p&&(p=this.extendTranslation(p,t,n,r));else{let x=!1,d=!1;const w=n.count!==void 0&&!Ae(n.count),S=Ga.hasDefaultValue(n),C=w?this.pluralResolver.getSuffix(c,n.count,n):"",R=n.ordinal&&w?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",k=w&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),T=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${C}`]||n[`defaultValue${R}`]||n.defaultValue;!this.isValidLookup(p)&&S&&(x=!0,p=T),this.isValidLookup(p)||(d=!0,p=s);const I=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&d?void 0:p,O=S&&T!==p&&this.options.updateMissing;if(d||x||O){if(this.logger.log(O?"updateKey":"missingKey",c,l,s,O?T:p),o){const H=this.resolve(s,{...n,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let H=0;H<z.length;H++)L.push(z[H]);else this.options.saveMissingTo==="all"?L=this.languageUtils.toResolveHierarchy(n.lng||this.language):L.push(n.lng||this.language);const X=(H,Q,F)=>{const U=S&&F!==p?F:I;this.options.missingKeyHandler?this.options.missingKeyHandler(H,l,Q,U,O,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,l,Q,U,O,n),this.emit("missingKey",H,l,Q,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?L.forEach(H=>{const Q=this.pluralResolver.getSuffixes(H,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(F=>{X([H],s+F,n[`defaultValue${F}`]||T)})}):X(L,s,T))}p=this.extendTranslation(p,t,n,f,r),d&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${l}:${s}`),(d||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,x?p:void 0):p=this.options.parseMissingKeyHandler(p))}return i?(f.res=p,f.usedParams=this.getUsedParamsDetails(n),f):p}extendTranslation(t,n,r,i,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=Ae(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const p=t.match(this.interpolator.nestingRegexp);u=p&&p.length}let f=r.replace&&!Ae(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),c){const p=t.match(this.interpolator.nestingRegexp),b=p&&p.length;u<b&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var p=arguments.length,b=new Array(p),h=0;h<p;h++)b[h]=arguments[h];return o&&o[0]===b[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${n[0]}`),null):s.translate(...b,n)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,l=Ae(a)?[a]:a;return t!=null&&l&&l.length&&r.applyPostProcessor!==!1&&(t=Wm.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,s,a;return Ae(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=n.count!==void 0&&!Ae(n.count),b=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=n.context!==void 0&&(Ae(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(m=>{this.isValidLookup(r)||(a=m,!zp[`${g[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(zp[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(E=>{if(this.isValidLookup(r))return;s=E;const A=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(A,u,E,m,n);else{let x;p&&(x=this.pluralResolver.getSuffix(E,n.count,n));const d=`${this.options.pluralSeparator}zero`,w=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(A.push(u+x),n.ordinal&&x.indexOf(w)===0&&A.push(u+x.replace(w,this.options.pluralSeparator)),b&&A.push(u+d)),h){const S=`${u}${this.options.contextSeparator}${n.context}`;A.push(S),p&&(A.push(S+x),n.ordinal&&x.indexOf(w)===0&&A.push(S+x.replace(w,this.options.pluralSeparator)),b&&A.push(S+d))}}let _;for(;_=A.pop();)this.isValidLookup(r)||(o=_,r=this.getResource(E,m,_,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:s,usedNS:a}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Ae(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Oc=e=>e.charAt(0).toUpperCase()+e.slice(1);class Up{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xn.create("languageUtils")}getScriptPartFromCode(t){if(t=Wa(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Wa(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Ae(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(t)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Oc(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Oc(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Oc(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Ae(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Ae(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):Ae(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&o(this.formatLanguageCode(s))}),i}}let rT=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iT={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const oT=["v1","v2","v3"],sT=["v4"],qp={zero:0,one:1,two:2,few:3,many:4,other:5},aT=()=>{const e={};return rT.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:iT[t.fc]}})}),e};class lT{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Xn.create("pluralResolver"),(!this.options.compatibilityJSON||sT.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=aT(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=Wa(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:i})}catch{if(!t.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(l,n)}return this.pluralRulesCache[o]=s,s}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,o)=>qp[i]-qp[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const o=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!oT.includes(this.options.compatibilityJSON)}}const Hp=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=QC(e,t,n);return!o&&i&&Ae(n)&&(o=Su(e,n,r),o===void 0&&(o=Su(t,n,r))),o},Ic=e=>e.replace(/\$/g,"$$$$");class cT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:b,nestingSuffix:h,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:E,alwaysFormat:A}=t.interpolation;this.escape=n!==void 0?n:JC,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Vi(o):s||"{{",this.suffix=a?Vi(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?Vi(p):b||Vi("$t("),this.nestingSuffix=h?Vi(h):g||Vi(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=E||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,s,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=b=>{if(b.indexOf(this.formatSeparator)<0){const E=Hp(n,l,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(E,void 0,r,{...i,...n,interpolationkey:b}):E}const h=b.split(this.formatSeparator),g=h.shift().trim(),m=h.join(this.formatSeparator).trim();return this.format(Hp(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),m,r,{...i,...n,interpolationkey:g})};this.resetRegExp();const u=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>Ic(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?Ic(this.escape(b)):Ic(b)}].forEach(b=>{for(a=0;o=b.regex.exec(t);){const h=o[1].trim();if(s=c(h),s===void 0)if(typeof u=="function"){const m=u(t,o,i);s=Ae(m)?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,h))s="";else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${h} for interpolating ${t}`),s="";else!Ae(s)&&!this.useRawValueToEscape&&(s=Lp(s));const g=b.safeValue(s);if(t=t.replace(o[0],g),f?(b.regex.lastIndex+=s.length,b.regex.lastIndex-=o[0].length):b.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,s);const b=p.match(/'/g),h=p.match(/"/g);(b&&b.length%2===0&&!h||h.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),c&&(s={...c,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${p}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;i=this.nestingRegexp.exec(t);){let l=[];s={...r},s=s.replace&&!Ae(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const u=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=u.shift(),l=u,c=!0}if(o=n(a.call(this,i[1].trim(),s),s),o&&i[0]===t&&!Ae(o))return o;Ae(o)||(o=Lp(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),c&&(o=l.reduce((u,f)=>this.format(u,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const uT=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[a,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},Wi=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const s=r+JSON.stringify(o);let a=t[s];return a||(a=e(Wa(r),i),t[s]=a),a(n)}};class dT{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xn.create("formatter"),this.options=t,this.formats={number:Wi((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:Wi((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:Wi((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:Wi((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:Wi((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Wi(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{const{formatName:c,formatOptions:u}=uT(l);if(this.formats[c]){let f=a;try{const p=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},b=p.locale||p.lng||i.locale||i.lng||r;f=this.formats[c](a,b,{...u,...i,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},t)}}const fT=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class pT extends Ol{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Xn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const o={},s={},a={},l={};return t.forEach(c=>{let u=!0;n.forEach(f=>{const p=`${c}|${f}`;!r.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,u=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const i=t.split("|"),o=i[0],s=i[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const a={};this.queue.forEach(l=>{GC(l.loaded,[o],s),fT(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:s});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,o*2,s)},o);return}s(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(t,n,a)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ae(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Ae(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(s,a)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,s),!s&&a&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,a),this.loaded(t,s,a)})}saveMissing(t,n,r,i,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,i,l):u=c(t,n,r,i),u&&typeof u.then=="function"?u.then(f=>a(null,f)).catch(a):a(null,u)}catch(u){a(u)}else c(t,n,r,i,a,l)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const Vp=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Ae(e[1])&&(t.defaultValue=e[1]),Ae(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Wp=e=>(Ae(e.ns)&&(e.ns=[e.ns]),Ae(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Ae(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ha=()=>{},hT=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class hs extends Ol{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Wp(t),this.services={},this.logger=Xn,this.modules={external:[]},hT(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Ae(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=Vp();this.options={...i,...this.options,...Wp(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Xn.init(o(this.modules.logger),this.options):Xn.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=dT);const f=new Up(this.options);this.store=new jp(this.options.resources,this.options);const p=this.services;p.logger=Xn,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new lT(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=o(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new cT(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new pT(o(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(b){for(var h=arguments.length,g=new Array(h>1?h-1:0),m=1;m<h;m++)g[m-1]=arguments[m];t.emit(b,...g)}),this.modules.languageDetector&&(p.languageDetector=o(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=o(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new Ga(this.services,this.options),this.translator.on("*",function(b){for(var h=arguments.length,g=new Array(h>1?h-1:0),m=1;m<h;m++)g[m-1]=arguments[m];t.emit(b,...g)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ha),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=Fo(),c=()=>{const u=(f,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(p),r(f,p)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ha;const i=Ae(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],s=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(a=>s(a)),this.services.backendConnector.load(o,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(a)})}else r(null)}reloadResources(t,n,r){const i=Fo();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ha),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Wm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Fo();this.emit("languageChanging",t);const o=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?(o(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},a=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=Ae(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||o(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{s(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(t),i}getFixedT(t,n,r){var i=this;const o=function(s,a){let l;if(typeof a!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),f=2;f<c;f++)u[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([s,a].concat(u))}else l={...a};l.lng=l.lng||o.lng,l.lngs=l.lngs||o.lngs,l.ns=l.ns||o.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||o.keyPrefix);const p=i.options.keySeparator||".";let b;return l.keyPrefix&&Array.isArray(s)?b=s.map(h=>`${l.keyPrefix}${p}${h}`):b=l.keyPrefix?`${l.keyPrefix}${p}${s}`:s,i.t(b,l)};return Ae(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const a=n.precheck(this,s);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}loadNamespaces(t,n){const r=Fo();return this.options.ns?(Ae(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Fo();Ae(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return o.length?(this.options.preload=i.concat(o),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Up(Vp());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new hs(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ha;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new hs(i);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new jp(this.store.data,i),o.services.resourceStore=o.store),o.translator=new Ga(o.services,i),o.translator.on("*",function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];o.emit(a,...c)}),o.init(i,n),o.translator.options=i,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ct=hs.createInstance();ct.createInstance=hs.createInstance;ct.createInstance;ct.dir;ct.init;ct.loadResources;ct.reloadResources;ct.use;ct.changeLanguage;ct.getFixedT;ct.t;ct.exists;ct.setDefaultNamespace;ct.hasLoadedNamespace;ct.loadNamespaces;ct.loadLanguages;const gT={language:"Language",language_switch_label:"Language",language_en:"English",language_de:"German",language_es:"Spanish",source_url:"URL overridden",source_user:"Custom selected",source_navigator:"Browser setting",source_default:"Default locale",reset:"Reset",logout:"Logout"},mT={language:"Sprache",language_switch_label:"Sprache",language_en:"Englisch",language_de:"Deutsch",language_es:"Spanisch",source_url:"URL-Override",source_user:"Durch Benutzer ausgewählt",source_navigator:"Browser-Einstellung",source_default:"Standard-Sprache",reset:"Zurücksetzen",logout:"Abmelden"},yT={language:"Idioma",language_switch_label:"Idioma",language_en:"Inglés",language_de:"Alemán",language_es:"Español",source_url:"URL sobrescrita",source_user:"Seleccionado manualmente",source_navigator:"Configuración del navegador",source_default:"Idioma predeterminado",reset:"Restablecer",logout:"Cerrar sesión"},bT={title:"Digital Quality and Accessibility",ready_title:"Ready to Analyze",ready_body:'Click "Run Quality Check" to analyze the current page for accessibility and quality issues.',run_quality_check:"Run Quality Check",analyzing:"Analyzing...",access_denied:"Access Denied",config_required:"Configuration Required",auth_error:"Authentication Error",close:"Close",close_sidebar:"Close sidebar",fab_tooltip:"DQM Quality Analysis",ai_settings:"AI Assistant",ai_backend_api:"ChatGPT (API)",summary_label:"Summary",summary_stats:"AI stats – attempts: {{attempts}}, empty: {{empty}}, mode: {{mode}}, duration: {{duration}}ms",openai_info:"Uses an OpenAI-compatible Chat Completions API. A browser call usually requires a CORS-enabled proxy.",openai_model:"OpenAI model",openai_base_url:"OpenAI base URL",openai_api_key:"OpenAI API key",openai_missing_key:"OpenAI API key is missing.",translation_enable:"Auto-translate DQM results",summary_enable:"AI summary card",ai_model_hint:"Model choice affects translation and summary quality/speed.",ai_cache_clear:"Clear AI cache",translation_not_needed:"UI language is English; translation is not needed.",translation_target_lang:"Target language: {{lang}}",translation_when:"AI features run automatically after an analysis completes, when you change the UI language, or when you enable them here.",ai_limitations:"AI can be wrong or hallucinate – please verify results.",summary_api_only:"AI features use ChatGPT (API) for translation and summaries.",summary_disclaimer:"Note: Summaries may contain errors or hallucinations. Please verify.",translation_full_power:"Full translation (may take longer)",translation_model:"Model: {{model}}",translation_downloading:"Initializing AI…",translation_translating:"Translating results…",translation_progress:"{{done}} / {{total}} checkpoints",translation_ready:"Translation is ready.",translation_partial:"Translation stopped early to keep performance snappy. Some items remain untranslated.",translation_incomplete:"Some items could not be translated reliably and remain unchanged.",translation_restart:"Translate missing items",summary_restart:"Restart summary",summary_title:"AI Summary",summary_regenerate:"Regenerate",summary_generating:"Generating summary…",summary_failed:"Summary failed",summary_empty:"No summary available yet.",summary_disabled:"Enable the AI summary in the AI Assistant settings to get an executive overview of the most important issues.",overall_quality:"Overall Quality",passed:"Passed",failed:"Failed",show_all_errors:"Show Page with all Errors",quality_breakdown:"Quality Breakdown",all_passed:"All Passed",x_of_y_passed:"{{passed}} of {{total}} passed",percent_passed:"{{percent}}% passed",failed_checkpoints:"Failed Checkpoints",filter_by_category:"Filter by Category",showing_categories:"Showing {{count}} of {{total}} categories",showing_all_categories:"Showing all of {{total}} categories",show_all:"Show All",view_in_browser:"View in Browser",view_source:"View Source",analysis_failed:"Analysis Failed",retry:"Retry",no_highlighted_content:"No highlighted content available.",failed_load_browser:"Failed to load browser view. Please try again.",loading_views:"Loading both views...",highlighted_errors:"Highlighted Errors",browser_view:"Browser View",source_view:"Source View",x_of_y:"{{current}} of {{total}}",prev_highlight:"Previous highlight",next_highlight:"Next highlight",reload_highlights:"Reload highlights",open_in_new_tab:"Open in new tab",enable_js:"Enable JavaScript",disable_js:"Disable JavaScript",no_source_content:"No source content available for this checkpoint.",failed_load_all_errors:"Failed to load page with all errors. Please try again.",failed_load_highlights:"Failed to load highlighted content. Please try again.",failed_load_source:"Failed to load source view. Please try again.",dqm_disabled:"DQM is disabled. Permission denied.",dqm_not_configured:"DQM is not configured. Please provide API credentials via props, localStorage, or configure an authentication backend."},wT={title:"Digitale Qualität und Barrierefreiheit",ready_title:"Bereit für Analyse",ready_body:'Klicken Sie auf "Qualitätsprüfung starten", um die aktuelle Seite auf Barrierefreiheits- und Qualitätsprobleme zu prüfen.',run_quality_check:"Qualitätsprüfung starten",analyzing:"Analyse läuft...",access_denied:"Zugriff verweigert",config_required:"Konfiguration erforderlich",auth_error:"Authentifizierungsfehler",close:"Schließen",close_sidebar:"Seitenleiste schließen",fab_tooltip:"DQM Qualitätsanalyse",ai_settings:"KI-Assistent",ai_backend_api:"ChatGPT (API)",summary_label:"Zusammenfassung",summary_stats:"KI-Statistik – Versuche: {{attempts}}, leer: {{empty}}, Modus: {{mode}}, Dauer: {{duration}}ms",openai_info:"Nutzt eine OpenAI-kompatible Chat-Completions-API. Ein Browser-Aufruf benötigt meist einen CORS-fähigen Proxy.",openai_model:"OpenAI-Modell",openai_base_url:"OpenAI Base-URL",openai_api_key:"OpenAI API-Key",openai_missing_key:"OpenAI API-Key fehlt.",translation_enable:"DQM-Ergebnisse automatisch übersetzen",summary_enable:"KI-Zusammenfassung",ai_model_hint:"Die Modellauswahl beeinflusst Übersetzung und Zusammenfassung (Qualität/Tempo).",ai_cache_clear:"KI-Cache löschen",translation_not_needed:"Die UI-Sprache ist Englisch; eine Übersetzung ist nicht nötig.",translation_target_lang:"Zielsprache: {{lang}}",translation_when:"KI-Funktionen laufen automatisch nach Abschluss der Analyse, beim Wechsel der UI-Sprache oder sobald Sie sie hier aktivieren.",ai_limitations:"KI kann sich irren oder halluzinieren – bitte Ergebnisse prüfen.",summary_api_only:"KI-Funktionen nutzen ChatGPT (API) für Übersetzungen und Zusammenfassungen.",summary_disclaimer:"Hinweis: Zusammenfassungen können Fehler oder Halluzinationen enthalten. Bitte fachlich prüfen.",translation_full_power:"Vollständige Übersetzung (kann länger dauern)",translation_model:"Modell: {{model}}",translation_downloading:"KI wird initialisiert…",translation_translating:"Ergebnisse werden übersetzt…",translation_progress:"{{done}} / {{total}} Prüfpunkte",translation_ready:"Übersetzung ist bereit.",translation_partial:"Die Übersetzung wurde vorzeitig beendet, um die Performance hoch zu halten. Einige Inhalte bleiben unübersetzt.",translation_incomplete:"Einige Inhalte konnten nicht zuverlässig übersetzt werden und bleiben unverändert.",translation_restart:"Fehlende Übersetzungen nachholen",summary_restart:"Zusammenfassung neu starten",summary_title:"KI-Zusammenfassung",summary_regenerate:"Neu generieren",summary_generating:"Zusammenfassung wird erstellt…",summary_failed:"Zusammenfassung fehlgeschlagen",summary_empty:"Noch keine Zusammenfassung verfügbar.",summary_disabled:"Aktivieren Sie die KI-Zusammenfassung in den KI-Assistent-Einstellungen, um eine kompakte Übersicht der wichtigsten Punkte zu erhalten.",overall_quality:"Gesamtqualität",passed:"Bestanden",failed:"Fehlgeschlagen",show_all_errors:"Seite mit allen Fehlern anzeigen",quality_breakdown:"Qualitätsübersicht",all_passed:"Alle bestanden",x_of_y_passed:"{{passed}} von {{total}} bestanden",percent_passed:"{{percent}}% bestanden",failed_checkpoints:"Fehlgeschlagene Prüfpunkte",filter_by_category:"Nach Kategorie filtern",showing_categories:"{{count}} von {{total}} Kategorien angezeigt",showing_all_categories:"Alle {{total}} Kategorien angezeigt",show_all:"Alle anzeigen",view_in_browser:"Im Browser anzeigen",view_source:"Quellcode anzeigen",analysis_failed:"Analyse fehlgeschlagen",retry:"Wiederholen",no_highlighted_content:"Keine hervorgehobenen Inhalte verfügbar.",failed_load_browser:"Browseransicht konnte nicht geladen werden. Bitte erneut versuchen.",loading_views:"Beide Ansichten werden geladen...",highlighted_errors:"Hervorgehobene Fehler",browser_view:"Browseransicht",source_view:"Quellansicht",x_of_y:"{{current}} von {{total}}",prev_highlight:"Vorheriger Fehler",next_highlight:"Nächster Fehler",reload_highlights:"Hervorhebungen neu laden",open_in_new_tab:"In neuem Tab öffnen",enable_js:"JavaScript aktivieren",disable_js:"JavaScript deaktivieren",no_source_content:"Kein Quellcode für diesen Prüfpunkt verfügbar.",failed_load_all_errors:"Seite mit allen Fehlern konnte nicht geladen werden. Bitte erneut versuchen.",failed_load_highlights:"Hervorgehobene Inhalte konnten nicht geladen werden. Bitte erneut versuchen.",failed_load_source:"Quellansicht konnte nicht geladen werden. Bitte erneut versuchen.",dqm_disabled:"DQM ist deaktiviert. Zugriff verweigert.",dqm_not_configured:"DQM ist nicht konfiguriert. Bitte geben Sie API-Zugangsdaten über Props, localStorage oder ein Authentifizierungs-Backend an."},_T={title:"Calidad digital y accesibilidad",ready_title:"Listo para analizar",ready_body:'Haz clic en "Ejecutar comprobación de calidad" para analizar la página actual en busca de problemas de accesibilidad y calidad.',run_quality_check:"Ejecutar comprobación de calidad",analyzing:"Analizando...",access_denied:"Acceso denegado",config_required:"Configuración requerida",auth_error:"Error de autenticación",close:"Cerrar",close_sidebar:"Cerrar barra lateral",fab_tooltip:"Análisis de calidad DQM",ai_settings:"Asistente de IA",ai_backend_api:"ChatGPT (API)",summary_label:"Resumen",summary_stats:"Estadísticas IA – intentos: {{attempts}}, vacías: {{empty}}, modo: {{mode}}, duración: {{duration}}ms",openai_info:"Usa una API compatible con OpenAI Chat Completions. Normalmente, una llamada desde el navegador requiere un proxy con CORS.",openai_model:"Modelo de OpenAI",openai_base_url:"URL base de OpenAI",openai_api_key:"Clave API de OpenAI",openai_missing_key:"Falta la clave API de OpenAI.",translation_enable:"Traducir automáticamente los resultados de DQM",summary_enable:"Tarjeta de resumen de IA",ai_model_hint:"La elección del modelo afecta la traducción y el resumen (calidad/velocidad).",ai_cache_clear:"Borrar caché de IA",translation_not_needed:"El idioma de la interfaz es inglés; no es necesario traducir.",translation_target_lang:"Idioma de destino: {{lang}}",translation_when:"Las funciones de IA se ejecutan automáticamente al finalizar un análisis, al cambiar el idioma de la UI o al activarlas aquí.",ai_limitations:"La IA puede equivocarse o alucinar; verifica los resultados.",summary_api_only:"Las funciones de IA utilizan ChatGPT (API) para traducciones y resúmenes.",summary_disclaimer:"Nota: los resúmenes pueden contener errores o alucinaciones. Verifica el contenido.",translation_full_power:"Traducción completa (puede tardar más)",translation_model:"Modelo: {{model}}",translation_downloading:"Inicializando IA…",translation_translating:"Traduciendo resultados…",translation_progress:"{{done}} / {{total}} checkpoints",translation_ready:"La traducción está lista.",translation_partial:"La traducción se detuvo antes para mantener un buen rendimiento. Algunos elementos quedan sin traducir.",translation_incomplete:"Algunos elementos no se pudieron traducir de forma fiable y permanecen sin cambios.",translation_restart:"Traducir elementos faltantes",summary_restart:"Reiniciar resumen",summary_title:"Resumen de IA",summary_regenerate:"Regenerar",summary_generating:"Generando resumen…",summary_failed:"Falló el resumen",summary_empty:"Aún no hay resumen disponible.",summary_disabled:"Activa el resumen de IA en los ajustes del asistente para obtener una visión general de los puntos más importantes.",overall_quality:"Calidad general",passed:"Aprobado",failed:"Fallido",show_all_errors:"Mostrar página con todos los errores",quality_breakdown:"Desglose de calidad",all_passed:"Todo aprobado",x_of_y_passed:"{{passed}} de {{total}} aprobados",percent_passed:"{{percent}}% aprobados",failed_checkpoints:"Checkpoints fallidos",filter_by_category:"Filtrar por categoría",showing_categories:"Mostrando {{count}} de {{total}} categorías",showing_all_categories:"Mostrando todas las {{total}} categorías",show_all:"Mostrar todo",view_in_browser:"Ver en el navegador",view_source:"Ver fuente",analysis_failed:"El análisis falló",retry:"Reintentar",no_highlighted_content:"No hay contenido resaltado disponible.",failed_load_browser:"No se pudo cargar la vista del navegador. Inténtalo de nuevo.",loading_views:"Cargando ambas vistas...",highlighted_errors:"Errores resaltados",browser_view:"Vista del navegador",source_view:"Vista de fuente",x_of_y:"{{current}} de {{total}}",prev_highlight:"Resaltado anterior",next_highlight:"Siguiente resaltado",reload_highlights:"Recargar resaltados",open_in_new_tab:"Abrir en una pestaña nueva",enable_js:"Habilitar JavaScript",disable_js:"Deshabilitar JavaScript",no_source_content:"No hay contenido de fuente disponible para este checkpoint.",failed_load_all_errors:"No se pudo cargar la página con todos los errores. Inténtalo de nuevo.",failed_load_highlights:"No se pudo cargar el contenido resaltado. Inténtalo de nuevo.",failed_load_source:"No se pudo cargar la vista de fuente. Inténtalo de nuevo.",dqm_disabled:"DQM está deshabilitado. Permiso denegado.",dqm_not_configured:"DQM no está configurado. Proporciona credenciales de API vía props, localStorage o configura un backend de autenticación."},vT={heading:"DQM Authentication",subheading:"Please authenticate to access quality analysis",enter_credentials:"Enter credentials directly",website_id:"Website ID",website_id_helper:"Your website identifier",api_key:"API Key",api_key_helper:"Your Crownpeak DQM API key",continue:"Continue",or:"OR",login_backend:"Login with Backend Session",no_credentials:"Don't have credentials?",get_started:"Get started with Crownpeak DQM",errors:{missing_fields:"Please enter both API Key and Website ID",non_ascii_key:"API key contains non-ASCII characters",backend_missing:"Backend URL not configured",failed_redirect:"Failed to redirect to login page"}},ST={heading:"DQM-Authentifizierung",subheading:"Bitte authentifizieren Sie sich für die Qualitätsanalyse",enter_credentials:"Zugangsdaten direkt eingeben",website_id:"Website-ID",website_id_helper:"Ihre Website-Kennung",api_key:"API-Schlüssel",api_key_helper:"Ihr Crownpeak DQM API-Schlüssel",continue:"Weiter",or:"ODER",login_backend:"Mit Backend-Sitzung anmelden",no_credentials:"Keine Zugangsdaten?",get_started:"Jetzt mit Crownpeak DQM starten",errors:{missing_fields:"Bitte API-Schlüssel und Website-ID eingeben",non_ascii_key:"API-Schlüssel enthält Nicht-ASCII-Zeichen",backend_missing:"Backend-URL nicht konfiguriert",failed_redirect:"Weiterleitung zur Login-Seite fehlgeschlagen"}},ET={heading:"Autenticación DQM",subheading:"Autentícate para acceder al análisis de calidad",enter_credentials:"Introducir credenciales directamente",website_id:"ID del sitio web",website_id_helper:"Tu identificador de sitio web",api_key:"Clave API",api_key_helper:"Tu clave API de Crownpeak DQM",continue:"Continuar",or:"O",login_backend:"Iniciar sesión con sesión del backend",no_credentials:"¿No tienes credenciales?",get_started:"Comienza con Crownpeak DQM",errors:{missing_fields:"Introduce tanto la clave API como el ID del sitio web",non_ascii_key:"La clave API contiene caracteres no ASCII",backend_missing:"La URL del backend no está configurada",failed_redirect:"No se pudo redirigir a la página de inicio de sesión"}},xT={login_title:"DQM Widget Test",login_subtitle:"Enter your DQM credentials to view the landing page",login_website_id:"Website ID",login_api_key:"DQM API Key",login_cta:"View Landing Page",hero_title:"Your Digital Quality Command Center",hero_subtitle:"Run accessibility and quality checks in seconds with guided highlights and actionable remediation steps.",hero_cta:"Run a Demo Scan",features_title:"Everything you need to ship accessible experiences",feature1_title:"One-click quality scans",feature1_body:"Trigger Crownpeak DQM analysis directly from your page without leaving your workflow.",feature2_title:"Guided remediation",feature2_body:"Jump to highlighted issues with source and browser views for faster fixes.",feature3_title:"Team-ready insights",feature3_body:"Share actionable reports, trends, and checkpoints with your team.",stats_title:"Trusted by teams everywhere",stat_active_customers:"Active customers",stat_uptime:"Uptime guarantee",stat_countries:"Countries served",stat_support:"Expert support",testimonials_title:"What teams are saying",testimonial1_quote:"The DQM sidebar cut our accessibility triage time in half. Highlights and source view are game changers.",testimonial1_name:"Jordan Lee",testimonial1_title:"Lead Accessibility Engineer, Northwind",testimonial2_quote:"We finally have a repeatable process to ship compliant pages. The guided navigation keeps everyone aligned.",testimonial2_name:"Priya Desai",testimonial2_title:"Digital Experience Manager, Fabrikam",testimonial3_quote:"Fast, reliable, and easy to roll out across teams. DQM makes quality measurable.",testimonial3_name:"Alex Müller",testimonial3_title:"Product Director, Contoso",pricing_title:"Simple, transparent pricing",pricing_subtitle:"Choose the plan that works best for your team",plan_starter:"Starter",plan_starter_feat1:"10 GB storage",plan_starter_feat2:"100 GB bandwidth",plan_starter_feat3:"Email support",plan_starter_feat4:"99.9% uptime",plan_cta_outline:"Get started",plan_badge_popular:"Popular",plan_pro:"Professional",plan_pro_feat1:"100 GB storage",plan_pro_feat2:"1 TB bandwidth",plan_pro_feat3:"Priority support",plan_pro_feat4:"99.99% uptime",plan_pro_feat5:"Advanced analytics",plan_cta_primary:"Get started",plan_enterprise:"Enterprise",plan_enterprise_price:"Custom",plan_ent_feat1:"Unlimited storage",plan_ent_feat2:"Unlimited bandwidth",plan_ent_feat3:"24/7 phone support",plan_ent_feat4:"99.99% uptime SLA",plan_ent_feat5:"Dedicated manager",plan_cta_contact:"Contact Sales",cta_title:"Ready to get started?",cta_subtitle:"Join thousands of companies already using Cloudify. No credit card required.",cta_button:"Start your free trial",footer_brand:"Cloudify",footer_tagline:"Modern cloud infrastructure for the next generation of applications.",footer_icon_speed:"Performance insights",footer_icon_security:"Security highlights",footer_icon_growth:"Growth metrics",footer_col_product:"Product",footer_col_company:"Company",footer_col_resources:"Resources",footer_col_support:"Support",footer_link_features:"Features",footer_link_pricing:"Pricing",footer_link_integrations:"Integrations",footer_link_docs:"Documentation",footer_link_contact:"Contact Us",footer_link_about:"About",footer_link_blog:"Blog",footer_link_careers:"Careers",footer_link_press:"Press",footer_link_presskit:"Press Kit",footer_link_faq:"FAQ",footer_link_guides:"Guides",footer_link_api:"API Docs",footer_link_community:"Community",footer_link_status:"Status",footer_link_help:"Help Center",footer_link_terms:"Terms of Service",footer_link_privacy:"Privacy Policy",footer_link_cookies:"Cookie Policy",footer_copyright:"© 2025 Cloudify. All rights reserved. |",editor_title:"HTML Editor",debug_mode:"Debug Mode Active",debug_desc:"The DQM Widget will analyze the custom HTML from the editor instead of the page content. Your HTML is automatically saved to IndexedDB.",tab_editor:"HTML Editor",tab_preview:"Preview",loading_html:"Loading HTML from IndexedDB...",reset_default:"Reset to Default",preview_html:"Preview HTML",auto_saved:"Auto-saved to IndexedDB",close:"Close",analyze_custom_html:"Analyze Custom HTML"},CT={login_title:"DQM Widget Test",login_subtitle:"Geben Sie Ihre DQM-Zugangsdaten ein, um die Landing Page zu sehen",login_website_id:"Website-ID",login_api_key:"DQM API-Schlüssel",login_cta:"Landing Page anzeigen",hero_title:"Ihr Command Center für digitale Qualität",hero_subtitle:"Führen Sie Barrierefreiheits- und Qualitätschecks in Sekunden durch – mit geführten Highlights und klaren Handlungsschritten.",hero_cta:"Demo-Scan starten",features_title:"Alles für barrierefreie Erlebnisse",feature1_title:"Qualitätschecks mit einem Klick",feature1_body:"Starten Sie Crownpeak DQM direkt von der Seite aus, ohne den Workflow zu verlassen.",feature2_title:"Geführte Behebung",feature2_body:"Springen Sie zu markierten Problemen mit Quell- und Browseransicht für schnellere Fixes.",feature3_title:"Teamfähige Insights",feature3_body:"Teilen Sie Berichte, Trends und Checkpoints mit Ihrem Team.",stats_title:"Vertrauen von Teams weltweit",stat_active_customers:"Aktive Kunden",stat_uptime:"Verfügbarkeitsgarantie",stat_countries:"Länder im Einsatz",stat_support:"Experten-Support",testimonials_title:"Das sagen Teams",testimonial1_quote:"Die DQM-Sidebar hat unsere Accessibility-Triage halbiert. Highlights und Quellansicht sind ein Game Changer.",testimonial1_name:"Jordan Lee",testimonial1_title:"Lead Accessibility Engineer, Northwind",testimonial2_quote:"Endlich ein reproduzierbarer Prozess für konforme Seiten. Die geführte Navigation hält alle auf Kurs.",testimonial2_name:"Priya Desai",testimonial2_title:"Digital Experience Manager, Fabrikam",testimonial3_quote:"Schnell, zuverlässig und leicht auszurollen. DQM macht Qualität messbar.",testimonial3_name:"Alex Müller",testimonial3_title:"Product Director, Contoso",pricing_title:"Einfache, transparente Preise",pricing_subtitle:"Wählen Sie den passenden Plan für Ihr Team",plan_starter:"Starter",plan_starter_feat1:"10 GB Speicher",plan_starter_feat2:"100 GB Bandbreite",plan_starter_feat3:"E-Mail-Support",plan_starter_feat4:"99,9 % Verfügbarkeit",plan_cta_outline:"Jetzt starten",plan_badge_popular:"Beliebt",plan_pro:"Professional",plan_pro_feat1:"100 GB Speicher",plan_pro_feat2:"1 TB Bandbreite",plan_pro_feat3:"Priorisierter Support",plan_pro_feat4:"99,99 % Verfügbarkeit",plan_pro_feat5:"Erweiterte Analysen",plan_cta_primary:"Jetzt starten",plan_enterprise:"Enterprise",plan_enterprise_price:"Individuell",plan_ent_feat1:"Unbegrenzter Speicher",plan_ent_feat2:"Unbegrenzte Bandbreite",plan_ent_feat3:"24/7 Telefon-Support",plan_ent_feat4:"99,99 % SLA",plan_ent_feat5:"Dedizierter Manager",plan_cta_contact:"Vertrieb kontaktieren",cta_title:"Bereit zum Start?",cta_subtitle:"Schließen Sie sich Tausenden Unternehmen an, die bereits Cloudify nutzen. Keine Kreditkarte erforderlich.",cta_button:"Kostenlosen Test starten",footer_brand:"Cloudify",footer_tagline:"Moderne Cloud-Infrastruktur für die nächste Generation von Anwendungen.",footer_icon_speed:"Performance-Insights",footer_icon_security:"Sicherheits-Highlights",footer_icon_growth:"Wachstumsmetriken",footer_col_product:"Produkt",footer_col_company:"Unternehmen",footer_col_resources:"Ressourcen",footer_col_support:"Support",footer_link_features:"Funktionen",footer_link_pricing:"Preise",footer_link_integrations:"Integrationen",footer_link_docs:"Dokumentation",footer_link_contact:"Kontakt",footer_link_about:"Über uns",footer_link_blog:"Blog",footer_link_careers:"Karriere",footer_link_press:"Presse",footer_link_presskit:"Pressekit",footer_link_faq:"FAQ",footer_link_guides:"Leitfäden",footer_link_api:"API-Dokumentation",footer_link_community:"Community",footer_link_status:"Status",footer_link_help:"Hilfecenter",footer_link_terms:"Nutzungsbedingungen",footer_link_privacy:"Datenschutz",footer_link_cookies:"Cookie-Richtlinie",footer_copyright:"© 2025 Cloudify. Alle Rechte vorbehalten. |",editor_title:"HTML-Editor",debug_mode:"Debug-Modus aktiv",debug_desc:"Das DQM-Widget analysiert den benutzerdefinierten HTML-Code aus dem Editor anstelle des Seiteninhalts. Ihr HTML wird automatisch in IndexedDB gespeichert.",tab_editor:"HTML-Editor",tab_preview:"Vorschau",loading_html:"HTML wird aus IndexedDB geladen...",reset_default:"Auf Standard zurücksetzen",preview_html:"HTML ansehen",auto_saved:"Automatisch in IndexedDB gespeichert",close:"Schließen",analyze_custom_html:"Benutzerdefiniertes HTML analysieren"},TT={login_title:"Prueba del widget DQM",login_subtitle:"Introduce tus credenciales de DQM para ver la página de destino",login_website_id:"ID del sitio web",login_api_key:"Clave API de DQM",login_cta:"Ver página de destino",hero_title:"Tu centro de mando de calidad digital",hero_subtitle:"Ejecuta comprobaciones de accesibilidad y calidad en segundos con resaltados guiados y pasos de corrección accionables.",hero_cta:"Ejecutar un escaneo de demostración",features_title:"Todo lo que necesitas para publicar experiencias accesibles",feature1_title:"Escaneos de calidad con un clic",feature1_body:"Dispara el análisis de Crownpeak DQM directamente desde tu página sin salir de tu flujo de trabajo.",feature2_title:"Corrección guiada",feature2_body:"Ve a los problemas resaltados con vistas de fuente y navegador para corregir más rápido.",feature3_title:"Información lista para el equipo",feature3_body:"Comparte informes accionables, tendencias y checkpoints con tu equipo.",stats_title:"Confiado por equipos en todas partes",stat_active_customers:"Clientes activos",stat_uptime:"Garantía de disponibilidad",stat_countries:"Países atendidos",stat_support:"Soporte experto",testimonials_title:"Lo que dicen los equipos",testimonial1_quote:"La barra lateral de DQM redujo nuestro tiempo de triaje de accesibilidad a la mitad. Los resaltados y la vista de fuente son clave.",testimonial1_name:"Jordan Lee",testimonial1_title:"Ingeniero/a líder de accesibilidad, Northwind",testimonial2_quote:"Por fin tenemos un proceso repetible para publicar páginas conformes. La navegación guiada mantiene a todos alineados.",testimonial2_name:"Priya Desai",testimonial2_title:"Gerente de experiencia digital, Fabrikam",testimonial3_quote:"Rápido, fiable y fácil de desplegar en equipos. DQM hace la calidad medible.",testimonial3_name:"Alex Müller",testimonial3_title:"Director/a de producto, Contoso",pricing_title:"Precios simples y transparentes",pricing_subtitle:"Elige el plan que funcione para tu equipo",plan_starter:"Inicial",plan_starter_feat1:"10 GB de almacenamiento",plan_starter_feat2:"100 GB de ancho de banda",plan_starter_feat3:"Soporte por email",plan_starter_feat4:"99.9% de disponibilidad",plan_cta_outline:"Comenzar",plan_badge_popular:"Popular",plan_pro:"Profesional",plan_pro_feat1:"100 GB de almacenamiento",plan_pro_feat2:"1 TB de ancho de banda",plan_pro_feat3:"Soporte prioritario",plan_pro_feat4:"99.99% de disponibilidad",plan_pro_feat5:"Analítica avanzada",plan_cta_primary:"Comenzar",plan_enterprise:"Empresarial",plan_enterprise_price:"Personalizado",plan_ent_feat1:"Almacenamiento ilimitado",plan_ent_feat2:"Ancho de banda ilimitado",plan_ent_feat3:"Soporte telefónico 24/7",plan_ent_feat4:"SLA de 99.99% de disponibilidad",plan_ent_feat5:"Gerente dedicado",plan_cta_contact:"Contactar ventas",cta_title:"¿Listo para empezar?",cta_subtitle:"Únete a miles de empresas que ya usan Cloudify. No se requiere tarjeta de crédito.",cta_button:"Comenzar prueba gratuita",footer_brand:"Cloudify",footer_tagline:"Infraestructura moderna para la próxima generación de aplicaciones.",footer_icon_speed:"Información de rendimiento",footer_icon_security:"Aspectos de seguridad",footer_icon_growth:"Métricas de crecimiento",footer_col_product:"Producto",footer_col_company:"Compañía",footer_col_resources:"Recursos",footer_col_support:"Soporte",footer_link_features:"Funciones",footer_link_pricing:"Precios",footer_link_integrations:"Integraciones",footer_link_docs:"Documentación",footer_link_contact:"Contáctanos",footer_link_about:"Acerca de",footer_link_blog:"Blog",footer_link_careers:"Carreras",footer_link_press:"Prensa",footer_link_presskit:"Kit de prensa",footer_link_faq:"Preguntas frecuentes",footer_link_guides:"Guías",footer_link_api:"Docs de API",footer_link_community:"Comunidad",footer_link_status:"Estado",footer_link_help:"Centro de ayuda",footer_link_terms:"Términos del servicio",footer_link_privacy:"Política de privacidad",footer_link_cookies:"Política de cookies",footer_copyright:"© 2025 Cloudify. Todos los derechos reservados. |",editor_title:"Editor HTML",debug_mode:"Modo de depuración activo",debug_desc:"El widget DQM analizará el HTML personalizado del editor en lugar del contenido de la página. Tu HTML se guarda automáticamente en IndexedDB.",tab_editor:"Editor HTML",tab_preview:"Vista previa",loading_html:"Cargando HTML desde IndexedDB...",reset_default:"Restablecer a valores predeterminados",preview_html:"Vista previa HTML",auto_saved:"Guardado automático en IndexedDB",close:"Cerrar",analyze_custom_html:"Analizar HTML personalizado"},Qa={en:{common:gT,sidebar:bT,auth:vT,demo:xT},de:{common:mT,sidebar:wT,auth:ST,demo:CT},es:{common:yT,sidebar:_T,auth:ET,demo:TT}},Kp={"de-AT":"de","de-CH":"de","de-DE":"de","es-ES":"es","es-MX":"es","es-AR":"es","en-US":"en","en-GB":"en","en-AU":"en"},AT=e=>{if(e in Qa)return e;if(e in Kp)return Kp[e];const t=e.split("-")[0];return t in Qa?t:"en"};ct.use(H0).init({resources:Qa,lng:vi,fallbackLng:{"de-AT":["de","en"],"de-CH":["de","en"],"es-MX":["es","en"],"es-AR":["es","en"],default:["en"]},interpolation:{escapeValue:!1},defaultNS:"common",supportedLngs:Object.keys(Qa),load:"languageOnly"});const kT=()=>typeof window>"u"?{locale:vi,source:"default",userOverride:!1}:vu(window.location.search,Hm(),navigator.language,vi),Eu=kT();typeof window<"u"&&ct.language!==Eu.locale&&ct.changeLanguage(Eu.locale);const Km=Rn({name:"locale",initialState:Eu,reducers:{setResolvedLocale:(e,t)=>{const n=t.payload;e.locale=n.locale,e.source=n.source,e.userOverride=n.userOverride,n.userOverride?Hi(n.locale):n.source!=="user"&&Hi(null),ct.language!==n.locale&&ct.changeLanguage(n.locale)},setUserLocale:(e,t)=>{e.locale=t.payload,e.source="user",e.userOverride=!0,Hi(t.payload),ct.language!==t.payload&&ct.changeLanguage(t.payload)},applyNavigatorLocale:e=>{if(typeof window>"u"||e.userOverride||e.source==="url")return;const t=vu(window.location.search,Hm(),navigator.language,vi);e.locale=t.locale,e.source=t.source,e.userOverride=t.userOverride,t.userOverride?Hi(t.locale):Hi(null),ct.language!==t.locale&&ct.changeLanguage(t.locale)},resetLocale:e=>{if(typeof window>"u")return;Hi(null);const t=vu(window.location.search,null,navigator.language,vi);e.locale=t.locale,e.source=t.source,e.userOverride=t.userOverride,ct.language!==t.locale&&ct.changeLanguage(t.locale)}}}),{setResolvedLocale:A2,setUserLocale:RT,applyNavigatorLocale:OT,resetLocale:IT}=Km.actions,PT=Km.reducer,Gp={url:"common:source_url",user:"common:source_user",navigator:"common:source_navigator",default:"common:source_default"},NT=({index:e=1})=>{const{t}=Rr(["common"]),r=D.useContext(Cr)?.store,[i,o]=D.useState(()=>r?.getState()?.locale);D.useEffect(()=>r?(o(r.getState().locale),r.subscribe(()=>{o(r.getState().locale)})):void 0,[r]);const s=D.useMemo(()=>({en:t("common:language_en"),de:t("common:language_de"),es:t("common:language_es")}),[t]);if(!r||!i)return null;const{locale:a,source:l,userOverride:c}=i,u=g=>{r.dispatch(RT(g))},f=()=>{r.dispatch(IT()),r.dispatch(OT())},p=l==="url",b=Gp[l]??Gp.default,h=t(b);return M(Rx,{locale:a,isUrlControlled:p,userOverride:!!c,switchLabel:t("common:language_switch_label"),sourceLabel:h,localeLabels:s,onSelect:u,onReset:f,resetLabel:t("common:reset"),index:e})},fr=(e,t)=>{typeof window>"u"||localStorage.setItem(e,t)},ga=e=>{typeof window>"u"||localStorage.removeItem(e)},MT=({config:e,onAuthSuccess:t,onAuthError:n,initialError:r})=>{const{t:i}=Rr(["auth","common"]),[o,s]=D.useState(""),[a,l]=D.useState(""),[c,u]=D.useState(!1),[f,p]=D.useState(r||null),b=!!e.authBackendUrl,h=!b,g=b;le.debug("[DQMLogin] Component rendered",{config:e,initialError:r,error:f,hasBackendAuth:b,showDirectCredentials:h,showBackendLogin:g}),D.useEffect(()=>{if(!e.authBackendUrl)return;const A=new URLSearchParams(window.location.search),_=A.get("sessionToken"),x=A.get("websiteId");if(_&&x){le.debug("[DQMLogin] 🎉 Found session token in URL, processing redirect"),typeof window<"u"&&e.useLocalStorage!==!1&&(fr("dqm_sessionToken",_),fr("dqm_websiteID",x),fr("dqm_sessionType","backend"),ga("dqm_apiKey"),le.debug("[DQMLogin] Backend session saved to localStorage"));const d=window.location.origin+window.location.pathname;window.history.replaceState({},document.title,d),t({apiKey:"BACKEND_SESSION",websiteId:x,sessionToken:_,sessionType:"backend"})}},[e.authBackendUrl,e.useLocalStorage,t]);const m=async()=>{if(!o||!a){p(i("auth:errors.missing_fields"));return}u(!0),p(null);try{if(!/^[\x00-\x7F]*$/.test(o))throw new Error(i("auth:errors.non_ascii_key"));if(e.authBackendUrl){const A=await fetch(`${e.authBackendUrl}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({apiKey:o,websiteId:a})});if(!A.ok){const x=await A.json().catch(()=>({}));throw new Error(x.message||`Authentication failed: ${A.statusText}`)}const _=await A.json();if(!_.sessionToken)throw new Error("Invalid response from authentication backend - missing session token");typeof window<"u"&&e.useLocalStorage!==!1&&(fr("dqm_sessionToken",_.sessionToken),fr("dqm_sessionType","backend"),ga("dqm_apiKey"),ga("dqm_websiteID"),le.debug("[DQMLogin] Backend session saved to localStorage")),t({apiKey:"BACKEND_SESSION",websiteId:_.websiteId||"BACKEND_SESSION",sessionToken:_.sessionToken,sessionType:"backend"})}else typeof window<"u"&&e.useLocalStorage!==!1&&(fr("dqm_apiKey",o),fr("dqm_websiteID",a),fr("dqm_sessionType","direct"),ga("dqm_sessionToken"),le.debug("[DQMLogin] Direct credentials saved to localStorage")),t({apiKey:o,websiteId:a,sessionType:"direct"})}catch(A){const _=A instanceof Error?A.message:"Authentication failed";p(_),n(A instanceof Error?A:new Error(_))}finally{u(!1)}},E=()=>{if(!e.authBackendUrl){p(i("auth:errors.backend_missing"));return}u(!0),p(null);try{const A=window.location.href;typeof window<"u"&&e.useLocalStorage!==!1&&fr("dqm_return_url",A),le.debug("[DQMLogin] 🔄 Redirecting to login page"),le.debug("[DQMLogin] Return URL:",A);const _=new URL(`${e.authBackendUrl}/auth/login`);_.searchParams.set("returnUrl",A),window.location.href=_.toString()}catch(A){const _=A instanceof Error?A.message:i("auth:errors.failed_redirect");p(_),n(A instanceof Error?A:new Error(_)),u(!1)}};return ne(P.Box,{sx:{display:"flex",flexDirection:"column",gap:3,p:3,width:"100%"},children:[ne(P.Box,{sx:{textAlign:"center"},children:[M(mt.Lock,{sx:{fontSize:50,color:"#711bc1",mb:2}}),M(P.Typography,{variant:"h5",gutterBottom:!0,fontWeight:700,children:i("auth:heading")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:i("auth:subheading")})]}),f&&M(P.Alert,{severity:"error",onClose:()=>p(null),children:f}),h&&ne(P.Box,{sx:{display:"flex",flexDirection:"column",gap:2},children:[M(P.Typography,{variant:"subtitle2",color:"text.secondary",children:i("auth:enter_credentials")}),M(P.TextField,{label:i("auth:website_id"),autoComplete:"username",value:a,onChange:A=>l(A.target.value),disabled:c,fullWidth:!0,required:!0,helperText:i("auth:website_id_helper")}),M(P.TextField,{label:i("auth:api_key"),type:"password",value:o,onChange:A=>s(A.target.value),disabled:c,fullWidth:!0,required:!0,helperText:i("auth:api_key_helper")}),M(P.Button,{variant:"outlined",onClick:m,disabled:c||!o||!a,fullWidth:!0,size:"large",children:c?M(P.CircularProgress,{size:24}):i("auth:continue")})]}),g&&h&&M(P.Divider,{children:i("auth:or")}),g&&M(P.Button,{variant:"contained",startIcon:M(mt.Login,{}),onClick:E,disabled:c,fullWidth:!0,size:"large",sx:{background:"linear-gradient(135deg, #711bc1 0%, #8e44d6 100%)","&:hover":{background:"linear-gradient(135deg, #5a0f9a 0%, #7339b8 100%)"}},children:c?M(P.CircularProgress,{size:24,color:"inherit"}):i("auth:login_backend")}),ne(P.Typography,{variant:"caption",color:"text.secondary",sx:{textAlign:"center"},children:[i("auth:no_credentials")," ",M(P.Link,{href:"https://www.crownpeak.com/firstspirit/products/digital-accessibility/digital-accessibility-and-quality-management-dqm/",target:"_blank",children:i("auth:get_started")})]})]})},DT={present:!1,rect:null,position:null,contentOffset:{top:0,bottom:0,left:0,right:0}};function LT(e){const t=window.innerWidth,n=window.innerHeight,r=e.width>=t*.9,i=e.height>=n*.9;if(r){if(e.top<=10)return"top";if(e.bottom>=n-10)return"bottom"}if(i){if(e.left<=10)return"left";if(e.right>=t-10)return"right"}return e.top<=10?"top":e.bottom>=n-10?"bottom":e.left<=10?"left":e.right>=t-10?"right":"center"}function $T(e,t){const n={top:0,bottom:0,left:0,right:0};switch(t){case"top":n.top=e.height;break;case"bottom":n.bottom=e.height;break;case"left":n.left=e.width;break;case"right":n.right=e.width;break}return n}function BT(e,t){return e.present!==t.present||e.position!==t.position?!1:e.rect===null&&t.rect===null?!0:e.rect===null||t.rect===null?!1:e.rect.height===t.rect.height&&e.rect.width===t.rect.width&&e.rect.top===t.rect.top&&e.rect.bottom===t.rect.bottom&&e.rect.left===t.rect.left&&e.rect.right===t.rect.right&&e.contentOffset.top===t.contentOffset.top&&e.contentOffset.bottom===t.contentOffset.bottom&&e.contentOffset.left===t.contentOffset.left&&e.contentOffset.right===t.contentOffset.right}function FT(e,t){const{root:n,check:r,pollMs:i=0}=t||{},o=D.useCallback(()=>{const c=(n??document).querySelector?.(e)??null;if(!(r?r(c):!!c)||!c)return DT;const f=c.getBoundingClientRect(),p=LT(f),b=$T(f,p);return{present:!0,rect:{height:f.height,width:f.width,top:f.top,bottom:f.bottom,left:f.left,right:f.right},position:p,contentOffset:b}},[n,e,r]),[s,a]=D.useState(()=>o());return D.useEffect(()=>{let l=null;const c=()=>{l!=null&&cancelAnimationFrame(l),l=requestAnimationFrame(()=>{const b=o();a(h=>BT(h,b)?h:b)})},u=n??document.documentElement,f=new MutationObserver(c);f.observe(u,{childList:!0,subtree:!0,attributes:!0}),c(),window.addEventListener("load",c),window.addEventListener("resize",c);let p=null;return i&&i>0&&(p=window.setInterval(c,i)),()=>{f.disconnect(),l!=null&&cancelAnimationFrame(l),p!=null&&clearInterval(p),window.removeEventListener("load",c),window.removeEventListener("resize",c)}},[o,n,i]),s}const Gm=e=>{const{selector:t,validateIframe:n=!0,pollMs:r=1e3,manualOffset:i}=e||{},o=t!=null&&t!=="",s=D.useCallback(l=>l?n&&l.tagName.toLowerCase()==="iframe"?!!l.contentWindow:!0:!1,[n]),a=FT(o?t:"__disabled__",o?{check:s,pollMs:r}:{pollMs:0});if(!o)return{present:!1,height:0,width:0,position:null,contentOffset:{top:0,bottom:0,left:0,right:0},isManualOffset:!1};if(!a.present)return{present:!1,height:0,width:0,position:null,contentOffset:{top:0,bottom:0,left:0,right:0},isManualOffset:!1};if(i){const l={top:0,bottom:0,left:0,right:0};return l[i.position]=i.pixels,{present:!0,height:i.position==="top"||i.position==="bottom"?i.pixels:0,width:i.position==="left"||i.position==="right"?i.pixels:0,position:i.position,contentOffset:l,isManualOffset:!0}}return{present:a.present,height:a.rect?.height??0,width:a.rect?.width??0,position:a.position,contentOffset:a.contentOffset,isManualOffset:!1}},Qm=D.createContext(null),Ym=()=>{const e=D.useContext(Qm);if(!e)throw new Error("useAI must be used within an AIProvider");return e},Jm=({children:e,translationConfig:t,summaryConfig:n})=>{const{i18n:r}=Rr(),[i,o]=D.useState(()=>{if(typeof window>"u")return t?.enabledByDefault===!0;const O=lt("dqm_translate_results_enabled");return O==null?t?.enabledByDefault===!0:O==="true"}),[s,a]=D.useState(()=>typeof window>"u"?"fast":lt("dqm_translate_results_mode")==="full"?"full":"fast"),[l,c]=D.useState(!1),[u,f]=D.useState(()=>{if(typeof window>"u")return!0;const O=lt("dqm_ai_summary_enabled");return O==="true"?!0:O!=="false"}),[p,b]=D.useState(()=>typeof window>"u"?"":lt("dqm_openai_apiKey")??""),[h,g]=D.useState(()=>typeof window>"u"?"gpt-4.1-mini":lt("dqm_openai_model")??"gpt-4.1-mini"),[m,E]=D.useState(()=>typeof window>"u"?"https://api.openai.com/v1":lt("dqm_openai_baseUrl")??"https://api.openai.com/v1"),A=D.useCallback(O=>{o(O)},[]),_=D.useCallback(O=>{a(O)},[]),x=D.useCallback(O=>{f(O)},[]),d=D.useCallback(O=>{b(O)},[]),w=D.useCallback(O=>{g(O)},[]),S=D.useCallback(O=>{E(O)},[]);D.useEffect(()=>{typeof window>"u"||yn("dqm_translate_results_enabled",i?"true":"false")},[i]),D.useEffect(()=>{typeof window>"u"||yn("dqm_translate_results_mode",s)},[s]),D.useEffect(()=>{typeof window>"u"||yn("dqm_ai_summary_enabled",u?"true":"false")},[u]),D.useEffect(()=>{typeof window>"u"||yn("dqm_openai_apiKey",p)},[p]),D.useEffect(()=>{typeof window>"u"||yn("dqm_openai_model",h)},[h]),D.useEffect(()=>{typeof window>"u"||yn("dqm_openai_baseUrl",m)},[m]);const C=D.useMemo(()=>(r.language||"en").split("-")[0],[r.language]),R=C!=="en",k=u||i||C==="en",T=D.useMemo(()=>{const O=t?.computeBudgetMs??15e3;return s==="full"?12e4:O},[t?.computeBudgetMs,s]),y=D.useMemo(()=>h.trim()||"gpt-4.1-mini",[h]),I=D.useMemo(()=>({translationEnabled:i,setTranslationEnabled:A,translationMode:s,setTranslationMode:_,translationDialogOpen:l,setTranslationDialogOpen:c,summaryEnabled:u,setSummaryEnabled:x,openAiApiKey:p,setOpenAiApiKey:d,openAiModel:h,setOpenAiModel:w,openAiBaseUrl:m,setOpenAiBaseUrl:S,targetLang:C,translationNeeded:R,aiEnabled:k,computeBudgetMs:T,effectiveModelId:y,translationConfig:t,summaryConfig:n}),[i,A,s,_,l,u,x,p,d,h,w,m,S,C,R,k,T,y,t,n]);return M(Qm.Provider,{value:I,children:e})},Xm="dqm.ai.translationCache",jT=1,Zm=()=>typeof indexedDB<"u",zT=()=>new Promise((e,t)=>{if(!Zm()){e();return}const n=indexedDB.deleteDatabase(Xm);n.onsuccess=()=>e(),n.onerror=()=>t(n.error??new Error("Failed to delete IndexedDB")),n.onblocked=()=>t(new Error("IndexedDB deletion blocked by open connections"))}),UT=()=>new Promise((e,t)=>{const n=indexedDB.open(Xm,jT);n.onupgradeneeded=()=>{const r=n.result;r.objectStoreNames.contains("checkpoint")||r.createObjectStore("checkpoint",{keyPath:"key"}),r.objectStoreNames.contains("label")||r.createObjectStore("label",{keyPath:"key"})},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error??new Error("Failed to open IndexedDB"))}),oi=async(e,t,n)=>{const r=await UT();return await new Promise((i,o)=>{const s=r.transaction(e,t),a=s.objectStore(e);n(a).then(i).catch(o),s.oncomplete=()=>r.close(),s.onerror=()=>{o(s.error??new Error("IndexedDB transaction failed")),r.close()}})},si=e=>new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error??new Error("IndexedDB request failed"))}),Ya=e=>{let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")},Ko=(e,t,n)=>`checkpoint|${e}|${t}|${n}`,Yi=e=>Ya(JSON.stringify({name:e?.name??"",description:e?.description??"",category:e?.category??"",topics:e?.topics??[]})),Ki=(e,t,n,r)=>`label|${e}|${t}|${n}|${r}`,qT=()=>Zm()?{getCheckpointMany:async e=>e.length===0?new Map:await oi("checkpoint","readonly",async t=>{const n=await Promise.all(e.map(async r=>{const i=await si(t.get(r));return i?[r,i]:null}));return new Map(n.filter(r=>r!==null))}),putCheckpointMany:async e=>{e.length!==0&&await oi("checkpoint","readwrite",async t=>{await Promise.all(e.map(n=>si(t.put(n))))})},deleteCheckpointMany:async e=>{e.length!==0&&await oi("checkpoint","readwrite",async t=>{await Promise.all(e.map(n=>si(t.delete(n))))})},getLabelMany:async e=>e.length===0?new Map:await oi("label","readonly",async t=>{const n=await Promise.all(e.map(async r=>{const i=await si(t.get(r));return i?[r,i]:null}));return new Map(n.filter(r=>r!==null))}),putLabelMany:async e=>{e.length!==0&&await oi("label","readwrite",async t=>{await Promise.all(e.map(n=>si(t.put(n))))})},clearAll:async()=>{try{await zT()}catch{await oi("checkpoint","readwrite",async e=>{await si(e.clear())}),await oi("label","readwrite",async e=>{await si(e.clear())})}}}:{getCheckpointMany:async()=>new Map,putCheckpointMany:async()=>{},deleteCheckpointMany:async()=>{},getLabelMany:async()=>new Map,putLabelMany:async()=>{},clearAll:async()=>{}},ey=()=>{const e=D.useMemo(()=>qT(),[]),t=D.useMemo(()=>new Map,[]),[n,r]=D.useState(null),i=D.useCallback(async()=>{if(typeof navigator>"u"||!navigator.storage?.persisted){r(null);return}try{const a=await navigator.storage.persisted();r(typeof a=="boolean"?a:null)}catch{r(null)}},[]),o=D.useCallback(async()=>{await e.clearAll(),t.clear()},[t,e]),s=D.useCallback(()=>{t.clear()},[t]);return{cache:e,assetCache:t,storagePersisted:n,refreshStorageState:i,clearAll:o,clearAssetCache:s}},HT=e=>{const t=(e.baseUrl??"https://api.openai.com/v1").replace(/\/+$/,""),n=e.model,r=e.apiKey;return{chatJson:async({system:i,user:o,maxTokens:s,schema:a,signal:l})=>{const c=a?`
|
|
114
114
|
|
|
115
115
|
Schema (JSON): ${a}`:"",u=await fetch(`${t}/chat/completions`,{method:"POST",headers:{Authorization:`Bearer ${r}`,"Content-Type":"application/json"},body:JSON.stringify({model:n,temperature:0,max_tokens:s,response_format:{type:"json_object"},messages:[{role:"system",content:`${i}${c}`},{role:"user",content:o}]}),signal:l});if(!u.ok){const p=await u.text().catch(()=>"");throw new Error(`OpenAI API error: ${u.status} ${u.statusText}${p?`
|
|
116
|
-
${p}`:""}`)}const f=await u.json();return{content:f.choices?.[0]?.message?.content??"",finishReason:f.choices?.[0]?.finish_reason??null}}}},xu=e=>{const{enabled:t,openAiApiKey:n,openAiModel:r="gpt-4.1-mini",openAiBaseUrl:i="https://api.openai.com/v1"}=e,{t:o}=
|
|
116
|
+
${p}`:""}`)}const f=await u.json();return{content:f.choices?.[0]?.message?.content??"",finishReason:f.choices?.[0]?.finish_reason??null}}}},xu=e=>{const{enabled:t,openAiApiKey:n,openAiModel:r="gpt-4.1-mini",openAiBaseUrl:i="https://api.openai.com/v1"}=e,{t:o}=Rr("sidebar"),[s,a]=D.useState(t?"initializing":"disabled"),[l,c]=D.useState(null),[u,f]=D.useState(!1),[p,b]=D.useState(null),h=D.useRef(null),g=D.useRef(null),m=D.useRef(Promise.resolve()),E=D.useCallback(()=>{g.current?.abort(),g.current=null,h.current?.interrupt?.()},[]),A=D.useCallback(async _=>{const x=m.current.catch(()=>{});let d=()=>{};const w=new Promise(S=>{d=S});m.current=x.then(()=>w),await x;try{return await _()}finally{d()}},[]);return D.useEffect(()=>{if(!t){E(),h.current=null,a("disabled"),b(null),f(!1),c(null);return}if(!n||n.trim().length===0){a("error"),b(o("openai_missing_key")),f(!1),h.current=null;return}const _=r.trim()||"gpt-4.1-mini";h.current=HT({apiKey:n.trim(),model:_,baseUrl:i.trim()||"https://api.openai.com/v1"}),a("ready"),f(!0),b(null),c(_)},[t,n,i,r,o,E]),{client:h.current,state:s,loadedModelId:l,isReady:u,error:p,runWithLock:A,stop:E}},ot=e=>e&&e.replace(/(<li>\s*)(?:Nächste(?:r|n)? Schritt:|Next step:)\s*/gi,"$1").replace(/(^\s*(?:[-*]\s*|\d+\.\s*)?)(?:Nächste(?:r|n)? Schritt:|Next step:)\s*/gim,"$1"),Er=e=>Math.ceil(e.length/4),ty=e=>{const t=e.toLowerCase();return t.startsWith("gpt-")||t.includes("gpt-4")||t.includes("gpt-3.5")||t.includes("o1")||t.includes("o3")?12e3:t.includes("ctx4k")||t.includes("4k")?3500:t.includes("-1k")||t.includes("ctx1k")||t.includes("1k")?900:2500},dd=e=>{const t=(e||"").toLowerCase().split("-")[0];return t==="en"?"English":t==="de"?"German":t==="es"?"Spanish":t||e||"the target language"},Ji=e=>{const t=(e||"").toLowerCase().split("-")[0];return t==="en"?"Write in English.":t==="de"?"Schreibe auf Deutsch.":t==="es"?"Escribe en español.":`Write in ${dd(e)} (${e}).`},ny=e=>{const t=e instanceof Error?e.message:String(e);return/Prompt tokens exceed context window size/i.test(t)||/context window size/i.test(t)},wr=(e,t)=>!e||e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`,Pc=(e,t,n,r,i,o)=>{const s=o?.maxDescriptionChars??(i<=1024?600:2400),a=o?.dropTopics===!0,l=r.map(b=>({...b,name:wr(b.name,220),category:wr(b.category,140),topics:a?[]:(b.topics??[]).map(h=>wr(h,60)).slice(0,8),description:wr(b.description??"",s)})),c=b=>JSON.stringify({targetLanguage:n,items:b,schema:t});let u=l,f=Er(e)+Er(c(u))+128,p=s;for(;f>i&&p>200;)p=Math.floor(p*.7),u=u.map(b=>({...b,description:wr(b.description??"",p)})),f=Er(e)+Er(c(u))+128;return f>i&&u.length>1&&(u=[u[0]]),u},VT=e=>{const t=e.trim(),n=t.indexOf("{"),r=t.lastIndexOf("}");if(n>=0&&r>n)return t.slice(n,r+1);const i=t.indexOf("{");if(i<0)return null;let o=0,s=!1,a=!1;for(let l=i;l<t.length;l+=1){const c=t[l];if(s){if(a){a=!1;continue}if(c==="\\\\"){a=!0;continue}c==='"'&&(s=!1);continue}if(c==='"'){s=!0;continue}if(c==="{"&&(o+=1),c==="}"&&(o-=1,o===0))return t.slice(i,l+1)}return null},WT=e=>{const t=e.trim();try{return JSON.parse(t)}catch{const n=VT(t);if(n)try{return JSON.parse(n)}catch(r){throw new Error(`Failed to parse JSON from model output: ${r.message}
|
|
117
117
|
Output: ${t.slice(0,500)}`)}throw new Error(`Failed to parse JSON from model output.
|
|
118
|
-
Output: ${t.slice(0,500)}`)}},Qn=async e=>{const{client:t,system:n,payload:r,maxTokens:i,schema:o,fallback:s,resetChat:a,retries:l=1,cooldownMs:c=50,signal:u}=e,f=()=>t.interrupt?.();u?.addEventListener("abort",f,{once:!0});try{const p=async h=>{h<=0||await new Promise(g=>setTimeout(g,h))};let b=null;for(let h=0;h<=l;h+=1){if(u?.aborted)throw new DOMException("Aborted","AbortError");if((a||h>0)&&t.reset)try{await t.reset(!0)}catch{}const g=JSON.stringify(r);let m;try{m=await t.chatJson({system:n,user:g,maxTokens:i,schema:o,resetChat:a,signal:u})}catch(A){const _=A instanceof Error?A.message.toLowerCase():"";throw A}if(u?.aborted)throw new DOMException("Aborted","AbortError");const E=m.content;if(!E||E.trim().length===0){if(b=new Error("Model returned empty response"),b.code="EMPTY_MODEL_RESPONSE",h<l){await p(c);continue}throw b}try{return WT(E)}catch(A){const _=s?.(E);if(_)return _;if(b=A,h<l){await p(c);continue}throw A}}throw b instanceof Error?b:new Error(String(b))}finally{u?.removeEventListener("abort",f)}},KT=e=>{const t=e.indexOf('"bullets"');if(t<0)return[];const n=e.indexOf("[",t);if(n<0)return[];const r=[];let i=n+1;for(;i<e.length&&r.length<12;){for(;i<e.length&&/\s|,/.test(e[i]);)i+=1;if(i>=e.length||e[i]==="]")break;if(e[i]!=='"'){i+=1;continue}i+=1;let o="",s=!1;for(;i<e.length;){const a=e[i];if(s){o+=a,s=!1,i+=1;continue}if(a==="\\\\"){s=!0,i+=1;continue}if(a==='"'){r.push(o.trim()),i+=1;break}o+=a,i+=1}if(i>=e.length)break}return r.filter(o=>o.length>0).slice(0,8)},GT=e=>e?e.split(/\r?\n+/).map(t=>t.trim().replace(/^[*-]\s*/,"").replace(/^\d+\.\s*/,"")).filter(t=>t.length>0).slice(0,8):[],QT=async e=>{const{client:t,data:n,targetLanguage:r,signal:i}=e,o=e.modelId??"unknown",s=ty(o),a=dd(r),l=Math.max(800,Math.floor(s*.5)),c=Date.now(),u={chunked:!1,chunkCount:0,totalFailed:n.checkpoints.filter(C=>C.failed).length,attempts:0,emptyResponses:0,fallbackUsed:"none",modelId:o,targetLang:r,durationMs:0},f=(C,R)=>n.checkpoints.filter(k=>k.failed).slice(0,C).map(k=>({id:k.id,category:k.category,name:k.name??"",description:br(k.description??"",R)})),p={targetLanguage:r,stats:{siteName:n.siteName,failedCount:n.totalErrors}},b=JSON.stringify({type:"object",properties:{bullets:{type:"array",items:{type:"string"}}},required:["bullets"],additionalProperties:!1}),h=["You are an assistant that summarizes a website quality/accessibility report for developers.",`Write in ${a} (${r}).`,Yi(r),"Return 5–7 concise bullet points with the most important findings and next actions.","Each bullet must be <= 140 characters.",'No prefixes like "Next step:" / "Nächster Schritt:".',"Base the summary on the checkpoint texts (name/description).","Prefer actionable wording and group similar issues.","Do not hallucinate; only use the provided data.","Return JSON only."].join(" "),g=C=>{const R=KT(C);return R.length>0?{bullets:R}:null},m=async(C,R=4)=>{const k={...p,failedCheckpoints:C.map(y=>({id:y.id,category:y.category,name:y.name??"",description:br(y.description??"",260)}))};return u.attempts+=1,((await Qn({client:t,system:h,payload:k,maxTokens:r.toLowerCase().startsWith("en")?512:640,schema:b,fallback:g,resetChat:!0,retries:1,cooldownMs:100,signal:i})).bullets??[]).filter(y=>typeof y=="string"&&y.trim().length>0).slice(0,R)},E=async C=>{const R={...p,failedCheckpoints:C.map(T=>({id:T.id,category:T.category,name:T.name??"",description:br(T.description??"",180)}))};return u.attempts+=1,((await Qn({client:t,system:h,payload:R,maxTokens:r.toLowerCase().startsWith("en")?320:420,schema:b,fallback:g,resetChat:!0,retries:0,cooldownMs:80,signal:i})).bullets??[]).filter(T=>typeof T=="string"&&T.trim().length>0).slice(0,4)},A=C=>{const R=[];let k=[];const T=y=>Sr(JSON.stringify({targetLanguage:r,checkpoints:y.map(I=>({name:I.name??"",description:br(I.description??"",220),category:I.category??""}))}));for(const y of C){const I=[...k,y];(I.length>4||T(I)>l)&&k.length>0?(R.push(k),k=[y]):k=I}return k.length>0&&R.push(k),R},_=n.checkpoints.filter(C=>C.failed);if(_.length>3||Sr(JSON.stringify(_))>Math.floor(l*.5)){const C=A(_);u.chunked=!0,u.chunkCount=C.length;const R=[];for(const T of C){if(i?.aborted)throw new DOMException("Aborted","AbortError");try{const y=await m(T,4);R.push(...y)}catch{continue}}const k=Array.from(new Set(R.map(T=>T.trim()))).filter(Boolean).slice(0,14);if(k.length>0){const T=["You merge bullet points about website quality/accessibility issues for developers.",`Write in ${a} (${r}).`,Yi(r),"Return 5–7 concise bullets (<= 140 chars) combining similar issues; do not invent new facts.","Use only the provided bullets.","Return JSON only."].join(" ");u.attempts+=1;const I=((await Qn({client:t,system:T,payload:{targetLanguage:r,bullets:k},maxTokens:r.toLowerCase().startsWith("en")?384:512,schema:JSON.stringify({type:"object",properties:{bullets:{type:"array",items:{type:"string"}}},required:["bullets"],additionalProperties:!1}),resetChat:!0,retries:1,cooldownMs:120,signal:i})).bullets??[]).filter(O=>typeof O=="string"&&O.trim().length>0).slice(0,7);if(I.length>0)return u.fallbackUsed="chunk",u.chunked=!0,u.chunkCount=C.length,u.durationMs=Date.now()-c,{bullets:I,stats:u};u.emptyResponses+=1}}const d=[{maxItems:8,descChars:420,maxTokens:s<=1024?512:640},{maxItems:6,descChars:320,maxTokens:s<=1024?640:896},{maxItems:4,descChars:220,maxTokens:s<=1024?768:1152},{maxItems:3,descChars:180,maxTokens:s<=1024?896:1280}];let w=null;for(const C of d){if(i?.aborted)throw new DOMException("Aborted","AbortError");let R=C.descChars,k=C.maxItems,T={...p,failedCheckpoints:f(k,R)};const y=Math.max(600,Math.floor(s*.6));let I=Sr(JSON.stringify(T));for(;I>y&&k>3;)k=Math.max(3,Math.floor(k*.8)),R=Math.max(120,Math.floor(R*.8)),T={...p,failedCheckpoints:f(k,R)},I=Sr(JSON.stringify(T));try{u.attempts+=1;const O=await Qn({client:t,system:h,payload:T,maxTokens:C.maxTokens,schema:b,fallback:g,resetChat:!0,retries:2,cooldownMs:120,signal:i}),L=Array.isArray(O.bullets)?O.bullets.filter(U=>typeof U=="string"&&U.trim().length>0).slice(0,8):[];if(L.length>0){if(u.fallbackUsed=u.fallbackUsed==="none"?"single":u.fallbackUsed,(r||"").toLowerCase().startsWith("en"))return u.durationMs=Date.now()-c,{bullets:L,stats:u};const U=JSON.stringify({type:"object",properties:{bullets:{type:"array",items:{type:"string"}}},required:["bullets"],additionalProperties:!1}),Z=[`Translate to ${a} (${r}).`,Yi(r),"Translate each bullet. Keep them concise (<= 140 characters) and preserve technical meaning.","Return JSON only."].join(" ");u.attempts+=1;const V=await Qn({client:t,system:Z,payload:{targetLanguage:r,bullets:L},maxTokens:256,schema:U,resetChat:!0,retries:1,cooldownMs:75,signal:i}),Q=Array.isArray(V.bullets)?V.bullets.filter(F=>typeof F=="string"&&F.trim().length>0).slice(0,8):[];return u.fallbackUsed="single",u.durationMs=Date.now()-c,{bullets:Q.length>0?Q:L,stats:u}}w=new Error("Model returned empty summary")}catch(O){const L=O?.code;if(w=O instanceof Error?O:new Error(String(O)),L==="EMPTY_MODEL_RESPONSE"){u.emptyResponses+=1;try{const U=await E(_.slice(0,4));if(U.length>0)return u.fallbackUsed="tiny",u.durationMs=Date.now()-c,{bullets:U,stats:u}}catch{}continue}if(ny(O))continue;continue}}if(i?.aborted)throw new DOMException("Aborted","AbortError");try{const C=["You summarize website quality/accessibility issues for developers.",`Write in ${a} (${r}).`,Yi(r),"Return 5-7 bullet points, each <= 140 characters, no numbering prefixes.","Use only the provided data; do not invent issues."].join(" "),R={...p,failedCheckpoints:f(4,160)};u.attempts+=1;const T=(await e.client.chatJson({system:C,user:JSON.stringify(R),maxTokens:480,resetChat:!0,signal:i})).content??"",y=GT(T).map(nt);if(y.length>0)return u.fallbackUsed=u.fallbackUsed==="none"?"single":u.fallbackUsed,u.durationMs=Date.now()-c,{bullets:y,stats:u};u.emptyResponses+=1,w=new Error("Model returned empty summary")}catch(C){w=C instanceof Error?C:new Error(String(C))}u.durationMs=Date.now()-c,u.fallbackUsed=u.fallbackUsed==="none"?"fail":u.fallbackUsed;const S=w instanceof Error?w:new Error(String(w));throw S.stats=u,S},YT=async e=>{const{client:t,data:n,targetLanguage:r,modelId:i,cache:o,computeBudgetMs:s=15e3,maxConcurrentBatches:a=1,maxItemsPerBatch:l,forceSerial:c=!1,onProgress:u,onBatchStatus:f,onPartialResult:p,signal:b}=e,h=Date.now(),g=n.checkpoints.filter(q=>q.failed),m=g.length;let E=!1;const A=ty(i),_=i.toLowerCase(),x=_.startsWith("gpt-")||_.includes("gpt-4")||_.includes("gpt-3.5")||_.includes("o1")||_.includes("o3"),d=l&&l>0?l:x?A<=1024?1:2:1,w=dd(r),S=Math.max(600,Math.floor(A*.6)),C=new Map,R=new Map,k=new Map,T=Date.now(),y=[`You are a professional translator. Translate ALL text to ${w} (${r}).`,Yi(r),"CRITICAL: ALL text fields MUST be translated to the target language. Do not leave any text in the source language.","Preserve meaning and technical terms; if an English technical term is commonly used in the target language, keep the original term instead of inventing a new one.","Keep HTML tags/attributes unchanged; translate only visible text content.","Output JSON only and only keys allowed by schema.",'Do not add prefixes like "Next step:" / "Nächster Schritt:".'].join(" "),I=Array.from(new Set(n.checkpoints.map(q=>q.category).filter(q=>typeof q=="string"&&q.trim().length>0))),O=Array.from(new Set(n.checkpoints.flatMap(q=>q.topics??[]).filter(q=>typeof q=="string"&&q.trim().length>0)));if(I.length>0)try{const q=new Map,re=[];for(const ce of I){const B=Ja(ce);q.set(ce,B),re.push(Wi(i,r,"category",B))}const Y=o?await o.getLabelMany(re):new Map;for(const ce of I){const B=Wi(i,r,"category",q.get(ce)),me=Y.get(B);me?.translated&&R.set(ce,me.translated)}const W=I.filter(ce=>!R.has(ce));if(W.length!==0){const me=(await Qn({client:t,system:y,payload:{targetLanguage:r,items:W},maxTokens:512,schema:JSON.stringify({type:"object",properties:{items:{type:"array",items:{type:"string"}}},required:["items"],additionalProperties:!1}),retries:1,cooldownMs:50,signal:b})).items??[],Ee=[];for(let be=0;be<W.length;be+=1){const Te=W[be],je=me[be];if(typeof je=="string"&&je.trim().length>0&&(R.set(Te,nt(je)),o)){const xe=q.get(Te);Ee.push({key:Wi(i,r,"category",xe),modelId:i,lang:r,type:"category",source:Te,sourceHash:xe,translated:nt(je),updatedAt:T})}}await o?.putLabelMany(Ee)}}catch{E=!0}if(O.length>0)try{const q=new Map,re=[];for(const ce of O){const B=Ja(ce);q.set(ce,B),re.push(Wi(i,r,"topic",B))}const Y=o?await o.getLabelMany(re):new Map;for(const ce of O){const B=Wi(i,r,"topic",q.get(ce)),me=Y.get(B);me?.translated&&k.set(ce,me.translated)}const W=O.filter(ce=>!k.has(ce));if(W.length!==0){const ce={targetLanguage:r,items:W},me=(await Qn({client:t,system:`${y} Treat "topics" as tags/labels and translate them.`,payload:ce,maxTokens:512,schema:JSON.stringify({type:"object",properties:{items:{type:"array",items:{type:"string"}}},required:["items"],additionalProperties:!1}),retries:1,cooldownMs:50,signal:b})).items??[],Ee=[];for(let be=0;be<W.length;be+=1){const Te=W[be],je=me[be];if(typeof je=="string"&&je.trim().length>0&&(k.set(Te,nt(je)),o)){const xe=q.get(Te);Ee.push({key:Wi(i,r,"topic",xe),modelId:i,lang:r,type:"topic",source:Te,sourceHash:xe,translated:nt(je),updatedAt:T})}}await o?.putLabelMany(Ee)}}catch{E=!0}const L={targetLanguage:r,items:[]},U=JSON.stringify({type:"object",properties:{targetLanguage:{type:"string"},items:{type:"array",items:{type:"object",properties:{id:{type:"string"},category:{type:"string"},name:{type:"string"},description:{type:"string"},topics:{type:"array",items:{type:"string"}}},required:["id","category","name","description","topics"],additionalProperties:!1}}},required:["targetLanguage","items"],additionalProperties:!1});let Z=0;if(o){const q=g.map(W=>Vo(i,r,Qi(W))),re=await o.getCheckpointMany(q),Y=[];for(const W of g){const ce=Vo(i,r,Qi(W)),B=re.get(ce),me=Qi(W);if(B&&B.sourceHash===me){C.set(W.id,{name:B.translated.name,description:B.translated.description,category:B.translated.category,topics:B.translated.topics}),W.category&&B.translated.category&&R.set(W.category,B.translated.category);for(let Ee=0;Ee<(W.topics??[]).length;Ee+=1){const be=W.topics?.[Ee],Te=B.translated.topics?.[Ee];be&&Te&&k.set(be,Te)}Z+=1,Y.push(W.id)}}u?.({translatedCheckpoints:Z,totalCheckpoints:m,isPartial:!1}),Y.length>0&&(f?.({ids:Y,status:"done"}),p?.(ci(n,C,R,k)))}if(g.length===0){const q={translatedCheckpoints:0,totalCheckpoints:0,isPartial:!1};return u?.(q),{data:ci(n,C,R,k),progress:q}}const V=g.filter(q=>!C.has(q.id)),Q=[],F=q=>{const re=[];let Y=[];const W=ce=>Sr(JSON.stringify({targetLanguage:r,items:ce.map(B=>({category:B.category??"",name:B.name??"",description:B.description??"",topics:B.topics??[]}))}));for(const ce of q){const B=[...Y,ce],me=B.length>d,Ee=W(B)>S;(me||Ee)&&Y.length>0?(re.push({batch:Y,missing:Y}),Y=[ce]):Y=B}return Y.length>0&&re.push({batch:Y,missing:Y}),re};Q.push(...F(V));const z=c?1:Math.max(1,Math.min(a,4));let se=0,te=!1;const J=async()=>{for(;;){if(b?.aborted)throw new DOMException("Aborted","AbortError");if(Date.now()-h>s){te=!0;return}const q=se;if(q>=Q.length||te)return;se+=1;const{batch:re,missing:Y}=Q[q],W=Y.map(we=>({id:we.id,category:we.category??"",name:we.name??"",description:we.description??"",topics:we.topics??[]})),ce=new Map(W.map(we=>[we.id,we])),B=Pc(y,L,r,W,A,{dropTopics:A<=1024}),me={...L,items:B};f?.({ids:B.map(we=>we.id),status:"translating"});const Ee=new Map(B.map(we=>[we.id,we])),be=async(we,Ae)=>Qn({client:t,system:y,payload:{...L,items:we},maxTokens:Ae,schema:U,retries:1,cooldownMs:75,signal:b});let Te=null;try{Te=await be(me.items,2048)}catch{try{Te=await be(me.items,3072)}catch(Ae){if(ny(Ae)){E=!0;for(const rt of me.items.slice(0,1)){if(b?.aborted)throw new DOMException("Aborted","AbortError");const ft=Pc(y,L,r,[rt],A,{maxDescriptionChars:350,dropTopics:!0});try{const pt=(await be(ft,1024)).items?.[0];pt?.id&&C.set(pt.id,{category:nt(pt.category),name:nt(pt.name),description:nt(pt.description),topics:(pt.topics??[]).map(At=>nt(At))})}catch{}}Z=Math.min(m,Z+1),u?.({translatedCheckpoints:Z,totalCheckpoints:m,isPartial:!1}),p?.(ci(n,C,R,k)),f?.({ids:B.map(rt=>rt.id),status:"done"});continue}E=!0;for(const rt of me.items){if(b?.aborted)throw new DOMException("Aborted","AbortError");if(Date.now()-h>s){te=!0;break}try{const qe=(await be([rt],1024)).items?.[0];if(qe?.id){C.set(qe.id,{category:nt(qe.category),name:nt(qe.name),description:nt(qe.description),topics:(qe.topics??[]).map(At=>nt(At))});const pt=Qi(ce.get(qe.id)??rt);await o?.putCheckpointMany([{key:Vo(i,r,pt),modelId:i,lang:r,checkpointId:qe.id,sourceHash:pt,translated:{name:nt(qe.name),description:nt(qe.description),category:nt(qe.category),topics:(qe.topics??[]).map(At=>nt(At))},updatedAt:T}])}}catch{E=!0}}Z=Math.min(m,Z+Y.length),u?.({translatedCheckpoints:Z,totalCheckpoints:m,isPartial:!1}),p?.(ci(n,C,R,k)),f?.({ids:B.map(rt=>rt.id),status:"done"});continue}}const xe=await(async we=>{if((r||"").toLowerCase().startsWith("en"))return we;try{const Ae=[`Ensure the following texts are in ${w} (${r}).`,Yi(r),"Assume the source is English unless it clearly matches the target language; translate any English text.","If text is already in the target language, keep it unchanged; otherwise translate.","Preserve HTML tags and technical meaning.","Return JSON only."].join(" ");return(await Qn({client:t,system:Ae,payload:{targetLanguage:r,items:we},maxTokens:1536,schema:U,retries:0,cooldownMs:50,signal:b})).items??we}catch{return we}})(Te.items??[]),dt=xe.filter(we=>{const Ae=Ee.get(we.id);if(!Ae)return!1;const rt=(we.name??"").trim()===(Ae.name??"").trim(),ft=(we.description??"").trim()===(Ae.description??"").trim(),qe=(we.category??"").trim()===(Ae.category??"").trim();return!r.toLowerCase().startsWith("en")&&(rt||ft||qe)}),Jt=async we=>{const Ae=Pc(y,L,r,[we],A,{maxDescriptionChars:400,dropTopics:!0});return(await Qn({client:t,system:y,payload:{...L,items:Ae},maxTokens:1024,schema:U,retries:0,cooldownMs:50,signal:b})).items?.[0]};if(dt.length>0){E=!0;for(const we of dt){if(b?.aborted)throw new DOMException("Aborted","AbortError");const Ae=ce.get(we.id)??Ee.get(we.id);if(Ae)try{const rt=await Jt(Ae);rt&&(we.category=nt(rt.category),we.name=nt(rt.name),we.description=nt(rt.description),we.topics=(rt.topics??[]).map(ft=>nt(ft)))}catch{}}}for(const we of xe??[])C.set(we.id,{category:nt(we.category),name:nt(we.name),description:nt(we.description),topics:(we.topics??[]).map(Ae=>nt(Ae))});if(o){const we=(xe??[]).map(Ae=>{const rt=ce.get(Ae.id)??me.items.find(qe=>qe.id===Ae.id),ft=Qi(rt??Ae);return{key:Vo(i,r,ft),modelId:i,lang:r,checkpointId:Ae.id,sourceHash:ft,translated:{name:nt(Ae.name),description:nt(Ae.description),category:nt(Ae.category),topics:(Ae.topics??[]).map(qe=>nt(qe))},updatedAt:T}});await o.putCheckpointMany(we)}Z=Math.min(m,Z+Y.length),u?.({translatedCheckpoints:Z,totalCheckpoints:m,isPartial:!1}),p?.(ci(n,C,R,k)),f?.({ids:B.map(we=>we.id),status:"done"})}},oe=Array.from({length:z},()=>J());if(await Promise.all(oe),te){const q={translatedCheckpoints:Z,totalCheckpoints:m,isPartial:!0};return u?.(q),{data:ci(n,C,R,k),progress:q}}const le={translatedCheckpoints:Z,totalCheckpoints:m,isPartial:E};return u?.(le),{data:ci(n,C,R,k),progress:le}},ci=(e,t,n,r)=>({...e,checkpoints:e.checkpoints.map(i=>{const o=t.get(i.id),s=n.get(i.category)??o?.category??i.category;return o?{...Qp(i),category:s,name:o.name??i.name,description:o.description??i.description,topics:(o.topics??i.topics??[]).map(a=>r.get(a)??a)}:{...Qp(i),category:s,topics:(i.topics??[]).map(a=>r.get(a)??a)}})}),Qp=e=>({...e,colors:{...e.colors},topics:Array.isArray(e.topics)?[...e.topics]:[],canHighlight:{...e.canHighlight},checkpointType:e.checkpointType?{...e.checkpointType}:e.checkpointType}),ry=e=>{const{engine:t,cacheManager:n,originalData:r,targetLang:i,modelId:o,enabled:s,mode:a,computeBudgetMs:l,persistentCache:c,summaryGenerating:u=!1}=e,{t:f}=kr("sidebar"),[p,b]=D.useState(null),[h,g]=D.useState(null),[m,E]=D.useState(null),[A,_]=D.useState(new Set),[x,d]=D.useState(new Set),[w,S]=D.useState(0),C=D.useRef(null),R=D.useRef(null),k=D.useRef(!1),T=D.useRef(void 0),y=D.useRef(t),I=D.useRef(n),O=D.useRef(r),L=D.useRef(i),U=D.useRef(o),Z=D.useRef(s),V=D.useRef(a),Q=D.useRef(l),F=D.useRef(c),z=D.useRef(u),se=D.useRef(f);D.useEffect(()=>{y.current=t,I.current=n,O.current=r,L.current=i,U.current=o,Z.current=s,V.current=a,Q.current=l,F.current=c,z.current=u,se.current=f});const te=r?.assetId??null,J=i!=="en",oe=A.size>0,le=D.useCallback(()=>{C.current?.abort(),C.current=null},[]),q=D.useCallback(()=>{b(O.current),_(new Set),d(new Set)},[]),re=D.useCallback(()=>{const ce=O.current;return ce?`${ce.assetId}:${L.current}:${U.current}`:""},[]),Y=D.useCallback(()=>{if(!O.current)return;if(L.current==="en"){E(se.current("translation_not_needed")),q();return}const B=re();I.current.assetCache.delete(B),R.current=null,k.current=!1,q(),le(),E(null),g(null),b(null),_(new Set),d(new Set),S(me=>me+1)},[re,q,le]),W=D.useCallback(async ce=>{const B=O.current;if(!B||!Z.current)return;const me=B.checkpoints.find(be=>be.id===ce);if(!me)return;const Ee=re();I.current.assetCache.delete(Ee),d(be=>{const Te=new Set(be);return Te.delete(ce),Te}),_(be=>{const Te=new Set(be);return Te.delete(ce),Te});try{const be=Qi(me),Te=Vo(U.current,L.current,be);await F.current.deleteCheckpointMany([Te])}catch{}R.current=null,S(be=>be+1)},[re]);return D.useEffect(()=>{const ce=`${te}:${i}:${o}:${a}`;if(!s){b(null),g(null),E(null),_(new Set),d(new Set);return}if(!te||z.current)return;if(!J){g(null),E(se.current("translation_not_needed")),b(O.current);return}if(k.current||R.current===ce||!y.current.isReady||!y.current.client)return;const B=O.current;if(!B)return;const me=re(),Ee=I.current.assetCache.get(me);if(Ee){E(null),g({translatedCheckpoints:Ee.checkpoints.length,totalCheckpoints:Ee.checkpoints.length,isPartial:!1}),b(Ee),R.current=ce;return}R.current=ce,k.current=!0,le();const be=new AbortController;C.current=be,_(new Set),d(new Set),E(null),g(null),fe.debug("Translation: start (once)");const Te=y.current.client,je=y.current.runWithLock;return je(async()=>YT({client:Te,data:B,targetLanguage:L.current,modelId:U.current,maxConcurrentBatches:3,maxItemsPerBatch:12,forceSerial:!1,cache:F.current,computeBudgetMs:Q.current,signal:be.signal,onProgress:xe=>g(xe),onBatchStatus:()=>{},onPartialResult:()=>{}})).then(({data:xe,progress:dt})=>{be.signal.aborted||(fe.debug("Translation: done"),I.current.assetCache.set(me,xe),b(xe),dt.isPartial&&E(V.current==="full"?se.current("translation_incomplete"):se.current("translation_partial")),_(new Set),d(new Set))}).catch(xe=>{be.signal.aborted||(fe.error("Translation: failed",xe),E(xe instanceof Error?xe.message:String(xe)),b(B),_(new Set),d(new Set))}).finally(()=>{k.current=!1}),()=>{be.abort()}},[te,i,o,a,s,J,w,re,le]),{translatedData:p,progress:h,error:m,translatingIds:A,translatedIds:x,isTranslating:oe,restart:Y,stop:le,retrySingleCheckpoint:W,resetToOriginal:q,onDataChange:T.current}},iy=e=>{const{engine:t,originalData:n,targetLang:r,modelId:i,enabled:o,timeoutMs:s=45e3,translationInProgress:a=!1,cache:l}=e,{t:c}=kr("sidebar"),[u,f]=D.useState("idle"),[p,b]=D.useState(null),[h,g]=D.useState(null),[m,E]=D.useState(0),[A,_]=D.useState(null),x=D.useRef(new Map),d=D.useRef(null),w=D.useRef(r),S=D.useRef(!1),C=D.useRef(null),R=D.useRef(t),k=D.useRef(n),T=D.useRef(r),y=D.useRef(i),I=D.useRef(o),O=D.useRef(s),L=D.useRef(a),U=D.useRef(l),Z=D.useRef(c);D.useEffect(()=>{R.current=t,k.current=n,T.current=r,y.current=i,I.current=o,O.current=s,L.current=a,U.current=l,Z.current=c});const V=D.useCallback(()=>{d.current?.abort(),d.current=null,S.current=!1,C.current=null,x.current.clear(),g(null),b(null),_(null),f("idle"),E(F=>F+1)},[]),Q=n?.assetId??null;return D.useEffect(()=>{w.current!==r&&(w.current=r,C.current=null,b(null),g(null),_(null),f("idle"))},[r]),D.useEffect(()=>{m>0&&(C.current=null)},[m]),D.useEffect(()=>{const F=`${Q}:${r}:${i}`;if(!I.current){f("idle");return}if(!Q||L.current||S.current||C.current===F||!R.current.isReady||!R.current.client)return;const z=k.current;if(!z)return;const te=(()=>{const Y=(z.checkpoints||[]).filter(W=>W.failed).map(W=>({id:W.id??"",name:W.name??"",description:W.description??"",category:W.category??"",topics:[...W.topics??[]].sort()})).sort((W,ce)=>{const B=`${W.id}|${W.category}|${W.name}|${W.description}`,me=`${ce.id}|${ce.category}|${ce.name}|${ce.description}`;return B.localeCompare(me)});return Ja(JSON.stringify({modelId:y.current,targetLang:T.current,site:z.siteName??"",totalErrors:z.totalErrors??0,failed:Y}))})();if(te&&x.current.has(te)){const Y=x.current.get(te);b(Y.bullets),_(Y.stats),f("ready"),C.current=F;return}C.current=F,S.current=!0,d.current?.abort();const J=new AbortController;d.current=J,f("generating"),g(null),b(null),_(null);const oe=window.setTimeout(()=>{J.abort(),S.current&&(f("error"),g(Z.current("summary_timeout")),S.current=!1)},O.current),le=Date.now();fe.debug("Summary: start (once)");const q=R.current.client,re=R.current.runWithLock;return re(async()=>{if(q.reset)try{await q.reset(!0)}catch{}return QT({client:q,data:z,targetLanguage:T.current,modelId:y.current,cache:U.current,signal:J.signal})}).then(Y=>{J.signal.aborted||(fe.debug("Summary: ready in",Date.now()-le,"ms"),b(Y.bullets),_(Y.stats??null),te&&x.current.set(te,{bullets:Y.bullets,stats:Y.stats??null}),f("ready"))}).catch(Y=>{if(J.signal.aborted)return;fe.error("Summary: failed",Y),f("error"),g(Y instanceof Error?Y.message:String(Y));const W=Y?.stats;W&&_(W)}).finally(()=>{window.clearTimeout(oe),S.current=!1}),()=>{J.abort(),window.clearTimeout(oe)}},[Q,r,i,m]),{state:u,bullets:p,error:h,stats:A,restart:V}},JT=({open:e,onClose:t,translationEnabled:n,setTranslationEnabled:r,translationMode:i,setTranslationMode:o,translationTargetLang:s,translationNeeded:a,summaryEnabled:l,setSummaryEnabled:c,restartSummary:u,openAiApiKey:f,setOpenAiApiKey:p,openAiModel:b,setOpenAiModel:h,openAiBaseUrl:g,setOpenAiBaseUrl:m,aiModelIdEffective:E,translationState:A,translationError:_,translationProgress:x,clearTranslationCache:d,restartTranslation:w,hasAnalysisData:S,openAiSettingsExpanded:C,setOpenAiSettingsExpanded:R})=>{const{t:k}=kr(["sidebar"]);return ne(P.Dialog,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,PaperProps:{style:{borderRadius:12}},children:[ne(P.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ne(P.Box,{display:"flex",alignItems:"center",gap:1,children:[M(gt.AutoAwesome,{}),M(P.Typography,{variant:"h6",fontWeight:700,children:k("sidebar:ai_settings",{defaultValue:"AI Assistant"})})]}),M(P.IconButton,{onClick:t,"aria-label":k("sidebar:close"),children:M(gt.Close,{})})]}),ne(P.DialogContent,{dividers:!0,children:[M(P.Box,{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap",children:M(P.FormControlLabel,{control:M(P.Switch,{checked:n,onChange:(T,y)=>r(y)}),label:k("sidebar:translation_enable",{defaultValue:"Auto-translate DQM results"})})}),M(P.FormControlLabel,{control:M(P.Switch,{checked:l,onChange:(T,y)=>{c(y),y&&u()}}),label:k("sidebar:summary_enable",{defaultValue:"AI summary card"})}),ne(P.Accordion,{defaultExpanded:l||n,expanded:C,onChange:(T,y)=>R(y),sx:{boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)","&:before":{display:"none"}},children:[M(P.AccordionSummary,{expandIcon:M(gt.ExpandMore,{}),children:ne(P.Box,{display:"flex",alignItems:"center",gap:1,children:[M(P.Chip,{size:"small",color:"success",label:"API",sx:{height:18,fontSize:"0.65rem"}}),M(P.Typography,{fontWeight:700,children:k("sidebar:ai_backend_api",{defaultValue:"ChatGPT (API)"})}),l&&M(P.Chip,{size:"small",color:"primary",label:k("sidebar:summary_label",{defaultValue:"Summary"}),sx:{height:18,fontSize:"0.65rem"}})]})}),M(P.AccordionDetails,{children:ne(P.Box,{display:"flex",flexDirection:"column",gap:1.5,children:[M(P.Alert,{severity:"info",sx:{mb:1},children:k("sidebar:openai_info",{defaultValue:"Uses an OpenAI-compatible Chat Completions API. A browser call usually requires a CORS-enabled proxy."})}),ne(P.FormControl,{fullWidth:!0,size:"small",children:[M(P.InputLabel,{id:"dqm-openai-model-label",children:k("sidebar:openai_model",{defaultValue:"OpenAI model"})}),ne(P.Select,{labelId:"dqm-openai-model-label",value:b,label:k("sidebar:openai_model",{defaultValue:"OpenAI model"}),MenuProps:{disablePortal:!0},onChange:T=>h(String(T.target.value)),children:[M(P.MenuItem,{value:"gpt-4o-mini",children:"gpt-4o-mini"}),M(P.MenuItem,{value:"gpt-4o",children:"gpt-4o"}),M(P.MenuItem,{value:"gpt-4.1-mini",children:"gpt-4.1-mini"}),M(P.MenuItem,{value:"gpt-4.1",children:"gpt-4.1"})]})]}),ne(P.Box,{display:"flex",gap:1,flexWrap:"wrap",children:[M(P.Box,{flex:1,minWidth:260,children:M(P.TextField,{size:"small",fullWidth:!0,value:g,onChange:T=>m(T.target.value),label:k("sidebar:openai_base_url",{defaultValue:"OpenAI base URL"}),placeholder:"https://api.openai.com/v1",inputProps:{spellCheck:!1}})}),M(P.Box,{flex:1,minWidth:260,children:M(P.TextField,{size:"small",fullWidth:!0,type:"password",value:f,onChange:T=>p(T.target.value),label:k("sidebar:openai_api_key",{defaultValue:"OpenAI API key"}),placeholder:"sk-...",inputProps:{spellCheck:!1,autoComplete:"off"}})})]})]})})]}),(n||l)&&ne(P.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:1.5},children:[M(P.Typography,{variant:"body2",color:"text.secondary",children:k("sidebar:translation_when",{defaultValue:"AI features run automatically after an analysis completes, when you change the UI language, or when you enable them here."})}),M(P.Typography,{variant:"caption",color:"text.secondary",children:k("sidebar:ai_limitations",{defaultValue:"AI can be wrong or hallucinate – please verify results."})}),n&&!a&&M(P.Alert,{severity:"info",children:k("sidebar:translation_not_needed",{defaultValue:"UI language is English; translation is not needed."})}),M(P.FormControlLabel,{control:M(P.Switch,{checked:i==="full",onChange:(T,y)=>o(y?"full":"fast")}),label:k("sidebar:translation_full_power",{defaultValue:"Full translation (may take longer)"})}),M(P.Typography,{variant:"body2",color:"text.secondary",children:k("sidebar:translation_target_lang",{defaultValue:"Target language: {{lang}}",lang:s})}),E&&M(P.Typography,{variant:"caption",color:"text.secondary",children:k("sidebar:translation_model",{defaultValue:"Model: {{model}}",model:E})}),A==="initializing"&&ne(zr,{children:[M(P.Typography,{variant:"body2",fontWeight:600,children:k("sidebar:translation_downloading")}),M(P.LinearProgress,{variant:"indeterminate"})]}),A==="translating"&&ne(zr,{children:[M(P.Typography,{variant:"body2",fontWeight:600,children:k("sidebar:translation_translating")}),M(P.LinearProgress,{variant:x?"determinate":"indeterminate",value:x&&x.totalCheckpoints>0?x.translatedCheckpoints/x.totalCheckpoints*100:void 0}),x&&M(P.Typography,{variant:"caption",color:"text.secondary",children:k("sidebar:translation_progress",{done:x.translatedCheckpoints,total:x.totalCheckpoints})})]}),A==="ready"&&M(P.Alert,{severity:"success",children:k("sidebar:translation_ready")}),_&&M(P.Alert,{severity:A==="error"?"error":"info",children:_}),ne(P.Box,{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:1,flexWrap:"wrap",children:[M(P.Button,{variant:"outlined",color:"warning",onClick:d,sx:{textTransform:"none"},children:k("sidebar:ai_cache_clear")}),M(P.Button,{variant:"outlined",startIcon:M(gt.Replay,{}),onClick:w,disabled:!S||!n||A==="initializing",sx:{textTransform:"none"},children:k("sidebar:translation_restart")}),M(P.Button,{variant:"outlined",startIcon:M(gt.Replay,{}),onClick:u,disabled:!S||!l,sx:{textTransform:"none"},children:k("sidebar:summary_restart")}),M(P.Button,{onClick:t,sx:{textTransform:"none"},children:k("sidebar:close")})]})]})]})]})};var XT=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},oy=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(oy||{}),Ar="uninitialized",Cu="pending",Wo="fulfilled",Ko="rejected";function Yp(e){return{status:e,isUninitialized:e===Ar,isLoading:e===Cu,isSuccess:e===Wo,isError:e===Ko}}var Jp=Zn;function fd(e,t){if(e===t||!(Jp(e)&&Jp(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const s of n)o[s]=fd(e[s],t[s]),i&&(i=e[s]===o[s]);return i?e:o}function Tu(e,t,n){return e.reduce((r,i,o)=>(t(i,o)&&r.push(n(i,o)),r),[]).flat()}function ZT(e){return new RegExp("(^|:)//").test(e)}function eA(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function pd(e){return e!=null}function Xp(e){return[...e?.values()??[]].filter(pd)}function tA(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var nA=e=>e.replace(/\/$/,""),rA=e=>e.replace(/^\//,"");function iA(e,t){if(!e)return t;if(!t)return e;if(ZT(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=nA(e),t=rA(t),`${e}${n}${t}`}function Xa(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Au=()=>new Map,oA=e=>{const t=new AbortController;return setTimeout(()=>{const n="signal timed out",r="TimeoutError";t.abort(typeof DOMException<"u"?new DOMException(n,r):Object.assign(new Error(n),{name:r}))},e),t.signal},sA=(...e)=>{for(const n of e)if(n.aborted)return AbortSignal.abort(n.reason);const t=new AbortController;for(const n of e)n.addEventListener("abort",()=>t.abort(n.reason),{signal:t.signal,once:!0});return t.signal},Zp=(...e)=>fetch(...e),aA=e=>e.status>=200&&e.status<=299,lA=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function eh(e){if(!Zn(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}var cA=e=>typeof e=="object"&&(Zn(e)||Array.isArray(e)||typeof e.toJSON=="function");function uA({baseUrl:e,prepareHeaders:t=f=>f,fetchFn:n=Zp,paramsSerializer:r,isJsonContentType:i=lA,jsonContentType:o="application/json",jsonReplacer:s,timeout:a,responseHandler:l,validateStatus:c,...u}={}){return typeof fetch>"u"&&n===Zp&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,b,h)=>{const{getState:g,extra:m,endpoint:E,forced:A,type:_}=b;let x,{url:d,headers:w=new Headers(u.headers),params:S=void 0,responseHandler:C=l??"json",validateStatus:R=c??aA,timeout:k=a,...T}=typeof p=="string"?{url:p}:p,y={...u,signal:k?sA(b.signal,oA(k)):b.signal,...T};w=new Headers(eh(w)),y.headers=await t(w,{getState:g,arg:p,extra:m,endpoint:E,forced:A,type:_,extraOptions:h})||w;const I=cA(y.body);if(y.body!=null&&!I&&typeof y.body!="string"&&y.headers.delete("content-type"),!y.headers.has("content-type")&&I&&y.headers.set("content-type",o),I&&i(y.headers)&&(y.body=JSON.stringify(y.body,s)),y.headers.has("accept")||(C==="json"?y.headers.set("accept","application/json"):C==="text"&&y.headers.set("accept","text/plain, text/html, */*")),S){const F=~d.indexOf("?")?"&":"?",z=r?r(S):new URLSearchParams(eh(S));d+=F+z}d=iA(e,d);const O=new Request(d,y);x={request:new Request(d,y)};let U;try{U=await n(O)}catch(F){return{error:{status:(F instanceof Error||typeof DOMException<"u"&&F instanceof DOMException)&&F.name==="TimeoutError"?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(F)},meta:x}}const Z=U.clone();x.response=Z;let V,Q="";try{let F;if(await Promise.all([f(U,C).then(z=>V=z,z=>F=z),Z.text().then(z=>Q=z,()=>{})]),F)throw F}catch(F){return{error:{status:"PARSING_ERROR",originalStatus:U.status,data:Q,error:String(F)},meta:x}}return R(U,V)?{data:V,meta:x}:{error:{status:U.status,data:V},meta:x}};async function f(p,b){if(typeof b=="function")return b(p);if(b==="content-type"&&(b=i(p.headers)?"json":"text"),b==="json"){const h=await p.text();return h.length?JSON.parse(h):null}return p.text()}}var th=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Pl="__rtkq/",dA="online",fA="offline",sy="focused",hd=Nn(`${Pl}${sy}`),ay=Nn(`${Pl}un${sy}`),gd=Nn(`${Pl}${dA}`),ly=Nn(`${Pl}${fA}`),ks="query",cy="mutation",uy="infinitequery";function Nl(e){return e.type===ks}function pA(e){return e.type===cy}function Rs(e){return e.type===uy}function Za(e){return Nl(e)||Rs(e)}function md(e,t,n,r,i,o){const s=hA(e)?e(t,n,r,i):e;return s?Tu(s,pd,a=>o(dy(a))):[]}function hA(e){return typeof e=="function"}function dy(e){return typeof e=="string"?{type:e}:e}function gA(e,t){return e.catch(t)}var ao=(e,t)=>e.endpointDefinitions[t],ps=Symbol("forceQueryFn"),ku=e=>typeof e[ps]=="function";function mA({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o,getInternalState:s}){const a=d=>s(d)?.runningQueries,l=d=>s(d)?.runningMutations,{unsubscribeQueryResult:c,removeMutationResult:u,updateSubscriptionOptions:f}=i.internalActions;return{buildInitiateQuery:A,buildInitiateInfiniteQuery:_,buildInitiateMutation:x,getRunningQueryThunk:p,getRunningMutationThunk:b,getRunningQueriesThunk:h,getRunningMutationsThunk:g};function p(d,w){return S=>{const C=ao(o,d),R=e({queryArgs:w,endpointDefinition:C,endpointName:d});return a(S)?.get(R)}}function b(d,w){return S=>l(S)?.get(w)}function h(){return d=>Xp(a(d))}function g(){return d=>Xp(l(d))}function m(d){if(process.env.NODE_ENV!=="production"){if(m.triggered)return;const w=d(i.internalActions.internal_getRTKQSubscriptions());if(m.triggered=!0,typeof w!="object"||typeof w?.type=="string")throw new Error(process.env.NODE_ENV==="production"?Be(34):`Warning: Middleware for RTK-Query API at reducerPath "${i.reducerPath}" has not been added to the store.
|
|
119
|
-
You must add the middleware for RTK-Query to function correctly!`)}}function E(d,w){const S=(C,{subscribe:R=!0,forceRefetch:k,subscriptionOptions:T,[
|
|
120
|
-
${
|
|
118
|
+
Output: ${t.slice(0,500)}`)}},Jn=async e=>{const{client:t,system:n,payload:r,maxTokens:i,schema:o,fallback:s,resetChat:a,retries:l=1,cooldownMs:c=50,signal:u}=e,f=()=>t.interrupt?.();u?.addEventListener("abort",f,{once:!0});try{const p=async h=>{h<=0||await new Promise(g=>setTimeout(g,h))};let b=null;for(let h=0;h<=l;h+=1){if(u?.aborted)throw new DOMException("Aborted","AbortError");if((a||h>0)&&t.reset)try{await t.reset(!0)}catch{}const g=JSON.stringify(r);let m;try{m=await t.chatJson({system:n,user:g,maxTokens:i,schema:o,resetChat:a,signal:u})}catch(A){const _=A instanceof Error?A.message.toLowerCase():"";throw A}if(u?.aborted)throw new DOMException("Aborted","AbortError");const E=m.content;if(!E||E.trim().length===0){if(b=new Error("Model returned empty response"),b.code="EMPTY_MODEL_RESPONSE",h<l){await p(c);continue}throw b}try{return WT(E)}catch(A){const _=s?.(E);if(_)return _;if(b=A,h<l){await p(c);continue}throw A}}throw b instanceof Error?b:new Error(String(b))}finally{u?.removeEventListener("abort",f)}},KT=e=>{const t=e.indexOf('"bullets"');if(t<0)return[];const n=e.indexOf("[",t);if(n<0)return[];const r=[];let i=n+1;for(;i<e.length&&r.length<12;){for(;i<e.length&&/\s|,/.test(e[i]);)i+=1;if(i>=e.length||e[i]==="]")break;if(e[i]!=='"'){i+=1;continue}i+=1;let o="",s=!1;for(;i<e.length;){const a=e[i];if(s){o+=a,s=!1,i+=1;continue}if(a==="\\\\"){s=!0,i+=1;continue}if(a==='"'){r.push(o.trim()),i+=1;break}o+=a,i+=1}if(i>=e.length)break}return r.filter(o=>o.length>0).slice(0,8)},GT=e=>e?e.split(/\r?\n+/).map(t=>t.trim().replace(/^[*-]\s*/,"").replace(/^\d+\.\s*/,"")).filter(t=>t.length>0).slice(0,8):[],QT=async e=>{const{client:t,data:n,targetLanguage:r,signal:i}=e,o=e.modelId??"unknown",s=ty(o),a=dd(r),l=Math.max(800,Math.floor(s*.5)),c=Date.now(),u={chunked:!1,chunkCount:0,totalFailed:n.checkpoints.filter(C=>C.failed).length,attempts:0,emptyResponses:0,fallbackUsed:"none",modelId:o,targetLang:r,durationMs:0},f=(C,R)=>n.checkpoints.filter(k=>k.failed).slice(0,C).map(k=>({id:k.id,category:k.category,name:k.name??"",description:wr(k.description??"",R)})),p={targetLanguage:r,stats:{siteName:n.siteName,failedCount:n.totalErrors}},b=JSON.stringify({type:"object",properties:{bullets:{type:"array",items:{type:"string"}}},required:["bullets"],additionalProperties:!1}),h=["You are an assistant that summarizes a website quality/accessibility report for developers.",`Write in ${a} (${r}).`,Ji(r),"Return 5–7 concise bullet points with the most important findings and next actions.","Each bullet must be <= 140 characters.",'No prefixes like "Next step:" / "Nächster Schritt:".',"Base the summary on the checkpoint texts (name/description).","Prefer actionable wording and group similar issues.","Do not hallucinate; only use the provided data.","Return JSON only."].join(" "),g=C=>{const R=KT(C);return R.length>0?{bullets:R}:null},m=async(C,R=4)=>{const k={...p,failedCheckpoints:C.map(y=>({id:y.id,category:y.category,name:y.name??"",description:wr(y.description??"",260)}))};return u.attempts+=1,((await Jn({client:t,system:h,payload:k,maxTokens:r.toLowerCase().startsWith("en")?512:640,schema:b,fallback:g,resetChat:!0,retries:1,cooldownMs:100,signal:i})).bullets??[]).filter(y=>typeof y=="string"&&y.trim().length>0).slice(0,R)},E=async C=>{const R={...p,failedCheckpoints:C.map(T=>({id:T.id,category:T.category,name:T.name??"",description:wr(T.description??"",180)}))};return u.attempts+=1,((await Jn({client:t,system:h,payload:R,maxTokens:r.toLowerCase().startsWith("en")?320:420,schema:b,fallback:g,resetChat:!0,retries:0,cooldownMs:80,signal:i})).bullets??[]).filter(T=>typeof T=="string"&&T.trim().length>0).slice(0,4)},A=C=>{const R=[];let k=[];const T=y=>Er(JSON.stringify({targetLanguage:r,checkpoints:y.map(I=>({name:I.name??"",description:wr(I.description??"",220),category:I.category??""}))}));for(const y of C){const I=[...k,y];(I.length>4||T(I)>l)&&k.length>0?(R.push(k),k=[y]):k=I}return k.length>0&&R.push(k),R},_=n.checkpoints.filter(C=>C.failed);if(_.length>3||Er(JSON.stringify(_))>Math.floor(l*.5)){const C=A(_);u.chunked=!0,u.chunkCount=C.length;const R=[];for(const T of C){if(i?.aborted)throw new DOMException("Aborted","AbortError");try{const y=await m(T,4);R.push(...y)}catch{continue}}const k=Array.from(new Set(R.map(T=>T.trim()))).filter(Boolean).slice(0,14);if(k.length>0){const T=["You merge bullet points about website quality/accessibility issues for developers.",`Write in ${a} (${r}).`,Ji(r),"Return 5–7 concise bullets (<= 140 chars) combining similar issues; do not invent new facts.","Use only the provided bullets.","Return JSON only."].join(" ");u.attempts+=1;const I=((await Jn({client:t,system:T,payload:{targetLanguage:r,bullets:k},maxTokens:r.toLowerCase().startsWith("en")?384:512,schema:JSON.stringify({type:"object",properties:{bullets:{type:"array",items:{type:"string"}}},required:["bullets"],additionalProperties:!1}),resetChat:!0,retries:1,cooldownMs:120,signal:i})).bullets??[]).filter(O=>typeof O=="string"&&O.trim().length>0).slice(0,7);if(I.length>0)return u.fallbackUsed="chunk",u.chunked=!0,u.chunkCount=C.length,u.durationMs=Date.now()-c,{bullets:I,stats:u};u.emptyResponses+=1}}const d=[{maxItems:8,descChars:420,maxTokens:s<=1024?512:640},{maxItems:6,descChars:320,maxTokens:s<=1024?640:896},{maxItems:4,descChars:220,maxTokens:s<=1024?768:1152},{maxItems:3,descChars:180,maxTokens:s<=1024?896:1280}];let w=null;for(const C of d){if(i?.aborted)throw new DOMException("Aborted","AbortError");let R=C.descChars,k=C.maxItems,T={...p,failedCheckpoints:f(k,R)};const y=Math.max(600,Math.floor(s*.6));let I=Er(JSON.stringify(T));for(;I>y&&k>3;)k=Math.max(3,Math.floor(k*.8)),R=Math.max(120,Math.floor(R*.8)),T={...p,failedCheckpoints:f(k,R)},I=Er(JSON.stringify(T));try{u.attempts+=1;const O=await Jn({client:t,system:h,payload:T,maxTokens:C.maxTokens,schema:b,fallback:g,resetChat:!0,retries:2,cooldownMs:120,signal:i}),L=Array.isArray(O.bullets)?O.bullets.filter(z=>typeof z=="string"&&z.trim().length>0).slice(0,8):[];if(L.length>0){if(u.fallbackUsed=u.fallbackUsed==="none"?"single":u.fallbackUsed,(r||"").toLowerCase().startsWith("en"))return u.durationMs=Date.now()-c,{bullets:L,stats:u};const z=JSON.stringify({type:"object",properties:{bullets:{type:"array",items:{type:"string"}}},required:["bullets"],additionalProperties:!1}),X=[`Translate to ${a} (${r}).`,Ji(r),"Translate each bullet. Keep them concise (<= 140 characters) and preserve technical meaning.","Return JSON only."].join(" ");u.attempts+=1;const H=await Jn({client:t,system:X,payload:{targetLanguage:r,bullets:L},maxTokens:256,schema:z,resetChat:!0,retries:1,cooldownMs:75,signal:i}),Q=Array.isArray(H.bullets)?H.bullets.filter(F=>typeof F=="string"&&F.trim().length>0).slice(0,8):[];return u.fallbackUsed="single",u.durationMs=Date.now()-c,{bullets:Q.length>0?Q:L,stats:u}}w=new Error("Model returned empty summary")}catch(O){const L=O?.code;if(w=O instanceof Error?O:new Error(String(O)),L==="EMPTY_MODEL_RESPONSE"){u.emptyResponses+=1;try{const z=await E(_.slice(0,4));if(z.length>0)return u.fallbackUsed="tiny",u.durationMs=Date.now()-c,{bullets:z,stats:u}}catch{}continue}if(ny(O))continue;continue}}if(i?.aborted)throw new DOMException("Aborted","AbortError");try{const C=["You summarize website quality/accessibility issues for developers.",`Write in ${a} (${r}).`,Ji(r),"Return 5-7 bullet points, each <= 140 characters, no numbering prefixes.","Use only the provided data; do not invent issues."].join(" "),R={...p,failedCheckpoints:f(4,160)};u.attempts+=1;const T=(await e.client.chatJson({system:C,user:JSON.stringify(R),maxTokens:480,resetChat:!0,signal:i})).content??"",y=GT(T).map(ot);if(y.length>0)return u.fallbackUsed=u.fallbackUsed==="none"?"single":u.fallbackUsed,u.durationMs=Date.now()-c,{bullets:y,stats:u};u.emptyResponses+=1,w=new Error("Model returned empty summary")}catch(C){w=C instanceof Error?C:new Error(String(C))}u.durationMs=Date.now()-c,u.fallbackUsed=u.fallbackUsed==="none"?"fail":u.fallbackUsed;const S=w instanceof Error?w:new Error(String(w));throw S.stats=u,S},YT=async e=>{const{client:t,data:n,targetLanguage:r,modelId:i,cache:o,computeBudgetMs:s=15e3,maxConcurrentBatches:a=1,maxItemsPerBatch:l,forceSerial:c=!1,onProgress:u,onBatchStatus:f,onPartialResult:p,signal:b}=e,h=Date.now(),g=n.checkpoints.filter(q=>q.failed),m=g.length;let E=!1;const A=ty(i),_=i.toLowerCase(),x=_.startsWith("gpt-")||_.includes("gpt-4")||_.includes("gpt-3.5")||_.includes("o1")||_.includes("o3"),d=l&&l>0?l:x?A<=1024?1:2:1,w=dd(r),S=Math.max(600,Math.floor(A*.6)),C=new Map,R=new Map,k=new Map,T=Date.now(),y=[`You are a professional translator. Translate ALL text to ${w} (${r}).`,Ji(r),"CRITICAL: ALL text fields MUST be translated to the target language. Do not leave any text in the source language.","Preserve meaning and technical terms; if an English technical term is commonly used in the target language, keep the original term instead of inventing a new one.","Keep HTML tags/attributes unchanged; translate only visible text content.","Output JSON only and only keys allowed by schema.",'Do not add prefixes like "Next step:" / "Nächster Schritt:".'].join(" "),I=Array.from(new Set(n.checkpoints.map(q=>q.category).filter(q=>typeof q=="string"&&q.trim().length>0))),O=Array.from(new Set(n.checkpoints.flatMap(q=>q.topics??[]).filter(q=>typeof q=="string"&&q.trim().length>0)));if(I.length>0)try{const q=new Map,re=[];for(const fe of I){const B=Ya(fe);q.set(fe,B),re.push(Ki(i,r,"category",B))}const Y=o?await o.getLabelMany(re):new Map;for(const fe of I){const B=Ki(i,r,"category",q.get(fe)),we=Y.get(B);we?.translated&&R.set(fe,we.translated)}const W=I.filter(fe=>!R.has(fe));if(W.length!==0){const we=(await Jn({client:t,system:y,payload:{targetLanguage:r,items:W},maxTokens:512,schema:JSON.stringify({type:"object",properties:{items:{type:"array",items:{type:"string"}}},required:["items"],additionalProperties:!1}),retries:1,cooldownMs:50,signal:b})).items??[],be=[];for(let Ce=0;Ce<W.length;Ce+=1){const ke=W[Ce],De=we[Ce];if(typeof De=="string"&&De.trim().length>0&&(R.set(ke,ot(De)),o)){const Se=q.get(ke);be.push({key:Ki(i,r,"category",Se),modelId:i,lang:r,type:"category",source:ke,sourceHash:Se,translated:ot(De),updatedAt:T})}}await o?.putLabelMany(be)}}catch{E=!0}if(O.length>0)try{const q=new Map,re=[];for(const fe of O){const B=Ya(fe);q.set(fe,B),re.push(Ki(i,r,"topic",B))}const Y=o?await o.getLabelMany(re):new Map;for(const fe of O){const B=Ki(i,r,"topic",q.get(fe)),we=Y.get(B);we?.translated&&k.set(fe,we.translated)}const W=O.filter(fe=>!k.has(fe));if(W.length!==0){const fe={targetLanguage:r,items:W},we=(await Jn({client:t,system:`${y} Treat "topics" as tags/labels and translate them.`,payload:fe,maxTokens:512,schema:JSON.stringify({type:"object",properties:{items:{type:"array",items:{type:"string"}}},required:["items"],additionalProperties:!1}),retries:1,cooldownMs:50,signal:b})).items??[],be=[];for(let Ce=0;Ce<W.length;Ce+=1){const ke=W[Ce],De=we[Ce];if(typeof De=="string"&&De.trim().length>0&&(k.set(ke,ot(De)),o)){const Se=q.get(ke);be.push({key:Ki(i,r,"topic",Se),modelId:i,lang:r,type:"topic",source:ke,sourceHash:Se,translated:ot(De),updatedAt:T})}}await o?.putLabelMany(be)}}catch{E=!0}const L={targetLanguage:r,items:[]},z=JSON.stringify({type:"object",properties:{targetLanguage:{type:"string"},items:{type:"array",items:{type:"object",properties:{id:{type:"string"},category:{type:"string"},name:{type:"string"},description:{type:"string"},topics:{type:"array",items:{type:"string"}}},required:["id","category","name","description","topics"],additionalProperties:!1}}},required:["targetLanguage","items"],additionalProperties:!1});let X=0;if(o){const q=g.map(W=>Ko(i,r,Yi(W))),re=await o.getCheckpointMany(q),Y=[];for(const W of g){const fe=Ko(i,r,Yi(W)),B=re.get(fe),we=Yi(W);if(B&&B.sourceHash===we){C.set(W.id,{name:B.translated.name,description:B.translated.description,category:B.translated.category,topics:B.translated.topics}),W.category&&B.translated.category&&R.set(W.category,B.translated.category);for(let be=0;be<(W.topics??[]).length;be+=1){const Ce=W.topics?.[be],ke=B.translated.topics?.[be];Ce&&ke&&k.set(Ce,ke)}X+=1,Y.push(W.id)}}u?.({translatedCheckpoints:X,totalCheckpoints:m,isPartial:!1}),Y.length>0&&(f?.({ids:Y,status:"done"}),p?.(ai(n,C,R,k)))}if(g.length===0){const q={translatedCheckpoints:0,totalCheckpoints:0,isPartial:!1};return u?.(q),{data:ai(n,C,R,k),progress:q}}const H=g.filter(q=>!C.has(q.id)),Q=[],F=q=>{const re=[];let Y=[];const W=fe=>Er(JSON.stringify({targetLanguage:r,items:fe.map(B=>({category:B.category??"",name:B.name??"",description:B.description??"",topics:B.topics??[]}))}));for(const fe of q){const B=[...Y,fe],we=B.length>d,be=W(B)>S;(we||be)&&Y.length>0?(re.push({batch:Y,missing:Y}),Y=[fe]):Y=B}return Y.length>0&&re.push({batch:Y,missing:Y}),re};Q.push(...F(H));const U=c?1:Math.max(1,Math.min(a,4));let ae=0,te=!1;const J=async()=>{for(;;){if(b?.aborted)throw new DOMException("Aborted","AbortError");if(Date.now()-h>s){te=!0;return}const q=ae;if(q>=Q.length||te)return;ae+=1;const{batch:re,missing:Y}=Q[q],W=Y.map(ye=>({id:ye.id,category:ye.category??"",name:ye.name??"",description:ye.description??"",topics:ye.topics??[]})),fe=new Map(W.map(ye=>[ye.id,ye])),B=Pc(y,L,r,W,A,{dropTopics:A<=1024}),we={...L,items:B};f?.({ids:B.map(ye=>ye.id),status:"translating"});const be=new Map(B.map(ye=>[ye.id,ye])),Ce=async(ye,ve)=>Jn({client:t,system:y,payload:{...L,items:ye},maxTokens:ve,schema:z,retries:1,cooldownMs:75,signal:b});let ke=null;try{ke=await Ce(we.items,2048)}catch{try{ke=await Ce(we.items,3072)}catch(ve){if(ny(ve)){E=!0;for(const Ge of we.items.slice(0,1)){if(b?.aborted)throw new DOMException("Aborted","AbortError");const pt=Pc(y,L,r,[Ge],A,{maxDescriptionChars:350,dropTopics:!0});try{const ht=(await Ce(pt,1024)).items?.[0];ht?.id&&C.set(ht.id,{category:ot(ht.category),name:ot(ht.name),description:ot(ht.description),topics:(ht.topics??[]).map(At=>ot(At))})}catch{}}X=Math.min(m,X+1),u?.({translatedCheckpoints:X,totalCheckpoints:m,isPartial:!1}),p?.(ai(n,C,R,k)),f?.({ids:B.map(Ge=>Ge.id),status:"done"});continue}E=!0;for(const Ge of we.items){if(b?.aborted)throw new DOMException("Aborted","AbortError");if(Date.now()-h>s){te=!0;break}try{const He=(await Ce([Ge],1024)).items?.[0];if(He?.id){C.set(He.id,{category:ot(He.category),name:ot(He.name),description:ot(He.description),topics:(He.topics??[]).map(At=>ot(At))});const ht=Yi(fe.get(He.id)??Ge);await o?.putCheckpointMany([{key:Ko(i,r,ht),modelId:i,lang:r,checkpointId:He.id,sourceHash:ht,translated:{name:ot(He.name),description:ot(He.description),category:ot(He.category),topics:(He.topics??[]).map(At=>ot(At))},updatedAt:T}])}}catch{E=!0}}X=Math.min(m,X+Y.length),u?.({translatedCheckpoints:X,totalCheckpoints:m,isPartial:!1}),p?.(ai(n,C,R,k)),f?.({ids:B.map(Ge=>Ge.id),status:"done"});continue}}const Se=await(async ye=>{if((r||"").toLowerCase().startsWith("en"))return ye;try{const ve=[`Ensure the following texts are in ${w} (${r}).`,Ji(r),"Assume the source is English unless it clearly matches the target language; translate any English text.","If text is already in the target language, keep it unchanged; otherwise translate.","Preserve HTML tags and technical meaning.","Return JSON only."].join(" ");return(await Jn({client:t,system:ve,payload:{targetLanguage:r,items:ye},maxTokens:1536,schema:z,retries:0,cooldownMs:50,signal:b})).items??ye}catch{return ye}})(ke.items??[]),Fe=Se.filter(ye=>{const ve=be.get(ye.id);if(!ve)return!1;const Ge=(ye.name??"").trim()===(ve.name??"").trim(),pt=(ye.description??"").trim()===(ve.description??"").trim(),He=(ye.category??"").trim()===(ve.category??"").trim();return!r.toLowerCase().startsWith("en")&&(Ge||pt||He)}),$t=async ye=>{const ve=Pc(y,L,r,[ye],A,{maxDescriptionChars:400,dropTopics:!0});return(await Jn({client:t,system:y,payload:{...L,items:ve},maxTokens:1024,schema:z,retries:0,cooldownMs:50,signal:b})).items?.[0]};if(Fe.length>0){E=!0;for(const ye of Fe){if(b?.aborted)throw new DOMException("Aborted","AbortError");const ve=fe.get(ye.id)??be.get(ye.id);if(ve)try{const Ge=await $t(ve);Ge&&(ye.category=ot(Ge.category),ye.name=ot(Ge.name),ye.description=ot(Ge.description),ye.topics=(Ge.topics??[]).map(pt=>ot(pt)))}catch{}}}for(const ye of Se??[])C.set(ye.id,{category:ot(ye.category),name:ot(ye.name),description:ot(ye.description),topics:(ye.topics??[]).map(ve=>ot(ve))});if(o){const ye=(Se??[]).map(ve=>{const Ge=fe.get(ve.id)??we.items.find(He=>He.id===ve.id),pt=Yi(Ge??ve);return{key:Ko(i,r,pt),modelId:i,lang:r,checkpointId:ve.id,sourceHash:pt,translated:{name:ot(ve.name),description:ot(ve.description),category:ot(ve.category),topics:(ve.topics??[]).map(He=>ot(He))},updatedAt:T}});await o.putCheckpointMany(ye)}X=Math.min(m,X+Y.length),u?.({translatedCheckpoints:X,totalCheckpoints:m,isPartial:!1}),p?.(ai(n,C,R,k)),f?.({ids:B.map(ye=>ye.id),status:"done"})}},oe=Array.from({length:U},()=>J());if(await Promise.all(oe),te){const q={translatedCheckpoints:X,totalCheckpoints:m,isPartial:!0};return u?.(q),{data:ai(n,C,R,k),progress:q}}const ce={translatedCheckpoints:X,totalCheckpoints:m,isPartial:E};return u?.(ce),{data:ai(n,C,R,k),progress:ce}},ai=(e,t,n,r)=>({...e,checkpoints:e.checkpoints.map(i=>{const o=t.get(i.id),s=n.get(i.category)??o?.category??i.category;return o?{...Qp(i),category:s,name:o.name??i.name,description:o.description??i.description,topics:(o.topics??i.topics??[]).map(a=>r.get(a)??a)}:{...Qp(i),category:s,topics:(i.topics??[]).map(a=>r.get(a)??a)}})}),Qp=e=>({...e,colors:{...e.colors},topics:Array.isArray(e.topics)?[...e.topics]:[],canHighlight:{...e.canHighlight},checkpointType:e.checkpointType?{...e.checkpointType}:e.checkpointType}),ry=e=>{const{engine:t,cacheManager:n,originalData:r,targetLang:i,modelId:o,enabled:s,mode:a,computeBudgetMs:l,persistentCache:c,summaryGenerating:u=!1}=e,{t:f}=Rr("sidebar"),[p,b]=D.useState(null),[h,g]=D.useState(null),[m,E]=D.useState(null),[A,_]=D.useState(new Set),[x,d]=D.useState(new Set),[w,S]=D.useState(0),C=D.useRef(null),R=D.useRef(null),k=D.useRef(!1),T=D.useRef(null),y=D.useRef(u),I=D.useRef(void 0),O=D.useRef(t),L=D.useRef(n),z=D.useRef(r),X=D.useRef(i),H=D.useRef(o),Q=D.useRef(s),F=D.useRef(a),U=D.useRef(l),ae=D.useRef(c),te=D.useRef(u),J=D.useRef(f);D.useEffect(()=>{O.current=t,L.current=n,z.current=r,X.current=i,H.current=o,Q.current=s,F.current=a,U.current=l,ae.current=c,te.current=u,J.current=f});const oe=r?.assetId??null,ce=i!=="en",q=A.size>0,re=t.isReady;D.useEffect(()=>{y.current&&!u&&(le.debug("Translation: summary finished, resetting hasRunForKeyRef for retry"),R.current=null),y.current=u},[u]);const Y=D.useCallback(()=>{C.current?.abort(),C.current=null},[]),W=D.useCallback(()=>{b(z.current),_(new Set),d(new Set)},[]),fe=D.useCallback(()=>{const be=z.current;return be?`${be.assetId}:${X.current}:${H.current}`:""},[]),B=D.useCallback(()=>{if(!z.current)return;if(X.current==="en"){E(J.current("translation_not_needed")),W();return}const Ce=fe();L.current.assetCache.delete(Ce),R.current=null,k.current=!1,W(),Y(),E(null),g(null),b(null),_(new Set),d(new Set),S(ke=>ke+1)},[fe,W,Y]),we=D.useCallback(async be=>{const Ce=z.current;if(!Ce||!Q.current)return;const ke=Ce.checkpoints.find(Se=>Se.id===be);if(!ke)return;const De=fe();L.current.assetCache.delete(De),d(Se=>{const Fe=new Set(Se);return Fe.delete(be),Fe}),_(Se=>{const Fe=new Set(Se);return Fe.delete(be),Fe});try{const Se=Yi(ke),Fe=Ko(H.current,X.current,Se);await ae.current.deleteCheckpointMany([Fe])}catch{}R.current=null,S(Se=>Se+1)},[fe]);return D.useEffect(()=>{const be=`${oe}:${i}:${o}:${a}`;if(T.current&&(clearTimeout(T.current),T.current=null),!s){b(null),g(null),E(null),_(new Set),d(new Set);return}if(!oe)return;if(u){le.debug("Translation: waiting for summary to complete");return}if(!ce){g(null),E(J.current("translation_not_needed")),b(z.current);return}if(k.current||R.current===be)return;if(!re||!O.current.client){le.debug("Translation: engine not ready yet");return}if(!z.current)return;const ke=fe(),De=L.current.assetCache.get(ke);if(De){E(null),g({translatedCheckpoints:De.checkpoints.length,totalCheckpoints:De.checkpoints.length,isPartial:!1}),b(De),R.current=be;return}return le.debug("Translation: scheduling with 300ms debounce"),T.current=setTimeout(()=>{if(T.current=null,!Q.current){le.debug("Translation: cancelled after debounce - disabled");return}if(te.current){le.debug("Translation: cancelled after debounce - summary running");return}if(k.current){le.debug("Translation: cancelled after debounce - already running");return}if(R.current===be){le.debug("Translation: cancelled after debounce - already ran for key");return}if(!O.current.isReady||!O.current.client){le.debug("Translation: cancelled after debounce - engine not ready");return}const Se=z.current;if(!Se)return;R.current=be,k.current=!0,Y();const Fe=new AbortController;C.current=Fe,_(new Set),d(new Set),E(null),g(null),le.debug("Translation: starting API call");const $t=O.current.client,ye=O.current.runWithLock;ye(async()=>YT({client:$t,data:Se,targetLanguage:X.current,modelId:H.current,maxConcurrentBatches:3,maxItemsPerBatch:12,forceSerial:!1,cache:ae.current,computeBudgetMs:U.current,signal:Fe.signal,onProgress:ve=>g(ve),onBatchStatus:()=>{},onPartialResult:()=>{}})).then(({data:ve,progress:Ge})=>{Fe.signal.aborted||(le.debug("Translation: done"),L.current.assetCache.set(ke,ve),b(ve),Ge.isPartial&&E(F.current==="full"?J.current("translation_incomplete"):J.current("translation_partial")),_(new Set),d(new Set))}).catch(ve=>{Fe.signal.aborted||(le.error("Translation: failed",ve),E(ve instanceof Error?ve.message:String(ve)),b(Se),_(new Set),d(new Set))}).finally(()=>{k.current=!1})},300),()=>{T.current&&(clearTimeout(T.current),T.current=null),C.current?.abort()}},[oe,i,o,a,s,ce,w,fe,Y,u,re]),{translatedData:p,progress:h,error:m,translatingIds:A,translatedIds:x,isTranslating:q,restart:B,stop:Y,retrySingleCheckpoint:we,resetToOriginal:W,onDataChange:I.current}},iy=e=>{const{engine:t,originalData:n,targetLang:r,modelId:i,enabled:o,timeoutMs:s=45e3,translationInProgress:a=!1,cache:l}=e,{t:c}=Rr("sidebar"),[u,f]=D.useState("idle"),[p,b]=D.useState(null),[h,g]=D.useState(null),[m,E]=D.useState(0),[A,_]=D.useState(null),x=D.useRef(new Map),d=D.useRef(null),w=D.useRef(r),S=D.useRef(!1),C=D.useRef(null),R=D.useRef(t),k=D.useRef(n),T=D.useRef(r),y=D.useRef(i),I=D.useRef(o),O=D.useRef(s),L=D.useRef(a),z=D.useRef(l),X=D.useRef(c);D.useEffect(()=>{R.current=t,k.current=n,T.current=r,y.current=i,I.current=o,O.current=s,L.current=a,z.current=l,X.current=c});const H=D.useCallback(()=>{d.current?.abort(),d.current=null,S.current=!1,C.current=null,x.current.clear(),g(null),b(null),_(null),f("idle"),E(F=>F+1)},[]),Q=n?.assetId??null;return D.useEffect(()=>{w.current!==r&&(w.current=r,C.current=null,b(null),g(null),_(null),f("idle"))},[r]),D.useEffect(()=>{m>0&&(C.current=null)},[m]),D.useEffect(()=>{const F=`${Q}:${r}:${i}`;if(!I.current){f("idle");return}if(!Q||L.current||S.current||C.current===F||!R.current.isReady||!R.current.client)return;const U=k.current;if(!U)return;const te=(()=>{const Y=(U.checkpoints||[]).filter(W=>W.failed).map(W=>({id:W.id??"",name:W.name??"",description:W.description??"",category:W.category??"",topics:[...W.topics??[]].sort()})).sort((W,fe)=>{const B=`${W.id}|${W.category}|${W.name}|${W.description}`,we=`${fe.id}|${fe.category}|${fe.name}|${fe.description}`;return B.localeCompare(we)});return Ya(JSON.stringify({modelId:y.current,targetLang:T.current,site:U.siteName??"",totalErrors:U.totalErrors??0,failed:Y}))})();if(te&&x.current.has(te)){const Y=x.current.get(te);b(Y.bullets),_(Y.stats),f("ready"),C.current=F;return}C.current=F,S.current=!0,d.current?.abort();const J=new AbortController;d.current=J,f("generating"),g(null),b(null),_(null);const oe=window.setTimeout(()=>{J.abort(),S.current&&(f("error"),g(X.current("summary_timeout")),S.current=!1)},O.current),ce=Date.now();le.debug("Summary: start (once)");const q=R.current.client,re=R.current.runWithLock;return re(async()=>{if(q.reset)try{await q.reset(!0)}catch{}return QT({client:q,data:U,targetLanguage:T.current,modelId:y.current,cache:z.current,signal:J.signal})}).then(Y=>{J.signal.aborted||(le.debug("Summary: ready in",Date.now()-ce,"ms"),b(Y.bullets),_(Y.stats??null),te&&x.current.set(te,{bullets:Y.bullets,stats:Y.stats??null}),f("ready"))}).catch(Y=>{if(J.signal.aborted)return;le.error("Summary: failed",Y),f("error"),g(Y instanceof Error?Y.message:String(Y));const W=Y?.stats;W&&_(W)}).finally(()=>{window.clearTimeout(oe),S.current=!1}),()=>{J.abort(),window.clearTimeout(oe)}},[Q,r,i,m]),{state:u,bullets:p,error:h,stats:A,restart:H}},JT=({open:e,onClose:t,translationEnabled:n,setTranslationEnabled:r,translationMode:i,setTranslationMode:o,translationTargetLang:s,translationNeeded:a,summaryEnabled:l,setSummaryEnabled:c,restartSummary:u,openAiApiKey:f,setOpenAiApiKey:p,openAiModel:b,setOpenAiModel:h,openAiBaseUrl:g,setOpenAiBaseUrl:m,aiModelIdEffective:E,translationState:A,translationError:_,translationProgress:x,clearTranslationCache:d,restartTranslation:w,hasAnalysisData:S,openAiSettingsExpanded:C,setOpenAiSettingsExpanded:R})=>{const{t:k}=Rr(["sidebar"]);return ne(P.Dialog,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,PaperProps:{style:{borderRadius:12}},children:[ne(P.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ne(P.Box,{display:"flex",alignItems:"center",gap:1,children:[M(mt.AutoAwesome,{}),M(P.Typography,{variant:"h6",fontWeight:700,children:k("sidebar:ai_settings",{defaultValue:"AI Assistant"})})]}),M(P.IconButton,{onClick:t,"aria-label":k("sidebar:close"),children:M(mt.Close,{})})]}),ne(P.DialogContent,{dividers:!0,children:[M(P.Box,{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap",children:M(P.FormControlLabel,{control:M(P.Switch,{checked:n,onChange:(T,y)=>r(y)}),label:k("sidebar:translation_enable",{defaultValue:"Auto-translate DQM results"})})}),M(P.FormControlLabel,{control:M(P.Switch,{checked:l,onChange:(T,y)=>{c(y),y&&u()}}),label:k("sidebar:summary_enable",{defaultValue:"AI summary card"})}),ne(P.Accordion,{defaultExpanded:l||n,expanded:C,onChange:(T,y)=>R(y),sx:{boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)","&:before":{display:"none"}},children:[M(P.AccordionSummary,{expandIcon:M(mt.ExpandMore,{}),children:ne(P.Box,{display:"flex",alignItems:"center",gap:1,children:[M(P.Chip,{size:"small",color:"success",label:"API",sx:{height:18,fontSize:"0.65rem"}}),M(P.Typography,{fontWeight:700,children:k("sidebar:ai_backend_api",{defaultValue:"ChatGPT (API)"})}),l&&M(P.Chip,{size:"small",color:"primary",label:k("sidebar:summary_label",{defaultValue:"Summary"}),sx:{height:18,fontSize:"0.65rem"}})]})}),M(P.AccordionDetails,{children:ne(P.Box,{display:"flex",flexDirection:"column",gap:1.5,children:[M(P.Alert,{severity:"info",sx:{mb:1},children:k("sidebar:openai_info",{defaultValue:"Uses an OpenAI-compatible Chat Completions API. A browser call usually requires a CORS-enabled proxy."})}),ne(P.FormControl,{fullWidth:!0,size:"small",children:[M(P.InputLabel,{id:"dqm-openai-model-label",children:k("sidebar:openai_model",{defaultValue:"OpenAI model"})}),ne(P.Select,{labelId:"dqm-openai-model-label",value:b,label:k("sidebar:openai_model",{defaultValue:"OpenAI model"}),MenuProps:{disablePortal:!0},onChange:T=>h(String(T.target.value)),children:[M(P.MenuItem,{value:"gpt-4o-mini",children:"gpt-4o-mini"}),M(P.MenuItem,{value:"gpt-4o",children:"gpt-4o"}),M(P.MenuItem,{value:"gpt-4.1-mini",children:"gpt-4.1-mini"}),M(P.MenuItem,{value:"gpt-4.1",children:"gpt-4.1"})]})]}),ne(P.Box,{display:"flex",gap:1,flexWrap:"wrap",children:[M(P.Box,{flex:1,minWidth:260,children:M(P.TextField,{size:"small",fullWidth:!0,value:g,onChange:T=>m(T.target.value),label:k("sidebar:openai_base_url",{defaultValue:"OpenAI base URL"}),placeholder:"https://api.openai.com/v1",inputProps:{spellCheck:!1}})}),M(P.Box,{flex:1,minWidth:260,children:M(P.TextField,{size:"small",fullWidth:!0,type:"password",value:f,onChange:T=>p(T.target.value),label:k("sidebar:openai_api_key",{defaultValue:"OpenAI API key"}),placeholder:"sk-...",inputProps:{spellCheck:!1,autoComplete:"off"}})})]})]})})]}),(n||l)&&ne(P.Box,{sx:{mt:2,display:"flex",flexDirection:"column",gap:1.5},children:[M(P.Typography,{variant:"body2",color:"text.secondary",children:k("sidebar:translation_when",{defaultValue:"AI features run automatically after an analysis completes, when you change the UI language, or when you enable them here."})}),M(P.Typography,{variant:"caption",color:"text.secondary",children:k("sidebar:ai_limitations",{defaultValue:"AI can be wrong or hallucinate – please verify results."})}),n&&!a&&M(P.Alert,{severity:"info",children:k("sidebar:translation_not_needed",{defaultValue:"UI language is English; translation is not needed."})}),M(P.FormControlLabel,{control:M(P.Switch,{checked:i==="full",onChange:(T,y)=>o(y?"full":"fast")}),label:k("sidebar:translation_full_power",{defaultValue:"Full translation (may take longer)"})}),M(P.Typography,{variant:"body2",color:"text.secondary",children:k("sidebar:translation_target_lang",{defaultValue:"Target language: {{lang}}",lang:s})}),E&&M(P.Typography,{variant:"caption",color:"text.secondary",children:k("sidebar:translation_model",{defaultValue:"Model: {{model}}",model:E})}),A==="initializing"&&ne(Ur,{children:[M(P.Typography,{variant:"body2",fontWeight:600,children:k("sidebar:translation_downloading")}),M(P.LinearProgress,{variant:"indeterminate"})]}),A==="translating"&&ne(Ur,{children:[M(P.Typography,{variant:"body2",fontWeight:600,children:k("sidebar:translation_translating")}),M(P.LinearProgress,{variant:x?"determinate":"indeterminate",value:x&&x.totalCheckpoints>0?x.translatedCheckpoints/x.totalCheckpoints*100:void 0}),x&&M(P.Typography,{variant:"caption",color:"text.secondary",children:k("sidebar:translation_progress",{done:x.translatedCheckpoints,total:x.totalCheckpoints})})]}),A==="ready"&&M(P.Alert,{severity:"success",children:k("sidebar:translation_ready")}),_&&M(P.Alert,{severity:A==="error"?"error":"info",children:_}),ne(P.Box,{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:1,flexWrap:"wrap",children:[M(P.Button,{variant:"outlined",color:"warning",onClick:d,sx:{textTransform:"none"},children:k("sidebar:ai_cache_clear")}),M(P.Button,{variant:"outlined",startIcon:M(mt.Replay,{}),onClick:w,disabled:!S||!n||A==="initializing",sx:{textTransform:"none"},children:k("sidebar:translation_restart")}),M(P.Button,{variant:"outlined",startIcon:M(mt.Replay,{}),onClick:u,disabled:!S||!l,sx:{textTransform:"none"},children:k("sidebar:summary_restart")}),M(P.Button,{onClick:t,sx:{textTransform:"none"},children:k("sidebar:close")})]})]})]})]})};var XT=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},oy=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(oy||{}),kr="uninitialized",Cu="pending",Go="fulfilled",Qo="rejected";function Yp(e){return{status:e,isUninitialized:e===kr,isLoading:e===Cu,isSuccess:e===Go,isError:e===Qo}}var Jp=tr;function fd(e,t){if(e===t||!(Jp(e)&&Jp(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const s of n)o[s]=fd(e[s],t[s]),i&&(i=e[s]===o[s]);return i?e:o}function Tu(e,t,n){return e.reduce((r,i,o)=>(t(i,o)&&r.push(n(i,o)),r),[]).flat()}function ZT(e){return new RegExp("(^|:)//").test(e)}function eA(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function pd(e){return e!=null}function Xp(e){return[...e?.values()??[]].filter(pd)}function tA(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var nA=e=>e.replace(/\/$/,""),rA=e=>e.replace(/^\//,"");function iA(e,t){if(!e)return t;if(!t)return e;if(ZT(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=nA(e),t=rA(t),`${e}${n}${t}`}function Ja(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var Au=()=>new Map,oA=e=>{const t=new AbortController;return setTimeout(()=>{const n="signal timed out",r="TimeoutError";t.abort(typeof DOMException<"u"?new DOMException(n,r):Object.assign(new Error(n),{name:r}))},e),t.signal},sA=(...e)=>{for(const n of e)if(n.aborted)return AbortSignal.abort(n.reason);const t=new AbortController;for(const n of e)n.addEventListener("abort",()=>t.abort(n.reason),{signal:t.signal,once:!0});return t.signal},Zp=(...e)=>fetch(...e),aA=e=>e.status>=200&&e.status<=299,lA=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function eh(e){if(!tr(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}var cA=e=>typeof e=="object"&&(tr(e)||Array.isArray(e)||typeof e.toJSON=="function");function uA({baseUrl:e,prepareHeaders:t=f=>f,fetchFn:n=Zp,paramsSerializer:r,isJsonContentType:i=lA,jsonContentType:o="application/json",jsonReplacer:s,timeout:a,responseHandler:l,validateStatus:c,...u}={}){return typeof fetch>"u"&&n===Zp&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,b,h)=>{const{getState:g,extra:m,endpoint:E,forced:A,type:_}=b;let x,{url:d,headers:w=new Headers(u.headers),params:S=void 0,responseHandler:C=l??"json",validateStatus:R=c??aA,timeout:k=a,...T}=typeof p=="string"?{url:p}:p,y={...u,signal:k?sA(b.signal,oA(k)):b.signal,...T};w=new Headers(eh(w)),y.headers=await t(w,{getState:g,arg:p,extra:m,endpoint:E,forced:A,type:_,extraOptions:h})||w;const I=cA(y.body);if(y.body!=null&&!I&&typeof y.body!="string"&&y.headers.delete("content-type"),!y.headers.has("content-type")&&I&&y.headers.set("content-type",o),I&&i(y.headers)&&(y.body=JSON.stringify(y.body,s)),y.headers.has("accept")||(C==="json"?y.headers.set("accept","application/json"):C==="text"&&y.headers.set("accept","text/plain, text/html, */*")),S){const F=~d.indexOf("?")?"&":"?",U=r?r(S):new URLSearchParams(eh(S));d+=F+U}d=iA(e,d);const O=new Request(d,y);x={request:new Request(d,y)};let z;try{z=await n(O)}catch(F){return{error:{status:(F instanceof Error||typeof DOMException<"u"&&F instanceof DOMException)&&F.name==="TimeoutError"?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(F)},meta:x}}const X=z.clone();x.response=X;let H,Q="";try{let F;if(await Promise.all([f(z,C).then(U=>H=U,U=>F=U),X.text().then(U=>Q=U,()=>{})]),F)throw F}catch(F){return{error:{status:"PARSING_ERROR",originalStatus:z.status,data:Q,error:String(F)},meta:x}}return R(z,H)?{data:H,meta:x}:{error:{status:z.status,data:H},meta:x}};async function f(p,b){if(typeof b=="function")return b(p);if(b==="content-type"&&(b=i(p.headers)?"json":"text"),b==="json"){const h=await p.text();return h.length?JSON.parse(h):null}return p.text()}}var th=class{constructor(e,t=void 0){this.value=e,this.meta=t}},Il="__rtkq/",dA="online",fA="offline",sy="focused",hd=Pn(`${Il}${sy}`),ay=Pn(`${Il}un${sy}`),gd=Pn(`${Il}${dA}`),ly=Pn(`${Il}${fA}`),Os="query",cy="mutation",uy="infinitequery";function Pl(e){return e.type===Os}function pA(e){return e.type===cy}function Is(e){return e.type===uy}function Xa(e){return Pl(e)||Is(e)}function md(e,t,n,r,i,o){const s=hA(e)?e(t,n,r,i):e;return s?Tu(s,pd,a=>o(dy(a))):[]}function hA(e){return typeof e=="function"}function dy(e){return typeof e=="string"?{type:e}:e}function gA(e,t){return e.catch(t)}var lo=(e,t)=>e.endpointDefinitions[t],gs=Symbol("forceQueryFn"),ku=e=>typeof e[gs]=="function";function mA({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o,getInternalState:s}){const a=d=>s(d)?.runningQueries,l=d=>s(d)?.runningMutations,{unsubscribeQueryResult:c,removeMutationResult:u,updateSubscriptionOptions:f}=i.internalActions;return{buildInitiateQuery:A,buildInitiateInfiniteQuery:_,buildInitiateMutation:x,getRunningQueryThunk:p,getRunningMutationThunk:b,getRunningQueriesThunk:h,getRunningMutationsThunk:g};function p(d,w){return S=>{const C=lo(o,d),R=e({queryArgs:w,endpointDefinition:C,endpointName:d});return a(S)?.get(R)}}function b(d,w){return S=>l(S)?.get(w)}function h(){return d=>Xp(a(d))}function g(){return d=>Xp(l(d))}function m(d){if(process.env.NODE_ENV!=="production"){if(m.triggered)return;const w=d(i.internalActions.internal_getRTKQSubscriptions());if(m.triggered=!0,typeof w!="object"||typeof w?.type=="string")throw new Error(process.env.NODE_ENV==="production"?ze(34):`Warning: Middleware for RTK-Query API at reducerPath "${i.reducerPath}" has not been added to the store.
|
|
119
|
+
You must add the middleware for RTK-Query to function correctly!`)}}function E(d,w){const S=(C,{subscribe:R=!0,forceRefetch:k,subscriptionOptions:T,[gs]:y,...I}={})=>(O,L)=>{const z=e({queryArgs:C,endpointDefinition:w,endpointName:d});let X;const H={...I,type:Os,subscribe:R,forceRefetch:k,subscriptionOptions:T,endpointName:d,originalArgs:C,queryCacheKey:z,[gs]:y};if(Pl(w))X=t(H);else{const{direction:re,initialPageParam:Y,refetchCachedPages:W}=I;X=n({...H,direction:re,initialPageParam:Y,refetchCachedPages:W})}const Q=i.endpoints[d].select(C),F=O(X),U=Q(L());m(O);const{requestId:ae,abort:te}=F,J=U.requestId!==ae,oe=a(O)?.get(z),ce=()=>Q(L()),q=Object.assign(y?F.then(ce):J&&!oe?Promise.resolve(U):Promise.all([oe,F]).then(ce),{arg:C,requestId:ae,subscriptionOptions:T,queryCacheKey:z,abort:te,async unwrap(){const re=await q;if(re.isError)throw re.error;return re.data},refetch:re=>O(S(C,{subscribe:!1,forceRefetch:!0,...re})),unsubscribe(){R&&O(c({queryCacheKey:z,requestId:ae}))},updateSubscriptionOptions(re){q.subscriptionOptions=re,O(f({endpointName:d,requestId:ae,queryCacheKey:z,options:re}))}});if(!oe&&!J&&!y){const re=a(O);re.set(z,q),q.then(()=>{re.delete(z)})}return q};return S}function A(d,w){return E(d,w)}function _(d,w){return E(d,w)}function x(d){return(w,{track:S=!0,fixedCacheKey:C}={})=>(R,k)=>{const T=r({type:"mutation",endpointName:d,originalArgs:w,track:S,fixedCacheKey:C}),y=R(T);m(R);const{requestId:I,abort:O,unwrap:L}=y,z=gA(y.unwrap().then(F=>({data:F})),F=>({error:F})),X=()=>{R(u({requestId:I,fixedCacheKey:C}))},H=Object.assign(z,{arg:y.arg,requestId:I,abort:O,unwrap:L,reset:X}),Q=l(R);return Q.set(I,H),H.then(()=>{Q.delete(I)}),C&&(Q.set(C,H),H.then(()=>{Q.get(C)===H&&Q.delete(C)})),H}}}var fy=class extends XT{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}},li=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function ci(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new fy(i.issues,t,n,r);return i.value}function nh(e){return e}var jo=(e={})=>({...e,[Al]:!0});function yA({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:o,selectors:s,onSchemaFailure:a,catchSchemaFailure:l,skipSchemaValidation:c}){const u=(T,y,I,O)=>(L,z)=>{const X=n[T],H=r({queryArgs:y,endpointDefinition:X,endpointName:T});if(L(i.internalActions.queryResultPatched({queryCacheKey:H,patches:I})),!O)return;const Q=i.endpoints[T].select(y)(z()),F=md(X.providesTags,Q.data,void 0,y,{},o);L(i.internalActions.updateProvidedBy([{queryCacheKey:H,providedTags:F}]))};function f(T,y,I=0){const O=[y,...T];return I&&O.length>I?O.slice(0,-1):O}function p(T,y,I=0){const O=[...T,y];return I&&O.length>I?O.slice(1):O}const b=(T,y,I,O=!0)=>(L,z)=>{const H=i.endpoints[T].select(y)(z()),Q={patches:[],inversePatches:[],undo:()=>L(i.util.patchQueryData(T,y,Q.inversePatches,O))};if(H.status===kr)return Q;let F;if("data"in H)if(ln(H.data)){const[U,ae,te]=Pm(H.data,I);Q.patches.push(...ae),Q.inversePatches.push(...te),F=U}else F=I(H.data),Q.patches.push({op:"replace",path:[],value:F}),Q.inversePatches.push({op:"replace",path:[],value:H.data});return Q.patches.length===0||L(i.util.patchQueryData(T,y,Q.patches,O)),Q},h=(T,y,I)=>O=>O(i.endpoints[T].initiate(y,{subscribe:!1,forceRefetch:!0,[gs]:()=>({data:I})})),g=(T,y)=>T.query&&T[y]?T[y]:nh,m=async(T,{signal:y,abort:I,rejectWithValue:O,fulfillWithValue:L,dispatch:z,getState:X,extra:H})=>{const Q=n[T.endpointName],{metaSchema:F,skipSchemaValidation:U=c}=Q,ae=T.type===Os;try{let te=nh;const J={signal:y,abort:I,dispatch:z,getState:X,extra:H,endpoint:T.endpointName,type:T.type,forced:ae?E(T,X()):void 0,queryCacheKey:ae?T.queryCacheKey:void 0},oe=ae?T[gs]:void 0;let ce;const q=async(Y,W,fe,B)=>{if(W==null&&Y.pages.length)return Promise.resolve({data:Y});const we={queryArg:T.originalArgs,pageParam:W},be=await re(we),Ce=B?f:p;return{data:{pages:Ce(Y.pages,be.data,fe),pageParams:Ce(Y.pageParams,W,fe)},meta:be.meta}};async function re(Y){let W;const{extraOptions:fe,argSchema:B,rawResponseSchema:we,responseSchema:be}=Q;if(B&&!li(U,"arg")&&(Y=await ci(B,Y,"argSchema",{})),oe?W=oe():Q.query?(te=g(Q,"transformResponse"),W=await t(Q.query(Y),J,fe)):W=await Q.queryFn(Y,J,fe,De=>t(De,J,fe)),typeof process<"u"&&process.env.NODE_ENV==="development"){const De=Q.query?"`baseQuery`":"`queryFn`";let Se;if(!W)Se=`${De} did not return anything.`;else if(typeof W!="object")Se=`${De} did not return an object.`;else if(W.error&&W.data)Se=`${De} returned an object containing both \`error\` and \`result\`.`;else if(W.error===void 0&&W.data===void 0)Se=`${De} returned an object containing neither a valid \`error\` and \`result\`. At least one of them should not be \`undefined\``;else for(const Fe of Object.keys(W))if(Fe!=="error"&&Fe!=="data"&&Fe!=="meta"){Se=`The object returned by ${De} has the unknown property ${Fe}.`;break}Se&&console.error(`Error encountered handling the endpoint ${T.endpointName}.
|
|
120
|
+
${Se}
|
|
121
121
|
It needs to return an object with either the shape \`{ data: <value> }\` or \`{ error: <value> }\` that may contain an optional \`meta\` property.
|
|
122
|
-
Object returned was:`,W)}if(W.error)throw new th(W.error,W.meta);let{data:
|
|
123
|
-
In the case of an unhandled error, no tags will be "provided" or "invalidated".`,J):console.error(J),J}};function E(T,y){const I=s.selectQueryEntry(y,T.queryCacheKey),O=s.selectConfig(y).refetchOnMountOrArgChange,L=I?.fulfilledTimeStamp,U=T.forceRefetch??(T.subscribe&&O);return U?U===!0||(Number(new Date)-Number(L))/1e3>=U:!1}const A=()=>ds(`${e}/executeQuery`,m,{getPendingMeta({arg:y}){const I=n[y.endpointName];return Bo({startedTimeStamp:Date.now(),...Rs(I)?{direction:y.direction}:{}})},condition(y,{getState:I}){const O=I(),L=s.selectQueryEntry(O,y.queryCacheKey),U=L?.fulfilledTimeStamp,Z=y.originalArgs,V=L?.originalArgs,Q=n[y.endpointName],F=y.direction;return ku(y)?!0:L?.status==="pending"?!1:E(y,O)||Nl(Q)&&Q?.forceRefetch?.({currentArg:Z,previousArg:V,endpointState:L,state:O})?!0:!(U&&!F)},dispatchConditionRejection:!0}),_=A(),x=A(),d=ds(`${e}/executeMutation`,m,{getPendingMeta(){return Bo({startedTimeStamp:Date.now()})}}),w=T=>"force"in T,S=T=>"ifOlderThan"in T,C=(T,y,I={})=>(O,L)=>{const U=w(I)&&I.force,Z=S(I)&&I.ifOlderThan,V=(F=!0)=>{const z={forceRefetch:F,subscribe:!1};return i.endpoints[T].initiate(y,z)},Q=i.endpoints[T].select(y)(L());if(U)O(V());else if(Z){const F=Q?.fulfilledTimeStamp;if(!F){O(V());return}(Number(new Date)-Number(new Date(F)))/1e3>=Z&&O(V())}else O(V(!1))};function R(T){return y=>y?.meta?.arg?.endpointName===T}function k(T,y){return{matchPending:Xo(cd(T),R(y)),matchFulfilled:Xo(Hr(T),R(y)),matchRejected:Xo(so(T),R(y))}}return{queryThunk:_,mutationThunk:d,infiniteQueryThunk:x,prefetch:C,updateQueryData:b,upsertQueryData:h,patchQueryData:u,buildMatchThunkActions:k}}function Ru(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function py(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function hy(e,t,n,r){return md(n[e.meta.arg.endpointName][t],Hr(e)?e.payload:void 0,Ol(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function rh(e){return an(e)?Om(e):e}function ya(e,t,n){const r=e[t];r&&n(r)}function hs(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function ih(e,t,n){const r=e[hs(t)];r&&n(r)}var ba={};function bA({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:s,hasRehydrationInfo:a},assertTagType:l,config:c}){const u=Nn(`${e}/resetApiState`);function f(R,k,T,y){R[k.queryCacheKey]??={status:Ar,endpointName:k.endpointName},ya(R,k.queryCacheKey,I=>{I.status=Cu,I.requestId=T&&I.requestId?I.requestId:y.requestId,k.originalArgs!==void 0&&(I.originalArgs=k.originalArgs),I.startedTimeStamp=y.startedTimeStamp;const O=i[y.arg.endpointName];Rs(O)&&"direction"in k&&(I.direction=k.direction)})}function p(R,k,T,y){ya(R,k.arg.queryCacheKey,I=>{if(I.requestId!==k.requestId&&!y)return;const{merge:O}=i[k.arg.endpointName];if(I.status=Wo,O)if(I.data!==void 0){const{fulfilledTimeStamp:L,arg:U,baseQueryMeta:Z,requestId:V}=k;let Q=Ts(I.data,F=>O(F,T,{arg:U.originalArgs,baseQueryMeta:Z,fulfilledTimeStamp:L,requestId:V}));I.data=Q}else I.data=T;else I.data=i[k.arg.endpointName].structuralSharing??!0?fd(an(I.data)?jx(I.data):I.data,T):T;delete I.error,I.fulfilledTimeStamp=k.fulfilledTimeStamp})}const b=On({name:`${e}/queries`,initialState:ba,reducers:{removeQueryResult:{reducer(R,{payload:{queryCacheKey:k}}){delete R[k]},prepare:Lo()},cacheEntriesUpserted:{reducer(R,k){for(const T of k.payload){const{queryDescription:y,value:I}=T;f(R,y,!0,{arg:y,requestId:k.meta.requestId,startedTimeStamp:k.meta.timestamp}),p(R,{arg:y,requestId:k.meta.requestId,fulfilledTimeStamp:k.meta.timestamp,baseQueryMeta:{}},I,!0)}},prepare:R=>({payload:R.map(y=>{const{endpointName:I,arg:O,value:L}=y,U=i[I];return{queryDescription:{type:ks,endpointName:I,originalArgs:y.arg,queryCacheKey:r({queryArgs:O,endpointDefinition:U,endpointName:I})},value:L}}),meta:{[kl]:!0,requestId:ud(),timestamp:Date.now()}})},queryResultPatched:{reducer(R,{payload:{queryCacheKey:k,patches:T}}){ya(R,k,y=>{y.data=kp(y.data,T.concat())})},prepare:Lo()}},extraReducers(R){R.addCase(t.pending,(k,{meta:T,meta:{arg:y}})=>{const I=ku(y);f(k,y,I,T)}).addCase(t.fulfilled,(k,{meta:T,payload:y})=>{const I=ku(T.arg);p(k,T,y,I)}).addCase(t.rejected,(k,{meta:{condition:T,arg:y,requestId:I},error:O,payload:L})=>{ya(k,y.queryCacheKey,U=>{if(!T){if(U.requestId!==I)return;U.status=Ko,U.error=L??O}})}).addMatcher(a,(k,T)=>{const{queries:y}=s(T);for(const[I,O]of Object.entries(y))(O?.status===Wo||O?.status===Ko)&&(k[I]=O)})}}),h=On({name:`${e}/mutations`,initialState:ba,reducers:{removeMutationResult:{reducer(R,{payload:k}){const T=hs(k);T in R&&delete R[T]},prepare:Lo()}},extraReducers(R){R.addCase(n.pending,(k,{meta:T,meta:{requestId:y,arg:I,startedTimeStamp:O}})=>{I.track&&(k[hs(T)]={requestId:y,status:Cu,endpointName:I.endpointName,startedTimeStamp:O})}).addCase(n.fulfilled,(k,{payload:T,meta:y})=>{y.arg.track&&ih(k,y,I=>{I.requestId===y.requestId&&(I.status=Wo,I.data=T,I.fulfilledTimeStamp=y.fulfilledTimeStamp)})}).addCase(n.rejected,(k,{payload:T,error:y,meta:I})=>{I.arg.track&&ih(k,I,O=>{O.requestId===I.requestId&&(O.status=Ko,O.error=T??y)})}).addMatcher(a,(k,T)=>{const{mutations:y}=s(T);for(const[I,O]of Object.entries(y))(O?.status===Wo||O?.status===Ko)&&I!==O?.requestId&&(k[I]=O)})}}),g={tags:{},keys:{}},m=On({name:`${e}/invalidation`,initialState:g,reducers:{updateProvidedBy:{reducer(R,k){for(const{queryCacheKey:T,providedTags:y}of k.payload){E(R,T);for(const{type:I,id:O}of y){const L=(R.tags[I]??={})[O||"__internal_without_id"]??=[];L.includes(T)||L.push(T)}R.keys[T]=y}},prepare:Lo()}},extraReducers(R){R.addCase(b.actions.removeQueryResult,(k,{payload:{queryCacheKey:T}})=>{E(k,T)}).addMatcher(a,(k,T)=>{const{provided:y}=s(T);for(const[I,O]of Object.entries(y.tags??{}))for(const[L,U]of Object.entries(O)){const Z=(k.tags[I]??={})[L||"__internal_without_id"]??=[];for(const V of U)Z.includes(V)||Z.push(V),k.keys[V]=y.keys[V]}}).addMatcher(Tr(Hr(t),Ol(t)),(k,T)=>{A(k,[T])}).addMatcher(b.actions.cacheEntriesUpserted.match,(k,T)=>{const y=T.payload.map(({queryDescription:I,value:O})=>({type:"UNKNOWN",payload:O,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:I}}));A(k,y)})}});function E(R,k){const T=rh(R.keys[k]??[]);for(const y of T){const I=y.type,O=y.id??"__internal_without_id",L=R.tags[I]?.[O];L&&(R.tags[I][O]=rh(L).filter(U=>U!==k))}delete R.keys[k]}function A(R,k){const T=k.map(y=>{const I=hy(y,"providesTags",i,l),{queryCacheKey:O}=y.meta.arg;return{queryCacheKey:O,providedTags:I}});m.caseReducers.updateProvidedBy(R,m.actions.updateProvidedBy(T))}const _=On({name:`${e}/subscriptions`,initialState:ba,reducers:{updateSubscriptionOptions(R,k){},unsubscribeQueryResult(R,k){},internal_getRTKQSubscriptions(){}}}),x=On({name:`${e}/internalSubscriptions`,initialState:ba,reducers:{subscriptionsUpdated:{reducer(R,k){return kp(R,k.payload)},prepare:Lo()}}}),d=On({name:`${e}/config`,initialState:{online:tA(),focused:eA(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(R,{payload:k}){R.middlewareRegistered=R.middlewareRegistered==="conflict"||o!==k?"conflict":!0}},extraReducers:R=>{R.addCase(gd,k=>{k.online=!0}).addCase(ly,k=>{k.online=!1}).addCase(hd,k=>{k.focused=!0}).addCase(ay,k=>{k.focused=!1}).addMatcher(a,k=>({...k}))}}),w=Sm({queries:b.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:x.reducer,config:d.reducer}),S=(R,k)=>w(u.match(k)?void 0:R,k),C={...d.actions,...b.actions,..._.actions,...x.actions,...h.actions,...m.actions,resetApiState:u};return{reducer:S,actions:C}}var Rn=Symbol.for("RTKQ/skipToken"),gy={status:Ar},oh=Ts(gy,()=>{}),sh=Ts(gy,()=>{});function wA({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=_=>oh,i=_=>sh;return{buildQuerySelector:p,buildInfiniteQuerySelector:b,buildMutationSelector:h,selectInvalidatedBy:g,selectCachedArgsForQuery:m,selectApiState:s,selectQueries:a,selectMutations:c,selectQueryEntry:l,selectConfig:u};function o(_){return{..._,...Yp(_.status)}}function s(_){const x=_[t];if(process.env.NODE_ENV!=="production"&&!x){if(s.triggered)return x;s.triggered=!0,console.error(`Error: No data found at \`state.${t}\`. Did you forget to add the reducer to the store?`)}return x}function a(_){return s(_)?.queries}function l(_,x){return a(_)?.[x]}function c(_){return s(_)?.mutations}function u(_){return s(_)?.config}function f(_,x,d){return w=>{if(w===Rn)return n(r,d);const S=e({queryArgs:w,endpointDefinition:x,endpointName:_});return n(R=>l(R,S)??oh,d)}}function p(_,x){return f(_,x,o)}function b(_,x){const{infiniteQueryOptions:d}=x;function w(S){const C={...S,...Yp(S.status)},{isLoading:R,isError:k,direction:T}=C,y=T==="forward",I=T==="backward";return{...C,hasNextPage:E(d,C.data,C.originalArgs),hasPreviousPage:A(d,C.data,C.originalArgs),isFetchingNextPage:R&&y,isFetchingPreviousPage:R&&I,isFetchNextPageError:k&&y,isFetchPreviousPageError:k&&I}}return f(_,x,w)}function h(){return _=>{let x;return typeof _=="object"?x=hs(_)??Rn:x=_,n(x===Rn?i:S=>s(S)?.mutations?.[x]??sh,o)}}function g(_,x){const d=_[t],w=new Set,S=Tu(x,pd,dy);for(const C of S){const R=d.provided.tags[C.type];if(!R)continue;let k=(C.id!==void 0?R[C.id]:Object.values(R).flat())??[];for(const T of k)w.add(T)}return Array.from(w.values()).flatMap(C=>{const R=d.queries[C];return R?{queryCacheKey:C,endpointName:R.endpointName,originalArgs:R.originalArgs}:[]})}function m(_,x){return Tu(Object.values(a(_)),d=>d?.endpointName===x&&d.status!==Ar,d=>d.originalArgs)}function E(_,x,d){return x?Ru(_,x,d)!=null:!1}function A(_,x,d){return!x||!_.getPreviousPageParam?!1:py(_,x,d)!=null}}var ah=WeakMap?new WeakMap:void 0,lh=({endpointName:e,queryArgs:t})=>{let n="";const r=ah?.get(t);if(typeof r=="string")n=r;else{const i=JSON.stringify(t,(o,s)=>(s=typeof s=="bigint"?{$bigint:s.toString()}:s,s=Zn(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s,s));Zn(t)&&ah?.set(t,i),n=i}return`${e}(${n})`};function my(...e){return function(n){const r=Va(c=>n.extractRehydrationInfo?.(c,{reducerPath:n.reducerPath??"api"})),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(c){let u=lh;if("serializeQueryArgs"in c.endpointDefinition){const f=c.endpointDefinition.serializeQueryArgs;u=p=>{const b=f(p);return typeof b=="string"?b:lh({...p,queryArgs:b})}}else n.serializeQueryArgs&&(u=n.serializeQueryArgs);return u(c)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(c){c()},apiUid:ud(),extractRehydrationInfo:r,hasRehydrationInfo:Va(c=>r(c)!=null)},s={injectEndpoints:l,enhanceEndpoints({addTagTypes:c,endpoints:u}){if(c)for(const f of c)i.tagTypes.includes(f)||i.tagTypes.push(f);if(u)for(const[f,p]of Object.entries(u))typeof p=="function"?p(ao(o,f)):Object.assign(ao(o,f)||{},p);return s}},a=e.map(c=>c.init(s,i,o));function l(c){const u=c.endpoints({query:f=>({...f,type:ks}),mutation:f=>({...f,type:cy}),infiniteQuery:f=>({...f,type:uy})});for(const[f,p]of Object.entries(u)){if(c.overrideExisting!==!0&&f in o.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(process.env.NODE_ENV==="production"?Be(39):`called \`injectEndpoints\` to override already-existing endpointName ${f} without specifying \`overrideExisting: true\``);typeof process<"u"&&process.env.NODE_ENV==="development"&&console.error(`called \`injectEndpoints\` to override already-existing endpointName ${f} without specifying \`overrideExisting: true\``);continue}if(typeof process<"u"&&process.env.NODE_ENV==="development"&&Rs(p)){const{infiniteQueryOptions:b}=p,{maxPages:h,getPreviousPageParam:g}=b;if(typeof h=="number"){if(h<1)throw new Error(process.env.NODE_ENV==="production"?Be(40):`maxPages for endpoint '${f}' must be a number greater than 0`);if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?Be(41):`getPreviousPageParam for endpoint '${f}' must be a function if maxPages is used`)}}o.endpointDefinitions[f]=p;for(const b of a)b.injectEndpoint(f,p)}return s}return s.injectEndpoints({endpoints:n.endpoints})}}function fr(e,...t){return Object.assign(e,...t)}var _A=({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const i=`${e.reducerPath}/subscriptions`;let o=null,s=null;const{updateSubscriptionOptions:a,unsubscribeQueryResult:l}=e.internalActions,c=(g,m)=>{if(a.match(m)){const{queryCacheKey:A,requestId:_,options:x}=m.payload,d=g.get(A);return d?.has(_)&&d.set(_,x),!0}if(l.match(m)){const{queryCacheKey:A,requestId:_}=m.payload,x=g.get(A);return x&&x.delete(_),!0}if(e.internalActions.removeQueryResult.match(m))return g.delete(m.payload.queryCacheKey),!0;if(t.pending.match(m)){const{meta:{arg:A,requestId:_}}=m,x=Xa(g,A.queryCacheKey,Au);return A.subscribe&&x.set(_,A.subscriptionOptions??x.get(_)??{}),!0}let E=!1;if(t.rejected.match(m)){const{meta:{condition:A,arg:_,requestId:x}}=m;if(A&&_.subscribe){const d=Xa(g,_.queryCacheKey,Au);d.set(x,_.subscriptionOptions??d.get(x)??{}),E=!0}}return E},u=()=>n.currentSubscriptions,b={getSubscriptions:u,getSubscriptionCount:g=>u().get(g)?.size??0,isRequestSubscribed:(g,m)=>!!u()?.get(g)?.get(m)};function h(g){return JSON.parse(JSON.stringify(Object.fromEntries([...g].map(([m,E])=>[m,Object.fromEntries(E)]))))}return(g,m)=>{if(o||(o=h(n.currentSubscriptions)),e.util.resetApiState.match(g))return o={},n.currentSubscriptions.clear(),s=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,b];const E=c(n.currentSubscriptions,g);let A=!0;if(process.env.NODE_ENV==="test"&&typeof g.type=="string"&&g.type===`${e.reducerPath}/getPolling`)return[!1,n.currentPolls];if(E){s||(s=setTimeout(()=>{const d=h(n.currentSubscriptions),[,w]=Pm(o,()=>d);m.next(e.internalActions.subscriptionsUpdated(w)),o=d,s=null},500));const _=typeof g.type=="string"&&!!g.type.startsWith(i),x=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;A=!_&&!x}return[A,!1]}},vA=2147483647/1e3-1,SA=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:s},getRunningQueryThunk:a,mwApi:l})=>{const{removeQueryResult:c,unsubscribeQueryResult:u,cacheEntriesUpserted:f}=t.internalActions,p=Tr(u.match,n.fulfilled,n.rejected,f.match);function b(_){const x=i.currentSubscriptions.get(_);return x?x.size>0:!1}const h={};function g(_){for(const x of _.values())x?.abort?.()}const m=(_,x)=>{const d=x.getState(),w=s(d);if(p(_)){let S;if(f.match(_))S=_.payload.map(C=>C.queryDescription.queryCacheKey);else{const{queryCacheKey:C}=u.match(_)?_.payload:_.meta.arg;S=[C]}E(S,x,w)}if(t.util.resetApiState.match(_)){for(const[S,C]of Object.entries(h))C&&clearTimeout(C),delete h[S];g(i.runningQueries),g(i.runningMutations)}if(r.hasRehydrationInfo(_)){const{queries:S}=r.extractRehydrationInfo(_);E(Object.keys(S),x,w)}};function E(_,x,d){const w=x.getState();for(const S of _){const C=o(w,S);C?.endpointName&&A(S,C.endpointName,x,d)}}function A(_,x,d,w){const C=ao(r,x)?.keepUnusedDataFor??w.keepUnusedDataFor;if(C===1/0)return;const R=Math.max(0,Math.min(C,vA));if(!b(_)){const k=h[_];k&&clearTimeout(k),h[_]=setTimeout(()=>{if(!b(_)){const T=o(d.getState(),_);T?.endpointName&&d.dispatch(a(T.endpointName,T.originalArgs))?.abort(),d.dispatch(c({queryCacheKey:_}))}delete h[_]},R*1e3)}}return m},ch=new Error("Promise never resolved before cacheEntryRemoved."),EA=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:s,selectApiState:a}})=>{const l=wu(r),c=wu(i),u=Hr(r,i),f={},{removeQueryResult:p,removeMutationResult:b,cacheEntriesUpserted:h}=e.internalActions;function g(d,w,S){const C=f[d];C?.valueResolved&&(C.valueResolved({data:w,meta:S}),delete C.valueResolved)}function m(d){const w=f[d];w&&(delete f[d],w.cacheEntryRemoved())}function E(d){const{arg:w,requestId:S}=d.meta,{endpointName:C,originalArgs:R}=w;return[C,R,S]}const A=(d,w,S)=>{const C=_(d);function R(k,T,y,I){const O=s(S,T),L=s(w.getState(),T);!O&&L&&x(k,I,T,w,y)}if(r.pending.match(d)){const[k,T,y]=E(d);R(k,C,y,T)}else if(h.match(d))for(const{queryDescription:k,value:T}of d.payload){const{endpointName:y,originalArgs:I,queryCacheKey:O}=k;R(y,O,d.meta.requestId,I),g(O,T,{})}else if(i.pending.match(d)){if(w.getState()[t].mutations[C]){const[T,y,I]=E(d);x(T,y,C,w,I)}}else if(u(d))g(C,d.payload,d.meta.baseQueryMeta);else if(p.match(d)||b.match(d))m(C);else if(e.util.resetApiState.match(d))for(const k of Object.keys(f))m(k)};function _(d){return l(d)?d.meta.arg.queryCacheKey:c(d)?d.meta.arg.fixedCacheKey??d.meta.requestId:p.match(d)?d.payload.queryCacheKey:b.match(d)?hs(d.payload):""}function x(d,w,S,C,R){const k=ao(n,d),T=k?.onCacheEntryAdded;if(!T)return;const y={},I=new Promise(Q=>{y.cacheEntryRemoved=Q}),O=Promise.race([new Promise(Q=>{y.valueResolved=Q}),I.then(()=>{throw ch})]);O.catch(()=>{}),f[S]=y;const L=e.endpoints[d].select(Za(k)?w:S),U=C.dispatch((Q,F,z)=>z),Z={...C,getCacheEntry:()=>L(C.getState()),requestId:R,extra:U,updateCachedData:Za(k)?Q=>C.dispatch(e.util.updateQueryData(d,w,Q)):void 0,cacheDataLoaded:O,cacheEntryRemoved:I},V=T(w,Z);Promise.resolve(V).catch(Q=>{if(Q!==ch)throw Q})}return A},xA=({api:e,context:{apiUid:t},reducerPath:n})=>(r,i)=>{e.util.resetApiState.match(r)&&i.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"&&process.env.NODE_ENV==="development"&&e.internalActions.middlewareRegistered.match(r)&&r.payload===t&&i.getState()[n]?.config?.middlewareRegistered==="conflict"&&console.warn(`There is a mismatch between slice and middleware for the reducerPath "${n}".
|
|
122
|
+
Object returned was:`,W)}if(W.error)throw new th(W.error,W.meta);let{data:Ce}=W;we&&!li(U,"rawResponse")&&(Ce=await ci(we,W.data,"rawResponseSchema",W.meta));let ke=await te(Ce,W.meta,Y);return be&&!li(U,"response")&&(ke=await ci(be,ke,"responseSchema",W.meta)),{...W,data:ke}}if(ae&&"infiniteQueryOptions"in Q){const{infiniteQueryOptions:Y}=Q,{maxPages:W=1/0}=Y,fe=T.refetchCachedPages??Y.refetchCachedPages??!0;let B;const we={pages:[],pageParams:[]},be=s.selectQueryEntry(X(),T.queryCacheKey)?.data,ke=E(T,X())&&!T.direction||!be?we:be;if("direction"in T&&T.direction&&ke.pages.length){const De=T.direction==="backward",Fe=(De?py:Ru)(Y,ke,T.originalArgs);B=await q(ke,Fe,W,De)}else{const{initialPageParam:De=Y.initialPageParam}=T,Se=be?.pageParams??[],Fe=Se[0]??De,$t=Se.length;if(B=await q(ke,Fe,W),oe&&(B={data:B.data.pages[0]}),fe)for(let ye=1;ye<$t;ye++){const ve=Ru(Y,B.data,T.originalArgs);B=await q(B.data,ve,W)}}ce=B}else ce=await re(T.originalArgs);return F&&!li(U,"meta")&&ce.meta&&(ce.meta=await ci(F,ce.meta,"metaSchema",ce.meta)),L(ce.data,jo({fulfilledTimeStamp:Date.now(),baseQueryMeta:ce.meta}))}catch(te){let J=te;if(J instanceof th){let oe=g(Q,"transformErrorResponse");const{rawErrorResponseSchema:ce,errorResponseSchema:q}=Q;let{value:re,meta:Y}=J;try{ce&&!li(U,"rawErrorResponse")&&(re=await ci(ce,re,"rawErrorResponseSchema",Y)),F&&!li(U,"meta")&&(Y=await ci(F,Y,"metaSchema",Y));let W=await oe(re,Y,T.originalArgs);return q&&!li(U,"errorResponse")&&(W=await ci(q,W,"errorResponseSchema",Y)),O(W,jo({baseQueryMeta:Y}))}catch(W){J=W}}try{if(J instanceof fy){const oe={endpoint:T.endpointName,arg:T.originalArgs,type:T.type,queryCacheKey:ae?T.queryCacheKey:void 0};Q.onSchemaFailure?.(J,oe),a?.(J,oe);const{catchSchemaFailure:ce=l}=Q;if(ce)return O(ce(J,oe),jo({baseQueryMeta:J._bqMeta}))}}catch(oe){J=oe}throw typeof process<"u"&&process.env.NODE_ENV!=="production"?console.error(`An unhandled error occurred processing a request for the endpoint "${T.endpointName}".
|
|
123
|
+
In the case of an unhandled error, no tags will be "provided" or "invalidated".`,J):console.error(J),J}};function E(T,y){const I=s.selectQueryEntry(y,T.queryCacheKey),O=s.selectConfig(y).refetchOnMountOrArgChange,L=I?.fulfilledTimeStamp,z=T.forceRefetch??(T.subscribe&&O);return z?z===!0||(Number(new Date)-Number(L))/1e3>=z:!1}const A=()=>ps(`${e}/executeQuery`,m,{getPendingMeta({arg:y}){const I=n[y.endpointName];return jo({startedTimeStamp:Date.now(),...Is(I)?{direction:y.direction}:{}})},condition(y,{getState:I}){const O=I(),L=s.selectQueryEntry(O,y.queryCacheKey),z=L?.fulfilledTimeStamp,X=y.originalArgs,H=L?.originalArgs,Q=n[y.endpointName],F=y.direction;return ku(y)?!0:L?.status==="pending"?!1:E(y,O)||Pl(Q)&&Q?.forceRefetch?.({currentArg:X,previousArg:H,endpointState:L,state:O})?!0:!(z&&!F)},dispatchConditionRejection:!0}),_=A(),x=A(),d=ps(`${e}/executeMutation`,m,{getPendingMeta(){return jo({startedTimeStamp:Date.now()})}}),w=T=>"force"in T,S=T=>"ifOlderThan"in T,C=(T,y,I={})=>(O,L)=>{const z=w(I)&&I.force,X=S(I)&&I.ifOlderThan,H=(F=!0)=>{const U={forceRefetch:F,subscribe:!1};return i.endpoints[T].initiate(y,U)},Q=i.endpoints[T].select(y)(L());if(z)O(H());else if(X){const F=Q?.fulfilledTimeStamp;if(!F){O(H());return}(Number(new Date)-Number(new Date(F)))/1e3>=X&&O(H())}else O(H(!1))};function R(T){return y=>y?.meta?.arg?.endpointName===T}function k(T,y){return{matchPending:es(cd(T),R(y)),matchFulfilled:es(Vr(T),R(y)),matchRejected:es(ao(T),R(y))}}return{queryThunk:_,mutationThunk:d,infiniteQueryThunk:x,prefetch:C,updateQueryData:b,upsertQueryData:h,patchQueryData:u,buildMatchThunkActions:k}}function Ru(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function py(e,{pages:t,pageParams:n},r){return e.getPreviousPageParam?.(t[0],t,n[0],n,r)}function hy(e,t,n,r){return md(n[e.meta.arg.endpointName][t],Vr(e)?e.payload:void 0,Rl(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function rh(e){return an(e)?Om(e):e}function ma(e,t,n){const r=e[t];r&&n(r)}function ms(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function ih(e,t,n){const r=e[ms(t)];r&&n(r)}var ya={};function bA({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:s,hasRehydrationInfo:a},assertTagType:l,config:c}){const u=Pn(`${e}/resetApiState`);function f(R,k,T,y){R[k.queryCacheKey]??={status:kr,endpointName:k.endpointName},ma(R,k.queryCacheKey,I=>{I.status=Cu,I.requestId=T&&I.requestId?I.requestId:y.requestId,k.originalArgs!==void 0&&(I.originalArgs=k.originalArgs),I.startedTimeStamp=y.startedTimeStamp;const O=i[y.arg.endpointName];Is(O)&&"direction"in k&&(I.direction=k.direction)})}function p(R,k,T,y){ma(R,k.arg.queryCacheKey,I=>{if(I.requestId!==k.requestId&&!y)return;const{merge:O}=i[k.arg.endpointName];if(I.status=Go,O)if(I.data!==void 0){const{fulfilledTimeStamp:L,arg:z,baseQueryMeta:X,requestId:H}=k;let Q=ks(I.data,F=>O(F,T,{arg:z.originalArgs,baseQueryMeta:X,fulfilledTimeStamp:L,requestId:H}));I.data=Q}else I.data=T;else I.data=i[k.arg.endpointName].structuralSharing??!0?fd(an(I.data)?jx(I.data):I.data,T):T;delete I.error,I.fulfilledTimeStamp=k.fulfilledTimeStamp})}const b=Rn({name:`${e}/queries`,initialState:ya,reducers:{removeQueryResult:{reducer(R,{payload:{queryCacheKey:k}}){delete R[k]},prepare:Bo()},cacheEntriesUpserted:{reducer(R,k){for(const T of k.payload){const{queryDescription:y,value:I}=T;f(R,y,!0,{arg:y,requestId:k.meta.requestId,startedTimeStamp:k.meta.timestamp}),p(R,{arg:y,requestId:k.meta.requestId,fulfilledTimeStamp:k.meta.timestamp,baseQueryMeta:{}},I,!0)}},prepare:R=>({payload:R.map(y=>{const{endpointName:I,arg:O,value:L}=y,z=i[I];return{queryDescription:{type:Os,endpointName:I,originalArgs:y.arg,queryCacheKey:r({queryArgs:O,endpointDefinition:z,endpointName:I})},value:L}}),meta:{[Al]:!0,requestId:ud(),timestamp:Date.now()}})},queryResultPatched:{reducer(R,{payload:{queryCacheKey:k,patches:T}}){ma(R,k,y=>{y.data=kp(y.data,T.concat())})},prepare:Bo()}},extraReducers(R){R.addCase(t.pending,(k,{meta:T,meta:{arg:y}})=>{const I=ku(y);f(k,y,I,T)}).addCase(t.fulfilled,(k,{meta:T,payload:y})=>{const I=ku(T.arg);p(k,T,y,I)}).addCase(t.rejected,(k,{meta:{condition:T,arg:y,requestId:I},error:O,payload:L})=>{ma(k,y.queryCacheKey,z=>{if(!T){if(z.requestId!==I)return;z.status=Qo,z.error=L??O}})}).addMatcher(a,(k,T)=>{const{queries:y}=s(T);for(const[I,O]of Object.entries(y))(O?.status===Go||O?.status===Qo)&&(k[I]=O)})}}),h=Rn({name:`${e}/mutations`,initialState:ya,reducers:{removeMutationResult:{reducer(R,{payload:k}){const T=ms(k);T in R&&delete R[T]},prepare:Bo()}},extraReducers(R){R.addCase(n.pending,(k,{meta:T,meta:{requestId:y,arg:I,startedTimeStamp:O}})=>{I.track&&(k[ms(T)]={requestId:y,status:Cu,endpointName:I.endpointName,startedTimeStamp:O})}).addCase(n.fulfilled,(k,{payload:T,meta:y})=>{y.arg.track&&ih(k,y,I=>{I.requestId===y.requestId&&(I.status=Go,I.data=T,I.fulfilledTimeStamp=y.fulfilledTimeStamp)})}).addCase(n.rejected,(k,{payload:T,error:y,meta:I})=>{I.arg.track&&ih(k,I,O=>{O.requestId===I.requestId&&(O.status=Qo,O.error=T??y)})}).addMatcher(a,(k,T)=>{const{mutations:y}=s(T);for(const[I,O]of Object.entries(y))(O?.status===Go||O?.status===Qo)&&I!==O?.requestId&&(k[I]=O)})}}),g={tags:{},keys:{}},m=Rn({name:`${e}/invalidation`,initialState:g,reducers:{updateProvidedBy:{reducer(R,k){for(const{queryCacheKey:T,providedTags:y}of k.payload){E(R,T);for(const{type:I,id:O}of y){const L=(R.tags[I]??={})[O||"__internal_without_id"]??=[];L.includes(T)||L.push(T)}R.keys[T]=y}},prepare:Bo()}},extraReducers(R){R.addCase(b.actions.removeQueryResult,(k,{payload:{queryCacheKey:T}})=>{E(k,T)}).addMatcher(a,(k,T)=>{const{provided:y}=s(T);for(const[I,O]of Object.entries(y.tags??{}))for(const[L,z]of Object.entries(O)){const X=(k.tags[I]??={})[L||"__internal_without_id"]??=[];for(const H of z)X.includes(H)||X.push(H),k.keys[H]=y.keys[H]}}).addMatcher(Ar(Vr(t),Rl(t)),(k,T)=>{A(k,[T])}).addMatcher(b.actions.cacheEntriesUpserted.match,(k,T)=>{const y=T.payload.map(({queryDescription:I,value:O})=>({type:"UNKNOWN",payload:O,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:I}}));A(k,y)})}});function E(R,k){const T=rh(R.keys[k]??[]);for(const y of T){const I=y.type,O=y.id??"__internal_without_id",L=R.tags[I]?.[O];L&&(R.tags[I][O]=rh(L).filter(z=>z!==k))}delete R.keys[k]}function A(R,k){const T=k.map(y=>{const I=hy(y,"providesTags",i,l),{queryCacheKey:O}=y.meta.arg;return{queryCacheKey:O,providedTags:I}});m.caseReducers.updateProvidedBy(R,m.actions.updateProvidedBy(T))}const _=Rn({name:`${e}/subscriptions`,initialState:ya,reducers:{updateSubscriptionOptions(R,k){},unsubscribeQueryResult(R,k){},internal_getRTKQSubscriptions(){}}}),x=Rn({name:`${e}/internalSubscriptions`,initialState:ya,reducers:{subscriptionsUpdated:{reducer(R,k){return kp(R,k.payload)},prepare:Bo()}}}),d=Rn({name:`${e}/config`,initialState:{online:tA(),focused:eA(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(R,{payload:k}){R.middlewareRegistered=R.middlewareRegistered==="conflict"||o!==k?"conflict":!0}},extraReducers:R=>{R.addCase(gd,k=>{k.online=!0}).addCase(ly,k=>{k.online=!1}).addCase(hd,k=>{k.focused=!0}).addCase(ay,k=>{k.focused=!1}).addMatcher(a,k=>({...k}))}}),w=Sm({queries:b.reducer,mutations:h.reducer,provided:m.reducer,subscriptions:x.reducer,config:d.reducer}),S=(R,k)=>w(u.match(k)?void 0:R,k),C={...d.actions,...b.actions,..._.actions,...x.actions,...h.actions,...m.actions,resetApiState:u};return{reducer:S,actions:C}}var kn=Symbol.for("RTKQ/skipToken"),gy={status:kr},oh=ks(gy,()=>{}),sh=ks(gy,()=>{});function wA({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=_=>oh,i=_=>sh;return{buildQuerySelector:p,buildInfiniteQuerySelector:b,buildMutationSelector:h,selectInvalidatedBy:g,selectCachedArgsForQuery:m,selectApiState:s,selectQueries:a,selectMutations:c,selectQueryEntry:l,selectConfig:u};function o(_){return{..._,...Yp(_.status)}}function s(_){const x=_[t];if(process.env.NODE_ENV!=="production"&&!x){if(s.triggered)return x;s.triggered=!0,console.error(`Error: No data found at \`state.${t}\`. Did you forget to add the reducer to the store?`)}return x}function a(_){return s(_)?.queries}function l(_,x){return a(_)?.[x]}function c(_){return s(_)?.mutations}function u(_){return s(_)?.config}function f(_,x,d){return w=>{if(w===kn)return n(r,d);const S=e({queryArgs:w,endpointDefinition:x,endpointName:_});return n(R=>l(R,S)??oh,d)}}function p(_,x){return f(_,x,o)}function b(_,x){const{infiniteQueryOptions:d}=x;function w(S){const C={...S,...Yp(S.status)},{isLoading:R,isError:k,direction:T}=C,y=T==="forward",I=T==="backward";return{...C,hasNextPage:E(d,C.data,C.originalArgs),hasPreviousPage:A(d,C.data,C.originalArgs),isFetchingNextPage:R&&y,isFetchingPreviousPage:R&&I,isFetchNextPageError:k&&y,isFetchPreviousPageError:k&&I}}return f(_,x,w)}function h(){return _=>{let x;return typeof _=="object"?x=ms(_)??kn:x=_,n(x===kn?i:S=>s(S)?.mutations?.[x]??sh,o)}}function g(_,x){const d=_[t],w=new Set,S=Tu(x,pd,dy);for(const C of S){const R=d.provided.tags[C.type];if(!R)continue;let k=(C.id!==void 0?R[C.id]:Object.values(R).flat())??[];for(const T of k)w.add(T)}return Array.from(w.values()).flatMap(C=>{const R=d.queries[C];return R?{queryCacheKey:C,endpointName:R.endpointName,originalArgs:R.originalArgs}:[]})}function m(_,x){return Tu(Object.values(a(_)),d=>d?.endpointName===x&&d.status!==kr,d=>d.originalArgs)}function E(_,x,d){return x?Ru(_,x,d)!=null:!1}function A(_,x,d){return!x||!_.getPreviousPageParam?!1:py(_,x,d)!=null}}var ah=WeakMap?new WeakMap:void 0,lh=({endpointName:e,queryArgs:t})=>{let n="";const r=ah?.get(t);if(typeof r=="string")n=r;else{const i=JSON.stringify(t,(o,s)=>(s=typeof s=="bigint"?{$bigint:s.toString()}:s,s=tr(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s,s));tr(t)&&ah?.set(t,i),n=i}return`${e}(${n})`};function my(...e){return function(n){const r=Ha(c=>n.extractRehydrationInfo?.(c,{reducerPath:n.reducerPath??"api"})),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(c){let u=lh;if("serializeQueryArgs"in c.endpointDefinition){const f=c.endpointDefinition.serializeQueryArgs;u=p=>{const b=f(p);return typeof b=="string"?b:lh({...p,queryArgs:b})}}else n.serializeQueryArgs&&(u=n.serializeQueryArgs);return u(c)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(c){c()},apiUid:ud(),extractRehydrationInfo:r,hasRehydrationInfo:Ha(c=>r(c)!=null)},s={injectEndpoints:l,enhanceEndpoints({addTagTypes:c,endpoints:u}){if(c)for(const f of c)i.tagTypes.includes(f)||i.tagTypes.push(f);if(u)for(const[f,p]of Object.entries(u))typeof p=="function"?p(lo(o,f)):Object.assign(lo(o,f)||{},p);return s}},a=e.map(c=>c.init(s,i,o));function l(c){const u=c.endpoints({query:f=>({...f,type:Os}),mutation:f=>({...f,type:cy}),infiniteQuery:f=>({...f,type:uy})});for(const[f,p]of Object.entries(u)){if(c.overrideExisting!==!0&&f in o.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(process.env.NODE_ENV==="production"?ze(39):`called \`injectEndpoints\` to override already-existing endpointName ${f} without specifying \`overrideExisting: true\``);typeof process<"u"&&process.env.NODE_ENV==="development"&&console.error(`called \`injectEndpoints\` to override already-existing endpointName ${f} without specifying \`overrideExisting: true\``);continue}if(typeof process<"u"&&process.env.NODE_ENV==="development"&&Is(p)){const{infiniteQueryOptions:b}=p,{maxPages:h,getPreviousPageParam:g}=b;if(typeof h=="number"){if(h<1)throw new Error(process.env.NODE_ENV==="production"?ze(40):`maxPages for endpoint '${f}' must be a number greater than 0`);if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?ze(41):`getPreviousPageParam for endpoint '${f}' must be a function if maxPages is used`)}}o.endpointDefinitions[f]=p;for(const b of a)b.injectEndpoint(f,p)}return s}return s.injectEndpoints({endpoints:n.endpoints})}}function pr(e,...t){return Object.assign(e,...t)}var _A=({api:e,queryThunk:t,internalState:n,mwApi:r})=>{const i=`${e.reducerPath}/subscriptions`;let o=null,s=null;const{updateSubscriptionOptions:a,unsubscribeQueryResult:l}=e.internalActions,c=(g,m)=>{if(a.match(m)){const{queryCacheKey:A,requestId:_,options:x}=m.payload,d=g.get(A);return d?.has(_)&&d.set(_,x),!0}if(l.match(m)){const{queryCacheKey:A,requestId:_}=m.payload,x=g.get(A);return x&&x.delete(_),!0}if(e.internalActions.removeQueryResult.match(m))return g.delete(m.payload.queryCacheKey),!0;if(t.pending.match(m)){const{meta:{arg:A,requestId:_}}=m,x=Ja(g,A.queryCacheKey,Au);return A.subscribe&&x.set(_,A.subscriptionOptions??x.get(_)??{}),!0}let E=!1;if(t.rejected.match(m)){const{meta:{condition:A,arg:_,requestId:x}}=m;if(A&&_.subscribe){const d=Ja(g,_.queryCacheKey,Au);d.set(x,_.subscriptionOptions??d.get(x)??{}),E=!0}}return E},u=()=>n.currentSubscriptions,b={getSubscriptions:u,getSubscriptionCount:g=>u().get(g)?.size??0,isRequestSubscribed:(g,m)=>!!u()?.get(g)?.get(m)};function h(g){return JSON.parse(JSON.stringify(Object.fromEntries([...g].map(([m,E])=>[m,Object.fromEntries(E)]))))}return(g,m)=>{if(o||(o=h(n.currentSubscriptions)),e.util.resetApiState.match(g))return o={},n.currentSubscriptions.clear(),s=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,b];const E=c(n.currentSubscriptions,g);let A=!0;if(process.env.NODE_ENV==="test"&&typeof g.type=="string"&&g.type===`${e.reducerPath}/getPolling`)return[!1,n.currentPolls];if(E){s||(s=setTimeout(()=>{const d=h(n.currentSubscriptions),[,w]=Pm(o,()=>d);m.next(e.internalActions.subscriptionsUpdated(w)),o=d,s=null},500));const _=typeof g.type=="string"&&!!g.type.startsWith(i),x=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;A=!_&&!x}return[A,!1]}},vA=2147483647/1e3-1,SA=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:s},getRunningQueryThunk:a,mwApi:l})=>{const{removeQueryResult:c,unsubscribeQueryResult:u,cacheEntriesUpserted:f}=t.internalActions,p=Ar(u.match,n.fulfilled,n.rejected,f.match);function b(_){const x=i.currentSubscriptions.get(_);return x?x.size>0:!1}const h={};function g(_){for(const x of _.values())x?.abort?.()}const m=(_,x)=>{const d=x.getState(),w=s(d);if(p(_)){let S;if(f.match(_))S=_.payload.map(C=>C.queryDescription.queryCacheKey);else{const{queryCacheKey:C}=u.match(_)?_.payload:_.meta.arg;S=[C]}E(S,x,w)}if(t.util.resetApiState.match(_)){for(const[S,C]of Object.entries(h))C&&clearTimeout(C),delete h[S];g(i.runningQueries),g(i.runningMutations)}if(r.hasRehydrationInfo(_)){const{queries:S}=r.extractRehydrationInfo(_);E(Object.keys(S),x,w)}};function E(_,x,d){const w=x.getState();for(const S of _){const C=o(w,S);C?.endpointName&&A(S,C.endpointName,x,d)}}function A(_,x,d,w){const C=lo(r,x)?.keepUnusedDataFor??w.keepUnusedDataFor;if(C===1/0)return;const R=Math.max(0,Math.min(C,vA));if(!b(_)){const k=h[_];k&&clearTimeout(k),h[_]=setTimeout(()=>{if(!b(_)){const T=o(d.getState(),_);T?.endpointName&&d.dispatch(a(T.endpointName,T.originalArgs))?.abort(),d.dispatch(c({queryCacheKey:_}))}delete h[_]},R*1e3)}}return m},ch=new Error("Promise never resolved before cacheEntryRemoved."),EA=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:s,selectApiState:a}})=>{const l=wu(r),c=wu(i),u=Vr(r,i),f={},{removeQueryResult:p,removeMutationResult:b,cacheEntriesUpserted:h}=e.internalActions;function g(d,w,S){const C=f[d];C?.valueResolved&&(C.valueResolved({data:w,meta:S}),delete C.valueResolved)}function m(d){const w=f[d];w&&(delete f[d],w.cacheEntryRemoved())}function E(d){const{arg:w,requestId:S}=d.meta,{endpointName:C,originalArgs:R}=w;return[C,R,S]}const A=(d,w,S)=>{const C=_(d);function R(k,T,y,I){const O=s(S,T),L=s(w.getState(),T);!O&&L&&x(k,I,T,w,y)}if(r.pending.match(d)){const[k,T,y]=E(d);R(k,C,y,T)}else if(h.match(d))for(const{queryDescription:k,value:T}of d.payload){const{endpointName:y,originalArgs:I,queryCacheKey:O}=k;R(y,O,d.meta.requestId,I),g(O,T,{})}else if(i.pending.match(d)){if(w.getState()[t].mutations[C]){const[T,y,I]=E(d);x(T,y,C,w,I)}}else if(u(d))g(C,d.payload,d.meta.baseQueryMeta);else if(p.match(d)||b.match(d))m(C);else if(e.util.resetApiState.match(d))for(const k of Object.keys(f))m(k)};function _(d){return l(d)?d.meta.arg.queryCacheKey:c(d)?d.meta.arg.fixedCacheKey??d.meta.requestId:p.match(d)?d.payload.queryCacheKey:b.match(d)?ms(d.payload):""}function x(d,w,S,C,R){const k=lo(n,d),T=k?.onCacheEntryAdded;if(!T)return;const y={},I=new Promise(Q=>{y.cacheEntryRemoved=Q}),O=Promise.race([new Promise(Q=>{y.valueResolved=Q}),I.then(()=>{throw ch})]);O.catch(()=>{}),f[S]=y;const L=e.endpoints[d].select(Xa(k)?w:S),z=C.dispatch((Q,F,U)=>U),X={...C,getCacheEntry:()=>L(C.getState()),requestId:R,extra:z,updateCachedData:Xa(k)?Q=>C.dispatch(e.util.updateQueryData(d,w,Q)):void 0,cacheDataLoaded:O,cacheEntryRemoved:I},H=T(w,X);Promise.resolve(H).catch(Q=>{if(Q!==ch)throw Q})}return A},xA=({api:e,context:{apiUid:t},reducerPath:n})=>(r,i)=>{e.util.resetApiState.match(r)&&i.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"&&process.env.NODE_ENV==="development"&&e.internalActions.middlewareRegistered.match(r)&&r.payload===t&&i.getState()[n]?.config?.middlewareRegistered==="conflict"&&console.warn(`There is a mismatch between slice and middleware for the reducerPath "${n}".
|
|
124
124
|
You can only have one api per reducer path, this will lead to crashes in various situations!${n==="api"?`
|
|
125
|
-
If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`:""}`)},CA=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:s,refetchQuery:a,internalState:l})=>{const{removeQueryResult:c}=o.internalActions,u=Tr(Hr(r),Ol(r)),f=Tr(Hr(i,r),so(i,r));let p=[],b=0;const h=(E,A)=>{(i.pending.match(E)||r.pending.match(E))&&b++,f(E)&&(b=Math.max(0,b-1)),u(E)?m(hy(E,"invalidatesTags",n,s),A):f(E)?m([],A):o.util.invalidateTags.match(E)&&m(md(E.payload,void 0,void 0,void 0,void 0,s),A)};function g(){return b>0}function m(E,A){const _=A.getState(),x=_[e];if(p.push(...E),x.config.invalidationBehavior==="delayed"&&g())return;const d=p;if(p=[],d.length===0)return;const w=o.util.selectInvalidatedBy(_,d);t.batch(()=>{const S=Array.from(w.values());for(const{queryCacheKey:C}of S){const R=x.queries[C],k=Xa(l.currentSubscriptions,C,Au);R&&(k.size===0?A.dispatch(c({queryCacheKey:C})):R.status!==Ar&&A.dispatch(a(R)))}})}return h},TA=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const{currentPolls:o,currentSubscriptions:s}=i,a=new Set;let l=null;const c=(m,E)=>{(n.internalActions.updateSubscriptionOptions.match(m)||n.internalActions.unsubscribeQueryResult.match(m))&&u(m.payload.queryCacheKey,E),(t.pending.match(m)||t.rejected.match(m)&&m.meta.condition)&&u(m.meta.arg.queryCacheKey,E),(t.fulfilled.match(m)||t.rejected.match(m)&&!m.meta.condition)&&f(m.meta.arg,E),n.util.resetApiState.match(m)&&(h(),l&&(clearTimeout(l),l=null),a.clear())};function u(m,E){a.add(m),l||(l=setTimeout(()=>{for(const A of a)p({queryCacheKey:A},E);a.clear(),l=null},0))}function f({queryCacheKey:m},E){const A=E.getState()[e],_=A.queries[m],x=s.get(m);if(!_||_.status===Ar)return;const{lowestPollingInterval:d,skipPollingIfUnfocused:w}=g(x);if(!Number.isFinite(d))return;const S=o.get(m);S?.timeout&&(clearTimeout(S.timeout),S.timeout=void 0);const C=Date.now()+d;o.set(m,{nextPollTimestamp:C,pollingInterval:d,timeout:setTimeout(()=>{(A.config.focused||!w)&&E.dispatch(r(_)),f({queryCacheKey:m},E)},d)})}function p({queryCacheKey:m},E){const _=E.getState()[e].queries[m],x=s.get(m);if(!_||_.status===Ar)return;const{lowestPollingInterval:d}=g(x);if(process.env.NODE_ENV==="test"){const C=o.pollUpdateCounters??={};C[m]??=0,C[m]++}if(!Number.isFinite(d)){b(m);return}const w=o.get(m),S=Date.now()+d;(!w||S<w.nextPollTimestamp)&&f({queryCacheKey:m},E)}function b(m){const E=o.get(m);E?.timeout&&clearTimeout(E.timeout),o.delete(m)}function h(){for(const m of o.keys())b(m)}function g(m=new Map){let E=!1,A=Number.POSITIVE_INFINITY;for(const _ of m.values())_.pollingInterval&&(A=Math.min(_.pollingInterval,A),E=_.skipPollingIfUnfocused||E);return{lowestPollingInterval:A,skipPollingIfUnfocused:E}}return c},AA=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=cd(n,r),o=so(n,r),s=Hr(n,r),a={};return(c,u)=>{if(i(c)){const{requestId:f,arg:{endpointName:p,originalArgs:b}}=c.meta,h=ao(t,p),g=h?.onQueryStarted;if(g){const m={},E=new Promise((d,w)=>{m.resolve=d,m.reject=w});E.catch(()=>{}),a[f]=m;const A=e.endpoints[p].select(Za(h)?b:f),_=u.dispatch((d,w,S)=>S),x={...u,getCacheEntry:()=>A(u.getState()),requestId:f,extra:_,updateCachedData:Za(h)?d=>u.dispatch(e.util.updateQueryData(p,b,d)):void 0,queryFulfilled:E};g(b,x)}}else if(s(c)){const{requestId:f,baseQueryMeta:p}=c.meta;a[f]?.resolve({data:c.payload,meta:p}),delete a[f]}else if(o(c)){const{requestId:f,rejectedWithValue:p,baseQueryMeta:b}=c.meta;a[f]?.reject({error:c.payload??c.error,isUnhandledError:!p,meta:b}),delete a[f]}}},kA=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions,s=(l,c)=>{hd.match(l)&&a(c,"refetchOnFocus"),gd.match(l)&&a(c,"refetchOnReconnect")};function a(l,c){const u=l.getState()[e],f=u.queries,p=i.currentSubscriptions;t.batch(()=>{for(const b of p.keys()){const h=f[b],g=p.get(b);if(!g||!h)continue;const m=[...g.values()];(m.some(A=>A[c]===!0)||m.every(A=>A[c]===void 0)&&u.config[c])&&(g.size===0?l.dispatch(o({queryCacheKey:b})):h.status!==Ar&&l.dispatch(r(h)))}})}return s};function RA(e){const{reducerPath:t,queryThunk:n,api:r,context:i,getInternalState:o}=e,{apiUid:s}=i,a={invalidateTags:Nn(`${t}/invalidateTags`)},l=p=>p.type.startsWith(`${t}/`),c=[xA,SA,CA,TA,EA,AA];return{middleware:p=>{let b=!1;const h=o(p.dispatch),g={...e,internalState:h,refetchQuery:f,isThisApiSliceAction:l,mwApi:p},m=c.map(_=>_(g)),E=_A(g),A=kA(g);return _=>x=>{if(!nd(x))return _(x);b||(b=!0,p.dispatch(r.internalActions.middlewareRegistered(s)));const d={...p,next:_},w=p.getState(),[S,C]=E(x,d,w);let R;if(S?R=_(x):R=C,p.getState()[t]&&(A(x,d,w),l(x)||i.hasRehydrationInfo(x)))for(const k of m)k(x,d,w);return R}},actions:a};function f(p){return e.api.endpoints[p.endpointName].initiate(p.originalArgs,{subscribe:!1,forceRefetch:!0})}}var uh=Symbol(),yy=({createSelector:e=ld}={})=>({name:uh,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:s,refetchOnMountOrArgChange:a,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:u,onSchemaFailure:f,catchSchemaFailure:p,skipSchemaValidation:b},h){tC();const g=q=>(typeof process<"u"&&process.env.NODE_ENV==="development"&&(r.includes(q.type)||console.error(`Tag type '${q.type}' was used, but not specified in \`tagTypes\`!`)),q);Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:gd,onOffline:ly,onFocus:hd,onFocusLost:ay},util:{}});const m=wA({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:E,selectCachedArgsForQuery:A,buildQuerySelector:_,buildInfiniteQuerySelector:x,buildMutationSelector:d}=m;fr(t.util,{selectInvalidatedBy:E,selectCachedArgsForQuery:A});const{queryThunk:w,infiniteQueryThunk:S,mutationThunk:C,patchQueryData:R,updateQueryData:k,upsertQueryData:T,prefetch:y,buildMatchThunkActions:I}=yA({baseQuery:n,reducerPath:i,context:h,api:t,serializeQueryArgs:o,assertTagType:g,selectors:m,onSchemaFailure:f,catchSchemaFailure:p,skipSchemaValidation:b}),{reducer:O,actions:L}=bA({context:h,queryThunk:w,mutationThunk:C,serializeQueryArgs:o,reducerPath:i,assertTagType:g,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:a,keepUnusedDataFor:s,reducerPath:i,invalidationBehavior:u}});fr(t.util,{patchQueryData:R,updateQueryData:k,upsertQueryData:T,prefetch:y,resetApiState:L.resetApiState,upsertQueryEntries:L.cacheEntriesUpserted}),fr(t.internalActions,L);const U=new WeakMap,Z=q=>Xa(U,q,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:V,buildInitiateInfiniteQuery:Q,buildInitiateMutation:F,getRunningMutationThunk:z,getRunningMutationsThunk:se,getRunningQueriesThunk:te,getRunningQueryThunk:J}=mA({queryThunk:w,mutationThunk:C,infiniteQueryThunk:S,api:t,serializeQueryArgs:o,context:h,getInternalState:Z});fr(t.util,{getRunningMutationThunk:z,getRunningMutationsThunk:se,getRunningQueryThunk:J,getRunningQueriesThunk:te});const{middleware:oe,actions:le}=RA({reducerPath:i,context:h,queryThunk:w,mutationThunk:C,infiniteQueryThunk:S,api:t,assertTagType:g,selectors:m,getRunningQueryThunk:J,getInternalState:Z});return fr(t.util,le),fr(t,{reducer:O,middleware:oe}),{name:uh,injectEndpoint(q,re){const Y=t,W=Y.endpoints[q]??={};Nl(re)&&fr(W,{name:q,select:_(q,re),initiate:V(q,re)},I(w,q)),pA(re)&&fr(W,{name:q,select:d(),initiate:F(q)},I(C,q)),Rs(re)&&fr(W,{name:q,select:x(q,re),initiate:Q(q,re)},I(w,q))}}}});yy();function wa(e){return e.replace(e[0],e[0].toUpperCase())}function OA(e){let t=0;for(const n in e)t++;return t}var IA="query",PA="mutation",NA="infinitequery";function MA(e){return e.type===IA}function DA(e){return e.type===PA}function by(e){return e.type===NA}function Fo(e,...t){return Object.assign(e,...t)}var Nc=Symbol();function Mc(e){const t=D.useRef(e),n=D.useMemo(()=>fd(t.current,e),[e]);return D.useEffect(()=>{t.current!==n&&(t.current=n)},[n]),n}function Ki(e){const t=D.useRef(e);return D.useEffect(()=>{Go(t.current,e)||(t.current=e)},[e]),Go(t.current,e)?t.current:e}var LA=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$A=LA(),BA=()=>typeof navigator<"u"&&navigator.product==="ReactNative",FA=BA(),jA=()=>$A||FA?D.useLayoutEffect:D.useEffect,zA=jA(),dh=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:oy.pending}:e;function Dc(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var Lc=["data","status","isLoading","isSuccess","isError","error"];function UA({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:s},serializeQueryArgs:a,context:l}){const c=o?w=>w():D.useEffect,u=w=>w.current?.unsubscribe?.(),f=l.endpointDefinitions;return{buildQueryHooks:_,buildInfiniteQueryHooks:x,buildMutationHook:d,usePrefetch:h};function p(w,S,C){if(S?.endpointName&&w.isUninitialized){const{endpointName:O}=S,L=f[O];C!==Rn&&a({queryArgs:S.originalArgs,endpointDefinition:L,endpointName:O})===a({queryArgs:C,endpointDefinition:L,endpointName:O})&&(S=void 0)}let R=w.isSuccess?w.data:S?.data;R===void 0&&(R=w.data);const k=R!==void 0,T=w.isLoading,y=(!S||S.isLoading||S.isUninitialized)&&!k&&T,I=w.isSuccess||k&&(T&&!S?.isError||w.isUninitialized);return{...w,data:R,currentData:w.data,isFetching:T,isLoading:y,isSuccess:I}}function b(w,S,C){if(S?.endpointName&&w.isUninitialized){const{endpointName:O}=S,L=f[O];C!==Rn&&a({queryArgs:S.originalArgs,endpointDefinition:L,endpointName:O})===a({queryArgs:C,endpointDefinition:L,endpointName:O})&&(S=void 0)}let R=w.isSuccess?w.data:S?.data;R===void 0&&(R=w.data);const k=R!==void 0,T=w.isLoading,y=(!S||S.isLoading||S.isUninitialized)&&!k&&T,I=w.isSuccess||T&&k;return{...w,data:R,currentData:w.data,isFetching:T,isLoading:y,isSuccess:I}}function h(w,S){const C=n(),R=Ki(S);return D.useCallback((k,T)=>C(e.util.prefetch(w,k,{...R,...T})),[w,C,R])}function g(w,S,{refetchOnReconnect:C,refetchOnFocus:R,refetchOnMountOrArgChange:k,skip:T=!1,pollingInterval:y=0,skipPollingIfUnfocused:I=!1,...O}={}){const{initiate:L}=e.endpoints[w],U=n(),Z=D.useRef(void 0);if(!Z.current){const Y=U(e.internalActions.internal_getRTKQSubscriptions());if(process.env.NODE_ENV!=="production"&&(typeof Y!="object"||typeof Y?.type=="string"))throw new Error(process.env.NODE_ENV==="production"?Be(37):`Warning: Middleware for RTK-Query API at reducerPath "${e.reducerPath}" has not been added to the store.
|
|
126
|
-
You must add the middleware for RTK-Query to function correctly!`);
|
|
127
|
-
Hook ${a} was either not provided or not a function.`)}return{name:qA,init(o,{serializeQueryArgs:s},a){const l=o,{buildQueryHooks:c,buildInfiniteQueryHooks:u,buildMutationHook:f,usePrefetch:p}=UA({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:s,context:a});return Fo(l,{usePrefetch:p}),Fo(a,{batch:e}),{injectEndpoint(b,h){if(MA(h)){const{useQuery:g,useLazyQuery:m,useLazyQuerySubscription:E,useQueryState:A,useQuerySubscription:_}=c(b);Fo(l.endpoints[b],{useQuery:g,useLazyQuery:m,useLazyQuerySubscription:E,useQueryState:A,useQuerySubscription:_}),o[`use${wa(b)}Query`]=g,o[`useLazy${wa(b)}Query`]=m}if(DA(h)){const g=f(b);Fo(l.endpoints[b],{useMutation:g}),o[`use${wa(b)}Mutation`]=g}else if(by(h)){const{useInfiniteQuery:g,useInfiniteQuerySubscription:m,useInfiniteQueryState:E}=u(b);Fo(l.endpoints[b],{useInfiniteQuery:g,useInfiniteQuerySubscription:m,useInfiniteQueryState:E}),o[`use${wa(b)}InfiniteQuery`]=g}}}}}},VA=my(yy(),HA());const Gi="https://api.crownpeak.net/dqm-cms/v1",jo=e=>({"Content-Type":"application/json","x-api-key":e}),$c=VA({reducerPath:"dqmApi",baseQuery:uA({baseUrl:Gi}),tagTypes:["Asset","Highlight"],endpoints:e=>({createAsset:e.mutation({query:({html:t,url:n,websiteId:r,apiKey:i,apiEndpoint:o})=>({url:`${o||Gi}/assets`,method:"POST",headers:jo(i),body:{html:t,url:n||window.location.href,websiteId:r},params:{apiKey:i}}),invalidatesTags:["Asset"]}),getAsset:e.query({query:({assetId:t,websiteId:n,apiKey:r,apiEndpoint:i})=>({url:`${i||Gi}/assets/${t}`,headers:jo(r),params:{websiteId:n,apiKey:r}}),transformResponse:t=>{const n=(t.checkpoints||[]).reduce((s,a)=>(s[a.category]||(s[a.category]=[]),s[a.category].push(a),s),{}),r=Object.keys(n);Object.entries(n).forEach(([s,a])=>{a.forEach(l=>{l.colors=_m(s,r)})});const i=Object.entries(n),o=t.totalCheckpoints>0?Math.round((t.totalCheckpoints-t.totalErrors)/t.totalCheckpoints*100):0;return{assetId:t.assetId,analysisState:t.analysisState,created:t.created,siteName:t.siteName,totalCheckpoints:t.totalCheckpoints,totalErrors:t.totalErrors,checkpoints:t.checkpoints||[],groupedCategories:i,qualityScore:o}},providesTags:(t,n,{assetId:r})=>[{type:"Asset",id:r}]}),getHighlight:e.query({query:({assetId:t,checkpointId:n,websiteId:r,apiKey:i,apiEndpoint:o})=>({url:`${o||Gi}/assets/${t}/pagehighlight/${n}`,headers:jo(i),params:{websiteId:r,apiKey:i}}),transformResponse:(t,n,r)=>({html:t.html,checkpointId:r.checkpointId}),providesTags:(t,n,{assetId:r,checkpointId:i})=>[{type:"Highlight",id:`${r}-${i}`}]}),getAllHighlights:e.query({query:({assetId:t,websiteId:n,apiKey:r,apiEndpoint:i})=>({url:`${i||Gi}/assets/${t}/pagehighlight/all`,headers:jo(r),params:{websiteId:n,apiKey:r}}),transformResponse:t=>({html:t.html}),providesTags:(t,n,{assetId:r})=>[{type:"Highlight",id:`${r}-all`}]}),getCheckpointHighlight:e.query({query:({assetId:t,checkpointId:n,websiteId:r,apiKey:i,apiEndpoint:o,highlightSource:s=!1})=>({url:`${o||Gi}/assets/${t}/errors/${n}`,headers:jo(i),params:{websiteId:r,apiKey:i,highlightSource:s},responseHandler:"text"}),providesTags:(t,n,{assetId:r,checkpointId:i,highlightSource:o})=>[{type:"Highlight",id:`${r}-${i}-${o?"source":"browser"}`}]})})}),fh={state:"idle",assetId:null,data:null,error:null,isAnalyzing:!1,startedAt:null,completedAt:null},wy=On({name:"analysis",initialState:fh,reducers:{startAnalysis:e=>{e.state="analyzing",e.isAnalyzing=!0,e.error=null,e.startedAt=Date.now(),e.completedAt=null},setAssetId:(e,t)=>{e.assetId=t.payload},analysisCompleted:(e,t)=>{e.state="completed",e.isAnalyzing=!1,e.data=t.payload,e.completedAt=Date.now()},analysisFailed:(e,t)=>{e.state="error",e.isAnalyzing=!1,e.error=t.payload,e.completedAt=Date.now()},resetAnalysis:e=>{Object.assign(e,fh)},updateAnalysisState:(e,t)=>{e.state=t.payload,(t.payload==="completed"||t.payload==="error")&&(e.isAnalyzing=!1,e.completedAt=Date.now())}}}),{startAnalysis:k2,setAssetId:R2,analysisCompleted:O2,analysisFailed:I2,resetAnalysis:P2,updateAnalysisState:N2}=wy.actions,ph={selectedCheckpoint:null,selectedCheckpointId:null,viewMode:"browser",showAllHighlights:!1,currentHighlightIndex:0,totalHighlights:0,visibleHighlightIndex:0,cache:{},scrollPositions:{},isModalOpen:!1,isLoading:!1,error:null,highlightedContent:"",scriptsDisabled:!0,hasAutoScrolled:!1,clickedIndicator:0,currentAssetId:null},WA=300*1e3,_y=On({name:"highlight",initialState:ph,reducers:{selectCheckpoint:(e,t)=>{e.selectedCheckpoint=t.payload,e.selectedCheckpointId=t.payload?.id||null,e.currentHighlightIndex=0,e.visibleHighlightIndex=0,e.hasAutoScrolled=!1,t.payload&&(e.isModalOpen=!0)},setSelectedCheckpointId:(e,t)=>{e.selectedCheckpointId=t.payload,t.payload||(e.selectedCheckpoint=null)},setViewMode:(e,t)=>{e.viewMode=t.payload},toggleShowAllHighlights:e=>{e.showAllHighlights=!e.showAllHighlights,e.selectedCheckpoint=null},setShowAllHighlights:(e,t)=>{e.showAllHighlights=t.payload,t.payload&&(e.selectedCheckpoint=null)},setCurrentHighlightIndex:(e,t)=>{e.currentHighlightIndex=t.payload},nextHighlight:e=>{e.currentHighlightIndex<e.totalHighlights-1&&(e.currentHighlightIndex+=1)},previousHighlight:e=>{e.currentHighlightIndex>0&&(e.currentHighlightIndex-=1)},setTotalHighlights:(e,t)=>{e.totalHighlights=t.payload},setVisibleHighlightIndex:(e,t)=>{e.visibleHighlightIndex=t.payload},cacheHighlight:(e,t)=>{const{checkpointId:n,content:r,type:i}=t.payload;e.cache[n]||(e.cache[n]={timestamp:Date.now()}),e.cache[n][i]=r,e.cache[n].timestamp=Date.now()},clearExpiredCache:e=>{const t=Date.now();Object.keys(e.cache).forEach(n=>{t-e.cache[n].timestamp>WA&&delete e.cache[n]})},clearCache:e=>{e.cache={}},saveScrollPosition:(e,t)=>{const{checkpointId:n,position:r}=t.payload;e.scrollPositions[n]||(e.scrollPositions[n]={browser:0,source:0}),r.browser!==void 0&&(e.scrollPositions[n].browser=r.browser),r.source!==void 0&&(e.scrollPositions[n].source=r.source)},openModal:e=>{e.isModalOpen=!0},closeModal:e=>{e.isModalOpen=!1,e.selectedCheckpoint=null,e.selectedCheckpointId=null,e.showAllHighlights=!1,e.hasAutoScrolled=!1,e.totalHighlights=0,e.currentHighlightIndex=0,e.highlightedContent=""},setHighlightedContent:(e,t)=>{e.highlightedContent=t.payload},toggleScripts:e=>{e.scriptsDisabled=!e.scriptsDisabled},setScriptsDisabled:(e,t)=>{e.scriptsDisabled=t.payload},setHasAutoScrolled:(e,t)=>{e.hasAutoScrolled=t.payload},incrementClickIndicator:e=>{e.clickedIndicator+=1},setCurrentAssetId:(e,t)=>{e.currentAssetId=t.payload},navigateHighlight:(e,t)=>{if(e.totalHighlights===0)return;let n=(e.visibleHighlightIndex||e.currentHighlightIndex)-1;t.payload==="next"?n=(n+1)%e.totalHighlights:(n=n-1,n<0&&(n=e.totalHighlights-1)),e.currentHighlightIndex=n+1,e.visibleHighlightIndex=0,e.clickedIndicator+=1},setLoading:(e,t)=>{e.isLoading=t.payload},setError:(e,t)=>{e.error=t.payload,e.isLoading=!1},resetHighlight:e=>{Object.assign(e,ph)}}}),{selectCheckpoint:KA,setSelectedCheckpointId:M2,setViewMode:GA,toggleShowAllHighlights:D2,setShowAllHighlights:L2,setCurrentHighlightIndex:QA,nextHighlight:$2,previousHighlight:B2,setTotalHighlights:F2,setVisibleHighlightIndex:YA,cacheHighlight:j2,clearExpiredCache:z2,clearCache:U2,saveScrollPosition:q2,openModal:JA,closeModal:XA,setLoading:ZA,setError:H2,resetHighlight:V2,setHighlightedContent:e2,toggleScripts:W2,setScriptsDisabled:K2,setHasAutoScrolled:G2,incrementClickIndicator:t2,setCurrentAssetId:Q2,navigateHighlight:Y2}=_y.actions,hh={apiKey:null,websiteId:null,isAuthenticated:!1,sessionType:null,sessionToken:null,accessToken:null,refreshToken:null,rememberMe:!1,isLoading:!1,error:null,storageWarningAcknowledged:!1},wr={apiKey:"dqm_apiKey",websiteId:"dqm_websiteID",rememberMe:"dqm_rememberMe",storageWarning:"dqm_storageWarningAcknowledged",sessionToken:"dqm_sessionToken",sessionType:"dqm_sessionType"},Bc=ds("auth/initialize",async(e,{dispatch:t})=>{if(e?.disabled===!0)return{isAuthenticated:!1,error:"DQM is disabled"};if(e?.apiKey&&e?.websiteId)return{apiKey:e.apiKey,websiteId:e.websiteId,sessionType:"direct",isAuthenticated:!0};if(typeof window<"u"&&e?.useLocalStorage!==!1){if(st("dqm_sessionType")==="backend"){const o=st("dqm_sessionToken");if(o)return fe.debug("Restoring backend session from localStorage"),{accessToken:o,sessionType:"backend",isAuthenticated:!0}}const r=st("dqm_apiKey"),i=st("dqm_websiteID");if(r&&i)return fe.debug("Restoring direct credentials from localStorage"),{apiKey:r,websiteId:i,sessionType:"direct",isAuthenticated:!0}}return e?.authBackendUrl?{isAuthenticated:!1}:{isAuthenticated:!1,error:"DQM not configured"}}),Fc=ds("auth/loginWithCredentials",async(e,{rejectWithValue:t})=>{try{if(e.sessionType==="direct"&&!/^[\x00-\x7F]*$/.test(e.apiKey))throw new Error("API key contains non-ASCII characters");return e.rememberMe!==!1&&typeof window<"u"&&(e.sessionType==="backend"&&e.sessionToken?(bn(wr.sessionToken,e.sessionToken),bn(wr.sessionType,"backend")):(bn(wr.apiKey,e.apiKey),bn(wr.websiteId,e.websiteId),bn(wr.sessionType,"direct"))),e}catch(n){return t(n instanceof Error?n.message:"Login failed")}}),n2=ds("auth/logout",async(e=!0)=>(e&&typeof window<"u"&&(vr(wr.apiKey),vr(wr.websiteId),vr(wr.sessionToken),vr(wr.sessionType),fe.debug("Cleared localStorage on logout")),!0)),vy=On({name:"auth",initialState:hh,reducers:{setApiKey:(e,t)=>{e.apiKey=t.payload,e.isAuthenticated=!!(t.payload&&e.websiteId),t.payload&&(e.sessionType="direct")},setWebsiteId:(e,t)=>{e.websiteId=t.payload,e.isAuthenticated=!!(e.apiKey&&t.payload)},setCredentials:(e,t)=>{e.apiKey=t.payload.apiKey,e.websiteId=t.payload.websiteId,e.isAuthenticated=!0,e.sessionType="direct",t.payload.rememberMe!==void 0&&(e.rememberMe=t.payload.rememberMe)},setSessionToken:(e,t)=>{e.accessToken=t.payload.accessToken,e.sessionType="backend",e.isAuthenticated=!0},setRememberMe:(e,t)=>{e.rememberMe=t.payload},acknowledgeStorageWarning:e=>{e.storageWarningAcknowledged=!0},setAuthLoading:(e,t)=>{e.isLoading=t.payload},setAuthError:(e,t)=>{e.error=t.payload,e.isLoading=!1},logout:e=>{e.apiKey=null,e.websiteId=null,e.accessToken=null,e.refreshToken=null,e.isAuthenticated=!1,e.sessionType=null,e.error=null},resetAuth:()=>hh,hydrateFromStorage:(e,t)=>{t.payload.apiKey&&(e.apiKey=t.payload.apiKey),t.payload.websiteId&&(e.websiteId=t.payload.websiteId),t.payload.rememberMe!==void 0&&(e.rememberMe=t.payload.rememberMe),t.payload.storageWarningAcknowledged!==void 0&&(e.storageWarningAcknowledged=t.payload.storageWarningAcknowledged),e.isAuthenticated=!!(e.apiKey&&e.websiteId),e.isAuthenticated&&(e.sessionType="direct")}},extraReducers:e=>{e.addCase(Bc.pending,t=>{t.isLoading=!0,t.error=null}).addCase(Bc.fulfilled,(t,n)=>{t.isLoading=!1,n.payload.apiKey&&(t.apiKey=n.payload.apiKey),n.payload.websiteId&&(t.websiteId=n.payload.websiteId),n.payload.accessToken&&(t.accessToken=n.payload.accessToken),n.payload.sessionType&&(t.sessionType=n.payload.sessionType),n.payload.isAuthenticated!==void 0&&(t.isAuthenticated=n.payload.isAuthenticated),n.payload.error&&(t.error=n.payload.error)}).addCase(Bc.rejected,(t,n)=>{t.isLoading=!1,t.error=n.error.message||"Authentication initialization failed"}),e.addCase(Fc.pending,t=>{t.isLoading=!0,t.error=null}).addCase(Fc.fulfilled,(t,n)=>{t.isLoading=!1,t.apiKey=n.payload.apiKey,t.websiteId=n.payload.websiteId,t.sessionType=n.payload.sessionType,t.isAuthenticated=!0,n.payload.sessionToken&&(t.accessToken=n.payload.sessionToken),n.payload.rememberMe!==void 0&&(t.rememberMe=n.payload.rememberMe)}).addCase(Fc.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload||"Login failed"}),e.addCase(n2.fulfilled,t=>{t.apiKey=null,t.websiteId=null,t.accessToken=null,t.refreshToken=null,t.isAuthenticated=!1,t.sessionType=null,t.error=null})}}),{setApiKey:J2,setWebsiteId:X2,setCredentials:jc,setSessionToken:gh,setRememberMe:Z2,acknowledgeStorageWarning:ek,setAuthLoading:tk,setAuthError:zc,logout:r2,resetAuth:nk,hydrateFromStorage:rk}=vy.actions,i2={provider:"none",openaiApiKey:null,openaiModel:"gpt-4.1-mini",enabled:!1,translationProvider:"none"},mh={settings:i2,summaries:{},isSettingsOpen:!1,isGenerating:!1,generatingFor:null,error:null},Sy=On({name:"ai",initialState:mh,reducers:{updateSettings:(e,t)=>{e.settings={...e.settings,...t.payload},t.payload.provider&&t.payload.provider!=="none"&&(e.settings.enabled=!0)},setProvider:(e,t)=>{e.settings.provider=t.payload,e.settings.enabled=t.payload!=="none"},setOpenAIApiKey:(e,t)=>{e.settings.openaiApiKey=t.payload},setOpenAIModel:(e,t)=>{e.settings.openaiModel=t.payload},setTranslationProvider:(e,t)=>{e.settings.translationProvider=t.payload},openSettings:e=>{e.isSettingsOpen=!0},closeSettings:e=>{e.isSettingsOpen=!1},toggleSettings:e=>{e.isSettingsOpen=!e.isSettingsOpen},startGeneration:(e,t)=>{e.isGenerating=!0,e.generatingFor=t.payload,e.error=null},generationCompleted:(e,t)=>{e.isGenerating=!1,e.generatingFor=null,e.summaries[t.payload.checkpointId]={checkpointId:t.payload.checkpointId,summary:t.payload.summary,generatedAt:Date.now(),provider:t.payload.provider}},generationFailed:(e,t)=>{e.isGenerating=!1,e.generatingFor=null,e.error=t.payload},clearError:e=>{e.error=null},clearSummaries:e=>{e.summaries={}},clearSummary:(e,t)=>{delete e.summaries[t.payload]},resetAI:()=>mh,hydrateSettings:(e,t)=>{t.payload.provider&&(e.settings.provider=t.payload.provider,e.settings.enabled=t.payload.provider!=="none"),t.payload.openaiApiKey!==void 0&&(e.settings.openaiApiKey=t.payload.openaiApiKey),t.payload.openaiModel&&(e.settings.openaiModel=t.payload.openaiModel),t.payload.translationProvider&&(e.settings.translationProvider=t.payload.translationProvider)}}}),{updateSettings:ik,setProvider:ok,setOpenAIApiKey:sk,setOpenAIModel:ak,setTranslationProvider:lk,openSettings:ck,closeSettings:uk,toggleSettings:dk,startGeneration:fk,generationCompleted:pk,generationFailed:hk,clearError:gk,clearSummaries:mk,clearSummary:yk,resetAI:bk,hydrateSettings:wk}=Sy.actions,o2=kC({reducer:{locale:PT,analysis:wy.reducer,highlight:_y.reducer,auth:vy.reducer,ai:Sy.reducer,[$c.reducerPath]:$c.reducer},middleware:e=>e().concat($c.middleware)}),s2=()=>zh(),a2=({open:e,onClose:t,onOpen:n,config:r,onAuthSuccess:i,onAuthError:o,debugHtml:s})=>{const{t:a,i18n:l}=kr(["sidebar","auth","common"]),c=s2(),[u,f]=D.useState("idle"),[p,b]=D.useState(null),[h,g]=D.useState(null),[m,E]=D.useState(null),[A,_]=D.useState(null),x=D.useRef(null),[d,w]=D.useState(null),S=D.useRef(null),[C,R]=D.useState([]),[k,T]=D.useState(null),[y,I]=D.useState(!1),[O,L]=D.useState(null),[U,Z]=D.useState(null),[V,Q]=D.useState("direct"),[F,z]=D.useState(""),[se,te]=D.useState(null),[J,oe]=D.useState(null),[le,q]=D.useState(!1),[re,Y]=D.useState("browser"),[W,ce]=D.useState(!1),[B,me]=D.useState(!1),[Ee,be]=D.useState(0),[Te,je]=D.useState(()=>typeof window>"u"?!0:st("dqm_quality_breakdown_expanded")!=="false"),[xe,dt]=D.useState(new Set),[Jt,we]=D.useState({}),[Ae,rt]=D.useState(0),[ft,qe]=D.useState(0),[pt,At]=D.useState(0),[$n,Ci]=D.useState(!0),[Ti,er]=D.useState(!1),Bn=D.useRef(null),Fn=Ym(),{translationEnabled:$t,setTranslationEnabled:Ht,translationMode:Ct,setTranslationMode:un,summaryEnabled:Xt,setSummaryEnabled:Rr,openAiApiKey:En,setOpenAiApiKey:Or,openAiModel:tr,setOpenAiModel:jn,openAiBaseUrl:Gr,setOpenAiBaseUrl:Ai,targetLang:lt,translationNeeded:kt,aiEnabled:Ir,effectiveModelId:nr,computeBudgetMs:rr}=Fn,xn=ey(),{cache:Qr,clearAll:yo,clearAssetCache:Vt}=xn,dn=xu({enabled:Ir,openAiApiKey:En,openAiModel:tr,openAiBaseUrl:Gr}),{state:ir,isReady:zn}=dn,or=xu({enabled:Xt,openAiApiKey:En,openAiModel:tr,openAiBaseUrl:Gr}),Yr=iy({engine:or,originalData:h,targetLang:lt,modelId:nr,enabled:Xt,timeoutMs:r?.summary?.timeoutMs??45e3,cache:Qr}),{state:mt,bullets:Pr,error:ki,stats:Un,restart:Jr}=Yr,Xr=Xt&&(mt==="generating"||mt==="idle"),he=ry({engine:dn,cacheManager:xn,originalData:h,targetLang:lt,modelId:nr,enabled:$t&&kt,mode:Ct,computeBudgetMs:rr,persistentCache:Qr,summaryGenerating:Xr}),{translatedData:$,progress:ie,restart:ge,stop:Ze}=he,yt=D.useMemo(()=>$t?ir==="initializing"?"initializing":ir==="error"?"error":ie&&ie.translatedCheckpoints<ie.totalCheckpoints?"translating":zn?"ready":"initializing":"disabled",[$t,ir,ie,zn]),[Ue,Rt]=D.useState(Xt);D.useEffect(()=>{Xr&&Ze()},[Xr,Ze]);const Zt=ir==="error"?"AI engine failed to initialize":null,Cn=D.useMemo(()=>tr.trim()||"gpt-4.1-mini",[tr]);D.useEffect(()=>{$t&&kt&&$?b($):h&&(!$t||!kt)&&b(h)},[$,$t,kt,h]);const Bt=D.useCallback(K=>{x.current=K,_(K)},[]),bt=D.useRef(!1),sr=D.useRef("browser"),Zr=Gm(r?.overlayConfig),bo=r?.disableLogout===!0,fn=D.useRef(r);fn.current=r;const Os=D.useRef(!1);D.useEffect(()=>{new URLSearchParams(window?.location?.search).get("dqm")==="true"&&n()},[]),D.useEffect(()=>{if(Os.current)return;Os.current=!0;const K=fn.current;if(K?.disabled===!0){I(!1),T(a("sidebar:dqm_disabled")),f("idle"),c(zc(a("sidebar:dqm_disabled")));return}if(K?.apiKey&&K?.websiteId){L({apiKey:K.apiKey,websiteId:K.websiteId}),Q("direct"),Z(null),I(!0),c(jc({apiKey:K.apiKey,websiteId:K.websiteId}));return}if(typeof window<"u"&&K?.useLocalStorage!==!1){if(st("dqm_sessionType")==="backend"){const ve=st("dqm_sessionToken");if(ve){fe.debug("Restoring backend session from localStorage"),Z(ve),Q("backend"),L({apiKey:"BACKEND_SESSION",websiteId:"BACKEND_SESSION"}),I(!0),c(gh({accessToken:ve}));return}}const ue=st("dqm_apiKey"),ye=st("dqm_websiteID");if(ue&&ye){fe.debug("Restoring direct credentials from localStorage"),L({apiKey:ue,websiteId:ye}),Q("direct"),Z(null),I(!0),c(jc({apiKey:ue,websiteId:ye}));return}}if(K?.authBackendUrl){I(!1),f("idle");return}I(!1),T(a("sidebar:dqm_not_configured")),f("idle"),c(zc(a("sidebar:dqm_not_configured")))},[]);const Ml=D.useCallback(K=>{L({apiKey:K.apiKey,websiteId:K.websiteId}),Z(K.sessionToken||null),Q(K.sessionType),I(!0),T(null),c(jc({apiKey:K.apiKey,websiteId:K.websiteId})),K.sessionToken&&c(gh({accessToken:K.sessionToken})),i&&i(K)},[i,c]),Dl=D.useCallback(K=>{fe.error("Authentication error:",K),T(K.message),I(!1),c(zc(K.message)),o&&o(K)},[o,c]),Ll=D.useCallback(()=>{L(null),Z(null),Q("direct"),I(!1),c(r2()),typeof window<"u"&&r?.useLocalStorage!==!1&&(vr("dqm_apiKey"),vr("dqm_websiteID"),vr("dqm_sessionToken"),vr("dqm_sessionType"),fe.debug("Cleared localStorage on logout")),f("idle"),b(null),E(null),Bt(null),S.current&&(clearInterval(S.current),S.current=null),w(null),fe.debug("User logged out")},[r?.useLocalStorage,Bt,c]),Is=D.useCallback(K=>{if(Ae===0)return;let ee=(pt||ft)-1;K==="next"?ee=(ee+1)%Ae:(ee=ee-1,ee<0&&(ee=Ae-1)),qe(ee+1),c(QA(ee+1)),At(0),c(YA(0)),be((ue=>ue+1)),c(t2())},[ft,pt,Ae,c]),Ps=D.useCallback(()=>{ce(!1),c(XA())},[c]);D.useEffect(()=>{W||(rt(0),qe(0),bt.current=!1)},[W]),D.useEffect(()=>{Ae>0&&ft===0&&(fe.debug("Auto-setting currentHighlight to 1 (total highlights:",Ae,")"),qe(1))},[Ae,ft]),D.useEffect(()=>{try{window.parent?.postMessage({type:"DQM_DRAWER_STATE",payload:{open:e}},"*")}catch{}},[e]);const ar=D.useCallback(K=>{fe.error("API authentication error:",K),I(!1),T("Authentication required. Please refresh the page.")},[]),$l=K=>{const ue=new DOMParser().parseFromString(K,"text/html");[".MuiDrawer-root","#dqm-widget-host",'[data-block-handle="dqm_quality_analysis"]',"#dqm-quality-analysis-script","#PBarNextFrameWrapper"].forEach(ct=>{try{ue.querySelectorAll(ct).forEach(en=>en.remove())}catch(Me){fe.warn("Could not process selector:",ct,Me.message)}});const ve=ue.documentElement.outerHTML,Ce=K.length,Fe=ve.length,Ne=((Ce-Fe)/Ce*100).toFixed(1);return fe.debug(`HTML optimization: ${Ce} → ${Fe} bytes (${Ne}% reduction)`),Fe>1024*1024&&fe.warn(`Optimized HTML still large: ${(Fe/1024/1024).toFixed(1)}MB`),ve},qn=D.useCallback(()=>V==="backend"&&r?.authBackendUrl?r.authBackendUrl:"https://api.crownpeak.net/dqm-cms/v1",[V,r?.authBackendUrl]),Hn=D.useCallback(()=>{const K={"Content-Type":"application/json"};if(V==="backend"){const ee=U||st("dqm_sessionToken");ee&&(K.Authorization=`Bearer ${ee}`)}else{const ee=O?.apiKey||st("dqm_apiKey");ee&&(K["x-api-key"]=ee)}return K},[V,U,O]),Nr=K=>{if(!/^[\x00-\x7F]*$/.test(K))throw new Error("API key contains non-ASCII characters and cannot be used in HTTP headers")},Ns=async()=>{if(!p){fe.error("No analysis data available");return}me(!0);try{const K=qn(),ee=Hn();let ue;if(V==="backend")ue=`${K}/dqm/assets/${p.assetId}/pagehighlight/all`;else{const ve=O?.apiKey||st("dqm_apiKey");if(!ve)throw new Error("DQM API key not found");try{Nr(ve)}catch(Fe){throw new Error(`Invalid API key: ${Fe instanceof Error?Fe.message:"encoding error"}`)}const Ce=encodeURIComponent(ve);ue=`${K}/assets/${p.assetId}/pagehighlight/all?apiKey=${Ce}`}const ye=await Xe.get(ue,{headers:ee,timeout:3e4,responseType:"text"});if(ye.data){const ve=ye.data,Ce=window.open("","_blank");if(Ce){try{Ce.opener=null}catch{}const Fe=ou(ve,{allowScripts:!1});Ce.document.open(),Ce.document.write(Fe),Ce.document.close(),setTimeout(()=>{const Ne=Ce.document.createElement("style");Ne.textContent=`
|
|
125
|
+
If you have multiple apis, you *have* to specify the reducerPath option when using createApi!`:""}`)},CA=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:s,refetchQuery:a,internalState:l})=>{const{removeQueryResult:c}=o.internalActions,u=Ar(Vr(r),Rl(r)),f=Ar(Vr(i,r),ao(i,r));let p=[],b=0;const h=(E,A)=>{(i.pending.match(E)||r.pending.match(E))&&b++,f(E)&&(b=Math.max(0,b-1)),u(E)?m(hy(E,"invalidatesTags",n,s),A):f(E)?m([],A):o.util.invalidateTags.match(E)&&m(md(E.payload,void 0,void 0,void 0,void 0,s),A)};function g(){return b>0}function m(E,A){const _=A.getState(),x=_[e];if(p.push(...E),x.config.invalidationBehavior==="delayed"&&g())return;const d=p;if(p=[],d.length===0)return;const w=o.util.selectInvalidatedBy(_,d);t.batch(()=>{const S=Array.from(w.values());for(const{queryCacheKey:C}of S){const R=x.queries[C],k=Ja(l.currentSubscriptions,C,Au);R&&(k.size===0?A.dispatch(c({queryCacheKey:C})):R.status!==kr&&A.dispatch(a(R)))}})}return h},TA=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const{currentPolls:o,currentSubscriptions:s}=i,a=new Set;let l=null;const c=(m,E)=>{(n.internalActions.updateSubscriptionOptions.match(m)||n.internalActions.unsubscribeQueryResult.match(m))&&u(m.payload.queryCacheKey,E),(t.pending.match(m)||t.rejected.match(m)&&m.meta.condition)&&u(m.meta.arg.queryCacheKey,E),(t.fulfilled.match(m)||t.rejected.match(m)&&!m.meta.condition)&&f(m.meta.arg,E),n.util.resetApiState.match(m)&&(h(),l&&(clearTimeout(l),l=null),a.clear())};function u(m,E){a.add(m),l||(l=setTimeout(()=>{for(const A of a)p({queryCacheKey:A},E);a.clear(),l=null},0))}function f({queryCacheKey:m},E){const A=E.getState()[e],_=A.queries[m],x=s.get(m);if(!_||_.status===kr)return;const{lowestPollingInterval:d,skipPollingIfUnfocused:w}=g(x);if(!Number.isFinite(d))return;const S=o.get(m);S?.timeout&&(clearTimeout(S.timeout),S.timeout=void 0);const C=Date.now()+d;o.set(m,{nextPollTimestamp:C,pollingInterval:d,timeout:setTimeout(()=>{(A.config.focused||!w)&&E.dispatch(r(_)),f({queryCacheKey:m},E)},d)})}function p({queryCacheKey:m},E){const _=E.getState()[e].queries[m],x=s.get(m);if(!_||_.status===kr)return;const{lowestPollingInterval:d}=g(x);if(process.env.NODE_ENV==="test"){const C=o.pollUpdateCounters??={};C[m]??=0,C[m]++}if(!Number.isFinite(d)){b(m);return}const w=o.get(m),S=Date.now()+d;(!w||S<w.nextPollTimestamp)&&f({queryCacheKey:m},E)}function b(m){const E=o.get(m);E?.timeout&&clearTimeout(E.timeout),o.delete(m)}function h(){for(const m of o.keys())b(m)}function g(m=new Map){let E=!1,A=Number.POSITIVE_INFINITY;for(const _ of m.values())_.pollingInterval&&(A=Math.min(_.pollingInterval,A),E=_.skipPollingIfUnfocused||E);return{lowestPollingInterval:A,skipPollingIfUnfocused:E}}return c},AA=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=cd(n,r),o=ao(n,r),s=Vr(n,r),a={};return(c,u)=>{if(i(c)){const{requestId:f,arg:{endpointName:p,originalArgs:b}}=c.meta,h=lo(t,p),g=h?.onQueryStarted;if(g){const m={},E=new Promise((d,w)=>{m.resolve=d,m.reject=w});E.catch(()=>{}),a[f]=m;const A=e.endpoints[p].select(Xa(h)?b:f),_=u.dispatch((d,w,S)=>S),x={...u,getCacheEntry:()=>A(u.getState()),requestId:f,extra:_,updateCachedData:Xa(h)?d=>u.dispatch(e.util.updateQueryData(p,b,d)):void 0,queryFulfilled:E};g(b,x)}}else if(s(c)){const{requestId:f,baseQueryMeta:p}=c.meta;a[f]?.resolve({data:c.payload,meta:p}),delete a[f]}else if(o(c)){const{requestId:f,rejectedWithValue:p,baseQueryMeta:b}=c.meta;a[f]?.reject({error:c.payload??c.error,isUnhandledError:!p,meta:b}),delete a[f]}}},kA=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions,s=(l,c)=>{hd.match(l)&&a(c,"refetchOnFocus"),gd.match(l)&&a(c,"refetchOnReconnect")};function a(l,c){const u=l.getState()[e],f=u.queries,p=i.currentSubscriptions;t.batch(()=>{for(const b of p.keys()){const h=f[b],g=p.get(b);if(!g||!h)continue;const m=[...g.values()];(m.some(A=>A[c]===!0)||m.every(A=>A[c]===void 0)&&u.config[c])&&(g.size===0?l.dispatch(o({queryCacheKey:b})):h.status!==kr&&l.dispatch(r(h)))}})}return s};function RA(e){const{reducerPath:t,queryThunk:n,api:r,context:i,getInternalState:o}=e,{apiUid:s}=i,a={invalidateTags:Pn(`${t}/invalidateTags`)},l=p=>p.type.startsWith(`${t}/`),c=[xA,SA,CA,TA,EA,AA];return{middleware:p=>{let b=!1;const h=o(p.dispatch),g={...e,internalState:h,refetchQuery:f,isThisApiSliceAction:l,mwApi:p},m=c.map(_=>_(g)),E=_A(g),A=kA(g);return _=>x=>{if(!nd(x))return _(x);b||(b=!0,p.dispatch(r.internalActions.middlewareRegistered(s)));const d={...p,next:_},w=p.getState(),[S,C]=E(x,d,w);let R;if(S?R=_(x):R=C,p.getState()[t]&&(A(x,d,w),l(x)||i.hasRehydrationInfo(x)))for(const k of m)k(x,d,w);return R}},actions:a};function f(p){return e.api.endpoints[p.endpointName].initiate(p.originalArgs,{subscribe:!1,forceRefetch:!0})}}var uh=Symbol(),yy=({createSelector:e=ld}={})=>({name:uh,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:s,refetchOnMountOrArgChange:a,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:u,onSchemaFailure:f,catchSchemaFailure:p,skipSchemaValidation:b},h){tC();const g=q=>(typeof process<"u"&&process.env.NODE_ENV==="development"&&(r.includes(q.type)||console.error(`Tag type '${q.type}' was used, but not specified in \`tagTypes\`!`)),q);Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:gd,onOffline:ly,onFocus:hd,onFocusLost:ay},util:{}});const m=wA({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:E,selectCachedArgsForQuery:A,buildQuerySelector:_,buildInfiniteQuerySelector:x,buildMutationSelector:d}=m;pr(t.util,{selectInvalidatedBy:E,selectCachedArgsForQuery:A});const{queryThunk:w,infiniteQueryThunk:S,mutationThunk:C,patchQueryData:R,updateQueryData:k,upsertQueryData:T,prefetch:y,buildMatchThunkActions:I}=yA({baseQuery:n,reducerPath:i,context:h,api:t,serializeQueryArgs:o,assertTagType:g,selectors:m,onSchemaFailure:f,catchSchemaFailure:p,skipSchemaValidation:b}),{reducer:O,actions:L}=bA({context:h,queryThunk:w,mutationThunk:C,serializeQueryArgs:o,reducerPath:i,assertTagType:g,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:a,keepUnusedDataFor:s,reducerPath:i,invalidationBehavior:u}});pr(t.util,{patchQueryData:R,updateQueryData:k,upsertQueryData:T,prefetch:y,resetApiState:L.resetApiState,upsertQueryEntries:L.cacheEntriesUpserted}),pr(t.internalActions,L);const z=new WeakMap,X=q=>Ja(z,q,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:H,buildInitiateInfiniteQuery:Q,buildInitiateMutation:F,getRunningMutationThunk:U,getRunningMutationsThunk:ae,getRunningQueriesThunk:te,getRunningQueryThunk:J}=mA({queryThunk:w,mutationThunk:C,infiniteQueryThunk:S,api:t,serializeQueryArgs:o,context:h,getInternalState:X});pr(t.util,{getRunningMutationThunk:U,getRunningMutationsThunk:ae,getRunningQueryThunk:J,getRunningQueriesThunk:te});const{middleware:oe,actions:ce}=RA({reducerPath:i,context:h,queryThunk:w,mutationThunk:C,infiniteQueryThunk:S,api:t,assertTagType:g,selectors:m,getRunningQueryThunk:J,getInternalState:X});return pr(t.util,ce),pr(t,{reducer:O,middleware:oe}),{name:uh,injectEndpoint(q,re){const Y=t,W=Y.endpoints[q]??={};Pl(re)&&pr(W,{name:q,select:_(q,re),initiate:H(q,re)},I(w,q)),pA(re)&&pr(W,{name:q,select:d(),initiate:F(q)},I(C,q)),Is(re)&&pr(W,{name:q,select:x(q,re),initiate:Q(q,re)},I(w,q))}}}});yy();function ba(e){return e.replace(e[0],e[0].toUpperCase())}function OA(e){let t=0;for(const n in e)t++;return t}var IA="query",PA="mutation",NA="infinitequery";function MA(e){return e.type===IA}function DA(e){return e.type===PA}function by(e){return e.type===NA}function zo(e,...t){return Object.assign(e,...t)}var Nc=Symbol();function Mc(e){const t=D.useRef(e),n=D.useMemo(()=>fd(t.current,e),[e]);return D.useEffect(()=>{t.current!==n&&(t.current=n)},[n]),n}function Gi(e){const t=D.useRef(e);return D.useEffect(()=>{Yo(t.current,e)||(t.current=e)},[e]),Yo(t.current,e)?t.current:e}var LA=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$A=LA(),BA=()=>typeof navigator<"u"&&navigator.product==="ReactNative",FA=BA(),jA=()=>$A||FA?D.useLayoutEffect:D.useEffect,zA=jA(),dh=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:oy.pending}:e;function Dc(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var Lc=["data","status","isLoading","isSuccess","isError","error"];function UA({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:s},serializeQueryArgs:a,context:l}){const c=o?w=>w():D.useEffect,u=w=>w.current?.unsubscribe?.(),f=l.endpointDefinitions;return{buildQueryHooks:_,buildInfiniteQueryHooks:x,buildMutationHook:d,usePrefetch:h};function p(w,S,C){if(S?.endpointName&&w.isUninitialized){const{endpointName:O}=S,L=f[O];C!==kn&&a({queryArgs:S.originalArgs,endpointDefinition:L,endpointName:O})===a({queryArgs:C,endpointDefinition:L,endpointName:O})&&(S=void 0)}let R=w.isSuccess?w.data:S?.data;R===void 0&&(R=w.data);const k=R!==void 0,T=w.isLoading,y=(!S||S.isLoading||S.isUninitialized)&&!k&&T,I=w.isSuccess||k&&(T&&!S?.isError||w.isUninitialized);return{...w,data:R,currentData:w.data,isFetching:T,isLoading:y,isSuccess:I}}function b(w,S,C){if(S?.endpointName&&w.isUninitialized){const{endpointName:O}=S,L=f[O];C!==kn&&a({queryArgs:S.originalArgs,endpointDefinition:L,endpointName:O})===a({queryArgs:C,endpointDefinition:L,endpointName:O})&&(S=void 0)}let R=w.isSuccess?w.data:S?.data;R===void 0&&(R=w.data);const k=R!==void 0,T=w.isLoading,y=(!S||S.isLoading||S.isUninitialized)&&!k&&T,I=w.isSuccess||T&&k;return{...w,data:R,currentData:w.data,isFetching:T,isLoading:y,isSuccess:I}}function h(w,S){const C=n(),R=Gi(S);return D.useCallback((k,T)=>C(e.util.prefetch(w,k,{...R,...T})),[w,C,R])}function g(w,S,{refetchOnReconnect:C,refetchOnFocus:R,refetchOnMountOrArgChange:k,skip:T=!1,pollingInterval:y=0,skipPollingIfUnfocused:I=!1,...O}={}){const{initiate:L}=e.endpoints[w],z=n(),X=D.useRef(void 0);if(!X.current){const Y=z(e.internalActions.internal_getRTKQSubscriptions());if(process.env.NODE_ENV!=="production"&&(typeof Y!="object"||typeof Y?.type=="string"))throw new Error(process.env.NODE_ENV==="production"?ze(37):`Warning: Middleware for RTK-Query API at reducerPath "${e.reducerPath}" has not been added to the store.
|
|
126
|
+
You must add the middleware for RTK-Query to function correctly!`);X.current=Y}const H=Mc(T?kn:S),Q=Gi({refetchOnReconnect:C,refetchOnFocus:R,pollingInterval:y,skipPollingIfUnfocused:I}),F=O.initialPageParam,U=Gi(F),ae=O.refetchCachedPages,te=Gi(ae),J=D.useRef(void 0);let{queryCacheKey:oe,requestId:ce}=J.current||{},q=!1;oe&&ce&&(q=X.current.isRequestSubscribed(oe,ce));const re=!q&&J.current!==void 0;return c(()=>{re&&(J.current=void 0)},[re]),c(()=>{const Y=J.current;if(typeof process<"u"&&process.env.NODE_ENV==="removeMeOnCompilation"&&console.log(re),H===kn){Y?.unsubscribe(),J.current=void 0;return}const W=J.current?.subscriptionOptions;if(!Y||Y.arg!==H){Y?.unsubscribe();const fe=z(L(H,{subscriptionOptions:Q,forceRefetch:k,...by(f[w])?{initialPageParam:U,refetchCachedPages:te}:{}}));J.current=fe}else Q!==W&&Y.updateSubscriptionOptions(Q)},[z,L,k,H,Q,re,U,te,w]),[J,z,L,Q]}function m(w,S){return(R,{skip:k=!1,selectFromResult:T}={})=>{const{select:y}=e.endpoints[w],I=Mc(k?kn:R),O=D.useRef(void 0),L=D.useMemo(()=>s([y(I),(F,U)=>U,F=>I],S,{memoizeOptions:{resultEqualityCheck:Yo}}),[y,I]),z=D.useMemo(()=>T?s([L],T,{devModeChecks:{identityFunctionCheck:"never"}}):L,[L,T]),X=r(F=>z(F,O.current),Yo),H=i(),Q=L(H.getState(),O.current);return zA(()=>{O.current=Q},[Q]),X}}function E(w){D.useEffect(()=>()=>{u(w),w.current=void 0},[w])}function A(w){if(!w.current)throw new Error(process.env.NODE_ENV==="production"?ze(38):"Cannot refetch a query that has not been started yet.");return w.current.refetch()}function _(w){const S=(k,T={})=>{const[y]=g(w,k,T);return E(y),D.useMemo(()=>({refetch:()=>A(y)}),[y])},C=({refetchOnReconnect:k,refetchOnFocus:T,pollingInterval:y=0,skipPollingIfUnfocused:I=!1}={})=>{const{initiate:O}=e.endpoints[w],L=n(),[z,X]=D.useState(Nc),H=D.useRef(void 0),Q=Gi({refetchOnReconnect:k,refetchOnFocus:T,pollingInterval:y,skipPollingIfUnfocused:I});c(()=>{const te=H.current?.subscriptionOptions;Q!==te&&H.current?.updateSubscriptionOptions(Q)},[Q]);const F=D.useRef(Q);c(()=>{F.current=Q},[Q]);const U=D.useCallback(function(te,J=!1){let oe;return t(()=>{u(H),H.current=oe=L(O(te,{subscriptionOptions:F.current,forceRefetch:!J})),X(te)}),oe},[L,O]),ae=D.useCallback(()=>{H.current?.queryCacheKey&&L(e.internalActions.removeQueryResult({queryCacheKey:H.current?.queryCacheKey}))},[L]);return D.useEffect(()=>()=>{u(H)},[]),D.useEffect(()=>{z!==Nc&&!H.current&&U(z,!0)},[z,U]),D.useMemo(()=>[U,z,{reset:ae}],[U,z,ae])},R=m(w,p);return{useQueryState:R,useQuerySubscription:S,useLazyQuerySubscription:C,useLazyQuery(k){const[T,y,{reset:I}]=C(k),O=R(y,{...k,skip:y===Nc}),L=D.useMemo(()=>({lastArg:y}),[y]);return D.useMemo(()=>[T,{...O,reset:I},L],[T,O,I,L])},useQuery(k,T){const y=S(k,T),I=R(k,{selectFromResult:k===kn||T?.skip?void 0:dh,...T}),O=Dc(I,...Lc);return D.useDebugValue(O),D.useMemo(()=>({...I,...y}),[I,y])}}}function x(w){const S=(R,k={})=>{const[T,y,I,O]=g(w,R,k),L=D.useRef(O);c(()=>{L.current=O},[O]);const z=k.refetchCachedPages,X=Gi(z),H=D.useCallback(function(U,ae){let te;return t(()=>{u(T),T.current=te=y(I(U,{subscriptionOptions:L.current,direction:ae}))}),te},[T,y,I]);E(T);const Q=Mc(k.skip?kn:R),F=D.useCallback(U=>{if(!T.current)throw new Error(process.env.NODE_ENV==="production"?ze(38):"Cannot refetch a query that has not been started yet.");const ae={refetchCachedPages:U?.refetchCachedPages??X};return T.current.refetch(ae)},[T,X]);return D.useMemo(()=>({trigger:H,refetch:F,fetchNextPage:()=>H(Q,"forward"),fetchPreviousPage:()=>H(Q,"backward")}),[F,H,Q])},C=m(w,b);return{useInfiniteQueryState:C,useInfiniteQuerySubscription:S,useInfiniteQuery(R,k){const{refetch:T,fetchNextPage:y,fetchPreviousPage:I}=S(R,k),O=C(R,{selectFromResult:R===kn||k?.skip?void 0:dh,...k}),L=Dc(O,...Lc,"hasNextPage","hasPreviousPage");return D.useDebugValue(L),D.useMemo(()=>({...O,fetchNextPage:y,fetchPreviousPage:I,refetch:T}),[O,y,I,T])}}}function d(w){return({selectFromResult:S,fixedCacheKey:C}={})=>{const{select:R,initiate:k}=e.endpoints[w],T=n(),[y,I]=D.useState();D.useEffect(()=>()=>{y?.arg.fixedCacheKey||y?.reset()},[y]);const O=D.useCallback(function(te){const J=T(k(te,{fixedCacheKey:C}));return I(J),J},[T,k,C]),{requestId:L}=y||{},z=D.useMemo(()=>R({fixedCacheKey:C,requestId:y?.requestId}),[C,y,R]),X=D.useMemo(()=>S?s([z],S):z,[S,z]),H=r(X,Yo),Q=C==null?y?.arg.originalArgs:void 0,F=D.useCallback(()=>{t(()=>{y&&I(void 0),C&&T(e.internalActions.removeMutationResult({requestId:L,fixedCacheKey:C}))})},[T,C,y,L]),U=Dc(H,...Lc,"endpointName");D.useDebugValue(U);const ae=D.useMemo(()=>({...H,originalArgs:Q,reset:F}),[H,Q,F]);return D.useMemo(()=>[O,ae],[O,ae])}}}var qA=Symbol(),HA=({batch:e=mb,hooks:t={useDispatch:zh,useSelector:gb,useStore:jh},createSelector:n=ld,unstable__sideEffectsInRender:r=!1,...i}={})=>{if(process.env.NODE_ENV!=="production"){const o=["useDispatch","useSelector","useStore"];let s=!1;for(const a of o)if(OA(i)>0&&(i[a]&&(s||(console.warn("As of RTK 2.0, the hooks now need to be specified as one object, provided under a `hooks` key:\n`reactHooksModule({ hooks: { useDispatch, useSelector, useStore } })`"),s=!0)),t[a]=i[a]),typeof t[a]!="function")throw new Error(process.env.NODE_ENV==="production"?ze(36):`When using custom hooks for context, all ${o.length} hooks need to be provided: ${o.join(", ")}.
|
|
127
|
+
Hook ${a} was either not provided or not a function.`)}return{name:qA,init(o,{serializeQueryArgs:s},a){const l=o,{buildQueryHooks:c,buildInfiniteQueryHooks:u,buildMutationHook:f,usePrefetch:p}=UA({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:s,context:a});return zo(l,{usePrefetch:p}),zo(a,{batch:e}),{injectEndpoint(b,h){if(MA(h)){const{useQuery:g,useLazyQuery:m,useLazyQuerySubscription:E,useQueryState:A,useQuerySubscription:_}=c(b);zo(l.endpoints[b],{useQuery:g,useLazyQuery:m,useLazyQuerySubscription:E,useQueryState:A,useQuerySubscription:_}),o[`use${ba(b)}Query`]=g,o[`useLazy${ba(b)}Query`]=m}if(DA(h)){const g=f(b);zo(l.endpoints[b],{useMutation:g}),o[`use${ba(b)}Mutation`]=g}else if(by(h)){const{useInfiniteQuery:g,useInfiniteQuerySubscription:m,useInfiniteQueryState:E}=u(b);zo(l.endpoints[b],{useInfiniteQuery:g,useInfiniteQuerySubscription:m,useInfiniteQueryState:E}),o[`use${ba(b)}InfiniteQuery`]=g}}}}}},VA=my(yy(),HA());const Qi="https://api.crownpeak.net/dqm-cms/v1",Uo=e=>({"Content-Type":"application/json","x-api-key":e}),$c=VA({reducerPath:"dqmApi",baseQuery:uA({baseUrl:Qi}),tagTypes:["Asset","Highlight"],endpoints:e=>({createAsset:e.mutation({query:({html:t,url:n,websiteId:r,apiKey:i,apiEndpoint:o})=>({url:`${o||Qi}/assets`,method:"POST",headers:Uo(i),body:{html:t,url:n||window.location.href,websiteId:r},params:{apiKey:i}}),invalidatesTags:["Asset"]}),getAsset:e.query({query:({assetId:t,websiteId:n,apiKey:r,apiEndpoint:i})=>({url:`${i||Qi}/assets/${t}`,headers:Uo(r),params:{websiteId:n,apiKey:r}}),transformResponse:t=>{const n=(t.checkpoints||[]).reduce((s,a)=>(s[a.category]||(s[a.category]=[]),s[a.category].push(a),s),{}),r=Object.keys(n);Object.entries(n).forEach(([s,a])=>{a.forEach(l=>{l.colors=_m(s,r)})});const i=Object.entries(n),o=t.totalCheckpoints>0?Math.round((t.totalCheckpoints-t.totalErrors)/t.totalCheckpoints*100):0;return{assetId:t.assetId,analysisState:t.analysisState,created:t.created,siteName:t.siteName,totalCheckpoints:t.totalCheckpoints,totalErrors:t.totalErrors,checkpoints:t.checkpoints||[],groupedCategories:i,qualityScore:o}},providesTags:(t,n,{assetId:r})=>[{type:"Asset",id:r}]}),getHighlight:e.query({query:({assetId:t,checkpointId:n,websiteId:r,apiKey:i,apiEndpoint:o})=>({url:`${o||Qi}/assets/${t}/pagehighlight/${n}`,headers:Uo(i),params:{websiteId:r,apiKey:i}}),transformResponse:(t,n,r)=>({html:t.html,checkpointId:r.checkpointId}),providesTags:(t,n,{assetId:r,checkpointId:i})=>[{type:"Highlight",id:`${r}-${i}`}]}),getAllHighlights:e.query({query:({assetId:t,websiteId:n,apiKey:r,apiEndpoint:i})=>({url:`${i||Qi}/assets/${t}/pagehighlight/all`,headers:Uo(r),params:{websiteId:n,apiKey:r}}),transformResponse:t=>({html:t.html}),providesTags:(t,n,{assetId:r})=>[{type:"Highlight",id:`${r}-all`}]}),getCheckpointHighlight:e.query({query:({assetId:t,checkpointId:n,websiteId:r,apiKey:i,apiEndpoint:o,highlightSource:s=!1})=>({url:`${o||Qi}/assets/${t}/errors/${n}`,headers:Uo(i),params:{websiteId:r,apiKey:i,highlightSource:s},responseHandler:"text"}),providesTags:(t,n,{assetId:r,checkpointId:i,highlightSource:o})=>[{type:"Highlight",id:`${r}-${i}-${o?"source":"browser"}`}]})})}),fh={state:"idle",assetId:null,data:null,error:null,isAnalyzing:!1,startedAt:null,completedAt:null},wy=Rn({name:"analysis",initialState:fh,reducers:{startAnalysis:e=>{e.state="analyzing",e.isAnalyzing=!0,e.error=null,e.startedAt=Date.now(),e.completedAt=null},setAssetId:(e,t)=>{e.assetId=t.payload},analysisCompleted:(e,t)=>{e.state="completed",e.isAnalyzing=!1,e.data=t.payload,e.completedAt=Date.now()},analysisFailed:(e,t)=>{e.state="error",e.isAnalyzing=!1,e.error=t.payload,e.completedAt=Date.now()},resetAnalysis:e=>{Object.assign(e,fh)},updateAnalysisState:(e,t)=>{e.state=t.payload,(t.payload==="completed"||t.payload==="error")&&(e.isAnalyzing=!1,e.completedAt=Date.now())}}}),{startAnalysis:k2,setAssetId:R2,analysisCompleted:O2,analysisFailed:I2,resetAnalysis:P2,updateAnalysisState:N2}=wy.actions,ph={selectedCheckpoint:null,selectedCheckpointId:null,viewMode:"browser",showAllHighlights:!1,currentHighlightIndex:0,totalHighlights:0,visibleHighlightIndex:0,cache:{},scrollPositions:{},isModalOpen:!1,isLoading:!1,error:null,highlightedContent:"",scriptsDisabled:!0,hasAutoScrolled:!1,clickedIndicator:0,currentAssetId:null},WA=300*1e3,_y=Rn({name:"highlight",initialState:ph,reducers:{selectCheckpoint:(e,t)=>{e.selectedCheckpoint=t.payload,e.selectedCheckpointId=t.payload?.id||null,e.currentHighlightIndex=0,e.visibleHighlightIndex=0,e.hasAutoScrolled=!1,t.payload&&(e.isModalOpen=!0)},setSelectedCheckpointId:(e,t)=>{e.selectedCheckpointId=t.payload,t.payload||(e.selectedCheckpoint=null)},setViewMode:(e,t)=>{e.viewMode=t.payload},toggleShowAllHighlights:e=>{e.showAllHighlights=!e.showAllHighlights,e.selectedCheckpoint=null},setShowAllHighlights:(e,t)=>{e.showAllHighlights=t.payload,t.payload&&(e.selectedCheckpoint=null)},setCurrentHighlightIndex:(e,t)=>{e.currentHighlightIndex=t.payload},nextHighlight:e=>{e.currentHighlightIndex<e.totalHighlights-1&&(e.currentHighlightIndex+=1)},previousHighlight:e=>{e.currentHighlightIndex>0&&(e.currentHighlightIndex-=1)},setTotalHighlights:(e,t)=>{e.totalHighlights=t.payload},setVisibleHighlightIndex:(e,t)=>{e.visibleHighlightIndex=t.payload},cacheHighlight:(e,t)=>{const{checkpointId:n,content:r,type:i}=t.payload;e.cache[n]||(e.cache[n]={timestamp:Date.now()}),e.cache[n][i]=r,e.cache[n].timestamp=Date.now()},clearExpiredCache:e=>{const t=Date.now();Object.keys(e.cache).forEach(n=>{t-e.cache[n].timestamp>WA&&delete e.cache[n]})},clearCache:e=>{e.cache={}},saveScrollPosition:(e,t)=>{const{checkpointId:n,position:r}=t.payload;e.scrollPositions[n]||(e.scrollPositions[n]={browser:0,source:0}),r.browser!==void 0&&(e.scrollPositions[n].browser=r.browser),r.source!==void 0&&(e.scrollPositions[n].source=r.source)},openModal:e=>{e.isModalOpen=!0},closeModal:e=>{e.isModalOpen=!1,e.selectedCheckpoint=null,e.selectedCheckpointId=null,e.showAllHighlights=!1,e.hasAutoScrolled=!1,e.totalHighlights=0,e.currentHighlightIndex=0,e.highlightedContent=""},setHighlightedContent:(e,t)=>{e.highlightedContent=t.payload},toggleScripts:e=>{e.scriptsDisabled=!e.scriptsDisabled},setScriptsDisabled:(e,t)=>{e.scriptsDisabled=t.payload},setHasAutoScrolled:(e,t)=>{e.hasAutoScrolled=t.payload},incrementClickIndicator:e=>{e.clickedIndicator+=1},setCurrentAssetId:(e,t)=>{e.currentAssetId=t.payload},navigateHighlight:(e,t)=>{if(e.totalHighlights===0)return;let n=(e.visibleHighlightIndex||e.currentHighlightIndex)-1;t.payload==="next"?n=(n+1)%e.totalHighlights:(n=n-1,n<0&&(n=e.totalHighlights-1)),e.currentHighlightIndex=n+1,e.visibleHighlightIndex=0,e.clickedIndicator+=1},setLoading:(e,t)=>{e.isLoading=t.payload},setError:(e,t)=>{e.error=t.payload,e.isLoading=!1},resetHighlight:e=>{Object.assign(e,ph)}}}),{selectCheckpoint:KA,setSelectedCheckpointId:M2,setViewMode:GA,toggleShowAllHighlights:D2,setShowAllHighlights:L2,setCurrentHighlightIndex:QA,nextHighlight:$2,previousHighlight:B2,setTotalHighlights:F2,setVisibleHighlightIndex:YA,cacheHighlight:j2,clearExpiredCache:z2,clearCache:U2,saveScrollPosition:q2,openModal:JA,closeModal:XA,setLoading:ZA,setError:H2,resetHighlight:V2,setHighlightedContent:e2,toggleScripts:W2,setScriptsDisabled:K2,setHasAutoScrolled:G2,incrementClickIndicator:t2,setCurrentAssetId:Q2,navigateHighlight:Y2}=_y.actions,hh={apiKey:null,websiteId:null,isAuthenticated:!1,sessionType:null,sessionToken:null,accessToken:null,refreshToken:null,rememberMe:!1,isLoading:!1,error:null,storageWarningAcknowledged:!1},_r={apiKey:"dqm_apiKey",websiteId:"dqm_websiteID",rememberMe:"dqm_rememberMe",storageWarning:"dqm_storageWarningAcknowledged",sessionToken:"dqm_sessionToken",sessionType:"dqm_sessionType"},Bc=ps("auth/initialize",async(e,{dispatch:t})=>{if(e?.disabled===!0)return{isAuthenticated:!1,error:"DQM is disabled"};if(e?.apiKey&&e?.websiteId)return{apiKey:e.apiKey,websiteId:e.websiteId,sessionType:"direct",isAuthenticated:!0};if(typeof window<"u"&&e?.useLocalStorage!==!1){if(lt("dqm_sessionType")==="backend"){const o=lt("dqm_sessionToken");if(o)return le.debug("Restoring backend session from localStorage"),{accessToken:o,sessionType:"backend",isAuthenticated:!0}}const r=lt("dqm_apiKey"),i=lt("dqm_websiteID");if(r&&i)return le.debug("Restoring direct credentials from localStorage"),{apiKey:r,websiteId:i,sessionType:"direct",isAuthenticated:!0}}return e?.authBackendUrl?{isAuthenticated:!1}:{isAuthenticated:!1,error:"DQM not configured"}}),Fc=ps("auth/loginWithCredentials",async(e,{rejectWithValue:t})=>{try{if(e.sessionType==="direct"&&!/^[\x00-\x7F]*$/.test(e.apiKey))throw new Error("API key contains non-ASCII characters");return e.rememberMe!==!1&&typeof window<"u"&&(e.sessionType==="backend"&&e.sessionToken?(yn(_r.sessionToken,e.sessionToken),yn(_r.sessionType,"backend")):(yn(_r.apiKey,e.apiKey),yn(_r.websiteId,e.websiteId),yn(_r.sessionType,"direct"))),e}catch(n){return t(n instanceof Error?n.message:"Login failed")}}),n2=ps("auth/logout",async(e=!0)=>(e&&typeof window<"u"&&(Sr(_r.apiKey),Sr(_r.websiteId),Sr(_r.sessionToken),Sr(_r.sessionType),le.debug("Cleared localStorage on logout")),!0)),vy=Rn({name:"auth",initialState:hh,reducers:{setApiKey:(e,t)=>{e.apiKey=t.payload,e.isAuthenticated=!!(t.payload&&e.websiteId),t.payload&&(e.sessionType="direct")},setWebsiteId:(e,t)=>{e.websiteId=t.payload,e.isAuthenticated=!!(e.apiKey&&t.payload)},setCredentials:(e,t)=>{e.apiKey=t.payload.apiKey,e.websiteId=t.payload.websiteId,e.isAuthenticated=!0,e.sessionType="direct",t.payload.rememberMe!==void 0&&(e.rememberMe=t.payload.rememberMe)},setSessionToken:(e,t)=>{e.accessToken=t.payload.accessToken,e.sessionType="backend",e.isAuthenticated=!0},setRememberMe:(e,t)=>{e.rememberMe=t.payload},acknowledgeStorageWarning:e=>{e.storageWarningAcknowledged=!0},setAuthLoading:(e,t)=>{e.isLoading=t.payload},setAuthError:(e,t)=>{e.error=t.payload,e.isLoading=!1},logout:e=>{e.apiKey=null,e.websiteId=null,e.accessToken=null,e.refreshToken=null,e.isAuthenticated=!1,e.sessionType=null,e.error=null},resetAuth:()=>hh,hydrateFromStorage:(e,t)=>{t.payload.apiKey&&(e.apiKey=t.payload.apiKey),t.payload.websiteId&&(e.websiteId=t.payload.websiteId),t.payload.rememberMe!==void 0&&(e.rememberMe=t.payload.rememberMe),t.payload.storageWarningAcknowledged!==void 0&&(e.storageWarningAcknowledged=t.payload.storageWarningAcknowledged),e.isAuthenticated=!!(e.apiKey&&e.websiteId),e.isAuthenticated&&(e.sessionType="direct")}},extraReducers:e=>{e.addCase(Bc.pending,t=>{t.isLoading=!0,t.error=null}).addCase(Bc.fulfilled,(t,n)=>{t.isLoading=!1,n.payload.apiKey&&(t.apiKey=n.payload.apiKey),n.payload.websiteId&&(t.websiteId=n.payload.websiteId),n.payload.accessToken&&(t.accessToken=n.payload.accessToken),n.payload.sessionType&&(t.sessionType=n.payload.sessionType),n.payload.isAuthenticated!==void 0&&(t.isAuthenticated=n.payload.isAuthenticated),n.payload.error&&(t.error=n.payload.error)}).addCase(Bc.rejected,(t,n)=>{t.isLoading=!1,t.error=n.error.message||"Authentication initialization failed"}),e.addCase(Fc.pending,t=>{t.isLoading=!0,t.error=null}).addCase(Fc.fulfilled,(t,n)=>{t.isLoading=!1,t.apiKey=n.payload.apiKey,t.websiteId=n.payload.websiteId,t.sessionType=n.payload.sessionType,t.isAuthenticated=!0,n.payload.sessionToken&&(t.accessToken=n.payload.sessionToken),n.payload.rememberMe!==void 0&&(t.rememberMe=n.payload.rememberMe)}).addCase(Fc.rejected,(t,n)=>{t.isLoading=!1,t.error=n.payload||"Login failed"}),e.addCase(n2.fulfilled,t=>{t.apiKey=null,t.websiteId=null,t.accessToken=null,t.refreshToken=null,t.isAuthenticated=!1,t.sessionType=null,t.error=null})}}),{setApiKey:J2,setWebsiteId:X2,setCredentials:jc,setSessionToken:gh,setRememberMe:Z2,acknowledgeStorageWarning:ek,setAuthLoading:tk,setAuthError:zc,logout:r2,resetAuth:nk,hydrateFromStorage:rk}=vy.actions,i2={provider:"none",openaiApiKey:null,openaiModel:"gpt-4.1-mini",enabled:!1,translationProvider:"none"},mh={settings:i2,summaries:{},isSettingsOpen:!1,isGenerating:!1,generatingFor:null,error:null},Sy=Rn({name:"ai",initialState:mh,reducers:{updateSettings:(e,t)=>{e.settings={...e.settings,...t.payload},t.payload.provider&&t.payload.provider!=="none"&&(e.settings.enabled=!0)},setProvider:(e,t)=>{e.settings.provider=t.payload,e.settings.enabled=t.payload!=="none"},setOpenAIApiKey:(e,t)=>{e.settings.openaiApiKey=t.payload},setOpenAIModel:(e,t)=>{e.settings.openaiModel=t.payload},setTranslationProvider:(e,t)=>{e.settings.translationProvider=t.payload},openSettings:e=>{e.isSettingsOpen=!0},closeSettings:e=>{e.isSettingsOpen=!1},toggleSettings:e=>{e.isSettingsOpen=!e.isSettingsOpen},startGeneration:(e,t)=>{e.isGenerating=!0,e.generatingFor=t.payload,e.error=null},generationCompleted:(e,t)=>{e.isGenerating=!1,e.generatingFor=null,e.summaries[t.payload.checkpointId]={checkpointId:t.payload.checkpointId,summary:t.payload.summary,generatedAt:Date.now(),provider:t.payload.provider}},generationFailed:(e,t)=>{e.isGenerating=!1,e.generatingFor=null,e.error=t.payload},clearError:e=>{e.error=null},clearSummaries:e=>{e.summaries={}},clearSummary:(e,t)=>{delete e.summaries[t.payload]},resetAI:()=>mh,hydrateSettings:(e,t)=>{t.payload.provider&&(e.settings.provider=t.payload.provider,e.settings.enabled=t.payload.provider!=="none"),t.payload.openaiApiKey!==void 0&&(e.settings.openaiApiKey=t.payload.openaiApiKey),t.payload.openaiModel&&(e.settings.openaiModel=t.payload.openaiModel),t.payload.translationProvider&&(e.settings.translationProvider=t.payload.translationProvider)}}}),{updateSettings:ik,setProvider:ok,setOpenAIApiKey:sk,setOpenAIModel:ak,setTranslationProvider:lk,openSettings:ck,closeSettings:uk,toggleSettings:dk,startGeneration:fk,generationCompleted:pk,generationFailed:hk,clearError:gk,clearSummaries:mk,clearSummary:yk,resetAI:bk,hydrateSettings:wk}=Sy.actions,o2=kC({reducer:{locale:PT,analysis:wy.reducer,highlight:_y.reducer,auth:vy.reducer,ai:Sy.reducer,[$c.reducerPath]:$c.reducer},middleware:e=>e().concat($c.middleware)}),s2=()=>zh(),a2=({open:e,onClose:t,onOpen:n,config:r,onAuthSuccess:i,onAuthError:o,debugHtml:s})=>{const{t:a,i18n:l}=Rr(["sidebar","auth","common"]),c=s2(),[u,f]=D.useState("idle"),[p,b]=D.useState(null),[h,g]=D.useState(null),[m,E]=D.useState(null),[A,_]=D.useState(null),x=D.useRef(null),[d,w]=D.useState(null),S=D.useRef(null),[C,R]=D.useState([]),[k,T]=D.useState(null),[y,I]=D.useState(!1),[O,L]=D.useState(null),[z,X]=D.useState(null),[H,Q]=D.useState("direct"),[F,U]=D.useState(""),[ae,te]=D.useState(null),[J,oe]=D.useState(null),[ce,q]=D.useState(!1),[re,Y]=D.useState("browser"),[W,fe]=D.useState(!1),[B,we]=D.useState(!1),[be,Ce]=D.useState(0),[ke,De]=D.useState(()=>typeof window>"u"?!0:lt("dqm_quality_breakdown_expanded")!=="false"),[Se,Fe]=D.useState(new Set),[$t,ye]=D.useState({}),[ve,Ge]=D.useState(0),[pt,He]=D.useState(0),[ht,At]=D.useState(0),[Ln,Ei]=D.useState(!0),[xi,nr]=D.useState(!1),$n=D.useRef(null),Bn=Ym(),{translationEnabled:Bt,setTranslationEnabled:Ht,translationMode:Ct,setTranslationMode:un,summaryEnabled:Xt,setSummaryEnabled:Or,openAiApiKey:Sn,setOpenAiApiKey:Ir,openAiModel:rr,setOpenAiModel:Fn,openAiBaseUrl:Qr,setOpenAiBaseUrl:Ci,targetLang:ut,translationNeeded:kt,aiEnabled:Pr,effectiveModelId:ir,computeBudgetMs:or}=Bn,En=ey(),{cache:Yr,clearAll:bo,clearAssetCache:Vt}=En,dn=xu({enabled:Pr,openAiApiKey:Sn,openAiModel:rr,openAiBaseUrl:Qr}),{state:sr,isReady:jn}=dn,ar=xu({enabled:Xt,openAiApiKey:Sn,openAiModel:rr,openAiBaseUrl:Qr}),Jr=iy({engine:ar,originalData:h,targetLang:ut,modelId:ir,enabled:Xt,timeoutMs:r?.summary?.timeoutMs??45e3,cache:Yr}),{state:yt,bullets:Nr,error:Ti,stats:zn,restart:Xr}=Jr,xn=Xt&&(yt==="generating"||yt==="idle"),he=ry({engine:dn,cacheManager:En,originalData:h,targetLang:ut,modelId:ir,enabled:Bt&&kt,mode:Ct,computeBudgetMs:or,persistentCache:Yr,summaryGenerating:xn}),{translatedData:$,progress:ie,restart:ge,stop:tt}=he,bt=D.useMemo(()=>Bt?sr==="initializing"?"initializing":sr==="error"?"error":ie&&ie.translatedCheckpoints<ie.totalCheckpoints?"translating":jn?"ready":"initializing":"disabled",[Bt,sr,ie,jn]),[qe,Rt]=D.useState(Xt),Wt=D.useRef(xn);D.useEffect(()=>{xn&&tt()},[xn,tt]),D.useEffect(()=>{Wt.current&&!xn&&(le.debug("DQMSidebar: summary finished, restarting translation"),ge()),Wt.current=xn},[xn,ge]);const Un=sr==="error"?"AI engine failed to initialize":null,Mr=D.useMemo(()=>rr.trim()||"gpt-4.1-mini",[rr]);D.useEffect(()=>{Bt&&kt&&$?b($):h&&(!Bt||!kt)&&b(h)},[$,Bt,kt,h]);const nt=D.useCallback(K=>{x.current=K,_(K)},[]),qn=D.useRef(!1),Ai=D.useRef("browser"),Ps=Gm(r?.overlayConfig),Zt=r?.disableLogout===!0,Ns=D.useRef(r);Ns.current=r;const Ms=D.useRef(!1);D.useEffect(()=>{new URLSearchParams(window?.location?.search).get("dqm")==="true"&&n()},[]),D.useEffect(()=>{if(Ms.current)return;Ms.current=!0;const K=Ns.current;if(K?.disabled===!0){I(!1),T(a("sidebar:dqm_disabled")),f("idle"),c(zc(a("sidebar:dqm_disabled")));return}if(K?.apiKey&&K?.websiteId){L({apiKey:K.apiKey,websiteId:K.websiteId}),Q("direct"),X(null),I(!0),c(jc({apiKey:K.apiKey,websiteId:K.websiteId}));return}if(typeof window<"u"&&K?.useLocalStorage!==!1){if(lt("dqm_sessionType")==="backend"){const Ee=lt("dqm_sessionToken");if(Ee){le.debug("Restoring backend session from localStorage"),X(Ee),Q("backend"),L({apiKey:"BACKEND_SESSION",websiteId:"BACKEND_SESSION"}),I(!0),c(gh({accessToken:Ee}));return}}const ue=lt("dqm_apiKey"),me=lt("dqm_websiteID");if(ue&&me){le.debug("Restoring direct credentials from localStorage"),L({apiKey:ue,websiteId:me}),Q("direct"),X(null),I(!0),c(jc({apiKey:ue,websiteId:me}));return}}if(K?.authBackendUrl){I(!1),f("idle");return}I(!1),T(a("sidebar:dqm_not_configured")),f("idle"),c(zc(a("sidebar:dqm_not_configured")))},[]);const Nl=D.useCallback(K=>{L({apiKey:K.apiKey,websiteId:K.websiteId}),X(K.sessionToken||null),Q(K.sessionType),I(!0),T(null),c(jc({apiKey:K.apiKey,websiteId:K.websiteId})),K.sessionToken&&c(gh({accessToken:K.sessionToken})),i&&i(K)},[i,c]),Ml=D.useCallback(K=>{le.error("Authentication error:",K),T(K.message),I(!1),c(zc(K.message)),o&&o(K)},[o,c]),Dl=D.useCallback(()=>{L(null),X(null),Q("direct"),I(!1),c(r2()),typeof window<"u"&&r?.useLocalStorage!==!1&&(Sr("dqm_apiKey"),Sr("dqm_websiteID"),Sr("dqm_sessionToken"),Sr("dqm_sessionType"),le.debug("Cleared localStorage on logout")),f("idle"),b(null),E(null),nt(null),S.current&&(clearInterval(S.current),S.current=null),w(null),le.debug("User logged out")},[r?.useLocalStorage,nt,c]),Ds=D.useCallback(K=>{if(ve===0)return;let ee=(ht||pt)-1;K==="next"?ee=(ee+1)%ve:(ee=ee-1,ee<0&&(ee=ve-1)),He(ee+1),c(QA(ee+1)),At(0),c(YA(0)),Ce((ue=>ue+1)),c(t2())},[pt,ht,ve,c]),Zr=D.useCallback(()=>{fe(!1),c(XA())},[c]);D.useEffect(()=>{W||(Ge(0),He(0),qn.current=!1)},[W]),D.useEffect(()=>{ve>0&&pt===0&&(le.debug("Auto-setting currentHighlight to 1 (total highlights:",ve,")"),He(1))},[ve,pt]),D.useEffect(()=>{try{window.parent?.postMessage({type:"DQM_DRAWER_STATE",payload:{open:e}},"*")}catch{}},[e]);const ki=D.useCallback(K=>{le.error("API authentication error:",K),I(!1),T("Authentication required. Please refresh the page.")},[]),Ll=K=>{const ue=new DOMParser().parseFromString(K,"text/html");[".MuiDrawer-root","#dqm-widget-host",'[data-block-handle="dqm_quality_analysis"]',"#dqm-quality-analysis-script","#PBarNextFrameWrapper"].forEach(dt=>{try{ue.querySelectorAll(dt).forEach(en=>en.remove())}catch(Ne){le.warn("Could not process selector:",dt,Ne.message)}});const Ee=ue.documentElement.outerHTML,Te=K.length,je=Ee.length,Me=((Te-je)/Te*100).toFixed(1);return le.debug(`HTML optimization: ${Te} → ${je} bytes (${Me}% reduction)`),je>1024*1024&&le.warn(`Optimized HTML still large: ${(je/1024/1024).toFixed(1)}MB`),Ee},Hn=D.useCallback(()=>H==="backend"&&r?.authBackendUrl?r.authBackendUrl:"https://api.crownpeak.net/dqm-cms/v1",[H,r?.authBackendUrl]),Vn=D.useCallback(()=>{const K={"Content-Type":"application/json"};if(H==="backend"){const ee=z||lt("dqm_sessionToken");ee&&(K.Authorization=`Bearer ${ee}`)}else{const ee=O?.apiKey||lt("dqm_apiKey");ee&&(K["x-api-key"]=ee)}return K},[H,z,O]),lr=K=>{if(!/^[\x00-\x7F]*$/.test(K))throw new Error("API key contains non-ASCII characters and cannot be used in HTTP headers")},$l=async()=>{if(!p){le.error("No analysis data available");return}we(!0);try{const K=Hn(),ee=Vn();let ue;if(H==="backend")ue=`${K}/dqm/assets/${p.assetId}/pagehighlight/all`;else{const Ee=O?.apiKey||lt("dqm_apiKey");if(!Ee)throw new Error("DQM API key not found");try{lr(Ee)}catch(je){throw new Error(`Invalid API key: ${je instanceof Error?je.message:"encoding error"}`)}const Te=encodeURIComponent(Ee);ue=`${K}/assets/${p.assetId}/pagehighlight/all?apiKey=${Te}`}const me=await et.get(ue,{headers:ee,timeout:3e4,responseType:"text"});if(me.data){const Ee=me.data,Te=window.open("","_blank");if(Te){try{Te.opener=null}catch{}const je=ou(Ee,{allowScripts:!1});Te.document.open(),Te.document.write(je),Te.document.close(),setTimeout(()=>{const Me=Te.document.createElement("style");Me.textContent=`
|
|
128
128
|
[data-dqm-id] {
|
|
129
129
|
animation: pulse 1.5s ease-in-out infinite;
|
|
130
130
|
}
|
|
@@ -139,5 +139,5 @@ Hook ${a} was either not provided or not a function.`)}return{name:qA,init(o,{se
|
|
|
139
139
|
border-color: #ff6666;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
`,Ce.document.head.appendChild(Ne)},100)}}else fe.warn("No content in response"),alert(a("sidebar:failed_load_all_errors"))}catch(K){fe.error("Failed to fetch page with all errors:",K),alert(a("sidebar:failed_load_all_errors"))}finally{me(!1)}},Ri=D.useCallback(async(K,ee=0)=>{fe.debug("Polling analysis status, attempt",ee+1,"for assetId:",K);const ue=30,ye=2e3,ve=1e4;try{const Ce=qn(),Fe=Hn();let Ne;if(V==="backend")Ne=`${Ce}/dqm/assets/${K}/status`,fe.debug("Polling backend:",Ne);else{const It=O?.apiKey||st("dqm_apiKey");if(!It)throw new Error("DQM API key not available for polling");try{Nr(It)}catch(ti){throw new Error(`Invalid API key: ${ti instanceof Error?ti.message:"encoding error"}`)}const Dr=encodeURIComponent(It);Ne=`${Ce}/assets/${K}/status?apiKey=${Dr}`,fe.debug("Polling direct:",Ne)}const Me=(await Xe.get(Ne,{headers:Fe,timeout:1e4})).data,en=Me.checkpoints&&Array.isArray(Me.checkpoints);if(en&&Me.totalCheckpoints!==void 0&&Me.checkpoints.length===Me.totalCheckpoints){S.current&&(clearInterval(S.current),S.current=null),w(null);const It={assetId:Me.assetId||Me.id,created:Me.created,siteName:Me.siteName,totalCheckpoints:Me.totalCheckpoints,totalErrors:Me.totalErrors,checkpoints:Me.checkpoints||[]};g(It),b(It),Vt(),R(Object.entries(Oi(Me.checkpoints||[]))),f("completed"),Bt(null),fe.debug("Analysis completed:",Me.checkpoints.length,"/",Me.totalCheckpoints,"checkpoints")}else if(Me.status==="failed"||Me.status==="error")S.current&&(clearInterval(S.current),S.current=null),w(null),E(Me.error||Me.message||"Analysis failed with unknown error"),R([]),f("error"),Bt(null),fe.debug("Analysis failed:",Me.error||Me.message);else{const It=en?Me.checkpoints.length:0,Dr=Me.totalCheckpoints||"?";fe.debug("Analysis in progress:",It,"/",Dr,"checkpoints"),m&&E(null)}}catch(Ce){if(fe.error("Polling failed:",Ce),Xe.isAxiosError(Ce)&&Ce.response?.status===401){ar(Ce);return}if(ee<ue){const Fe=Math.min(ye*Math.pow(1.5,ee),ve);setTimeout(()=>Ri(K,ee+1),Fe)}else S.current&&(clearInterval(S.current),S.current=null),w(null),E("Analysis polling failed after maximum attempts"),R([]),f("error"),Bt(null)}},[qn,Hn,V,O,m,ar,Bt]),Ms=D.useCallback(K=>{S.current&&(clearInterval(S.current),S.current=null),w(null),fe.debug("Starting polling for assetId:",K),Ri(K);const ee=setInterval(()=>{x.current?Ri(K):(clearInterval(ee),S.current===ee&&(S.current=null),w(null))},3e3);S.current=ee,w(ee)},[Ri]),ei=D.useCallback(()=>{S.current&&(clearInterval(S.current),S.current=null),w(null),Bt(null)},[Bt]),Mr=D.useCallback(async()=>{f("analyzing"),E(null),T(null),b(null),g(null);try{if(V==="backend"){const ct=U||st("dqm_sessionToken");if(!ct){f("idle"),fe.warn("Cannot start analysis: No session token available");return}fe.debug("Starting analysis with backend session token:",ct.substring(0,16)+"...")}else{const ct=O?.apiKey||st("dqm_apiKey"),Me=O?.websiteId||st("dqm_websiteID");if(!ct||!Me){f("idle"),fe.warn("Cannot start analysis: No credentials available");return}try{Nr(ct)}catch(en){throw new Error(`Invalid API key: ${en instanceof Error?en.message:"encoding error"}`)}fe.debug("Starting analysis with direct API key")}let K;s?(fe.warn("DEBUG MODE: Using custom HTML from debugHtml prop"),K=s):K=document.documentElement.outerHTML;const ee=$l(K),ue=qn(),ye=Hn();let ve,Ce;if(V==="backend")ve=`${ue}/dqm/assets`,Ce={html:ee,url:window.location.href},fe.debug("Using backend mode:",ve);else{const ct=O?.apiKey||st("dqm_apiKey"),Me=O?.websiteId||st("dqm_websiteID"),en=encodeURIComponent(ct);ve=`${ue}/assets?apiKey=${en}`,Ce={websiteId:Me,content:ee,contentType:"text/html; charset=UTF-8",title:document.title,timestamp:new Date().toISOString()},ye["Content-Type"]="application/x-www-form-urlencoded",fe.debug("Using direct mode:",ve)}const Fe=await Xe.post(ve,Ce,{headers:ye,timeout:3e4}),Ne=Fe.data?.assetId||Fe.data?.id;if(Ne)Bt(Ne),Ms(Ne);else throw new Error("No Asset ID returned from API")}catch(K){if(fe.error("Analysis failed:",K),Xe.isAxiosError(K)&&K.response?.status===401){ar(K),f("error");return}let ee="Unknown error occurred";Xe.isAxiosError(K)?ee=K.response?.data?.message||K.message||"API request failed":K instanceof Error&&(ee=K.message),E(ee),R([]),f("error"),ei()}},[V,U,O,s,qn,Hn,ar,Ms,ei]);D.useEffect(()=>{y&&O&&u==="idle"&&(fe.debug("Auto-starting analysis with available credentials"),Mr())},[y,O,Mr,u]),D.useCallback(K=>{b(K),dt(new Set),R(K?Object.entries(Oi(K.checkpoints||[])):[])},[]),D.useEffect(()=>()=>{ei()},[]),D.useEffect(()=>{e===!0&&Mr()},[e]),D.useEffect(()=>{if(!p||!se)return;const K=p.checkpoints.find(ee=>ee.id===se)||null;oe(K)},[p,se]);const Bl=K=>!K.totalCheckpoints||K.totalCheckpoints===0?0:Math.round((K.totalCheckpoints-K.totalErrors)/K.totalCheckpoints*100),Oi=D.useCallback(K=>{const ee=K.reduce((ue,ye)=>(ue[ye.category]||(ue[ye.category]=[]),ue[ye.category].push(ye),ue),{});return Object.entries(ee).forEach(([ue,ye])=>{ye.forEach(ve=>{ve.colors=_m(ue,Object.keys(ee))})}),ee},[]);D.useEffect(()=>{if(!p){R([]);return}R(Object.entries(Oi(p.checkpoints||[])))},[p,Oi]);const wo=async(K,ee,ue="browser")=>{z(""),q(!0),te(ee),Y(ue),ce(!0),c(e2("")),c(ZA(!0)),c(GA(ue)),c(JA()),we(ve=>({...ve,[ee]:{browser:"",source:""}})),sr.current=ue;const ye=p?.checkpoints.find(ve=>ve.id===ee)||null;oe(ye),c(KA(ye));try{const ve=qn(),Ce=Hn();let Fe,Ne;if(V==="backend")Fe=`${ve}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=false`,Ne=`${ve}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=true`;else{const It=O?.apiKey||st("dqm_apiKey");if(!It)throw new Error("DQM API key not found");try{Nr(It)}catch(ti){throw new Error(`Invalid API key: ${ti instanceof Error?ti.message:"encoding error"}`)}const Dr=encodeURIComponent(It);Fe=`${ve}/assets/${K}/errors/${ee}?apiKey=${Dr}&highlightSource=false`,Ne=`${ve}/assets/${K}/errors/${ee}?apiKey=${Dr}&highlightSource=true`}const ct=ye?.canHighlight.page&&await Xe.get(Fe,{headers:Ce,timeout:15e3,responseType:"text"})||void 0,Me=ye?.canHighlight.source&&await Xe.get(Ne,{headers:Ce,timeout:15e3,responseType:"text"})||void 0,en=ct?.data||"<p>No highlighted content available.</p>",$s=Me?.data||"<p>No source content available for this checkpoint.</p>";we(It=>({...It,[ee]:{browser:en,source:$s}})),fe.debug("Both views loaded and cached"),ue==="browser"&&ye?.canHighlight?.page&&p?Ls(p.assetId,ye.id):ue==="source"&&ye?.canHighlight?.source&&p&&Ds(p.assetId,ye.id)}catch(ve){fe.error("Failed to fetch highlighted content:",ve),z(`<p style="color: #dc3545;">${a("sidebar:failed_load_highlights")}</p>`)}finally{q(!1)}},Ds=async(K,ee)=>{const ue=Jt[ee];if(ue&&ue.source){fe.debug("Using cached source view for checkpoint:",ee),z(ue.source);return}fe.warn("Source view not in cache for checkpoint:",ee,", fetching..."),q(!0);try{const ye=qn(),ve=Hn();let Ce;if(V==="backend")Ce=`${ye}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=true`;else{const Ne=O?.apiKey||st("dqm_apiKey");if(!Ne)throw new Error("DQM API key not found");try{Nr(Ne)}catch(Me){throw new Error(`Invalid API key: ${Me instanceof Error?Me.message:"encoding error"}`)}const ct=encodeURIComponent(Ne);Ce=`${ye}/assets/${K}/errors/${ee}?apiKey=${ct}&highlightSource=true`}const Fe=await Xe.get(Ce,{headers:ve,timeout:15e3,responseType:"text"});if(Fe.data){const Ne=Fe.data;z(Ne),we(ct=>({...ct,[ee]:{...ct[ee],source:Ne}}))}else fe.warn("No highlighted content in response"),z(`<p>${a("sidebar:no_highlighted_content")}</p>`)}catch(ye){fe.error("Failed to fetch source view:",ye),z(`<p style="color: #dc3545;">${a("sidebar:failed_load_source")}</p>`)}finally{q(!1)}},Ls=async(K,ee)=>{const ue=Jt[ee];if(ue&&ue.browser){fe.debug("Using cached browser view for checkpoint:",ee),z(ue.browser);return}fe.warn("Browser view not in cache for checkpoint:",ee,", fetching..."),q(!0);try{const ye=qn(),ve=Hn();let Ce;if(V==="backend")Ce=`${ye}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=false`;else{const Ne=O?.apiKey||st("dqm_apiKey");if(!Ne)throw new Error("DQM API key not found");try{Nr(Ne)}catch(Me){throw new Error(`Invalid API key: ${Me instanceof Error?Me.message:"encoding error"}`)}const ct=encodeURIComponent(Ne);Ce=`${ye}/assets/${K}/errors/${ee}?apiKey=${ct}&highlightSource=false`}const Fe=await Xe.get(Ce,{headers:ve,timeout:15e3,responseType:"text"});if(Fe.data){const Ne=Fe.data;z(Ne),we(ct=>({...ct,[ee]:{...ct[ee],browser:Ne}}))}else fe.warn("No highlighted content in response"),z(`<p>${a("sidebar:no_highlighted_content")}</p>`)}catch(ye){fe.error("Failed to restore browser view:",ye),z(`<p style="color: #dc3545;">${a("sidebar:failed_load_browser")}</p>`)}finally{q(!1)}};return ne(P.ThemeProvider,{theme:P.createTheme({palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#f50057"},background:{default:"#fafafa"}},typography:{fontFamily:'Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif',htmlFontSize:18,fontSize:18,h6:{fontSize:"22px"},h5:{fontSize:"24px"},h4:{fontSize:"26px"},h3:{fontSize:"28px"},h2:{fontSize:"30px"},h1:{fontSize:"32px"},subtitle2:{fontSize:"19px"},subtitle1:{fontSize:"18px"},body1:{fontSize:"18px"},body2:{fontSize:"17px"},button:{fontSize:"17px"}},shape:{borderRadius:8},components:{MuiDialog:{styleOverrides:{root:{zIndex:999999}},defaultProps:{disablePortal:r?.shadowDomMode??!1}},MuiPopper:{defaultProps:{disablePortal:r?.shadowDomMode??!1}},MuiTooltip:{defaultProps:{PopperProps:{disablePortal:r?.shadowDomMode??!1}}},MuiModal:{defaultProps:{disablePortal:r?.shadowDomMode??!1}},MuiFab:{styleOverrides:{root:{zIndex:999999}}},MuiBackdrop:{styleOverrides:{root:{zIndex:999998}}}}}),children:[M(P.CssBaseline,{}),M(P.Tooltip,{title:a("sidebar:fab_tooltip"),placement:"left",children:M(Cv,{"data-testid":"dqm-fab",overlayInfo:Zr,onClick:()=>e?t():n(),"aria-label":a("sidebar:fab_tooltip"),style:{opacity:e?0:1,position:"fixed",zIndex:1400,transform:e?"translateX(80px)":"none",transition:"opacity 0.15s ease-in-out, transform 0.25s ease-in-out",pointerEvents:e?"none":"auto"},children:M(gt.TaskAlt,{sx:{fontSize:22}})})}),M(Tv,{overlayInfo:Zr,anchor:"right",open:e,onClose:t,variant:"temporary",elevation:16,ModalProps:{keepMounted:!1,disablePortal:r?.shadowDomMode??!1,disableScrollLock:!1,hideBackdrop:!1},children:y?ne(zr,{children:[ne(Av,{sx:{justifyContent:"space-between"},children:[M(P.Box,{display:"flex",alignItems:"center",gap:1.5,justifyContent:"flex-start",width:"100%",children:ne(P.Typography,{variant:"h6",component:"h1",fontWeight:700,flexDirection:"row",alignItems:"center",display:"flex",gap:"0.5rem",children:[M("img",{width:24,height:24,style:{marginRight:"0.5rem"},src:"https://app-assets.gadget.dev/a/255812/505265/assets/dqm.svg",alt:"Crownpeak DQM"}),a("sidebar:title")]})}),ne(P.Box,{display:"flex",alignItems:"center",gap:1,children:[M(P.Tooltip,{title:a("sidebar:ai_settings",{defaultValue:"AI Assistant"}),children:M(sc,{index:bo?1:2,onClick:()=>er(!0),"aria-label":a("sidebar:ai_settings",{defaultValue:"AI Assistant"}),sx:{color:Ir?yt==="error"?"error.main":"primary.main":"text.secondary"},children:yt==="initializing"||yt==="translating"?M(fi,{size:22,thickness:4,sx:{color:"inherit"}}):M(gt.AutoAwesome,{fontSize:"small"})})}),M(NT,{index:bo?2:3}),!bo&&M(P.Tooltip,{title:a("common:logout"),children:M(sc,{index:1,onClick:Ll,"aria-label":a("common:logout"),children:M(gt.Logout,{})})}),M(sc,{"data-testid":"sidebar-close",onClick:t,"aria-label":a("sidebar:close_sidebar"),children:M(gt.Close,{})})]})]}),M(kv,{children:ne(Vu,{children:[u==="idle"&&y&&ne(P.Box,{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",children:[M(P.Typography,{variant:"h5",fontWeight:600,gutterBottom:!0,color:"text.secondary",textAlign:"center",children:a("sidebar:ready_title")}),M(P.Typography,{variant:"body1",color:"text.secondary",textAlign:"center",sx:{maxWidth:400,mb:3},children:a("sidebar:ready_body")}),M(P.Box,{component:"svg",sx:{width:"120px",height:"120px",opacity:.3},viewBox:"0 0 24 24",children:M("path",{fill:"currentColor",d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z"})})]}),u==="analyzing"&&M(Iv,{expanded:Te}),u==="error"&&k&&M(P.Box,{children:ne(P.Alert,{severity:k.includes("Permission denied")?"warning":"error",children:[M(P.Typography,{variant:"subtitle1",fontWeight:700,gutterBottom:!0,children:k.includes("Permission denied")?a("sidebar:access_denied"):k.includes("not configured")?a("sidebar:config_required"):a("sidebar:auth_error")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:k})]})}),u==="error"&&!k&&M(P.Box,{children:ne(P.Alert,{severity:"error",action:M(P.Button,{color:"inherit",size:"small",onClick:Mr,startIcon:M(gt.Refresh,{}),sx:{textTransform:"none",fontWeight:"bolder",fontSize:"1rem"},children:a("sidebar:retry")}),children:[M(P.Typography,{variant:"subtitle1",fontWeight:700,gutterBottom:!0,children:a("sidebar:analysis_failed")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:m})]})}),u==="completed"&&p&&ne(P.Box,{children:[ne(Pg,{children:[M(P.Typography,{variant:"h6",fontWeight:700,gutterBottom:!0,sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:a("sidebar:overall_quality")}),ne(P.Box,{display:"flex",alignItems:"center",justifyContent:"flex-start ",columnGap:"60px",pt:2,children:[ne(P.Box,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,children:[M(_x,{value:Bl(p)}),ne(P.Box,{children:[M(P.Box,{display:"flex",alignItems:"center",justifyContent:"center",gap:1,mb:1,flexDirection:"column",children:ne(P.Typography,{color:"text.primary",fontSize:"12px",fontWeight:400,sx:{color:"gray",textAlign:"center"},children:[a("sidebar:passed"),M("p",{style:{margin:0,fontWeight:600,fontSize:"26px",color:"#28a745"},children:p.totalCheckpoints-p.totalErrors})]})}),M("hr",{style:{width:"100%",border:"1px solid #e0e0e0",margin:"10px 0px 10px 0px"}}),M(P.Box,{display:"flex",alignItems:"center",justifyContent:"center",gap:1,children:ne(P.Typography,{fontSize:"12px",fontWeight:400,sx:{color:"gray",textAlign:"center"},children:[M("p",{style:{margin:0,fontWeight:600,fontSize:"26px",color:"#dc3545"},children:p.totalErrors}),a("sidebar:failed")]})})]})]}),M(P.Box,{display:"flex",justifyContent:"center",mt:3,children:ne(P.Button,{variant:"outlined",size:"large",onClick:Ns,disabled:B,sx:{borderRadius:2,py:1,mb:3,fontSize:"17px",textTransform:"none"},children:[B?M(fi,{size:24,sx:{mr:1}}):null,a("sidebar:show_all_errors")]})})]})]}),ne(Ov,{children:[ne(P.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,flexWrap:"wrap",children:[ne(P.Typography,{variant:"h6",fontWeight:700,sx:{display:"flex",alignItems:"center",gap:1},children:[M(gt.AutoAwesome,{fontSize:"small"}),a("sidebar:summary_title"),M(P.Tooltip,{title:a("sidebar:summary_model_tooltip",{defaultValue:"Modell: {{model}}",model:Cn}),children:M(P.Chip,{size:"small",label:"ChatGPT",sx:{ml:1,fontWeight:600}})})]}),ne(P.Box,{display:"flex",gap:1,alignItems:"center",children:[M(P.Button,{variant:"outlined",size:"small",onClick:()=>er(!0),sx:{textTransform:"none"},children:a("sidebar:ai_settings")}),M(P.Button,{variant:"outlined",size:"small",startIcon:M(gt.Replay,{}),onClick:Jr,disabled:!Xt||mt==="generating",sx:{textTransform:"none"},children:a("sidebar:summary_regenerate")})]})]}),M(P.Typography,{variant:"caption",color:"text.secondary",children:a("sidebar:summary_disclaimer")}),Xt?mt==="generating"?ne(P.Box,{sx:{mt:2},children:[M(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:a("sidebar:summary_generating")}),M(P.LinearProgress,{}),ne(P.Box,{sx:{mt:2},children:[M(P.Skeleton,{height:24}),M(P.Skeleton,{height:24}),M(P.Skeleton,{height:24})]})]}):mt==="error"?ne(P.Alert,{severity:"warning",sx:{mt:2},children:[M(P.Typography,{variant:"subtitle2",fontWeight:700,gutterBottom:!0,children:a("sidebar:summary_failed")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:ki})]}):Pr&&Pr.length>0?M(P.Box,{component:"ul",sx:{mt:2,mb:0,pl:3},children:Pr.map((K,ee)=>M(P.Typography,{component:"li",variant:"body2",sx:{mb:.75},children:K},ee))}):M(P.Typography,{variant:"body2",color:"text.secondary",sx:{mt:1},children:a("sidebar:summary_empty")}):M(P.Typography,{variant:"body2",color:"text.secondary",sx:{mt:1},children:a("sidebar:summary_disabled")}),Un&&M(P.Typography,{variant:"caption",color:"text.secondary",sx:{mt:1,display:"block"},children:a("sidebar:summary_stats",{attempts:Un.attempts,empty:Un.emptyResponses,mode:Un.fallbackUsed,duration:Un.durationMs})})]}),ne(P.Accordion,{expanded:Te,onChange:()=>{je(!Te),localStorage.setItem("dqm_quality_breakdown_expanded",(!Te).toString())},sx:{borderRadius:"10px !important",marginBottom:2,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)","&:before":{display:"none"},overflowX:"visible"},children:[ne(P.AccordionSummary,{expandIcon:M(gt.ExpandMore,{}),sx:{paddingX:3,"& .MuiAccordionSummary-content":{alignItems:"center",overflow:"scroll",justifyContent:"flex-start",paddingY:2,marginRight:3}},children:[M(P.Typography,{variant:"h6",fontWeight:700,sx:{flexShrink:0},children:a("sidebar:quality_breakdown")}),M(P.Box,{display:"flex",justifyContent:"center",gap:1,mx:2,px:2.5,sx:{".MuiAccordionSummary-root:not(.Mui-expanded) &":{opacity:1,width:C.length*48,transition:"opacity 0.3s ease 300ms, width 0s ease 0s"},".MuiAccordionSummary-root.Mui-expanded &":{opacity:0,width:0,pointerEvents:"none",transition:"opacity 300ms ease 50ms, width 1250ms ease 200ms"}},children:ta(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).reverse().map(([K,ee])=>{const ue=ee.filter(Fe=>Fe.failed).length,ye=ee.length-ue,ve=ee[0]?.colors.bg,Ce=Math.round(ye/ee.length*100);return M(P.Tooltip,{title:ne(P.Box,{sx:{p:.5},display:"flex",flexDirection:"column",alignItems:"center",children:[M(P.Typography,{variant:"body2",fontWeight:600,sx:{mb:.5},children:K}),M(P.Typography,{variant:"caption",display:"block",children:a("sidebar:percent_passed",{percent:Ce})}),M(P.Typography,{variant:"caption",display:"block",children:ue===0?a("sidebar:all_passed"):a("sidebar:x_of_y_passed",{passed:ye,total:ee.length})})]}),placement:"top",arrow:!0,children:M(fi,{variant:"determinate",enableTrackSlot:!0,value:Ce,size:40,thickness:4,sx:{color:ve,top:0,left:0}})},K)})})]}),M(P.AccordionDetails,{sx:{padding:3,paddingTop:0},children:M(Ng,{children:M(P.Box,{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1,children:ta(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).reverse().map(([K,ee])=>{const ue=ee.filter(Ce=>Ce.failed).length,ye=ee.length-ue,ve=ee[0]?.colors.bg;return ne(P.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:1,width:"200px",children:[ne(P.Box,{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",children:[M(fi,{enableTrackSlot:!0,variant:"determinate",value:ye/ee.length*100,size:"100px",thickness:4,sx:{color:ve,"& .MuiCircularProgress-circleNegative":{stroke:"#e0e0e0"}}}),ne(P.Typography,{variant:"h6",component:"div",color:ve,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:700},children:[Math.round(ye/ee.length*100),"%"]})]}),ne(P.Typography,{component:"div",fontWeight:"bold",color:"gray",sx:{fontSize:"1rem",textAlign:"center",fontWeight:600},children:[K,M(P.Typography,{component:"div",fontWeight:"bold",color:"gray",pb:4,sx:{fontSize:"0.75rem",textAlign:"center",fontWeight:600},children:M(P.Typography,{component:"span",fontWeight:400,color:ue>0?"#dc3545":"#28a745",children:ue===0?a("sidebar:all_passed"):a("sidebar:x_of_y_passed",{passed:ye,total:ee.length})})})]})]},K)})})})})]}),p.checkpoints.some(K=>K.failed)&&ne(zr,{children:[ne(P.Typography,{variant:"h4",fontWeight:600,gutterBottom:!0,sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:4},children:[a("sidebar:failed_checkpoints"),"(",p.checkpoints.filter(K=>K.failed).length,")"]}),M(P.Typography,{variant:"caption",color:"text.secondary",sx:{px:2,display:"block",mb:1},children:a("sidebar:translation_disclaimer",{defaultValue:"KI-Übersetzungen können ungenau sein. Fachbegriffe und Inhalte bitte prüfen."})}),M(P.Box,{sx:{position:"sticky",top:-32,zIndex:10,py:2,borderRadius:0},children:ne(P.Card,{sx:{padding:2,pb:1,px:"20px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"},children:[ne(P.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1,children:[ne(P.Typography,{variant:"body2",color:"text.secondary",fontWeight:600,children:[a("sidebar:filter_by_category")," · ",xe.size>0?a("sidebar:showing_categories",{count:xe.size,total:Object.keys(C).length}):a("sidebar:showing_all_categories",{total:Object.keys(C).length})]}),M(P.Button,{size:"small",onClick:()=>dt(new Set),sx:{textTransform:"none",fontWeight:600,opacity:xe.size===0?0:1,transition:"opacity 0.2s ease-in-out"},children:a("sidebar:show_all")})]}),M(P.Box,{display:"flex",gap:1,flexWrap:"nowrap",sx:{overflowX:"scroll",pb:2.5,pt:1},children:ta(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).filter(([,K])=>K.some(ee=>ee.failed)).reverse().map(([K,ee])=>{const ue=ee.filter(Fe=>Fe.failed).length,{bg:ye,text:ve}=ee[0]?.colors||{},Ce=xe.has(K);return M(P.Chip,{label:`${K} (${ue})`,onClick:()=>{dt(Fe=>{const Ne=new Set(Fe);return Ne.has(K)?Ne.delete(K):Ne.add(K),Ne})},sx:{backgroundColor:Ce?ye:"transparent",color:Ce?ve:xe.size===0?ye:"#555555",border:`2px solid ${Ce||xe.size===0?ye:"#B1B1B1"}`,fontWeight:600,fontSize:"0.875rem",cursor:"pointer",transition:"all 0.2s ease","&:hover":{backgroundColor:ye,color:ve,transform:"translateY(-2px)",boxShadow:`0 4px 8px ${ye}40`,border:`2px solid ${ye}`}}},K)})})]})}),M(P.Box,{sx:{minHeight:"calc(100vh - 320px)"},children:M(Mg,{children:M(P.List,{sx:{p:0},children:ta(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).reverse().filter(([K,ee])=>xe.size===0?ee.some(ue=>ue.failed):xe.has(K)&&ee.some(ue=>ue.failed)).map(([K,ee])=>M(zr,{children:ee.filter(({failed:ue})=>ue).map(ue=>{const{bg:ye}=ue.colors;return M(P.ListItem,{sx:{px:0,py:1.5,alignItems:"flex-start"},children:ne(P.Box,{mt:.5,children:[M(P.Box,{display:"flex",alignItems:"center",gap:1,children:M(P.Typography,{variant:"h5",component:"div",fontWeight:600,mb:1.5,sx:{display:"flex",alignItems:"center",gap:1},children:ue.name})}),ne(P.Box,{display:"flex",gap:1,flexWrap:"wrap",mb:2,children:[ue?.canHighlight.page&&M(P.Button,{variant:"outlined",size:"small",startIcon:M(gt.Visibility,{}),onClick:()=>{te(ue.id),wo(p.assetId,ue.id,"browser")},sx:{textTransform:"none",borderRadius:2,fontSize:"0.875rem"},children:a("sidebar:view_in_browser")}),ue?.canHighlight.source&&M(P.Button,{variant:"outlined",size:"small",startIcon:M(gt.Visibility,{}),onClick:()=>{te(ue.id),wo(p.assetId,ue.id,"source")},sx:{textTransform:"none",borderRadius:2,fontSize:"0.875rem"},children:a("sidebar:view_source")}),M(P.Typography,{variant:"body2",color:ye,mr:2,ml:ue?.canHighlight.source||ue?.canHighlight.page?1:0,sx:{fontSize:"0.875rem",alignSelf:"center"},children:ue.category}),ue.topics?.map(ve=>M(P.Typography,{variant:"body2",color:"text.secondary",mr:2,sx:{fontSize:"0.875rem",alignSelf:"center"},children:ve},ve))]}),M(sp,{html:ue.description||""})]})},ue.id)})}))})})})]})]})]})}),M(Rv,{children:M(P.Button,{onClick:Mr,variant:"contained",size:"large",fullWidth:!0,disabled:u==="analyzing"||!y||!!k,sx:{borderRadius:2,py:1,fontWeight:600,textTransform:"none",background:"linear-gradient(156deg, #b604d4 0%, #e38ef2 100%)","&:hover":{background:"linear-gradient(156deg, #9800b1 0%, #d091db 100%)"},fontSize:"17px",transition:"background 0.3s ease","&:disabled":{background:"#e0e0e0",color:"#9e9e9e"}},children:u==="analyzing"?a("sidebar:analyzing",{defaultValue:"Analyzing..."}):a("sidebar:run_quality_check")})}),M(JT,{open:Ti,onClose:()=>er(!1),translationEnabled:$t,setTranslationEnabled:Ht,translationMode:Ct,setTranslationMode:un,translationTargetLang:lt,translationNeeded:kt,summaryEnabled:Xt,setSummaryEnabled:Rr,restartSummary:Jr,openAiApiKey:En,setOpenAiApiKey:Or,openAiModel:tr,setOpenAiModel:jn,openAiBaseUrl:Gr,setOpenAiBaseUrl:Ai,aiModelIdEffective:Cn,translationState:yt,translationError:Zt,translationProgress:ie,clearTranslationCache:yo,restartTranslation:ge,hasAnalysisData:!!h,openAiSettingsExpanded:Ue,setOpenAiSettingsExpanded:Rt}),ne(P.Dialog,{open:W,onClose:Ps,maxWidth:"xl",fullWidth:!0,PaperProps:{style:{borderRadius:12,padding:24,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.2)"}},children:[ne(P.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 24px",borderBottom:"1px solid #e0e0e0"},children:[M(P.Typography,{variant:"h6",fontWeight:700,color:"text.primary",children:a("sidebar:highlighted_errors")}),M(P.IconButton,{onClick:Ps,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:close"),children:M(gt.Close,{})})]}),M(P.DialogContent,{dividers:!0,sx:{padding:"16px 24px",borderBottom:"none"},children:ne(P.Box,{flexDirection:"row",display:"flex",gap:2,children:[J&&ne(P.Box,{width:"20%",sx:{maxHeight:"calc(100vh - 300px)",height:"calc(100vh - 300px)",overflowY:"auto"},children:[M(P.Typography,{variant:"h6",component:"div",fontWeight:600,mb:2,children:J.name}),ne(P.Box,{display:"flex",gap:1,mb:2,flexWrap:"wrap",children:[J.colors&&M(P.Chip,{label:J.category,size:"medium",sx:{backgroundColor:J.colors.bg,color:J.colors.text,fontWeight:600,fontSize:"1rem"}}),J.topics?.map(K=>M(P.Chip,{label:K,size:"medium",variant:"outlined",sx:{fontSize:"1rem"}},K))]}),M(P.Box,{sx:{fontSize:"0.95rem",lineHeight:1.6},children:M(sp,{html:J.description||""})})]}),le||!F?ne(P.Box,{sx:{backgroundColor:"#fff",border:"1px solid #e0e0e0",borderRadius:2,padding:2,pt:0,marginTop:0,width:"80%"},children:[ne(P.Box,{sx:{position:"sticky",top:0,zIndex:10,backgroundColor:"#fff",borderBottom:1,borderColor:"divider",mb:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ne(P.Box,{display:"flex",gap:2,alignItems:"center",children:[M(P.Skeleton,{variant:"rectangular",width:130,height:40,sx:{borderRadius:1}}),M(P.Skeleton,{variant:"rectangular",width:120,height:40,sx:{borderRadius:1}})]}),ne(P.Box,{display:"flex",gap:1,alignItems:"center",mr:2,children:[M(P.Skeleton,{variant:"rectangular",width:60,height:24,sx:{borderRadius:1}}),M(P.Skeleton,{variant:"circular",width:32,height:32}),M(P.Skeleton,{variant:"circular",width:32,height:32}),M(P.Skeleton,{variant:"circular",width:32,height:32}),M(P.Skeleton,{variant:"circular",width:32,height:32})]})]}),M(P.Box,{sx:{minHeight:400},children:M(P.Box,{display:"flex",alignItems:"center",justifyContent:"center",height:400,children:ne(P.Box,{textAlign:"center",children:[M(fi,{size:48,sx:{color:"#c653ff",mb:2}}),M(P.Typography,{variant:"body2",color:"text.secondary",children:a("sidebar:loading_views")})]})})})]}):ne(P.Box,{ref:Bn,sx:{backgroundColor:"#fff",border:"1px solid #e0e0e0",borderRadius:2,padding:2,pt:0,marginTop:0,height:"calc(100vh - 300px)",maxHeight:"calc(100vh - 300px)",overflow:"auto",width:J?"80%":"100%"},children:[ne(P.Box,{sx:{position:"sticky",top:0,zIndex:10,backgroundColor:"#fff",borderBottom:1,borderColor:"divider",mb:2,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ne(P.Tabs,{value:re,onChange:(K,ee)=>{Y(ee),ee==="browser"&&J?.canHighlight?.page&&p?Ls(p.assetId,J.id):ee==="source"&&J?.canHighlight?.source&&p&&Ds(p.assetId,J.id)},sx:{"& .MuiTab-root":{textTransform:"none",fontWeight:600,fontSize:"0.95rem"}},children:[M(P.Tab,{label:a("sidebar:browser_view"),value:"browser",sx:{display:J?.canHighlight.page?"inline-flex":"none"}}),M(P.Tab,{label:a("sidebar:source_view"),value:"source",sx:{display:J?.canHighlight.source?"inline-flex":"none"}})]}),ne(P.Box,{sx:{display:"flex",alignItems:"center",gap:1,mr:2},children:[Ae>0&&ne(zr,{children:[M(P.Typography,{variant:"body2",sx:{color:"text.secondary",fontWeight:600,fontSize:"0.875rem",minWidth:"60px",textAlign:"center"},children:a("sidebar:x_of_y",{current:pt||ft||1,total:Ae})}),M(P.IconButton,{size:"small",onClick:()=>Is("prev"),disabled:Ae===0,sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:prev_highlight"),children:M(gt.ArrowBack,{fontSize:"small"})}),M(P.IconButton,{size:"small",onClick:()=>Is("next"),disabled:Ae===0,sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:next_highlight"),children:M(gt.ArrowForward,{fontSize:"small"})})]}),M(P.IconButton,{size:"small",onClick:()=>wo(p.assetId,se,re),sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:reload_highlights"),children:M(gt.Replay,{fontSize:"small"})}),M(P.Tooltip,{title:a("sidebar:open_in_new_tab"),placement:"top",children:M(P.IconButton,{size:"small",onClick:()=>{const K=window.open("","_blank");if(K){try{K.opener=null}catch{}const ee=ou(F,{allowScripts:!1});K.document.open(),K.document.write(ee),K.document.close(),setTimeout(()=>{const ue=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],ye=K.document.querySelectorAll(ue.join(", "));if(fe.debug("Found highlights in new tab:",ye.length),ye.length>0){const ve=ye[0];fe.debug("Scrolling to first highlight in new tab"),ve.scrollIntoView({behavior:"smooth",block:"center"}),ve.classList.add("animate"),setTimeout(()=>{ve.classList.remove("animate")},800)}else fe.warn("No highlights found in new tab")},500)}},sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:open_in_new_tab"),children:M(gt.OpenInNew,{fontSize:"small"})})}),re==="browser"&&M(P.Tooltip,{title:a($n?"sidebar:enable_js":"sidebar:disable_js"),placement:"top",children:M(P.IconButton,{size:"small",onClick:()=>Ci(!$n),sx:{color:$n?"text.secondary":"primary.main","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a($n?"sidebar:enable_js":"sidebar:disable_js"),children:ne("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("path",{d:"M16 18L22 12L16 6"}),M("path",{d:"M8 6L2 12L8 18"})]})})})]})]}),M(P.Box,{sx:{minHeight:400},children:re==="browser"?M(Pv,{html:F,currentHighlight:ft,clickedIndicator:Ee,onHighlightsFound:rt,onVisibleHighlightChange:At,scriptsDisabled:$n}):M(Nv,{html:F,onHighlightsFound:rt,currentHighlight:ft,shouldAutoScrollToFirst:!bt.current,clickedIndicator:Ee,onVisibleHighlightChange:At,scrollContainerRef:Bn})})]})]})})]})]}):ne(P.Box,{sx:{width:"730px",height:"100vh",display:"flex",flexDirection:"column",backgroundColor:"#f5f5f5",overflow:"auto"},children:[ne(P.Box,{sx:{background:"linear-gradient(135deg, #711bc1 0%, #8e44d6 100%)",color:"white",py:4,px:3,textAlign:"center",boxShadow:"0 4px 20px rgba(0,0,0,0.1)"},children:[ne("svg",{style:{width:"24px",height:"24px",marginBottom:"1rem"},"aria-label":a("sidebar:title"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",children:[M("path",{d:"M18.84,250c0-4.39,1.18-8.74,3.39-12.55L125.16,60.82c4.51-7.75,12.92-12.54,21.92-12.54h205.84c9.03,0,17.41,4.79,21.92,12.54l102.92,176.63c2.21,3.8,3.39,8.16,3.39,12.55,0,4.39-1.18,8.74-3.39,12.54l-102.92,176.64c-4.51,7.75-12.92,12.55-21.92,12.55h-205.84c-9.03,0-17.41-4.8-21.92-12.55L22.24,262.55c-2.21-3.8-3.39-8.16-3.39-12.54ZM12.5,250c0,5.41,1.42,10.82,4.25,15.67l102.92,176.64c5.67,9.71,16.11,15.67,27.41,15.67h205.84c11.3,0,21.75-5.96,27.41-15.67l102.92-176.64c2.83-4.85,4.25-10.26,4.25-15.67,0-5.41-1.42-10.82-4.25-15.68l-102.92-176.64c-5.67-9.71-16.11-15.67-27.41-15.67h-205.84c-11.3,0-21.75,5.96-27.41,15.67L16.75,234.33c-2.83,4.85-4.25,10.27-4.25,15.68Z",style:{fill:"#fff",stroke:"#fff",strokeMiterlimit:10,strokeWidth:3}}),M("path",{d:"M41.06,250c0-3.97,1.07-7.9,3.07-11.34l93.03-159.66c4.08-7.01,11.68-11.34,19.82-11.34h186.06c8.16,0,15.74,4.33,19.82,11.34l93.03,159.66c2,3.44,3.07,7.37,3.07,11.34s-1.07,7.9-3.07,11.34l-93.03,159.66c-4.08,7.01-11.68,11.34-19.82,11.34h-186.06c-8.16,0-15.74-4.34-19.82-11.34l-93.03-159.66c-2-3.44-3.07-7.37-3.07-11.34Z",style:{fill:"#fff",strokeWidth:0}}),ne("g",{children:[M("path",{d:"M347.45,204.4c-2.14-9.18-8.83-8.76-16.53-7.36-20.65,3.73-41.32,7.7-62.16,9.94-4.02.43-10.73,1.04-19.22,1.09,0,.02,0,.04,0,.06-6.08-.08-12.18-.41-18.31-1.07-20.84-2.25-41.51-6.21-62.16-9.94-7.7-1.39-14.39-1.81-16.53,7.36-2,8.6,4.3,11.78,10.98,13.76,7.09,2.11,14.26,4.15,21.54,5.35,17.54,2.88,35.17,5.25,52.85,7.83-4.75,38.47-13.41,74.69-39.48,104.67-2.52,2.9-1.87,11.59.69,15.16,4.35,6.07,10.07,2.47,14.89-1.86,18.01-16.16,28.26-36.83,35.98-62.51,0-.06,0-.12,0-.19,0,.04,0,.07,0,.11,7.71,25.67,17.97,46.35,35.98,62.51,4.82,4.33,10.54,7.93,14.89,1.86,2.57-3.57,3.21-12.27.69-15.16-26.07-29.98-34.72-66.2-39.48-104.67,17.68-2.59,35.31-4.95,52.85-7.83,7.28-1.2,14.45-3.24,21.54-5.35,6.68-1.99,12.98-5.16,10.98-13.76Z",style:{fill:"#711bc1",strokeWidth:0}}),M("circle",{cx:"250",cy:"171.61",r:"26.08",style:{fill:"#711bc1",strokeWidth:0}})]})]}),M(P.Typography,{variant:"subtitle1",children:a("sidebar:title")})]}),M(P.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:3,overflow:"auto"},children:M(MT,{config:r||{},onAuthSuccess:Ml,onAuthError:Dl,initialError:k})}),M(P.IconButton,{onClick:t,sx:{position:"absolute",top:16,right:16,color:"white",backgroundColor:"rgba(255, 255, 255, 0.1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"}},"aria-label":a("sidebar:close"),children:M(gt.Close,{})})]})})]})},l2=e=>M(G0,{i18n:at,children:M(db,{store:o2,children:M(Jm,{translationConfig:e.config?.translation,summaryConfig:e.config?.summary,children:M(a2,{...e})})})});exports.AIProvider=Jm;exports.DEFAULT_LOCALE=Ei;exports.DQMSidebar=l2;exports.ErrorBoundary=Vu;exports.SUPPORTED_LOCALES=qm;exports.i18n=at;exports.normalizeLocale=Oa;exports.resolveLanguage=AT;exports.useAI=Ym;exports.useAIEngine=xu;exports.useAISummary=iy;exports.useAITranslation=ry;exports.useOverlayResistant=Gm;exports.useTranslationCache=ey;exports.withErrorBoundary=Sv;
|
|
142
|
+
`,Te.document.head.appendChild(Me)},100)}}else le.warn("No content in response"),alert(a("sidebar:failed_load_all_errors"))}catch(K){le.error("Failed to fetch page with all errors:",K),alert(a("sidebar:failed_load_all_errors"))}finally{we(!1)}},Ri=D.useCallback(async(K,ee=0)=>{le.debug("Polling analysis status, attempt",ee+1,"for assetId:",K);const ue=30,me=2e3,Ee=1e4;try{const Te=Hn(),je=Vn();let Me;if(H==="backend")Me=`${Te}/dqm/assets/${K}/status`,le.debug("Polling backend:",Me);else{const Nt=O?.apiKey||lt("dqm_apiKey");if(!Nt)throw new Error("DQM API key not available for polling");try{lr(Nt)}catch(Wn){throw new Error(`Invalid API key: ${Wn instanceof Error?Wn.message:"encoding error"}`)}const Lr=encodeURIComponent(Nt);Me=`${Te}/assets/${K}/status?apiKey=${Lr}`,le.debug("Polling direct:",Me)}const Ne=(await et.get(Me,{headers:je,timeout:1e4})).data,en=Ne.checkpoints&&Array.isArray(Ne.checkpoints);if(en&&Ne.totalCheckpoints!==void 0&&Ne.checkpoints.length===Ne.totalCheckpoints){S.current&&(clearInterval(S.current),S.current=null),w(null);const Nt={assetId:Ne.assetId||Ne.id,created:Ne.created,siteName:Ne.siteName,totalCheckpoints:Ne.totalCheckpoints,totalErrors:Ne.totalErrors,checkpoints:Ne.checkpoints||[]};g(Nt),b(Nt),Vt(),R(Object.entries(Ii(Ne.checkpoints||[]))),f("completed"),nt(null),le.debug("Analysis completed:",Ne.checkpoints.length,"/",Ne.totalCheckpoints,"checkpoints")}else if(Ne.status==="failed"||Ne.status==="error")S.current&&(clearInterval(S.current),S.current=null),w(null),E(Ne.error||Ne.message||"Analysis failed with unknown error"),R([]),f("error"),nt(null),le.debug("Analysis failed:",Ne.error||Ne.message);else{const Nt=en?Ne.checkpoints.length:0,Lr=Ne.totalCheckpoints||"?";le.debug("Analysis in progress:",Nt,"/",Lr,"checkpoints"),m&&E(null)}}catch(Te){if(le.error("Polling failed:",Te),et.isAxiosError(Te)&&Te.response?.status===401){ki(Te);return}if(ee<ue){const je=Math.min(me*Math.pow(1.5,ee),Ee);setTimeout(()=>Ri(K,ee+1),je)}else S.current&&(clearInterval(S.current),S.current=null),w(null),E("Analysis polling failed after maximum attempts"),R([]),f("error"),nt(null)}},[Hn,Vn,H,O,m,ki,nt]),Oi=D.useCallback(K=>{S.current&&(clearInterval(S.current),S.current=null),w(null),le.debug("Starting polling for assetId:",K),Ri(K);const ee=setInterval(()=>{x.current?Ri(K):(clearInterval(ee),S.current===ee&&(S.current=null),w(null))},3e3);S.current=ee,w(ee)},[Ri]),wo=D.useCallback(()=>{S.current&&(clearInterval(S.current),S.current=null),w(null),nt(null)},[nt]),Dr=D.useCallback(async()=>{f("analyzing"),E(null),T(null),b(null),g(null);try{if(H==="backend"){const dt=z||lt("dqm_sessionToken");if(!dt){f("idle"),le.warn("Cannot start analysis: No session token available");return}le.debug("Starting analysis with backend session token:",dt.substring(0,16)+"...")}else{const dt=O?.apiKey||lt("dqm_apiKey"),Ne=O?.websiteId||lt("dqm_websiteID");if(!dt||!Ne){f("idle"),le.warn("Cannot start analysis: No credentials available");return}try{lr(dt)}catch(en){throw new Error(`Invalid API key: ${en instanceof Error?en.message:"encoding error"}`)}le.debug("Starting analysis with direct API key")}let K;s?(le.warn("DEBUG MODE: Using custom HTML from debugHtml prop"),K=s):K=document.documentElement.outerHTML;const ee=Ll(K),ue=Hn(),me=Vn();let Ee,Te;if(H==="backend")Ee=`${ue}/dqm/assets`,Te={html:ee,url:window.location.href},le.debug("Using backend mode:",Ee);else{const dt=O?.apiKey||lt("dqm_apiKey"),Ne=O?.websiteId||lt("dqm_websiteID"),en=encodeURIComponent(dt);Ee=`${ue}/assets?apiKey=${en}`,Te={websiteId:Ne,content:ee,contentType:"text/html; charset=UTF-8",title:document.title,timestamp:new Date().toISOString()},me["Content-Type"]="application/x-www-form-urlencoded",le.debug("Using direct mode:",Ee)}const je=await et.post(Ee,Te,{headers:me,timeout:3e4}),Me=je.data?.assetId||je.data?.id;if(Me)nt(Me),Oi(Me);else throw new Error("No Asset ID returned from API")}catch(K){if(le.error("Analysis failed:",K),et.isAxiosError(K)&&K.response?.status===401){ki(K),f("error");return}let ee="Unknown error occurred";et.isAxiosError(K)?ee=K.response?.data?.message||K.message||"API request failed":K instanceof Error&&(ee=K.message),E(ee),R([]),f("error"),wo()}},[H,z,O,s,Hn,Vn,ki,Oi,wo]);D.useEffect(()=>{y&&O&&u==="idle"&&(le.debug("Auto-starting analysis with available credentials"),Dr())},[y,O,Dr,u]),D.useCallback(K=>{b(K),Fe(new Set),R(K?Object.entries(Ii(K.checkpoints||[])):[])},[]),D.useEffect(()=>()=>{wo()},[]),D.useEffect(()=>{e===!0&&Dr()},[e]),D.useEffect(()=>{if(!p||!ae)return;const K=p.checkpoints.find(ee=>ee.id===ae)||null;oe(K)},[p,ae]);const Bl=K=>!K.totalCheckpoints||K.totalCheckpoints===0?0:Math.round((K.totalCheckpoints-K.totalErrors)/K.totalCheckpoints*100),Ii=D.useCallback(K=>{const ee=K.reduce((ue,me)=>(ue[me.category]||(ue[me.category]=[]),ue[me.category].push(me),ue),{});return Object.entries(ee).forEach(([ue,me])=>{me.forEach(Ee=>{Ee.colors=_m(ue,Object.keys(ee))})}),ee},[]);D.useEffect(()=>{if(!p){R([]);return}R(Object.entries(Ii(p.checkpoints||[])))},[p,Ii]);const _o=async(K,ee,ue="browser")=>{U(""),q(!0),te(ee),Y(ue),fe(!0),c(e2("")),c(ZA(!0)),c(GA(ue)),c(JA()),ye(Ee=>({...Ee,[ee]:{browser:"",source:""}})),Ai.current=ue;const me=p?.checkpoints.find(Ee=>Ee.id===ee)||null;oe(me),c(KA(me));try{const Ee=Hn(),Te=Vn();let je,Me;if(H==="backend")je=`${Ee}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=false`,Me=`${Ee}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=true`;else{const Nt=O?.apiKey||lt("dqm_apiKey");if(!Nt)throw new Error("DQM API key not found");try{lr(Nt)}catch(Wn){throw new Error(`Invalid API key: ${Wn instanceof Error?Wn.message:"encoding error"}`)}const Lr=encodeURIComponent(Nt);je=`${Ee}/assets/${K}/errors/${ee}?apiKey=${Lr}&highlightSource=false`,Me=`${Ee}/assets/${K}/errors/${ee}?apiKey=${Lr}&highlightSource=true`}const dt=me?.canHighlight.page&&await et.get(je,{headers:Te,timeout:15e3,responseType:"text"})||void 0,Ne=me?.canHighlight.source&&await et.get(Me,{headers:Te,timeout:15e3,responseType:"text"})||void 0,en=dt?.data||"<p>No highlighted content available.</p>",vo=Ne?.data||"<p>No source content available for this checkpoint.</p>";ye(Nt=>({...Nt,[ee]:{browser:en,source:vo}})),le.debug("Both views loaded and cached"),ue==="browser"&&me?.canHighlight?.page&&p?$s(p.assetId,me.id):ue==="source"&&me?.canHighlight?.source&&p&&Ls(p.assetId,me.id)}catch(Ee){le.error("Failed to fetch highlighted content:",Ee),U(`<p style="color: #dc3545;">${a("sidebar:failed_load_highlights")}</p>`)}finally{q(!1)}},Ls=async(K,ee)=>{const ue=$t[ee];if(ue&&ue.source){le.debug("Using cached source view for checkpoint:",ee),U(ue.source);return}le.warn("Source view not in cache for checkpoint:",ee,", fetching..."),q(!0);try{const me=Hn(),Ee=Vn();let Te;if(H==="backend")Te=`${me}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=true`;else{const Me=O?.apiKey||lt("dqm_apiKey");if(!Me)throw new Error("DQM API key not found");try{lr(Me)}catch(Ne){throw new Error(`Invalid API key: ${Ne instanceof Error?Ne.message:"encoding error"}`)}const dt=encodeURIComponent(Me);Te=`${me}/assets/${K}/errors/${ee}?apiKey=${dt}&highlightSource=true`}const je=await et.get(Te,{headers:Ee,timeout:15e3,responseType:"text"});if(je.data){const Me=je.data;U(Me),ye(dt=>({...dt,[ee]:{...dt[ee],source:Me}}))}else le.warn("No highlighted content in response"),U(`<p>${a("sidebar:no_highlighted_content")}</p>`)}catch(me){le.error("Failed to fetch source view:",me),U(`<p style="color: #dc3545;">${a("sidebar:failed_load_source")}</p>`)}finally{q(!1)}},$s=async(K,ee)=>{const ue=$t[ee];if(ue&&ue.browser){le.debug("Using cached browser view for checkpoint:",ee),U(ue.browser);return}le.warn("Browser view not in cache for checkpoint:",ee,", fetching..."),q(!0);try{const me=Hn(),Ee=Vn();let Te;if(H==="backend")Te=`${me}/dqm/assets/${K}/pagehighlight/${ee}?highlightSource=false`;else{const Me=O?.apiKey||lt("dqm_apiKey");if(!Me)throw new Error("DQM API key not found");try{lr(Me)}catch(Ne){throw new Error(`Invalid API key: ${Ne instanceof Error?Ne.message:"encoding error"}`)}const dt=encodeURIComponent(Me);Te=`${me}/assets/${K}/errors/${ee}?apiKey=${dt}&highlightSource=false`}const je=await et.get(Te,{headers:Ee,timeout:15e3,responseType:"text"});if(je.data){const Me=je.data;U(Me),ye(dt=>({...dt,[ee]:{...dt[ee],browser:Me}}))}else le.warn("No highlighted content in response"),U(`<p>${a("sidebar:no_highlighted_content")}</p>`)}catch(me){le.error("Failed to restore browser view:",me),U(`<p style="color: #dc3545;">${a("sidebar:failed_load_browser")}</p>`)}finally{q(!1)}};return ne(P.ThemeProvider,{theme:P.createTheme({palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#f50057"},background:{default:"#fafafa"}},typography:{fontFamily:'Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif',htmlFontSize:18,fontSize:18,h6:{fontSize:"22px"},h5:{fontSize:"24px"},h4:{fontSize:"26px"},h3:{fontSize:"28px"},h2:{fontSize:"30px"},h1:{fontSize:"32px"},subtitle2:{fontSize:"19px"},subtitle1:{fontSize:"18px"},body1:{fontSize:"18px"},body2:{fontSize:"17px"},button:{fontSize:"17px"}},shape:{borderRadius:8},components:{MuiDialog:{styleOverrides:{root:{zIndex:999999}},defaultProps:{disablePortal:r?.shadowDomMode??!1}},MuiPopper:{defaultProps:{disablePortal:r?.shadowDomMode??!1}},MuiTooltip:{defaultProps:{PopperProps:{disablePortal:r?.shadowDomMode??!1}}},MuiModal:{defaultProps:{disablePortal:r?.shadowDomMode??!1}},MuiFab:{styleOverrides:{root:{zIndex:999999}}},MuiBackdrop:{styleOverrides:{root:{zIndex:999998}}}}}),children:[M(P.CssBaseline,{}),M(P.Tooltip,{title:a("sidebar:fab_tooltip"),placement:"left",children:M(Cv,{"data-testid":"dqm-fab",overlayInfo:Ps,onClick:()=>e?t():n(),"aria-label":a("sidebar:fab_tooltip"),style:{opacity:e?0:1,position:"fixed",zIndex:1400,transform:e?"translateX(80px)":"none",transition:"opacity 0.15s ease-in-out, transform 0.25s ease-in-out",pointerEvents:e?"none":"auto"},children:M(mt.TaskAlt,{sx:{fontSize:22}})})}),M(Tv,{overlayInfo:Ps,anchor:"right",open:e,onClose:t,variant:"temporary",elevation:16,ModalProps:{keepMounted:!1,disablePortal:r?.shadowDomMode??!1,disableScrollLock:!1,hideBackdrop:!1},children:y?ne(Ur,{children:[ne(Av,{sx:{justifyContent:"space-between"},children:[M(P.Box,{display:"flex",alignItems:"center",gap:1.5,justifyContent:"flex-start",width:"100%",children:ne(P.Typography,{variant:"h6",component:"h1",fontWeight:700,flexDirection:"row",alignItems:"center",display:"flex",gap:"0.5rem",children:[M("img",{width:24,height:24,style:{marginRight:"0.5rem"},src:"https://app-assets.gadget.dev/a/255812/505265/assets/dqm.svg",alt:"Crownpeak DQM"}),a("sidebar:title")]})}),ne(P.Box,{display:"flex",alignItems:"center",gap:1,children:[M(P.Tooltip,{title:a("sidebar:ai_settings",{defaultValue:"AI Assistant"}),children:M(sc,{index:Zt?1:2,onClick:()=>nr(!0),"aria-label":a("sidebar:ai_settings",{defaultValue:"AI Assistant"}),sx:{color:Pr?bt==="error"?"error.main":"primary.main":"text.secondary"},children:bt==="initializing"||bt==="translating"?M(ui,{size:22,thickness:4,sx:{color:"inherit"}}):M(mt.AutoAwesome,{fontSize:"small"})})}),M(NT,{index:Zt?2:3}),!Zt&&M(P.Tooltip,{title:a("common:logout"),children:M(sc,{index:1,onClick:Dl,"aria-label":a("common:logout"),children:M(mt.Logout,{})})}),M(sc,{"data-testid":"sidebar-close",onClick:t,"aria-label":a("sidebar:close_sidebar"),children:M(mt.Close,{})})]})]}),M(kv,{children:ne(Vu,{children:[u==="idle"&&y&&ne(P.Box,{p:4,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"400px",children:[M(P.Typography,{variant:"h5",fontWeight:600,gutterBottom:!0,color:"text.secondary",textAlign:"center",children:a("sidebar:ready_title")}),M(P.Typography,{variant:"body1",color:"text.secondary",textAlign:"center",sx:{maxWidth:400,mb:3},children:a("sidebar:ready_body")}),M(P.Box,{component:"svg",sx:{width:"120px",height:"120px",opacity:.3},viewBox:"0 0 24 24",children:M("path",{fill:"currentColor",d:"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M11,16.5L18,9.5L16.59,8.09L11,13.67L7.91,10.59L6.5,12L11,16.5Z"})})]}),u==="analyzing"&&M(Iv,{expanded:ke}),u==="error"&&k&&M(P.Box,{children:ne(P.Alert,{severity:k.includes("Permission denied")?"warning":"error",children:[M(P.Typography,{variant:"subtitle1",fontWeight:700,gutterBottom:!0,children:k.includes("Permission denied")?a("sidebar:access_denied"):k.includes("not configured")?a("sidebar:config_required"):a("sidebar:auth_error")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:k})]})}),u==="error"&&!k&&M(P.Box,{children:ne(P.Alert,{severity:"error",action:M(P.Button,{color:"inherit",size:"small",onClick:Dr,startIcon:M(mt.Refresh,{}),sx:{textTransform:"none",fontWeight:"bolder",fontSize:"1rem"},children:a("sidebar:retry")}),children:[M(P.Typography,{variant:"subtitle1",fontWeight:700,gutterBottom:!0,children:a("sidebar:analysis_failed")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:m})]})}),u==="completed"&&p&&ne(P.Box,{children:[ne(Pg,{children:[M(P.Typography,{variant:"h6",fontWeight:700,gutterBottom:!0,sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1},children:a("sidebar:overall_quality")}),ne(P.Box,{display:"flex",alignItems:"center",justifyContent:"flex-start ",columnGap:"60px",pt:2,children:[ne(P.Box,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:5,children:[M(_x,{value:Bl(p)}),ne(P.Box,{children:[M(P.Box,{display:"flex",alignItems:"center",justifyContent:"center",gap:1,mb:1,flexDirection:"column",children:ne(P.Typography,{color:"text.primary",fontSize:"12px",fontWeight:400,sx:{color:"gray",textAlign:"center"},children:[a("sidebar:passed"),M("p",{style:{margin:0,fontWeight:600,fontSize:"26px",color:"#28a745"},children:p.totalCheckpoints-p.totalErrors})]})}),M("hr",{style:{width:"100%",border:"1px solid #e0e0e0",margin:"10px 0px 10px 0px"}}),M(P.Box,{display:"flex",alignItems:"center",justifyContent:"center",gap:1,children:ne(P.Typography,{fontSize:"12px",fontWeight:400,sx:{color:"gray",textAlign:"center"},children:[M("p",{style:{margin:0,fontWeight:600,fontSize:"26px",color:"#dc3545"},children:p.totalErrors}),a("sidebar:failed")]})})]})]}),M(P.Box,{display:"flex",justifyContent:"center",mt:3,children:ne(P.Button,{variant:"outlined",size:"large",onClick:$l,disabled:B,sx:{borderRadius:2,py:1,mb:3,fontSize:"17px",textTransform:"none"},children:[B?M(ui,{size:24,sx:{mr:1}}):null,a("sidebar:show_all_errors")]})})]})]}),ne(Ov,{children:[ne(P.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,flexWrap:"wrap",children:[ne(P.Typography,{variant:"h6",fontWeight:700,sx:{display:"flex",alignItems:"center",gap:1},children:[M(mt.AutoAwesome,{fontSize:"small"}),a("sidebar:summary_title"),M(P.Tooltip,{title:a("sidebar:summary_model_tooltip",{defaultValue:"Modell: {{model}}",model:Mr}),children:M(P.Chip,{size:"small",label:"ChatGPT",sx:{ml:1,fontWeight:600}})})]}),ne(P.Box,{display:"flex",gap:1,alignItems:"center",children:[M(P.Button,{variant:"outlined",size:"small",onClick:()=>nr(!0),sx:{textTransform:"none"},children:a("sidebar:ai_settings")}),M(P.Button,{variant:"outlined",size:"small",startIcon:M(mt.Replay,{}),onClick:Xr,disabled:!Xt||yt==="generating",sx:{textTransform:"none"},children:a("sidebar:summary_regenerate")})]})]}),M(P.Typography,{variant:"caption",color:"text.secondary",children:a("sidebar:summary_disclaimer")}),Xt?yt==="generating"?ne(P.Box,{sx:{mt:2},children:[M(P.Typography,{variant:"body2",color:"text.secondary",sx:{mb:1},children:a("sidebar:summary_generating")}),M(P.LinearProgress,{}),ne(P.Box,{sx:{mt:2},children:[M(P.Skeleton,{height:24}),M(P.Skeleton,{height:24}),M(P.Skeleton,{height:24})]})]}):yt==="error"?ne(P.Alert,{severity:"warning",sx:{mt:2},children:[M(P.Typography,{variant:"subtitle2",fontWeight:700,gutterBottom:!0,children:a("sidebar:summary_failed")}),M(P.Typography,{variant:"body2",color:"text.secondary",children:Ti})]}):Nr&&Nr.length>0?M(P.Box,{component:"ul",sx:{mt:2,mb:0,pl:3},children:Nr.map((K,ee)=>M(P.Typography,{component:"li",variant:"body2",sx:{mb:.75},children:K},ee))}):M(P.Typography,{variant:"body2",color:"text.secondary",sx:{mt:1},children:a("sidebar:summary_empty")}):M(P.Typography,{variant:"body2",color:"text.secondary",sx:{mt:1},children:a("sidebar:summary_disabled")}),zn&&M(P.Typography,{variant:"caption",color:"text.secondary",sx:{mt:1,display:"block"},children:a("sidebar:summary_stats",{attempts:zn.attempts,empty:zn.emptyResponses,mode:zn.fallbackUsed,duration:zn.durationMs})})]}),ne(P.Accordion,{expanded:ke,onChange:()=>{De(!ke),localStorage.setItem("dqm_quality_breakdown_expanded",(!ke).toString())},sx:{borderRadius:"10px !important",marginBottom:2,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.08)","&:before":{display:"none"},overflowX:"visible"},children:[ne(P.AccordionSummary,{expandIcon:M(mt.ExpandMore,{}),sx:{paddingX:3,"& .MuiAccordionSummary-content":{alignItems:"center",overflow:"scroll",justifyContent:"flex-start",paddingY:2,marginRight:3}},children:[M(P.Typography,{variant:"h6",fontWeight:700,sx:{flexShrink:0},children:a("sidebar:quality_breakdown")}),M(P.Box,{display:"flex",justifyContent:"center",gap:1,mx:2,px:2.5,sx:{".MuiAccordionSummary-root:not(.Mui-expanded) &":{opacity:1,width:C.length*48,transition:"opacity 0.3s ease 300ms, width 0s ease 0s"},".MuiAccordionSummary-root.Mui-expanded &":{opacity:0,width:0,pointerEvents:"none",transition:"opacity 300ms ease 50ms, width 1250ms ease 200ms"}},children:ea(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).reverse().map(([K,ee])=>{const ue=ee.filter(je=>je.failed).length,me=ee.length-ue,Ee=ee[0]?.colors.bg,Te=Math.round(me/ee.length*100);return M(P.Tooltip,{title:ne(P.Box,{sx:{p:.5},display:"flex",flexDirection:"column",alignItems:"center",children:[M(P.Typography,{variant:"body2",fontWeight:600,sx:{mb:.5},children:K}),M(P.Typography,{variant:"caption",display:"block",children:a("sidebar:percent_passed",{percent:Te})}),M(P.Typography,{variant:"caption",display:"block",children:ue===0?a("sidebar:all_passed"):a("sidebar:x_of_y_passed",{passed:me,total:ee.length})})]}),placement:"top",arrow:!0,children:M(ui,{variant:"determinate",enableTrackSlot:!0,value:Te,size:40,thickness:4,sx:{color:Ee,top:0,left:0}})},K)})})]}),M(P.AccordionDetails,{sx:{padding:3,paddingTop:0},children:M(Ng,{children:M(P.Box,{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1,children:ea(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).reverse().map(([K,ee])=>{const ue=ee.filter(Te=>Te.failed).length,me=ee.length-ue,Ee=ee[0]?.colors.bg;return ne(P.Box,{display:"flex",alignItems:"center",flexDirection:"column",gap:1,width:"200px",children:[ne(P.Box,{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",children:[M(ui,{enableTrackSlot:!0,variant:"determinate",value:me/ee.length*100,size:"100px",thickness:4,sx:{color:Ee,"& .MuiCircularProgress-circleNegative":{stroke:"#e0e0e0"}}}),ne(P.Typography,{variant:"h6",component:"div",color:Ee,sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",fontWeight:700},children:[Math.round(me/ee.length*100),"%"]})]}),ne(P.Typography,{component:"div",fontWeight:"bold",color:"gray",sx:{fontSize:"1rem",textAlign:"center",fontWeight:600},children:[K,M(P.Typography,{component:"div",fontWeight:"bold",color:"gray",pb:4,sx:{fontSize:"0.75rem",textAlign:"center",fontWeight:600},children:M(P.Typography,{component:"span",fontWeight:400,color:ue>0?"#dc3545":"#28a745",children:ue===0?a("sidebar:all_passed"):a("sidebar:x_of_y_passed",{passed:me,total:ee.length})})})]})]},K)})})})})]}),p.checkpoints.some(K=>K.failed)&&ne(Ur,{children:[ne(P.Typography,{variant:"h4",fontWeight:600,gutterBottom:!0,sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:4},children:[a("sidebar:failed_checkpoints"),"(",p.checkpoints.filter(K=>K.failed).length,")"]}),M(P.Typography,{variant:"caption",color:"text.secondary",sx:{px:2,display:"block",mb:1},children:a("sidebar:translation_disclaimer",{defaultValue:"KI-Übersetzungen können ungenau sein. Fachbegriffe und Inhalte bitte prüfen."})}),M(P.Box,{sx:{position:"sticky",top:-32,zIndex:10,py:2,borderRadius:0},children:ne(P.Card,{sx:{padding:2,pb:1,px:"20px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.1)"},children:[ne(P.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",mb:1,children:[ne(P.Typography,{variant:"body2",color:"text.secondary",fontWeight:600,children:[a("sidebar:filter_by_category")," · ",Se.size>0?a("sidebar:showing_categories",{count:Se.size,total:Object.keys(C).length}):a("sidebar:showing_all_categories",{total:Object.keys(C).length})]}),M(P.Button,{size:"small",onClick:()=>Fe(new Set),sx:{textTransform:"none",fontWeight:600,opacity:Se.size===0?0:1,transition:"opacity 0.2s ease-in-out"},children:a("sidebar:show_all")})]}),M(P.Box,{display:"flex",gap:1,flexWrap:"nowrap",sx:{overflowX:"scroll",pb:2.5,pt:1},children:ea(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).filter(([,K])=>K.some(ee=>ee.failed)).reverse().map(([K,ee])=>{const ue=ee.filter(je=>je.failed).length,{bg:me,text:Ee}=ee[0]?.colors||{},Te=Se.has(K);return M(P.Chip,{label:`${K} (${ue})`,onClick:()=>{Fe(je=>{const Me=new Set(je);return Me.has(K)?Me.delete(K):Me.add(K),Me})},sx:{backgroundColor:Te?me:"transparent",color:Te?Ee:Se.size===0?me:"#555555",border:`2px solid ${Te||Se.size===0?me:"#B1B1B1"}`,fontWeight:600,fontSize:"0.875rem",cursor:"pointer",transition:"all 0.2s ease","&:hover":{backgroundColor:me,color:Ee,transform:"translateY(-2px)",boxShadow:`0 4px 8px ${me}40`,border:`2px solid ${me}`}}},K)})})]})}),M(P.Box,{sx:{minHeight:"calc(100vh - 320px)"},children:M(Mg,{children:M(P.List,{sx:{p:0},children:ea(C,[([K,ee])=>ee.filter(ue=>ue.failed).length/ee.length]).reverse().filter(([K,ee])=>Se.size===0?ee.some(ue=>ue.failed):Se.has(K)&&ee.some(ue=>ue.failed)).map(([K,ee])=>M(Ur,{children:ee.filter(({failed:ue})=>ue).map(ue=>{const{bg:me}=ue.colors;return M(P.ListItem,{sx:{px:0,py:1.5,alignItems:"flex-start"},children:ne(P.Box,{mt:.5,children:[M(P.Box,{display:"flex",alignItems:"center",gap:1,children:M(P.Typography,{variant:"h5",component:"div",fontWeight:600,mb:1.5,sx:{display:"flex",alignItems:"center",gap:1},children:ue.name})}),ne(P.Box,{display:"flex",gap:1,flexWrap:"wrap",mb:2,children:[ue?.canHighlight.page&&M(P.Button,{variant:"outlined",size:"small",startIcon:M(mt.Visibility,{}),onClick:()=>{te(ue.id),_o(p.assetId,ue.id,"browser")},sx:{textTransform:"none",borderRadius:2,fontSize:"0.875rem"},children:a("sidebar:view_in_browser")}),ue?.canHighlight.source&&M(P.Button,{variant:"outlined",size:"small",startIcon:M(mt.Visibility,{}),onClick:()=>{te(ue.id),_o(p.assetId,ue.id,"source")},sx:{textTransform:"none",borderRadius:2,fontSize:"0.875rem"},children:a("sidebar:view_source")}),M(P.Typography,{variant:"body2",color:me,mr:2,ml:ue?.canHighlight.source||ue?.canHighlight.page?1:0,sx:{fontSize:"0.875rem",alignSelf:"center"},children:ue.category}),ue.topics?.map(Ee=>M(P.Typography,{variant:"body2",color:"text.secondary",mr:2,sx:{fontSize:"0.875rem",alignSelf:"center"},children:Ee},Ee))]}),M(sp,{html:ue.description||""})]})},ue.id)})}))})})})]})]})]})}),M(Rv,{children:M(P.Button,{onClick:Dr,variant:"contained",size:"large",fullWidth:!0,disabled:u==="analyzing"||!y||!!k,sx:{borderRadius:2,py:1,fontWeight:600,textTransform:"none",background:"linear-gradient(156deg, #b604d4 0%, #e38ef2 100%)","&:hover":{background:"linear-gradient(156deg, #9800b1 0%, #d091db 100%)"},fontSize:"17px",transition:"background 0.3s ease","&:disabled":{background:"#e0e0e0",color:"#9e9e9e"}},children:u==="analyzing"?a("sidebar:analyzing",{defaultValue:"Analyzing..."}):a("sidebar:run_quality_check")})}),M(JT,{open:xi,onClose:()=>nr(!1),translationEnabled:Bt,setTranslationEnabled:Ht,translationMode:Ct,setTranslationMode:un,translationTargetLang:ut,translationNeeded:kt,summaryEnabled:Xt,setSummaryEnabled:Or,restartSummary:Xr,openAiApiKey:Sn,setOpenAiApiKey:Ir,openAiModel:rr,setOpenAiModel:Fn,openAiBaseUrl:Qr,setOpenAiBaseUrl:Ci,aiModelIdEffective:Mr,translationState:bt,translationError:Un,translationProgress:ie,clearTranslationCache:bo,restartTranslation:ge,hasAnalysisData:!!h,openAiSettingsExpanded:qe,setOpenAiSettingsExpanded:Rt}),ne(P.Dialog,{open:W,onClose:Zr,maxWidth:"xl",fullWidth:!0,PaperProps:{style:{borderRadius:12,padding:24,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.2)"}},children:[ne(P.DialogTitle,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 24px",borderBottom:"1px solid #e0e0e0"},children:[M(P.Typography,{variant:"h6",fontWeight:700,color:"text.primary",children:a("sidebar:highlighted_errors")}),M(P.IconButton,{onClick:Zr,sx:{color:"text.secondary","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:close"),children:M(mt.Close,{})})]}),M(P.DialogContent,{dividers:!0,sx:{padding:"16px 24px",borderBottom:"none"},children:ne(P.Box,{flexDirection:"row",display:"flex",gap:2,children:[J&&ne(P.Box,{width:"20%",sx:{maxHeight:"calc(100vh - 300px)",height:"calc(100vh - 300px)",overflowY:"auto"},children:[M(P.Typography,{variant:"h6",component:"div",fontWeight:600,mb:2,children:J.name}),ne(P.Box,{display:"flex",gap:1,mb:2,flexWrap:"wrap",children:[J.colors&&M(P.Chip,{label:J.category,size:"medium",sx:{backgroundColor:J.colors.bg,color:J.colors.text,fontWeight:600,fontSize:"1rem"}}),J.topics?.map(K=>M(P.Chip,{label:K,size:"medium",variant:"outlined",sx:{fontSize:"1rem"}},K))]}),M(P.Box,{sx:{fontSize:"0.95rem",lineHeight:1.6},children:M(sp,{html:J.description||""})})]}),ce||!F?ne(P.Box,{sx:{backgroundColor:"#fff",border:"1px solid #e0e0e0",borderRadius:2,padding:2,pt:0,marginTop:0,width:"80%"},children:[ne(P.Box,{sx:{position:"sticky",top:0,zIndex:10,backgroundColor:"#fff",borderBottom:1,borderColor:"divider",mb:2,py:1,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ne(P.Box,{display:"flex",gap:2,alignItems:"center",children:[M(P.Skeleton,{variant:"rectangular",width:130,height:40,sx:{borderRadius:1}}),M(P.Skeleton,{variant:"rectangular",width:120,height:40,sx:{borderRadius:1}})]}),ne(P.Box,{display:"flex",gap:1,alignItems:"center",mr:2,children:[M(P.Skeleton,{variant:"rectangular",width:60,height:24,sx:{borderRadius:1}}),M(P.Skeleton,{variant:"circular",width:32,height:32}),M(P.Skeleton,{variant:"circular",width:32,height:32}),M(P.Skeleton,{variant:"circular",width:32,height:32}),M(P.Skeleton,{variant:"circular",width:32,height:32})]})]}),M(P.Box,{sx:{minHeight:400},children:M(P.Box,{display:"flex",alignItems:"center",justifyContent:"center",height:400,children:ne(P.Box,{textAlign:"center",children:[M(ui,{size:48,sx:{color:"#c653ff",mb:2}}),M(P.Typography,{variant:"body2",color:"text.secondary",children:a("sidebar:loading_views")})]})})})]}):ne(P.Box,{ref:$n,sx:{backgroundColor:"#fff",border:"1px solid #e0e0e0",borderRadius:2,padding:2,pt:0,marginTop:0,height:"calc(100vh - 300px)",maxHeight:"calc(100vh - 300px)",overflow:"auto",width:J?"80%":"100%"},children:[ne(P.Box,{sx:{position:"sticky",top:0,zIndex:10,backgroundColor:"#fff",borderBottom:1,borderColor:"divider",mb:2,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[ne(P.Tabs,{value:re,onChange:(K,ee)=>{Y(ee),ee==="browser"&&J?.canHighlight?.page&&p?$s(p.assetId,J.id):ee==="source"&&J?.canHighlight?.source&&p&&Ls(p.assetId,J.id)},sx:{"& .MuiTab-root":{textTransform:"none",fontWeight:600,fontSize:"0.95rem"}},children:[M(P.Tab,{label:a("sidebar:browser_view"),value:"browser",sx:{display:J?.canHighlight.page?"inline-flex":"none"}}),M(P.Tab,{label:a("sidebar:source_view"),value:"source",sx:{display:J?.canHighlight.source?"inline-flex":"none"}})]}),ne(P.Box,{sx:{display:"flex",alignItems:"center",gap:1,mr:2},children:[ve>0&&ne(Ur,{children:[M(P.Typography,{variant:"body2",sx:{color:"text.secondary",fontWeight:600,fontSize:"0.875rem",minWidth:"60px",textAlign:"center"},children:a("sidebar:x_of_y",{current:ht||pt||1,total:ve})}),M(P.IconButton,{size:"small",onClick:()=>Ds("prev"),disabled:ve===0,sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:prev_highlight"),children:M(mt.ArrowBack,{fontSize:"small"})}),M(P.IconButton,{size:"small",onClick:()=>Ds("next"),disabled:ve===0,sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:next_highlight"),children:M(mt.ArrowForward,{fontSize:"small"})})]}),M(P.IconButton,{size:"small",onClick:()=>_o(p.assetId,ae,re),sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:reload_highlights"),children:M(mt.Replay,{fontSize:"small"})}),M(P.Tooltip,{title:a("sidebar:open_in_new_tab"),placement:"top",children:M(P.IconButton,{size:"small",onClick:()=>{const K=window.open("","_blank");if(K){try{K.opener=null}catch{}const ee=ou(F,{allowScripts:!1});K.document.open(),K.document.write(ee),K.document.close(),setTimeout(()=>{const ue=[".astHighlightFull",".astHighlightStart",".astHighlightMiddle",".astHighlightEnd",".astError"],me=K.document.querySelectorAll(ue.join(", "));if(le.debug("Found highlights in new tab:",me.length),me.length>0){const Ee=me[0];le.debug("Scrolling to first highlight in new tab"),Ee.scrollIntoView({behavior:"smooth",block:"center"}),Ee.classList.add("animate"),setTimeout(()=>{Ee.classList.remove("animate")},800)}else le.warn("No highlights found in new tab")},500)}},sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a("sidebar:open_in_new_tab"),children:M(mt.OpenInNew,{fontSize:"small"})})}),re==="browser"&&M(P.Tooltip,{title:a(Ln?"sidebar:enable_js":"sidebar:disable_js"),placement:"top",children:M(P.IconButton,{size:"small",onClick:()=>Ei(!Ln),sx:{color:Ln?"text.secondary":"primary.main","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"}},"aria-label":a(Ln?"sidebar:enable_js":"sidebar:disable_js"),children:ne("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("path",{d:"M16 18L22 12L16 6"}),M("path",{d:"M8 6L2 12L8 18"})]})})})]})]}),M(P.Box,{sx:{minHeight:400},children:re==="browser"?M(Pv,{html:F,currentHighlight:pt,clickedIndicator:be,onHighlightsFound:Ge,onVisibleHighlightChange:At,scriptsDisabled:Ln}):M(Nv,{html:F,onHighlightsFound:Ge,currentHighlight:pt,shouldAutoScrollToFirst:!qn.current,clickedIndicator:be,onVisibleHighlightChange:At,scrollContainerRef:$n})})]})]})})]})]}):ne(P.Box,{sx:{width:"730px",height:"100vh",display:"flex",flexDirection:"column",backgroundColor:"#f5f5f5",overflow:"auto"},children:[ne(P.Box,{sx:{background:"linear-gradient(135deg, #711bc1 0%, #8e44d6 100%)",color:"white",py:4,px:3,textAlign:"center",boxShadow:"0 4px 20px rgba(0,0,0,0.1)"},children:[ne("svg",{style:{width:"24px",height:"24px",marginBottom:"1rem"},"aria-label":a("sidebar:title"),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500",children:[M("path",{d:"M18.84,250c0-4.39,1.18-8.74,3.39-12.55L125.16,60.82c4.51-7.75,12.92-12.54,21.92-12.54h205.84c9.03,0,17.41,4.79,21.92,12.54l102.92,176.63c2.21,3.8,3.39,8.16,3.39,12.55,0,4.39-1.18,8.74-3.39,12.54l-102.92,176.64c-4.51,7.75-12.92,12.55-21.92,12.55h-205.84c-9.03,0-17.41-4.8-21.92-12.55L22.24,262.55c-2.21-3.8-3.39-8.16-3.39-12.54ZM12.5,250c0,5.41,1.42,10.82,4.25,15.67l102.92,176.64c5.67,9.71,16.11,15.67,27.41,15.67h205.84c11.3,0,21.75-5.96,27.41-15.67l102.92-176.64c2.83-4.85,4.25-10.26,4.25-15.67,0-5.41-1.42-10.82-4.25-15.68l-102.92-176.64c-5.67-9.71-16.11-15.67-27.41-15.67h-205.84c-11.3,0-21.75,5.96-27.41,15.67L16.75,234.33c-2.83,4.85-4.25,10.27-4.25,15.68Z",style:{fill:"#fff",stroke:"#fff",strokeMiterlimit:10,strokeWidth:3}}),M("path",{d:"M41.06,250c0-3.97,1.07-7.9,3.07-11.34l93.03-159.66c4.08-7.01,11.68-11.34,19.82-11.34h186.06c8.16,0,15.74,4.33,19.82,11.34l93.03,159.66c2,3.44,3.07,7.37,3.07,11.34s-1.07,7.9-3.07,11.34l-93.03,159.66c-4.08,7.01-11.68,11.34-19.82,11.34h-186.06c-8.16,0-15.74-4.34-19.82-11.34l-93.03-159.66c-2-3.44-3.07-7.37-3.07-11.34Z",style:{fill:"#fff",strokeWidth:0}}),ne("g",{children:[M("path",{d:"M347.45,204.4c-2.14-9.18-8.83-8.76-16.53-7.36-20.65,3.73-41.32,7.7-62.16,9.94-4.02.43-10.73,1.04-19.22,1.09,0,.02,0,.04,0,.06-6.08-.08-12.18-.41-18.31-1.07-20.84-2.25-41.51-6.21-62.16-9.94-7.7-1.39-14.39-1.81-16.53,7.36-2,8.6,4.3,11.78,10.98,13.76,7.09,2.11,14.26,4.15,21.54,5.35,17.54,2.88,35.17,5.25,52.85,7.83-4.75,38.47-13.41,74.69-39.48,104.67-2.52,2.9-1.87,11.59.69,15.16,4.35,6.07,10.07,2.47,14.89-1.86,18.01-16.16,28.26-36.83,35.98-62.51,0-.06,0-.12,0-.19,0,.04,0,.07,0,.11,7.71,25.67,17.97,46.35,35.98,62.51,4.82,4.33,10.54,7.93,14.89,1.86,2.57-3.57,3.21-12.27.69-15.16-26.07-29.98-34.72-66.2-39.48-104.67,17.68-2.59,35.31-4.95,52.85-7.83,7.28-1.2,14.45-3.24,21.54-5.35,6.68-1.99,12.98-5.16,10.98-13.76Z",style:{fill:"#711bc1",strokeWidth:0}}),M("circle",{cx:"250",cy:"171.61",r:"26.08",style:{fill:"#711bc1",strokeWidth:0}})]})]}),M(P.Typography,{variant:"subtitle1",children:a("sidebar:title")})]}),M(P.Box,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:3,overflow:"auto"},children:M(MT,{config:r||{},onAuthSuccess:Nl,onAuthError:Ml,initialError:k})}),M(P.IconButton,{onClick:t,sx:{position:"absolute",top:16,right:16,color:"white",backgroundColor:"rgba(255, 255, 255, 0.1)","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"}},"aria-label":a("sidebar:close"),children:M(mt.Close,{})})]})})]})},l2=e=>M(G0,{i18n:ct,children:M(db,{store:o2,children:M(Jm,{translationConfig:e.config?.translation,summaryConfig:e.config?.summary,children:M(a2,{...e})})})});exports.AIProvider=Jm;exports.DEFAULT_LOCALE=vi;exports.DQMSidebar=l2;exports.ErrorBoundary=Vu;exports.SUPPORTED_LOCALES=qm;exports.i18n=ct;exports.normalizeLocale=Ra;exports.resolveLanguage=AT;exports.useAI=Ym;exports.useAIEngine=xu;exports.useAISummary=iy;exports.useAITranslation=ry;exports.useOverlayResistant=Gm;exports.useTranslationCache=ey;exports.withErrorBoundary=Sv;
|
|
143
143
|
//# sourceMappingURL=index.cjs.map
|