@pulzr/perses-figure-panel 0.2.0 → 0.3.0
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/README.md +21 -0
- package/__mf/js/{PulzrFigurePanel.222ed57f17.js → PulzrFigurePanel.b29c14b507.js} +2 -2
- package/__mf/js/async/{0.73358ef06f.js → 0.ee9b9a050d.js} +2 -2
- package/__mf/js/async/{0p.a434b768a9.js → 0p.810fbfea5e.js} +2 -2
- package/__mf/js/async/{2.eb2d03fe10.js → 2.e0e77c51ac.js} +2 -2
- package/__mf/js/async/{6.bf1ee74593.js → 6.1033156971.js} +1 -1
- package/__mf/js/async/{9.dc16e89090.js → 9.f20ad249a8.js} +1 -1
- package/__mf/js/async/__federation_expose_PulzrFigurePanel.9472172973.js +1 -0
- package/__mf/js/async/{f.6ef0146b6f.js → f.9b147c6255.js} +2 -2
- package/__mf/js/async/k.39678d65e5.js +1 -0
- package/__mf/js/async/kk.62383e2b13.js +1 -0
- package/__mf/js/async/kx.899711f01e.js +83 -0
- package/__mf/js/async/kx.899711f01e.js.LICENSE.txt +55 -0
- package/__mf/js/async/mt.918f7f9b24.js +92 -0
- package/__mf/js/async/{b.09e9dadd98.js.LICENSE.txt → mt.918f7f9b24.js.LICENSE.txt} +0 -25
- package/__mf/js/async/{o.d3ab28c6c2.js → o.ec154e6ff6.js} +1 -1
- package/__mf/js/async/{os.61448719cf.js → os.e5e40daae1.js} +2 -2
- package/__mf/js/async/{p.f145ba64f8.js → p.4a73008e86.js} +2 -2
- package/__mf/js/async/{s.c517b47b4d.js → s.658d6a4164.js} +1 -1
- package/__mf/js/{main.fb996ef195.js → main.386bdfecce.js} +2 -2
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.d.ts +4 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.js +499 -101
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelComponent.js.map +1 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.js +128 -51
- package/lib/panels/pulzr-figure-panel/PulzrFigurePanelSettingsEditor.js.map +1 -1
- package/lib/panels/pulzr-figure-panel/figure.d.ts +25 -6
- package/lib/panels/pulzr-figure-panel/figure.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/figure.js +43 -11
- package/lib/panels/pulzr-figure-panel/figure.js.map +1 -1
- package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.d.ts +22 -2
- package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.d.ts.map +1 -1
- package/lib/panels/pulzr-figure-panel/pulzr-figure-panel-types.js.map +1 -1
- package/mf-manifest.json +19 -19
- package/mf-stats.json +19 -19
- package/package.json +1 -1
- package/__mf/js/async/5.b8898f130f.js +0 -83
- package/__mf/js/async/5.b8898f130f.js.LICENSE.txt +0 -30
- package/__mf/js/async/__federation_expose_PulzrFigurePanel.1c3d39adbe.js +0 -1
- package/__mf/js/async/b.09e9dadd98.js +0 -92
- package/__mf/js/async/k.d692a3f373.js +0 -1
- package/__mf/js/async/kk.50088d6550.js +0 -1
- /package/__mf/css/async/{b.7481ca0159.css → mt.7481ca0159.css} +0 -0
- /package/__mf/js/async/{0.73358ef06f.js.LICENSE.txt → 0.ee9b9a050d.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{0p.a434b768a9.js.LICENSE.txt → 0p.810fbfea5e.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{2.eb2d03fe10.js.LICENSE.txt → 2.e0e77c51ac.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{f.6ef0146b6f.js.LICENSE.txt → f.9b147c6255.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{os.61448719cf.js.LICENSE.txt → os.e5e40daae1.js.LICENSE.txt} +0 -0
- /package/__mf/js/async/{p.f145ba64f8.js.LICENSE.txt → p.4a73008e86.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*! LICENSE: mt.918f7f9b24.js.LICENSE.txt */
|
|
2
|
+
(self.chunk_PulzrFigurePanel_0_3_0=self.chunk_PulzrFigurePanel_0_3_0||[]).push([["mt"],{x2(e,t,n){"use strict";n.r(t),n.d(t,{capitalize:()=>i.A,createChainedFunction:()=>o,createSvgIcon:()=>s.A,debounce:()=>a.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,mergeSlotProps:()=>w.A,ownerDocument:()=>h.A,ownerWindow:()=>d.A,requirePropFactory:()=>p,setRef:()=>f,unstable_ClassNameGenerator:()=>S,unstable_memoTheme:()=>u.A,unstable_useEnhancedEffect:()=>m.A,unstable_useId:()=>g.A,unsupportedProp:()=>v,useControlled:()=>y.A,useEventCallback:()=>b.A,useForkRef:()=>x.A});var r=n("th"),i=n("CQ"),o=n("PT").A,s=n("Va"),a=n("cH"),l=function(e,t){return()=>null},c=n("tu"),u=n("Yb"),h=n("zI"),d=n("Rd"),p=function(e,t){return()=>null},f=n("DA").A,m=n("i"),g=n("Wc"),v=function(e,t,n,r,i){return null},y=n("o0"),b=n("LF"),x=n("Dd"),w=n("TB");let S={configure:e=>{r.A.configure(e)}}},Wc(e,t,n){"use strict";t.A=n("uF").A},Az(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindAll=void 0;var i=n("sB");function o(e){if(void 0!==e)return"boolean"==typeof e?{capture:e}:e}t.bindAll=function(e,t,n){var s=t.map(function(t){var s=null==n?t:r(r({},t),{options:r(r({},o(n)),o(t.options))});return(0,i.bind)(e,s)});return function(){s.forEach(function(e){return e()})}}},sB(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bind=void 0,t.bind=function(e,t){var n=t.type,r=t.listener,i=t.options;return e.addEventListener(n,r,i),function(){e.removeEventListener(n,r,i)}}},sK(e,t,n){"use strict";t.vJ=t.oI=void 0;var r=n("sB");Object.defineProperty(t,"oI",{enumerable:!0,get:function(){return r.bind}});var i=n("Az");Object.defineProperty(t,"vJ",{enumerable:!0,get:function(){return i.bindAll}})},Kp(e,t,n){e.exports=n("qV")(n("G6"),"DataView")},EH(e,t,n){var r=n("mc"),i=n("XJ"),o=n("pN"),s=n("qz"),a=n("v2");function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},x3y(e,t,n){var r=n("U4"),i=n("V8"),o=n("gh"),s=n("Zd"),a=n("gy");function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},to(e,t,n){e.exports=n("qV")(n("G6"),"Map")},FXD(e,t,n){var r=n("mv"),i=n("uh"),o=n("yY"),s=n("fo"),a=n("Ul");function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},xW(e,t,n){e.exports=n("qV")(n("G6"),"Promise")},eg(e,t,n){e.exports=n("qV")(n("G6"),"Set")},hZ(e,t,n){var r=n("FXD"),i=n("VG"),o=n("QJ");function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},bF(e,t,n){var r=n("x3y"),i=n("EU"),o=n("hc"),s=n("nO"),a=n("pJ"),l=n("sI");function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},hh(e,t,n){e.exports=n("G6").Symbol},Hg(e,t,n){e.exports=n("G6").Uint8Array},BM(e,t,n){e.exports=n("qV")(n("G6"),"WeakMap")},aaS(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},kk(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},TH(e,t,n){var r=n("ia"),i=n("Sl"),o=n("rJ"),s=n("ZH"),a=n("bJ"),l=n("pn"),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),h=!n&&!u&&s(e),d=!n&&!u&&!h&&l(e),p=n||u||h||d,f=p?r(e.length,String):[],m=f.length;for(var g in e)(t||c.call(e,g))&&!(p&&("length"==g||h&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m)))&&f.push(g);return f}},WR(e){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},Pe(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},xv(e,t,n){var r=n("rc"),i=n("qeg");e.exports=function(e,t,n){(void 0===n||i(e[t],n))&&(void 0!==n||t in e)||r(e,t,n)}},fs7(e,t,n){var r=n("rc"),i=n("qeg"),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},uf(e,t,n){var r=n("qeg");e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return -1}},rc(e,t,n){var r=n("nP0");e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},c0(e,t,n){var r=n("Vu"),i=Object.create;e.exports=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()},UZ(e,t,n){e.exports=n("ga")()},uo(e,t,n){var r=n("WR"),i=n("rJ");e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},lE(e,t,n){var r=n("hh"),i=n("wX"),o=n("DX"),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},DF(e,t,n){var r=n("lE"),i=n("Bu");e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},Z5(e,t,n){var r=n("IZ"),i=n("Bu");e.exports=function e(t,n,o,s,a){return t===n||(null!=t&&null!=n&&(i(t)||i(n))?r(t,n,o,s,e,a):t!=t&&n!=n)}},IZ(e,t,n){var r=n("bF"),i=n("vy"),o=n("Kf"),s=n("JO"),a=n("n5"),l=n("rJ"),c=n("ZH"),u=n("pn"),h="[object Arguments]",d="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=l(e),b=l(t),x=y?d:a(e),w=b?d:a(t);x=x==h?p:x,w=w==h?p:w;var S=x==p,A=w==p,C=x==w;if(C&&c(e)){if(!c(t))return!1;y=!0,S=!1}if(C&&!S)return v||(v=new r),y||u(e)?i(e,t,n,m,g,v):o(e,t,x,n,m,g,v);if(!(1&n)){var k=S&&f.call(e,"__wrapped__"),M=A&&f.call(t,"__wrapped__");if(k||M){var O=k?e.value():e,T=M?t.value():t;return v||(v=new r),g(O,T,n,m,v)}}return!!C&&(v||(v=new r),s(e,t,n,m,g,v))}},Vk(e,t,n){var r=n("M6"),i=n("sK4"),o=n("Vu"),s=n("ZO"),a=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,h=RegExp("^"+c.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:a).test(s(e))}},xX(e,t,n){var r=n("lE"),i=n("yy"),o=n("Bu"),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},l1(e,t,n){var r=n("si"),i=n("wW"),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},lp(e,t,n){var r=n("Vu"),i=n("si"),o=n("Jk"),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)"constructor"==a&&(t||!s.call(e,a))||n.push(a);return n}},Bo(e,t,n){var r=n("bF"),i=n("xv"),o=n("UZ"),s=n("uy"),a=n("Vu"),l=n("Xl"),c=n("rm");e.exports=function e(t,n,u,h,d){t!==n&&o(n,function(o,l){if(d||(d=new r),a(o))s(t,n,l,u,e,h,d);else{var p=h?h(c(t,l),o,l+"",t,n,d):void 0;void 0===p&&(p=o),i(t,l,p)}},l)}},uy(e,t,n){var r=n("xv"),i=n("qeB"),o=n("tF"),s=n("cj"),a=n("lC"),l=n("Sl"),c=n("rJ"),u=n("wXO"),h=n("ZH"),d=n("M6"),p=n("Vu"),f=n("MCy"),m=n("pn"),g=n("rm"),v=n("W0");e.exports=function(e,t,n,y,b,x,w){var S=g(e,n),A=g(t,n),C=w.get(A);if(C)return void r(e,n,C);var k=x?x(S,A,n+"",e,t,w):void 0,M=void 0===k;if(M){var O=c(A),T=!O&&h(A),_=!O&&!T&&m(A);k=A,O||T||_?c(S)?k=S:u(S)?k=s(S):T?(M=!1,k=i(A,!0)):_?(M=!1,k=o(A,!0)):k=[]:f(A)||l(A)?(k=S,l(S)?k=v(S):(!p(S)||d(S))&&(k=a(A))):M=!1}M&&(w.set(A,k),b(k,A,y,x,w),w.delete(A)),r(e,n,k)}},OA(e,t,n){var r=n("Su"),i=n("aP"),o=n("mP");e.exports=function(e,t){return o(i(e,t,r),e+"")}},UP(e,t,n){var r=n("RVI"),i=n("nP0"),o=n("Su");e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o},ia(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},Ia6(e,t,n){var r=n("Zz"),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},aa(e){e.exports=function(e){return function(t){return e(t)}}},xt(e){e.exports=function(e,t){return e.has(t)}},TL(e,t,n){var r=n("Hg");e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},qeB(e,t,n){e=n.nmd(e);var r=n("G6"),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},tF(e,t,n){var r=n("TL");e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},cj(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},zj(e,t,n){var r=n("fs7"),i=n("rc");e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=o?o(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),s?i(n,c,u):r(n,c,u)}return n}},wp(e,t,n){e.exports=n("G6")["__core-js_shared__"]},aB(e,t,n){var r=n("OA"),i=n("Et");e.exports=function(e){return r(function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,s)}return t})}},ga(e){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===n(o[l],l,o))break}return t}}},nP0(e,t,n){var r=n("qV");e.exports=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},vy(e,t,n){var r=n("hZ"),i=n("Pe"),o=n("xt");e.exports=function(e,t,n,s,a,l){var c=1&n,u=e.length,h=t.length;if(u!=h&&!(c&&h>u))return!1;var d=l.get(e),p=l.get(t);if(d&&p)return d==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f<u;){var v=e[f],y=t[f];if(s)var b=c?s(y,v,f,t,e,l):s(v,y,f,e,t,l);if(void 0!==b){if(b)continue;m=!1;break}if(g){if(!i(t,function(e,t){if(!o(g,t)&&(v===e||a(v,e,n,s,l)))return g.push(t)})){m=!1;break}}else if(!(v===y||a(v,y,n,s,l))){m=!1;break}}return l.delete(e),l.delete(t),m}},Kf(e,t,n){var r=n("hh"),i=n("Hg"),o=n("qeg"),s=n("vy"),a=n("qQ"),l=n("eL"),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,h,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!h(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)break;var m=d.get(e);if(m)return m==t;r|=2,d.set(e,t);var g=s(p(e),p(t),r,c,h,d);return d.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},JO(e,t,n){var r=n("XB"),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var h=u;h--;){var d=c[h];if(!(l?d in t:i.call(t,d)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++h<u;){var v=e[d=c[h]],y=t[d];if(o)var b=l?o(y,v,d,t,e,a):o(v,y,d,e,t,a);if(!(void 0===b?v===y||s(v,y,n,o,a):b)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w)&&(m=!1)}return a.delete(e),a.delete(t),m}},Ym(e,t,n){e.exports="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g},XB(e,t,n){var r=n("uo"),i=n("ww"),o=n("ZG");e.exports=function(e){return r(e,o,i)}},BW(e,t,n){var r=n("gL");e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},qV(e,t,n){var r=n("Vk"),i=n("IN");e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},hp(e,t,n){e.exports=n("jae")(Object.getPrototypeOf,Object)},wX(e,t,n){var r=n("hh"),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},ww(e,t,n){var r=n("kk"),i=n("Ux"),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:r(s(e=Object(e)),function(t){return o.call(e,t)})}:i},n5(e,t,n){var r=n("Kp"),i=n("to"),o=n("xW"),s=n("eg"),a=n("BM"),l=n("lE"),c=n("ZO"),u="[object Map]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(r),g=c(i),v=c(o),y=c(s),b=c(a),x=l;(r&&x(new r(new ArrayBuffer(1)))!=f||i&&x(new i)!=u||o&&x(o.resolve())!=h||s&&x(new s)!=d||a&&x(new a)!=p)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return f;case g:return u;case v:return h;case y:return d;case b:return p}return t}),e.exports=x},IN(e){e.exports=function(e,t){return null==e?void 0:e[t]}},mc(e,t,n){var r=n("ei");e.exports=function(){this.__data__=r?r(null):{},this.size=0}},XJ(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},pN(e,t,n){var r=n("ei"),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},qz(e,t,n){var r=n("ei"),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},v2(e,t,n){var r=n("ei");e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},lC(e,t,n){var r=n("c0"),i=n("hp"),o=n("si");e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:r(i(e))}},bJ(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},Et(e,t,n){var r=n("qeg"),i=n("xm"),o=n("bJ"),s=n("Vu");e.exports=function(e,t,n){if(!s(n))return!1;var a=typeof t;return("number"==a?!!(i(n)&&o(t,n.length)):"string"==a&&t in n)&&r(n[t],e)}},gL(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},sK4(e,t,n){var r,i=n("wp"),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},si(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},U4(e){e.exports=function(){this.__data__=[],this.size=0}},V8(e,t,n){var r=n("uf"),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},gh(e,t,n){var r=n("uf");e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},Zd(e,t,n){var r=n("uf");e.exports=function(e){return r(this.__data__,e)>-1}},gy(e,t,n){var r=n("uf");e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},mv(e,t,n){var r=n("EH"),i=n("x3y"),o=n("to");e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},uh(e,t,n){var r=n("BW");e.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},yY(e,t,n){var r=n("BW");e.exports=function(e){return r(this,e).get(e)}},fo(e,t,n){var r=n("BW");e.exports=function(e){return r(this,e).has(e)}},Ul(e,t,n){var r=n("BW");e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=+(n.size!=i),this}},qQ(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},ei(e,t,n){e.exports=n("qV")(Object,"create")},wW(e,t,n){e.exports=n("jae")(Object.keys,Object)},Jk(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},Rp(e,t,n){e=n.nmd(e);var r=n("Ym"),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},DX(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},jae(e){e.exports=function(e,t){return function(n){return e(t(n))}}},aP(e,t,n){var r=n("aaS"),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=n(l),r(e,this,c)}}},G6(e,t,n){var r=n("Ym"),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=r||i||Function("return this")()},rm(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},VG(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},QJ(e){e.exports=function(e){return this.__data__.has(e)}},eL(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},mP(e,t,n){var r=n("UP");e.exports=n("rx")(r)},rx(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},EU(e,t,n){var r=n("x3y");e.exports=function(){this.__data__=new r,this.size=0}},hc(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},nO(e){e.exports=function(e){return this.__data__.get(e)}},pJ(e){e.exports=function(e){return this.__data__.has(e)}},sI(e,t,n){var r=n("x3y"),i=n("to"),o=n("FXD");e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},ZO(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},Zz(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},RVI(e){e.exports=function(e){return function(){return e}}},K23(e,t,n){var r=n("Vu"),i=n("RF"),o=n("vF"),s=Math.max,a=Math.min;e.exports=function(e,t,n){var l,c,u,h,d,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var n=l,r=c;return l=c=void 0,f=t,h=e.apply(r,n)}function b(e){var n=e-p,r=e-f;return void 0===p||n>=t||n<0||g&&r>=u}function x(){var e,n,r,o=i();if(b(o))return w(o);d=setTimeout(x,(e=o-p,n=o-f,r=t-e,g?a(r,u-n):r))}function w(e){return(d=void 0,v&&l)?y(e):(l=c=void 0,h)}function S(){var e,n=i(),r=b(n);if(l=arguments,c=this,p=n,r){if(void 0===d)return f=e=p,d=setTimeout(x,t),m?y(e):h;if(g)return clearTimeout(d),d=setTimeout(x,t),y(p)}return void 0===d&&(d=setTimeout(x,t)),h}return t=o(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?s(o(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),S.cancel=function(){void 0!==d&&clearTimeout(d),f=0,l=p=c=d=void 0},S.flush=function(){return void 0===d?h:w(i())},S}},qeg(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},Su(e){e.exports=function(e){return e}},Sl(e,t,n){var r=n("DF"),i=n("Bu"),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},rJ(e){e.exports=Array.isArray},xm(e,t,n){var r=n("M6"),i=n("yy");e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},wXO(e,t,n){var r=n("xm"),i=n("Bu");e.exports=function(e){return i(e)&&r(e)}},ZH(e,t,n){e=n.nmd(e);var r=n("G6"),i=n("Dxv"),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,l=a?a.isBuffer:void 0;e.exports=l||i},JI(e,t,n){var r=n("Z5");e.exports=function(e,t){return r(e,t)}},M6(e,t,n){var r=n("lE"),i=n("Vu");e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},yy(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},Vu(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},Bu(e){e.exports=function(e){return null!=e&&"object"==typeof e}},MCy(e,t,n){var r=n("lE"),i=n("hp"),o=n("Bu"),s=Object.prototype,a=Function.prototype.toString,l=s.hasOwnProperty,c=a.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=r(e))return!1;var t=i(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&a.call(n)==c}},HD(e,t,n){var r=n("lE"),i=n("Bu");e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},pn(e,t,n){var r=n("xX"),i=n("aa"),o=n("Rp"),s=o&&o.isTypedArray;e.exports=s?i(s):r},ZG(e,t,n){var r=n("TH"),i=n("l1"),o=n("xm");e.exports=function(e){return o(e)?r(e):i(e)}},Xl(e,t,n){var r=n("TH"),i=n("lp"),o=n("xm");e.exports=function(e){return o(e)?r(e,!0):i(e)}},zu(e,t,n){var r=n("Bo");e.exports=n("aB")(function(e,t,n){r(e,t,n)})},RF(e,t,n){var r=n("G6");e.exports=function(){return r.Date.now()}},Ux(e){e.exports=function(){return[]}},Dxv(e){e.exports=function(){return!1}},vF(e,t,n){var r=n("Ia6"),i=n("Vu"),o=n("HD"),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return 0/0;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?0/0:+e}},W0(e,t,n){var r=n("zj"),i=n("Xl");e.exports=function(e){return r(e,i(e))}},IA(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z","Calendar")},jh(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z","ChevronDown")},aU(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z","ChevronRight")},Oe(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("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,2Z","Circle")},eI(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z","Close")},FK(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z","Delete")},Ny(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z","DeleteOutline")},Vp(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z","Drag")},rP(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M17.9,17.39C17.64,16.59 16.89,16 16,16H15V13A1,1 0 0,0 14,12H8V10H10A1,1 0 0,0 11,9V7H13A2,2 0 0,0 15,5V4.59C17.93,5.77 20,8.64 20,12C20,14.08 19.2,15.97 17.9,17.39M11,19.93C7.05,19.44 4,16.08 4,12C4,11.38 4.08,10.78 4.21,10.21L9,15V16A2,2 0 0,0 11,18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z","Earth")},EB(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z","EyeOffOutline")},lm(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z","EyeOutline")},oF(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z","InformationOutline")},lG(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z","Magnify")},Tq(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12Z","Pin")},V5(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M16,12V4H17V2H7V4H8V12L6,14V16H11.2V22H12.8V16H18V14L16,12M8.8,14L10,12.8V4H14V12.8L15.2,14H8.8Z","PinOutline")},iS(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z","Plus")},dG(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z","UnfoldLessHorizontal")},O7(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z","UnfoldMoreHorizontal")},Zr(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=(0,((r=n("gY"))&&r.__esModule?r:{default:r}).default)("M16,5V18H21V5M4,18H9V5H4M10,18H15V5H10V18Z","ViewColumn")},gY(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("x2"),i=n("P2");t.default=function(e,t){return(0,r.createSvgIcon)((0,i.jsx)("path",{d:e}),t)}},Ko(e,t,n){"use strict";var r=n("CT");function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},VuA(e,t,n){e.exports=n("Ko")()},CT(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},qM(e,t,n){!function(e,t){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}(t);function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var i={error:null},o=function(e){function t(){for(var t,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=i,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e),t.getDerivedStateFromError=function(e){return{error:e}};var o=t.prototype;return o.reset=function(){this.setState(i)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,i,o,s=this.state.error,a=this.props.resetKeys;null!==s&&null!==t.error&&(void 0===(n=e.resetKeys)&&(n=[]),void 0===(r=a)&&(r=[]),n.length!==r.length||n.some(function(e,t){return!Object.is(e,r[t])}))&&(null==(i=(o=this.props).onResetKeysChange)||i.call(o,e.resetKeys,a),this.reset())},o.render=function(){var e=this.state.error,t=this.props,r=t.fallbackRender,i=t.FallbackComponent,o=t.fallback;if(null!==e){var s={error:e,resetErrorBoundary:this.resetErrorBoundary};if(n.isValidElement(o))return o;if("function"==typeof r)return r(s);if(i)return n.createElement(i,s);else throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(n.Component);e.ErrorBoundary=o,e.useErrorHandler=function(e){var t=n.useState(null),r=t[0],i=t[1];if(null!=e)throw e;if(null!=r)throw r;return i},e.withErrorBoundary=function(e,t){var r=function(r){return n.createElement(o,t,n.createElement(e,r))};return r.displayName="withErrorBoundary("+(e.displayName||e.name||"Unknown")+")",r},Object.defineProperty(e,"__esModule",{value:!0})}(t,n("HE"))},KcQ(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var o=0,s=r.length;o<s;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?n[e]=i:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},io(e){"use strict";var t;t=function(){function e(){return!0}function t(){return!1}function n(){}return function r(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],o={name:"any",test:e},s=[],a=[],l={types:i,conversions:a,ignore:s};function c(e){var t=N(l.types,function(t){return t.name===e});if(t)return t;if("any"===e)return o;var n=N(l.types,function(t){return t.name.toLowerCase()===e.toLowerCase()});throw TypeError('Unknown type "'+e+'"'+(n?'. Did you mean "'+n.name+'"?':""))}function u(e){return e===o?999:l.types.indexOf(e)}function h(e){var t=N(l.types,function(t){return t.test(e)});if(t)return t.name;throw TypeError("Value has unknown type. Value: "+e)}function d(e){return e.map(function(e){var t=e.types.map(y);return(e.restParam?"...":"")+t.join("|")}).join(",")}function p(e){var t=P(e);return!!t&&t.restParam}function f(e){return e.types.some(function(e){return null!=e.conversion})}function m(t){if(!t||0===t.types.length)return e;if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var n=c(t.types[0].name).test,r=c(t.types[1].name).test;return function(e){return n(e)||r(e)}}var i=t.types.map(function(e){return c(e.name).test});return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}function g(e,t){return t<e.params.length?e.params[t]:p(e.params)?P(e.params):null}function v(e,t,n){var r=g(e,t);return(r?n?r.types.filter(b):r.types:[]).map(y)}function y(e){return e.name}function b(e){return null===e.conversion||void 0===e.conversion}function x(e,t){var n=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return Object.keys(t)}(B(e,function(e){return v(e,t,!1)}));return -1!==n.indexOf("any")?["any"]:n}function w(e,t,n){var r,i,o,s=e||"unnamed",a=n;for(o=0;o<t.length;o++){var l=a.filter(function(e){var n=m(g(e,o));return(o<e.params.length||p(e.params))&&n(t[o])});if(0===l.length){if((i=x(a,o)).length>0){var c=h(t[o]);return(r=TypeError("Unexpected type of argument in function "+s+" (expected: "+i.join(" or ")+", actual: "+c+", index: "+o+")")).data={category:"wrongType",fn:s,index:o,actual:c,expected:i},r}}else a=l}var u=a.map(function(e){return p(e.params)?1/0:e.params.length});if(t.length<Math.min.apply(null,u))return(r=TypeError("Too few arguments in function "+s+" (expected: "+(i=x(a,o)).join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:s,index:t.length,expected:i},r;var d=Math.max.apply(null,u);return t.length>d?(r=TypeError("Too many arguments in function "+s+" (expected: "+d+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:s,index:t.length,expectedLength:d}:(r=TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+s+".")).data={category:"mismatch",actual:t.map(h)},r}function S(e){for(var t=999,n=0;n<e.types.length;n++)b(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function A(e){for(var t=999,n=0;n<e.types.length;n++)b(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function C(e,t){var n,r,i=Math.min(e.params.length,t.params.length);if(0!=(r=e.params.some(f)-t.params.some(f)))return r;for(n=0;n<i;n++)if(0!=(r=f(e.params[n])-f(t.params[n])))return r;for(n=0;n<i;n++)if(0!==(r=function(e,t){var n;return 0!=(n=e.restParam-t.restParam)||0!=(n=f(e)-f(t))||0!=(n=S(e)-S(t))?n:A(e)-A(t)}(e.params[n],t.params[n])))return r;return e.params.length-t.params.length}function k(e){var t,n,r,i,o=[],s=[];switch(e.types.forEach(function(e){e.conversion&&(o.push(c(e.conversion.from).test),s.push(e.conversion.convert))}),s.length){case 0:return function(e){return e};case 1:return t=o[0],r=s[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=s[0],i=s[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<s.length;t++)if(o[t](e))return s[t](e);return e}}}function M(e,t){return function e(n,r,i){if(!(r<n.length))return[i.map(function(e,t){return{types:e,restParam:t===n.length-1&&p(n)}})];var o,s=n[r],a=t?s.types.filter(b):s.types;if(s.restParam){var l=a.filter(b);o=l.length<a.length?[l,a]:[a]}else o=a.map(function(e){return[e]});return B(o,function(t){return e(n,r+1,i.concat([t]))})}(e,0,[])}function O(e,r){if(0===Object.keys(r).length)throw SyntaxError("No signatures provided");var i,o=[];Object.keys(r).map(function(e){var t,n,i;return t=r[e],n=l.conversions,i=[],(""!==e.trim()&&(i=e.split(",").map(I).map(function(e,t,r){var i,o,s,a,l,h,d,p,f=(i=n,o=l=((a=0===e.indexOf("..."))?e.length>3?e.slice(3):"any":e).split("|").map(I).filter(D).filter(_),s={},i.forEach(function(e){-1!==o.indexOf(e.from)||-1===o.indexOf(e.to)||s[e.from]||(s[e.from]=e)}),h=Object.keys(s).map(function(e){return s[e]}),d=l.map(function(e){var t=c(e);return{name:e,typeIndex:u(t),test:t.test,conversion:null,conversionIndex:-1}}),p=h.map(function(e){var t=c(e.from);return{name:e.from,typeIndex:u(t),test:t.test,conversion:e,conversionIndex:n.indexOf(e)}}),{types:d.concat(p),restParam:a});if(f.restParam&&t!==r.length-1)throw SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return f})),i.some(E))?null:{params:i,fn:t}}).filter(R).forEach(function(e){var t=N(o,function(t){return function(e,t){for(var n=Math.max(e.params.length,t.params.length),r=0;r<n;r++)if(!function(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],-1!==t.indexOf(n))return!0;return!1}(v(e,r,!0),v(t,r,!0)))return!1;var i=e.params.length,o=t.params.length,s=p(e.params),a=p(t.params);return s?a?i===o:o>=i:a?i>=o:i===o}(t,e)});if(t)throw TypeError('Conflicting signatures "'+d(t.params)+'" and "'+d(e.params)+'".');o.push(e)});var s=B(o,function(e){return(e?M(e.params,!1):[]).map(function(t){return{params:t,fn:e.fn}})}).filter(R);s.sort(C);var a=s[0]&&s[0].params.length<=2&&!p(s[0].params),h=s[1]&&s[1].params.length<=2&&!p(s[1].params),g=s[2]&&s[2].params.length<=2&&!p(s[2].params),y=s[3]&&s[3].params.length<=2&&!p(s[3].params),b=s[4]&&s[4].params.length<=2&&!p(s[4].params),x=s[5]&&s[5].params.length<=2&&!p(s[5].params),w=s.map(function(e){return function(e){var t,n,r;if(p(e)){var i,o=(t=(i=e).slice(0,i.length-1).map(m)).length,s=m(P(e)),a=function(e){for(var t=o;t<e.length;t++)if(!s(e[t]))return!1;return!0};return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return a(e)&&e.length>=o+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=m(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=m(e[0]),r=m(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(m),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}(e.params)}),S=a?m(s[0].params[0]):t,A=h?m(s[1].params[0]):t,O=g?m(s[2].params[0]):t,T=y?m(s[3].params[0]):t,j=b?m(s[4].params[0]):t,z=x?m(s[5].params[0]):t,$=a?m(s[0].params[1]):t,F=h?m(s[1].params[1]):t,V=g?m(s[2].params[1]):t,H=y?m(s[3].params[1]):t,W=b?m(s[4].params[1]):t,U=x?m(s[5].params[1]):t,G=s.map(function(e){return function(e,t){var n=t;if(e.some(f)){var r=p(e),i=e.map(k);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(p(e)){var s=e.length-1;o=function(){return n.apply(this,L(arguments,0,s).concat([L(arguments,s)]))}}return o}(e.params,e.fn)}),q=a?G[0]:n,X=h?G[1]:n,Y=g?G[2]:n,K=y?G[3]:n,Q=b?G[4]:n,Z=x?G[5]:n,J=a?s[0].params.length:-1,ee=h?s[1].params.length:-1,et=g?s[2].params.length:-1,en=y?s[3].params.length:-1,er=b?s[4].params.length:-1,ei=x?s[5].params.length:-1,eo=6*!!(a&&h&&g&&y&&b&&x),es=s.length,ea=function(){for(var t=eo;t<es;t++)if(w[t](arguments))return G[t].apply(this,arguments);return l.onMismatch(e,arguments,s)},el=function e(t,n){return arguments.length===J&&S(t)&&$(n)?q.apply(e,arguments):arguments.length===ee&&A(t)&&F(n)?X.apply(e,arguments):arguments.length===et&&O(t)&&V(n)?Y.apply(e,arguments):arguments.length===en&&T(t)&&H(n)?K.apply(e,arguments):arguments.length===er&&j(t)&&W(n)?Q.apply(e,arguments):arguments.length===ei&&z(t)&&U(n)?Z.apply(e,arguments):ea.apply(e,arguments)};try{Object.defineProperty(el,"name",{value:e})}catch(e){}return i={},s.forEach(function(e){e.params.some(f)||M(e.params,!0).forEach(function(t){i[d(t)]=e.fn})}),el.signatures=i,el}function T(e,t,n){throw w(e,t,n)}function _(e){return -1===l.ignore.indexOf(e)}function I(e){return e.trim()}function D(e){return!!e}function R(e){return null!==e}function E(e){return 0===e.types.length}function P(e){return e[e.length-1]}function L(e,t,n){return Array.prototype.slice.call(e,t,n)}function N(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function B(e,t){return Array.prototype.concat.apply([],e.map(t))}function j(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(("object"==typeof r.signatures||"string"==typeof r.signature)&&""!==r.name){if(""===t)t=r.name;else if(t!==r.name){var i=Error("Function names do not match (expected: "+t+", actual: "+r.name+")");throw i.data={actual:r.name,expected:t},i}}}return t}function z(e){var t,n={};function r(e,r){if(n.hasOwnProperty(e)&&r!==n[e])throw(t=Error('Signature "'+e+'" is defined twice')).data={signature:e},t}for(var i=0;i<e.length;i++){var o=e[i];if("object"==typeof o.signatures)for(var s in o.signatures)o.signatures.hasOwnProperty(s)&&(r(s,o.signatures[s]),n[s]=o.signatures[s]);else if("string"==typeof o.signature)r(o.signature,o),n[o.signature]=o;else throw(t=TypeError("Function is no typed-function (index: "+i+")")).data={index:i},t}return n}return(l=O("typed",{"string, Object":O,Object:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(e[n]);return O(j(t),e)},"...Function":function(e){return O(j(e),z(e))},"string, ...Function":function(e,t){return O(e,z(t))}})).create=r,l.types=i,l.conversions=a,l.ignore=s,l.onMismatch=T,l.throwMismatchError=T,l.createError=w,l.convert=function(e,t){var n=h(e);if(t===n)return e;for(var r=0;r<l.conversions.length;r++){var i=l.conversions[r];if(i.from===n&&i.to===t)return i.convert(e)}throw Error("Cannot convert from "+n+" to "+t)},l.find=function(e,t){if(!e.signatures)throw TypeError("Function is no typed-function");if("string"==typeof t){n=t.split(",");for(var n,r=0;r<n.length;r++)n[r]=n[r].trim()}else if(Array.isArray(t))n=t;else throw TypeError("String array or a comma separated string expected");var i=n.join(","),o=e.signatures[i];if(o)return o;throw TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+n.join(", ")+"))")},l.addType=function(e,t){if(!e||"string"!=typeof e.name||"function"!=typeof e.test)throw TypeError("Object with properties {name: string, test: function} expected");if(!1!==t){for(var n=0;n<l.types.length;n++)if("Object"===l.types[n].name)return void l.types.splice(n,0,e)}l.types.push(e)},l.addConversion=function(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw TypeError("Object with properties {from: string, to: string, convert: function} expected");l.conversions.push(e)},l}()},"function"==typeof define&&define.amd?define([],t):e.exports=t()},vz(e,t,n){"use strict";var r=n("HE"),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a(function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})},[e,n,t]),s(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},Qr(e,t,n){"use strict";var r=n("HE"),i=n("TU"),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var h=a(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var p=s(e,(h=c(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,i]))[0],h[1]);return l(function(){d.hasValue=!0,d.value=p},[p]),u(p),p}},TU(e,t,n){"use strict";e.exports=n("vz")},N1(e,t,n){"use strict";e.exports=n("Qr")},QG(e,t,n){"use strict";let r,i,o,s,a;n.r(t),n.d(t,{AlignSelector:()=>Z,BITS_GROUP_CONFIG:()=>pk,BITS_UNIT_CONFIG:()=>pM,BYTES_GROUP_CONFIG:()=>pT,BYTES_UNIT_CONFIG:()=>p_,CURRENCY_GROUP_CONFIG:()=>pE,CURRENCY_UNIT_CONFIG:()=>pP,ChartsProvider:()=>e1,ChartsThemeContext:()=>e2,ColorPicker:()=>eZ,ContentWithLegend:()=>h7,DECIMAL_GROUP_CONFIG:()=>pU,DECIMAL_UNIT_CONFIG:()=>pG,DEFAULT_COLUMN_HEIGHT:()=>40,DEFAULT_COLUMN_MAX_WIDTH:()=>1e3,DEFAULT_COLUMN_MIN_WIDTH:()=>60,DEFAULT_COLUMN_WIDTH:()=>150,DEFAULT_LEGEND:()=>nr,DEFAULT_PINNED_CROSSHAIR:()=>W3,DEFAULT_TOOLTIP_CONFIG:()=>fO,DYNAMIC_NEARBY_SERIES_MULTIPLIER:()=>30,DateTimeRangePicker:()=>WP,DensitySelector:()=>m$,Dialog:()=>dM,DiscardChangesConfirmationDialog:()=>dO,DragAndDropElement:()=>gN,DragButton:()=>g$,Drawer:()=>g4,DropIndicator:()=>mV,EChart:()=>CZ,EMPHASIZED_SERIES_DESCRIPTION:()=>fw,EMPTY_TOOLTIP_DATA:()=>fk,ErrorAlert:()=>kr,ErrorBoundary:()=>ki.ErrorBoundary,ExemplarMetadataTooltip:()=>fB,FALLBACK_CHART_WIDTH:()=>750,FontSizeSelector:()=>ks,FormActions:()=>kl,FormatControls:()=>UC,INCREASE_NEARBY_SERIES_MULTIPLIER:()=>5.5,InfoTooltip:()=>fY,InterpolationFormat:()=>cc,ItemActionsProvider:()=>UT,JSONEditor:()=>B1,Legend:()=>h4,LinkEditorForm:()=>B5,LoadingOverlay:()=>jv,MIN_STEP_INTERVAL_MS:()=>10,ModeSelector:()=>B4,NEARBY_SERIES_DESCRIPTION:()=>fx,NoDataOverlay:()=>jg,OPTIMIZED_MODE_SERIES_LIMIT:()=>1e3,OptionsColorPicker:()=>e4,OptionsEditorColumn:()=>ji,OptionsEditorControl:()=>f0,OptionsEditorGrid:()=>jo,OptionsEditorGroup:()=>js,PERCENT_GROUP_CONFIG:()=>pX,PERCENT_UNIT_CONFIG:()=>pK,PINNED_CROSSHAIR_SERIES_NAME:()=>W5,PIN_TOOLTIP_HELP_TEXT:()=>fT,PersesTimeToIntlTime:()=>p7,RefreshIntervalPicker:()=>Q0,RepeatGrid:()=>Q2,SHOW_FEWER_SERIES_LIMIT:()=>5,SelectionProvider:()=>UP,SeriesInfo:()=>W2,SeriesLabelsStack:()=>WY,SeriesMarker:()=>WX,SettingsAutocomplete:()=>mP,SnackbarProvider:()=>GH,SortSelector:()=>jb,SortSelectorButtons:()=>jw,TABLE_FEATURES:()=>le,TEMPERATURE_GROUP_CONFIG:()=>pJ,TEMPERATURE_UNIT_CONFIG:()=>p0,THROUGHPUT_GROUP_CONFIG:()=>p2,THROUGHPUT_UNIT_CONFIG:()=>p3,TIME_GROUP_CONFIG:()=>p9,TIME_UNIT_CONFIG:()=>p8,TOOLTIP_ADJUST_Y_POS_MULTIPLIER:()=>.75,TOOLTIP_BG_COLOR_FALLBACK:()=>fS,TOOLTIP_DATE_FORMAT:()=>fA,TOOLTIP_LABELS_MAX_WIDTH:()=>500,TOOLTIP_MAX_HEIGHT:()=>650,TOOLTIP_MAX_WIDTH:()=>650,TOOLTIP_MIN_WIDTH:()=>375,TOOLTIP_PADDING:()=>8,TRANSFORM_TEXT:()=>Qx,Table:()=>hK,TextField:()=>hR,TextOverlay:()=>jm,ThresholdsEditor:()=>jN,TimeChartTooltip:()=>Uv,TimeRangeSelector:()=>Wz,TimeZoneContext:()=>dY,TimeZoneProvider:()=>dK,TimeZoneSelector:()=>WG,ToolbarIconButton:()=>Ub,TooltipContent:()=>Ul,TooltipHeader:()=>Ud,TransformsEditor:()=>QQ,UNIT_CONFIG:()=>fi,UNIT_GROUP_CONFIG:()=>fr,UNPIN_TOOLTIP_HELP_TEXT:()=>f_,UnitSelector:()=>Uw,ValueMappingsEditor:()=>Zp,YAMLEditor:()=>ets,YAxisLabel:()=>UM,applyCustomLabel:()=>pF,applyJoinTransform:()=>G4,applyMergeColumnsTransform:()=>G6,applyMergeIndexedColumnsTransform:()=>G9,applyMergeSeriesTransform:()=>G8,applyPivotByLabelTransform:()=>qt,applyValueMapping:()=>G3,assembleTransform:()=>fI,batchDispatchNearbySeriesActions:()=>W7,buildRelativeTimeOption:()=>Qv,calculateBarBandwidth:()=>fP,calculateBarSegmentBounds:()=>fL,calculateBarYBounds:()=>fN,calculateVisualYForSeries:()=>fE,checkCrosshairPinnedStatus:()=>Ue,checkforNearbyTimeSeries:()=>Ur,clearHighlightedSeries:()=>W9,combineSx:()=>nw,createRegexFromString:()=>GZ,createTimezoneAwareAxisFormatter:()=>C0,dateFormatOptionsWithTimeZone:()=>dW,defaultCursorData:()=>fC,enableDataZoom:()=>W4,extractFieldNames:()=>cD,formatBits:()=>pO,formatBytes:()=>pI,formatCurrency:()=>pL,formatDecimal:()=>pq,formatPercent:()=>pQ,formatTemperature:()=>p1,formatThroughput:()=>p4,formatTime:()=>fn,formatValue:()=>fo,formatWithTimeZone:()=>dU,generateChartsTheme:()=>G5,getClosestTimestamp:()=>Ut,getClosestTimestampInFullDataset:()=>Un,getCommonTimeScale:()=>Qh,getDateAndTime:()=>dX,getFormattedAxis:()=>GX,getFormattedAxisLabel:()=>dq,getFormattedMultipleYAxes:()=>GY,getFormatterFromCache:()=>px,getFormatterStats:()=>pw,getGMTOffset:()=>dG,getLegendMode:()=>no,getLegendPosition:()=>ni,getLegendSize:()=>ns,getNearbySeriesData:()=>Uo,getPixelXFromGrid:()=>fR,getPointInGrid:()=>W8,getResourceDisplayName:()=>Qm,getResourceExtendedDisplayName:()=>Qg,getSubmitText:()=>Qb,getTableCellLayout:()=>lt,getTheme:()=>QN,getTimeSeriesValues:()=>Qu,getTimeZoneOptions:()=>jU,getTitleAction:()=>Qy,getTooltipStyles:()=>fD,getUnitConfig:()=>fs,getUnitGroup:()=>fa,getUnitGroupConfig:()=>fl,getYBuffer:()=>Ua,handleMoveDown:()=>gz,handleMoveUp:()=>gj,hasBatchPatterns:()=>cT,hasDataFieldPatterns:()=>cI,hasDecimalPlaces:()=>pA,hasIndexedPatterns:()=>c_,interpolate:()=>ch,interpolateHeaders:()=>GJ,interpolateQueryParams:()=>G0,interpolateSelectionBatch:()=>G2,interpolateSelectionIndividual:()=>G1,isBitsUnit:()=>fp,isBytesUnit:()=>fd,isCurrencyUnit:()=>fv,isDateUnit:()=>fy,isDecimalUnit:()=>fh,isLegendItemVisuallySelected:()=>na,isPercentUnit:()=>fu,isRegexPattern:()=>GQ,isSafeUrl:()=>cE,isTemperatureUnit:()=>fb,isThroughputUnit:()=>fg,isTimeUnit:()=>fc,isUnitWithDecimalPlaces:()=>ff,isUnitWithShortValues:()=>fm,isValidLegendMode:()=>nt,isValidLegendPosition:()=>ne,isValidLegendSize:()=>nn,isValidTraceId:()=>Qd,isWithinPercentageRange:()=>Us,legacyCheckforNearbySeries:()=>Ui,legendModes:()=>t8,legendPositions:()=>t9,legendSizes:()=>t7,limitDecimalPlaces:()=>pC,mockChartsContext:()=>QA,parseFormat:()=>ck,parseVariables:()=>cf,parseVariablesAndFormat:()=>cm,persesColumnsToTanstackColumns:()=>ln,replaceDataFields:()=>cM,replaceDataFieldsBatch:()=>cO,replaceVariable:()=>cd,replaceVariables:()=>cg,replaceVariablesForDisplay:()=>cv,replaceVariablesInUrl:()=>cy,restoreChart:()=>W6,sanitizeUrl:()=>cP,shouldShortenValues:()=>pS,supportsCustomLabel:()=>pz,testChartsTheme:()=>QS,transformData:()=>qn,typography:()=>QP,useChartsContext:()=>e5,useChartsTheme:()=>e3,useDragAndDropMonitor:()=>gL,useItemActions:()=>UD,useLocalStorage:()=>GK,useMousePosition:()=>fM,useSelection:()=>UB,useSnackbar:()=>GU,useTimeZone:()=>dQ});var l=n("P2"),c=n("K2"),u=n("HE"),h=n.t(u,2),d=n("x6"),p=n("Hz"),f=n("I4"),m=n("mI"),g=n("Wc"),v=n("U2"),y=n("b4"),b=n("Yb"),x=n("WN"),w=n("CW"),S=n("uW"),A=n("CQ"),C=n("ja"),k=n("O2"),M=n("kZ");function O(e){return(0,M.Ay)("MuiCircularProgress",e)}(0,k.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);let T=(0,S.keyframes)`
|
|
3
|
+
0% {
|
|
4
|
+
transform: rotate(0deg);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
100% {
|
|
8
|
+
transform: rotate(360deg);
|
|
9
|
+
}
|
|
10
|
+
`,_=(0,S.keyframes)`
|
|
11
|
+
0% {
|
|
12
|
+
stroke-dasharray: 1px, 200px;
|
|
13
|
+
stroke-dashoffset: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
50% {
|
|
17
|
+
stroke-dasharray: 100px, 200px;
|
|
18
|
+
stroke-dashoffset: -15px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
100% {
|
|
22
|
+
stroke-dasharray: 1px, 200px;
|
|
23
|
+
stroke-dashoffset: -126px;
|
|
24
|
+
}
|
|
25
|
+
`,I="string"!=typeof T?(0,S.css)`
|
|
26
|
+
animation: ${T} 1.4s linear infinite;
|
|
27
|
+
`:null,D="string"!=typeof _?(0,S.css)`
|
|
28
|
+
animation: ${_} 1.4s ease-in-out infinite;
|
|
29
|
+
`:null,R=(0,y.A)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,A.A)(n.color)}`]]}})((0,b.A)(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:I||{animation:`${T} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),E=(0,y.A)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),P=(0,y.A)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${(0,A.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,b.A)(({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:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:D||{animation:`${_} 1.4s ease-in-out infinite`}}]}))),L=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:i="primary",disableShrink:o=!1,size:s=40,style:a,thickness:c=3.6,value:u=0,variant:h="indeterminate",...p}=n,m={...n,color:i,disableShrink:o,size:s,thickness:c,value:u,variant:h},g=(e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${(0,A.A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,A.A)(n)}`,i&&"circleDisableShrink"]};return(0,f.A)(o,O,t)})(m),v={},y={},b={};if("determinate"===h){let e=2*Math.PI*((44-c)/2);v.strokeDasharray=e.toFixed(3),b["aria-valuenow"]=Math.round(u),v.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,y.transform="rotate(-90deg)"}return(0,l.jsx)(R,{className:(0,d.A)(g.root,r),style:{width:s,height:s,...y,...a},ownerState:m,ref:t,role:"progressbar",...b,...p,children:(0,l.jsx)(E,{className:g.svg,ownerState:m,viewBox:"22 22 44 44",children:(0,l.jsx)(P,{className:g.circle,style:v,ownerState:m,cx:44,cy:44,r:(44-c)/2,fill:"none",strokeWidth:c})})})});function N(e){return(0,M.Ay)("MuiButton",e)}let B=(0,k.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),j=u.createContext({}),z=u.createContext(void 0),$=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],F=(0,y.A)(w.A,{shouldForwardProp:e=>(0,v.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,A.A)(n.color)}`],t[`size${(0,A.A)(n.size)}`],t[`${n.variant}Size${(0,A.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,b.A)(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${B.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${B.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${B.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${B.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,m.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${B.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${B.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${B.loading}`]:{color:"transparent"}}}]}})),V=(0,y.A)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,A.A)(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...$]})),H=(0,y.A)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,A.A)(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...$]})),W=(0,y.A)("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),U=(0,y.A)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(e,t)=>t.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),G=u.forwardRef(function(e,t){let n=u.useContext(j),r=u.useContext(z),i=(0,p.A)(n,e),o=(0,x.b)({props:i,name:"MuiButton"}),{children:s,color:a="primary",component:c="button",className:h,disabled:m=!1,disableElevation:v=!1,disableFocusRipple:y=!1,endIcon:b,focusVisibleClassName:w,fullWidth:S=!1,id:C,loading:k=null,loadingIndicator:M,loadingPosition:O="center",size:T="medium",startIcon:_,type:I,variant:D="text",...R}=o,E=(0,g.A)(C),P=M??(0,l.jsx)(L,{"aria-labelledby":E,color:"inherit",size:16}),B={...o,color:a,component:c,disabled:m,disableElevation:v,disableFocusRipple:y,fullWidth:S,loading:k,loadingIndicator:P,loadingPosition:O,size:T,type:I,variant:D},$=(e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,loading:s,loadingPosition:a,classes:l}=e,c={root:["root",s&&"loading",o,`${o}${(0,A.A)(t)}`,`size${(0,A.A)(i)}`,`${o}Size${(0,A.A)(i)}`,`color${(0,A.A)(t)}`,n&&"disableElevation",r&&"fullWidth",s&&`loadingPosition${(0,A.A)(a)}`],startIcon:["icon","startIcon",`iconSize${(0,A.A)(i)}`],endIcon:["icon","endIcon",`iconSize${(0,A.A)(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},u=(0,f.A)(c,N,l);return{...l,...u}})(B),G=(_||k&&"start"===O)&&(0,l.jsx)(V,{className:$.startIcon,ownerState:B,children:_||(0,l.jsx)(U,{className:$.loadingIconPlaceholder,ownerState:B})}),q=(b||k&&"end"===O)&&(0,l.jsx)(H,{className:$.endIcon,ownerState:B,children:b||(0,l.jsx)(U,{className:$.loadingIconPlaceholder,ownerState:B})}),X="boolean"==typeof k?(0,l.jsx)("span",{className:$.loadingWrapper,style:{display:"contents"},children:k&&(0,l.jsx)(W,{className:$.loadingIndicator,ownerState:B,children:P})}):null;return(0,l.jsxs)(F,{ownerState:B,className:(0,d.A)(n.className,$.root,h,r||""),component:c,disabled:m||k,focusRipple:!y,focusVisibleClassName:(0,d.A)($.focusVisible,w),ref:t,type:I,id:k?E:C,...R,classes:$,children:[G,"end"!==O&&X,s,"end"===O&&X,q]})});function q(e){return u.Children.toArray(e).filter(e=>u.isValidElement(e))}function X(e){return(0,M.Ay)("MuiButtonGroup",e)}let Y=(0,k.A)("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),K=(0,y.A)("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${Y.grouped}`]:t.grouped},{[`& .${Y.grouped}`]:t[`grouped${(0,A.A)(n.orientation)}`]},{[`& .${Y.grouped}`]:t[`grouped${(0,A.A)(n.variant)}`]},{[`& .${Y.grouped}`]:t[`grouped${(0,A.A)(n.variant)}${(0,A.A)(n.orientation)}`]},{[`& .${Y.grouped}`]:t[`grouped${(0,A.A)(n.variant)}${(0,A.A)(n.color)}`]},{[`& .${Y.firstButton}`]:t.firstButton},{[`& .${Y.lastButton}`]:t.lastButton},{[`& .${Y.middleButton}`]:t.middleButton},t.root,t[n.variant],!0===n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,"vertical"===n.orientation&&t.vertical]}})((0,b.A)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Y.lastButton},& .${Y.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Y.lastButton},& .${Y.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Y.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${"light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Y.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,C.A)()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,m.X4)(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${Y.lastButton},& .${Y.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${Y.lastButton},& .${Y.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${Y.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${Y.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter((0,C.A)(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${Y.firstButton},& .${Y.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${Y.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),Q=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiButtonGroup"}),{children:r,className:i,color:o="primary",component:s="div",disabled:a=!1,disableElevation:c=!1,disableFocusRipple:h=!1,disableRipple:p=!1,fullWidth:m=!1,orientation:g="horizontal",size:v="medium",variant:y="outlined",...b}=n,w={...n,color:o,component:s,disabled:a,disableElevation:c,disableFocusRipple:h,disableRipple:p,fullWidth:m,orientation:g,size:v,variant:y},S=(e=>{let{classes:t,color:n,disabled:r,disableElevation:i,fullWidth:o,orientation:s,variant:a}=e,l={root:["root",a,s,o&&"fullWidth",i&&"disableElevation",`color${(0,A.A)(n)}`],grouped:["grouped",`grouped${(0,A.A)(s)}`,`grouped${(0,A.A)(a)}`,`grouped${(0,A.A)(a)}${(0,A.A)(s)}`,`grouped${(0,A.A)(a)}${(0,A.A)(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,f.A)(l,X,t)})(w),C=u.useMemo(()=>({className:S.grouped,color:o,disabled:a,disableElevation:c,disableFocusRipple:h,disableRipple:p,fullWidth:m,size:v,variant:y}),[o,a,c,h,p,m,v,y,S.grouped]),k=q(r),M=k.length;return(0,l.jsx)(K,{as:s,role:"group",className:(0,d.A)(S.root,i),ref:t,ownerState:w,...b,children:(0,l.jsx)(j.Provider,{value:C,children:k.map((e,t)=>{let n,r;return(0,l.jsx)(z.Provider,{value:(n=0===t,r=t===M-1,n&&r?"":n?S.firstButton:r?S.lastButton:S.middleButton),children:e},t)})})})});function Z(e){let t,n,r,i,o,s,a,u,h,d,p,f=(0,c.c)(26);f[0]!==e?({onChange:t,value:r,...n}=e,f[0]=e,f[1]=t,f[2]=n,f[3]=r):(t=f[1],n=f[2],r=f[3]);let m=void 0===r?"left":r;f[4]!==t?(i=e=>{t(e)},f[4]=t,f[5]=i):i=f[5];let g=i;f[6]!==g?(o=()=>g("left"),f[6]=g,f[7]=o):o=f[7];let v="left"===m?"contained":"outlined";f[8]!==o||f[9]!==v?(s=(0,l.jsx)(G,{onClick:o,variant:v,children:"Left"},"left"),f[8]=o,f[9]=v,f[10]=s):s=f[10],f[11]!==g?(a=()=>g("center"),f[11]=g,f[12]=a):a=f[12];let y="center"===m?"contained":"outlined";f[13]!==a||f[14]!==y?(u=(0,l.jsx)(G,{onClick:a,variant:y,children:"Center"},"center"),f[13]=a,f[14]=y,f[15]=u):u=f[15],f[16]!==g?(h=()=>g("right"),f[16]=g,f[17]=h):h=f[17];let b="right"===m?"contained":"outlined";return f[18]!==b||f[19]!==h?(d=(0,l.jsx)(G,{onClick:h,variant:b,children:"Right"},"right"),f[18]=b,f[19]=h,f[20]=d):d=f[20],f[21]!==n||f[22]!==d||f[23]!==s||f[24]!==u?(p=(0,l.jsxs)(Q,{"aria-label":"Alignement",...n,children:[s,u,d]}),f[21]=n,f[22]=d,f[23]=s,f[24]=u,f[25]=p):p=f[25],p}function J(e){return(0,M.Ay)("MuiIconButton",e)}let ee=(0,k.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),et=(0,y.A)(w.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,"default"!==n.color&&t[`color${(0,A.A)(n.color)}`],n.edge&&t[`edge${(0,A.A)(n.edge)}`],t[`size${(0,A.A)(n.size)}`]]}})((0,b.A)(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),(0,b.A)(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${ee.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${ee.loading}`]:{color:"transparent"}}))),en=(0,y.A)("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>t.loadingIndicator})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),er=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiIconButton"}),{edge:r=!1,children:i,className:o,color:s="default",disabled:a=!1,disableFocusRipple:c=!1,size:u="medium",id:h,loading:p=null,loadingIndicator:m,...v}=n,y=(0,g.A)(h),b=m??(0,l.jsx)(L,{"aria-labelledby":y,color:"inherit",size:16}),w={...n,edge:r,color:s,disabled:a,disableFocusRipple:c,loading:p,loadingIndicator:b,size:u},S=(e=>{let{classes:t,disabled:n,color:r,edge:i,size:o,loading:s}=e,a={root:["root",s&&"loading",n&&"disabled","default"!==r&&`color${(0,A.A)(r)}`,i&&`edge${(0,A.A)(i)}`,`size${(0,A.A)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return(0,f.A)(a,J,t)})(w);return(0,l.jsxs)(et,{id:p?y:h,className:(0,d.A)(S.root,o),centerRipple:!0,focusRipple:!c,disabled:a||p,ref:t,...v,ownerState:w,children:["boolean"==typeof p&&(0,l.jsx)("span",{className:S.loadingWrapper,style:{display:"contents"},children:(0,l.jsx)(en,{className:S.loadingIndicator,ownerState:w,children:p&&b})}),i]})});var ei=n("vB"),eo=n("Nf");let es=(0,eo.Ay)();function ea(e){let{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,p.A)(t.components[n].defaultProps,r):r}var el=n("SH");function ec({props:e,name:t,defaultTheme:n,themeId:r}){let i=(0,el.A)(n);return r&&(i=i[r]||i),ea({theme:i,name:t,props:e})}var eu=n("nG"),eh=n("y"),ed=n("Fy"),ep=n("Lk");let ef=(0,eh.A)(),em=es("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function eg(e){return ec({props:e,name:"MuiStack",defaultTheme:ef})}let ev=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...(0,ed.NI)({theme:t},(0,ed.kW)({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){let r=(0,ep.LX)(t),i=Object.keys(t.breakpoints.values).reduce((t,n)=>(("object"==typeof e.spacing&&null!=e.spacing[n]||"object"==typeof e.direction&&null!=e.direction[n])&&(t[n]=!0),t),{}),o=(0,ed.kW)({values:e.direction,base:i}),s=(0,ed.kW)({values:e.spacing,base:i});"object"==typeof o&&Object.keys(o).forEach((e,t,n)=>{if(!o[e]){let r=t>0?o[n[t-1]]:"column";o[e]=r}}),n=(0,ei.A)(n,(0,ed.NI)({theme:t},s,(t,n)=>e.useFlexGap?{gap:(0,ep._W)(r,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[n?o[n]:e.direction]}`]:(0,ep._W)(r,t)}}))}return(0,ed.iZ)(t.breakpoints,n)};function ey(e={}){let{createStyledComponent:t=em,useThemeProps:n=eg,componentName:r="MuiStack"}=e,i=t(ev);return u.forwardRef(function(e,t){let o,s=n(e),{component:a="div",direction:c="column",spacing:h=0,divider:p,children:m,className:g,useFlexGap:v=!1,...y}=(0,eu.A)(s),b=(0,f.A)({root:["root"]},e=>(0,M.Ay)(r,e),{});return(0,l.jsx)(i,{as:a,ownerState:{direction:c,spacing:h,useFlexGap:v},ref:t,className:(0,d.A)(b.root,g),...y,children:p?(o=u.Children.toArray(m).filter(Boolean)).reduce((e,t,n)=>(e.push(t),n<o.length-1&&e.push(u.cloneElement(p,{key:`separator-${n}`})),e),[]):m})})}let eb=ey({createStyledComponent:(0,y.A)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,x.b)({props:e,name:"MuiStack"})});var ex=n("AI"),ew=n("Oe"),eS=n("FK");function eA(){return(eA=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function eC(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function ek(e){var t=(0,u.useRef)(e),n=(0,u.useRef)(function(e){t.current&&t.current(e)});return t.current=e,n.current}var eM,eO=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},eT=function(e){return"touches"in e},e_=function(e){return e&&e.ownerDocument.defaultView||self},eI=function(e,t,n){var r=e.getBoundingClientRect(),i=eT(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:eO((i.pageX-(r.left+e_(e).pageXOffset))/r.width),top:eO((i.pageY-(r.top+e_(e).pageYOffset))/r.height)}},eD=function(e){eT(e)||e.preventDefault()},eR=u.memo(function(e){var t=e.onMove,n=e.onKey,r=e.onEnd,i=eC(e,["onMove","onKey","onEnd"]),o=(0,u.useRef)(null),s=ek(t),a=ek(n),l=ek(r),c=(0,u.useRef)(null),h=(0,u.useRef)(!1),d=(0,u.useMemo)(function(){var e=function(e){eD(e),(eT(e)?e.touches.length>0:e.buttons>0)&&o.current?s(eI(o.current,e,c.current)):(n(!1),l())},t=function(){n(!1),l()};function n(n){var r=h.current,i=e_(o.current),s=n?i.addEventListener:i.removeEventListener;s(r?"touchmove":"mousemove",e),s(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=o.current;if(r&&(eD(t),(!h.current||eT(t))&&r)){if(eT(t)){h.current=!0;var i=t.changedTouches||[];i.length&&(c.current=i[0].identifier)}r.focus(),s(eI(r,t,c.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),a({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},function(e){var t=e.which||e.keyCode;t>=37&&t<=40&&l()},n]},[a,s,l]),p=d[0],f=d[1],m=d[2],g=d[3];return(0,u.useEffect)(function(){return g},[g]),u.createElement("div",eA({},i,{onTouchStart:p,onMouseDown:p,className:"react-colorful__interactive",ref:o,onKeyDown:f,onKeyUp:m,tabIndex:0,role:"slider"}))}),eE=function(e){return e.filter(Boolean).join(" ")},eP=function(e){var t=e.color,n=e.left,r=e.top,i=eE(["react-colorful__pointer",e.className]);return u.createElement("div",{className:i,style:{top:100*(void 0===r?.5:r)+"%",left:100*n+"%"}},u.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},eL=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},eN=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?eL(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?eL(parseInt(e.substring(6,8),16)/255,2):1}},eB=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:eL(e.h),s:eL(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:eL(i/2),a:eL(r,2)}},ej=function(e){var t=eB(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},ez=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),a=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:eL(255*[r,a,s,s,l,r][c]),g:eL(255*[l,r,r,a,s,s][c]),b:eL(255*[s,s,l,r,r,a][c]),a:eL(i,2)}},e$=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},eF=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?e$(eL(255*i)):"";return"#"+e$(t)+e$(n)+e$(r)+o},eV=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),a=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(a<0?a+6:a),s:o?s/o*100:0,v:o/255*100,a:i}},eH=u.memo(function(e){var t=e.hue,n=e.onChange,r=e.onChangeEnd,i=eE(["react-colorful__hue",e.className]);return u.createElement("div",{className:i},u.createElement(eR,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:eO(t+360*e.left,0,360)})},onEnd:r,"aria-label":"Hue","aria-valuenow":eL(t),"aria-valuemax":"360","aria-valuemin":"0"},u.createElement(eP,{className:"react-colorful__hue-pointer",left:t/360,color:ej({h:t,s:100,v:100,a:1})})))}),eW=u.memo(function(e){var t=e.hsva,n=e.onChange,r=e.onChangeEnd,i={backgroundColor:ej({h:t.h,s:100,v:100,a:1})};return u.createElement("div",{className:"react-colorful__saturation",style:i},u.createElement(eR,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:eO(t.s+100*e.left,0,100),v:eO(t.v-100*e.top,0,100)})},onEnd:r,"aria-label":"Color","aria-valuetext":"Saturation "+eL(t.s)+"%, Brightness "+eL(t.v)+"%"},u.createElement(eP,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:ej(t)})))}),eU=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},eG="u">typeof window?u.useLayoutEffect:u.useEffect,eq=new WeakMap,eX=function(e){eG(function(){var t=e.current;if("u">typeof document&&t){var r=t.getRootNode?t.getRootNode():t.ownerDocument,i=r&&("head"in r||"host"in r)?r:t.ownerDocument;if(!eq.has(i)){var o="head"in i?i.head:i,s=(o.ownerDocument||document).createElement("style");s.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}';var a=eM||n.nc;a&&s.setAttribute("nonce",a),eq.set(i,s),o.appendChild(s)}}},[])},eY=function(e){var t,n,r,i,o,s,a,l=e.className,c=e.colorModel,h=e.color,d=void 0===h?c.defaultColor:h,p=e.onChange,f=e.onChangeEnd,m=eC(e,["className","colorModel","color","onChange","onChangeEnd"]),g=(0,u.useRef)(null);eX(g);var v=(t=ek(p),n=ek(f),i=(r=(0,u.useState)(function(){return c.toHsva(d)}))[0],o=r[1],s=(0,u.useRef)({color:d,hsva:i}),a=(0,u.useRef)(!1),(0,u.useEffect)(function(){if(!c.equal(d,s.current.color)){var e=c.toHsva(d);s.current={hsva:e,color:d},o(e),a.current=!1}},[d,c]),(0,u.useEffect)(function(){var e;eU(i,s.current.hsva)||c.equal(e=c.fromHsva(i),s.current.color)||(s.current={hsva:i,color:e},t(e),a.current=!0)},[i,c,t]),[i,(0,u.useCallback)(function(e){o(function(t){return Object.assign({},t,e)})},[]),(0,u.useCallback)(function(){a.current&&(a.current=!1,n(s.current.color))},[n])]),y=v[0],b=v[1],x=v[2],w=eE(["react-colorful",l]);return u.createElement("div",eA({},m,{ref:g,className:w}),u.createElement(eW,{hsva:y,onChange:b,onChangeEnd:x}),u.createElement(eH,{hue:y.h,onChange:b,onChangeEnd:x,className:"react-colorful__last-control"}))},eK={defaultColor:"000",toHsva:function(e){return eV(eN(e))},fromHsva:function(e){return eF(ez({h:e.h,s:e.s,v:e.v,a:1}))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||eU(eN(e),eN(t))}},eQ=function(e){return u.createElement(eY,eA({},e,{colorModel:eK}))};let eZ=e=>{let t,n,r,i,o,s,a,h,d,p,f,m=(0,c.c)(26),{color:g,onChange:v,onClear:y,palette:b}=e,[x,w]=(0,u.useState)(g);m[0]!==v?(t=e=>{w(e),v?.(e)},m[0]=v,m[1]=t):t=m[1];let S=t;m[2]!==v?(n=e=>{let t=e.target.value.replace(/([^0-9A-F]+)/gi,"").substring(0,8);w(`#${t}`),eJ(e.target.value)&&v?.(e.target.value)},m[2]=v,m[3]=n):n=m[3];let A=n;return m[4]===Symbol.for("react.memo_cache_sentinel")?(r={width:"100%"},m[4]=r):r=m[4],m[5]!==g||m[6]!==S?(i=(0,l.jsx)(eQ,{color:g,onChange:S,style:r}),m[5]=g,m[6]=S,m[7]=i):i=m[7],m[8]!==S||m[9]!==b?(o=b&&b.map((e,t)=>(0,l.jsx)(er,{size:"small","aria-label":`change color to ${e}`,sx:{color:e},onClick:()=>S(e),children:(0,l.jsx)(ew,{})},t)),m[8]=S,m[9]=b,m[10]=o):o=m[10],m[11]!==o?(s=(0,l.jsx)(eb,{direction:"row",flexWrap:"wrap",justifyContent:"space-evenly",width:"200px",children:o}),m[11]=o,m[12]=s):s=m[12],m[13]===Symbol.for("react.memo_cache_sentinel")?(a={"aria-label":"enter hex color"},m[13]=a):a=m[13],m[14]!==A||m[15]!==x?(h=(0,l.jsx)(ex.A,{inputProps:a,fullWidth:!0,value:x,onChange:A}),m[14]=A,m[15]=x,m[16]=h):h=m[16],m[17]!==y?(d=y&&(0,l.jsx)(er,{onClick:y,children:(0,l.jsx)(eS,{})}),m[17]=y,m[18]=d):d=m[18],m[19]!==h||m[20]!==d?(p=(0,l.jsxs)(eb,{direction:"row",gap:1,alignItems:"center",children:[h,d]}),m[19]=h,m[20]=d,m[21]=p):p=m[21],m[22]!==p||m[23]!==i||m[24]!==s?(f=(0,l.jsxs)(eb,{spacing:1,children:[i,s,p]}),m[22]=p,m[23]=i,m[24]=s,m[25]=f):f=m[25],f},eJ=(e,t)=>{let n=/^#?([0-9A-F]{3,8})$/i.exec(e),r=n&&n[1]?n[1].length:0;return 3===r||6===r||!!t&&4===r||!!t&&8===r};var e0=n("YC");function e1(e){let t,n,r=(0,c.c)(8),{children:i,chartsTheme:o,enablePinning:s,enableSyncGrouping:a}=e,h=void 0!==s&&s,d=void 0===a||a,[p,f]=(0,u.useState)(null);r[0]!==o||r[1]!==h||r[2]!==d||r[3]!==p?(t={chartsTheme:o,enablePinning:h,lastTooltipPinnedCoords:p,enableSyncGrouping:d,setLastTooltipPinnedCoords:f},r[0]=o,r[1]=h,r[2]=d,r[3]=p,r[4]=t):t=r[4];let m=t;return r[5]!==i||r[6]!==m?(n=(0,l.jsx)(e2.Provider,{value:m,children:i}),r[5]=i,r[6]=m,r[7]=n):n=r[7],n}let e2=(0,u.createContext)(void 0);function e5(){let e=(0,u.useContext)(e2);if(void 0===e)throw Error("No ChartsThemeContext found. Did you forget a Provider?");return e}function e3(){return e5().chartsTheme}function e4(e){let t,n,r,i,o,s,a,h,d,p,f,m=(0,c.c)(26),{label:g,color:v,size:y,onColorChange:b,onClear:x}=e,w=void 0===y?"small":y,[S,A]=(0,u.useState)(null),C=!!S;m[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{A(e.currentTarget)},m[0]=t):t=m[0];let k=t;m[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{A(null)},m[1]=n):n=m[1];let M=n,{thresholds:O}=e3(),{defaultColor:T,palette:_}=O,I=`change ${g} color`;return m[2]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)(ew,{}),m[2]=r):r=m[2],m[3]!==v||m[4]!==C||m[5]!==w||m[6]!==I?(i=(0,l.jsx)(e9,{size:w,"aria-label":I,isSelected:C,iconColor:v,onClick:k,children:r}),m[3]=v,m[4]=C,m[5]=w,m[6]=I,m[7]=i):i=m[7],m[8]===Symbol.for("react.memo_cache_sentinel")?(s={paper:{sx:{padding:e6}}},a={vertical:"top",horizontal:"left"},o={vertical:"top",horizontal:"right"},m[8]=o,m[9]=s,m[10]=a):(o=m[8],s=m[9],a=m[10]),m[11]!==T||m[12]!==_?(h=[T,..._],m[11]=T,m[12]=_,m[13]=h):h=m[13],m[14]!==v||m[15]!==x||m[16]!==b||m[17]!==h?(d=(0,l.jsx)(eZ,{color:v,palette:h,onChange:b,onClear:x}),m[14]=v,m[15]=x,m[16]=b,m[17]=h,m[18]=d):d=m[18],m[19]!==S||m[20]!==C||m[21]!==d?(p=(0,l.jsx)(e0.Ay,{"data-testid":"options color picker",open:C,anchorEl:S,onClose:M,slotProps:s,anchorOrigin:a,transformOrigin:o,children:d}),m[19]=S,m[20]=C,m[21]=d,m[22]=p):p=m[22],m[23]!==p||m[24]!==i?(f=(0,l.jsxs)(l.Fragment,{children:[i,p]}),m[23]=p,m[24]=i,m[25]=f):f=m[25],f}function e6(e){return e.spacing(2)}let e9=(0,y.A)(er,{shouldForwardProp:e=>"isSelected"!==e&&"iconColor"!==e})(({iconColor:e,isSelected:t})=>({backgroundColor:t&&e?`${e}3F`:"undefined",color:e}));var e8=n("Jq"),e7=n("ZQ"),te=Symbol.for("immer-nothing"),tt=Symbol.for("immer-draftable"),tn=Symbol.for("immer-state");function tr(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ti=Object,to=ti.getPrototypeOf,ts="constructor",ta="prototype",tl="configurable",tc="enumerable",tu="writable",th="value",td=e=>!!e&&!!e[tn];function tp(e){return!!e&&(tg(e)||tS(e)||!!e[tt]||!!e[ts]?.[tt]||tA(e)||tC(e))}var tf=ti[ta][ts].toString(),tm=new WeakMap;function tg(e){if(!e||!tk(e))return!1;let t=to(e);if(null===t||t===ti[ta])return!0;let n=ti.hasOwnProperty.call(t,ts)&&t[ts];if(n===Object)return!0;if(!tM(n))return!1;let r=tm.get(n);return void 0===r&&(r=Function.toString.call(n),tm.set(n,r)),r===tf}function tv(e,t,n=!0){0===ty(e)?(n?Reflect.ownKeys(e):ti.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ty(e){let t=e[tn];return t?t.type_:tS(e)?1:tA(e)?2:3*!!tC(e)}var tb=(e,t,n=ty(e))=>2===n?e.has(t):ti[ta].hasOwnProperty.call(e,t),tx=(e,t,n=ty(e))=>2===n?e.get(t):e[t],tw=(e,t,n,r=ty(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n},tS=Array.isArray,tA=e=>e instanceof Map,tC=e=>e instanceof Set,tk=e=>"object"==typeof e,tM=e=>"function"==typeof e,tO=e=>e.modified_?e.copy_:e.base_;function tT(e,t){if(tA(e))return new Map(e);if(tC(e))return new Set(e);if(tS(e))return Array[ta].slice.call(e);let n=tg(e);if(!0!==t&&("class_only"!==t||n)){let t=to(e);if(null!==t&&n)return{...e};let r=ti.create(t);return ti.assign(r,e)}{let t=ti.getOwnPropertyDescriptors(e);delete t[tn];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],o=t[i];!1===o[tu]&&(o[tu]=!0,o[tl]=!0),(o.get||o.set)&&(t[i]={[tl]:!0,[tu]:!0,[tc]:o[tc],[th]:e[i]})}return ti.create(to(e),t)}}function t_(e,t=!1){return tD(e)||td(e)||!tp(e)||(ty(e)>1&&ti.defineProperties(e,{set:tI,add:tI,clear:tI,delete:tI}),ti.freeze(e),t&&tv(e,(e,t)=>{t_(t,!0)},!1)),e}var tI={[th]:function(){tr(2)}};function tD(e){return!(null!==e&&tk(e))||ti.isFrozen(e)}var tR="MapSet",tE="Patches",tP="ArrayMethods",tL={};function tN(e){let t=tL[e];return t||tr(0),t}var tB=e=>!!tL[e];function tj(e,t){t&&(e.patchPlugin_=tN(tE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tz(e){t$(e),e.drafts_.forEach(tV),e.drafts_=null}function t$(e){e===XB&&(XB=e.parent_)}var tF=e=>XB={drafts_:[],parent_:XB,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:tB(tR)?tN(tR):void 0,arrayMethodsPlugin_:tB(tP)?tN(tP):void 0};function tV(e){let t=e[tn];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function tH(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(void 0!==e&&e!==n){n[tn].modified_&&(tz(t),tr(4)),tp(e)&&(e=tW(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[tn].base_,e,t)}else e=tW(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&t_(t,n)}(t,e,!0),tz(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==te?e:void 0}function tW(e,t){if(tD(t))return t;let n=t[tn];if(!n)return tK(t,e.handledSet_,e);if(!tG(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);tY(n,e)}return n.copy_}function tU(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var tG=(e,t)=>e.scope_===t,tq=[];function tX(e,t,n,r){let i=e.copy_||e.base_,o=e.type_;if(void 0!==r&&tx(i,r,o)===t)return void tw(i,r,n,o);if(!e.draftLocations_){let t=e.draftLocations_=new Map;tv(i,(e,n)=>{if(td(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}for(let r of e.draftLocations_.get(t)??tq)tw(i,r,n,o)}function tY(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}tU(e)}}function tK(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||td(e)||t.has(e)||!tp(e)||tD(e)||(t.add(e),tv(e,(r,i)=>{if(td(i)){let t=i[tn];tG(t,n)&&(tw(e,r,tO(t),e.type_),tU(t))}else tp(i)&&tK(i,t,n)})),e}var tQ={get(e,t){var n,r,i;let o;if(t===tn)return e;let s=e.scope_.arrayMethodsPlugin_,a=1===e.type_&&"string"==typeof t;if(a&&s?.isArrayOperationMethod(t))return s.createMethodInterceptor(e,t);let l=e.copy_||e.base_;if(!tb(l,t,e.type_)){let r;return n=e,(r=t0(l,t))?th in r?r[th]:r.get?.call(n.draft_):void 0}let c=l[t];if(e.finalized_||!tp(c)||a&&e.operationMethod&&s?.isMutatingArrayMethod(e.operationMethod)&&Number.isInteger(o=+t)&&String(o)===t)return c;if(c===tJ(e.base_,t)||(r=e,i=c,1===r.type_&&r.allIndicesReassigned_&&tp(i)&&!i[tn]&&r.baseRefs_.has(i))){t2(e);let n=1===e.type_?+t:t,r=t3(e.scope_,c,e,n);return e.copy_[n]=r}return c},has:(e,t)=>t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,n){let r=t0(e.copy_||e.base_,t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=tJ(e.copy_||e.base_,t),i=r?.[tn];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if((n===r?0!==n||1/n==1/r:n!=n&&r!=r)&&(void 0!==n||tb(e.base_,t,e.type_)))return!0;t2(e),t1(e)}return!!(e.copy_[t]===n&&(void 0!==n||tb(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=n,e.assigned_.set(t,!0),!function(e,t,n){let{scope_:r}=e;if(td(n)){let i=n[tn];tG(i,r)&&i.callbacks_.push(function(){t2(e),tX(e,n,tO(i),t)})}else tp(n)&&e.callbacks_.push(function(){let i=e.copy_||e.base_;3===e.type_?i.has(n)&&tK(n,r.handledSet_,r):tx(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&tK(tx(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n),!0)},deleteProperty:(e,t)=>(t2(e),void 0!==tJ(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),t1(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let n=e.copy_||e.base_,r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[tu]:!0,[tl]:1!==e.type_||"length"!==t,[tc]:r[tc],[th]:n[t]}:r},defineProperty(){tr(11)},getPrototypeOf:e=>to(e.base_),setPrototypeOf(){tr(12)}},tZ={};for(let e in tQ){let t=tQ[e];tZ[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function tJ(e,t){let n=e[tn];return(n?n.copy_||n.base_:e)[t]}function t0(e,t){if(!(t in e))return;let n=to(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=to(n)}}function t1(e){!e.modified_&&(e.modified_=!0,e.parent_&&t1(e.parent_))}function t2(e){e.copy_||(e.assigned_=new Map,e.copy_=tT(e.base_,e.scope_.immer_.useStrictShallowCopy_))}tZ.deleteProperty=function(e,t){return tZ.set.call(this,e,t,void 0)},tZ.set=function(e,t,n){return tQ.set.call(this,e[0],t,n,e[0])};var t5=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{let r;if(tM(e)&&!tM(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}if(tM(t)||tr(6),void 0===n||tM(n)||tr(7),tp(e)){let i=tF(this),o=t3(i,e,void 0),s=!0;try{r=t(o),s=!1}finally{s?tz(i):t$(i)}return tj(i,n),tH(r,i)}if(e&&tk(e))tr(1);else{if(void 0===(r=t(e))&&(r=e),r===te&&(r=void 0),this.autoFreeze_&&t_(r,!0),n){let t=[],i=[];tN(tE).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}},this.produceWithPatches=(e,t)=>{let n,r;return tM(e)?(t,...n)=>this.produceWithPatches(t,t=>e(t,...n)):[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){var t;tp(e)||tr(8),td(e)&&(td(t=e)||tr(10),e=function e(t){let n;if(!tp(t)||tD(t))return t;let r=t[tn],i=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=tT(t,r.scope_.immer_.useStrictShallowCopy_),i=r.scope_.immer_.shouldUseStrictIteration()}else n=tT(t,!0);let o=n;return tC(n)&&(n=new Set),tv(o,(t,r)=>{tw(n,t,e(r))},i),r&&(r.finalized_=!1),n}(t));let n=tF(this),r=t3(n,e,void 0);return r[tn].isManual_=!0,t$(n),r}finishDraft(e,t){let n=e&&e[tn];n&&n.isManual_||tr(9);let{scope_:r}=n;return tj(r,t),tH(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--){let r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=tN(tE).applyPatches_;return td(e)?r(e,t):this.produce(e,e=>r(e,t))}};function t3(e,t,n,r){let[i,o]=tA(t)?tN(tR).proxyMap_(t,n):tC(t)?tN(tR).proxySet_(t,n):function(e,t){let n=tS(e),r={type_:+!!n,scope_:t?t.scope_:XB,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,o=tQ;n&&(i=[r],o=tZ);let{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,[a,r]}(t,n);if((n?.scope_??XB).drafts_.push(i),o.callbacks_=n?.callbacks_??[],o.key_=r,n&&void 0!==r)n.callbacks_.push(function(e){if(!o||!tG(o,e))return;e.mapSetPlugin_?.fixSetContents(o);let t=tO(o);tX(n,o.draft_??o,t,r),tY(o,e)});else o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);let{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)});return i}var t4=globalThis.Iterator;t4?.from;var t6=new t5().produce;let t9=["bottom","right"],t8=["list","table"],t7=["small","medium"];function ne(e){return t9.includes(e)}function nt(e){return t8.includes(e)}function nn(e){return t7.includes(e)}let nr={position:"bottom",mode:"list",size:"medium"};function ni(e){return void 0===e?nr.position:ne(e)?e:nr.position}function no(e){return e&&nt(e)?e:nr.mode}function ns(e){return e&&nn(e)?e:nr.size}function na(e,t){return"ALL"!==t&&!!t[e.id]}var nl=n("Pd"),nc=n("X3"),nu=n("gg"),nh=n("by"),nd=n("Rq");let np=(0,y.A)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${nh.A.primary}`]:t.primary},{[`& .${nh.A.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${nl.A.root}:where(& .${nh.A.primary})`]:{display:"block"},[`.${nl.A.root}:where(& .${nh.A.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),nf=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:s=!1,primary:a,primaryTypographyProps:c,secondary:h,secondaryTypographyProps:p,slots:m={},slotProps:g={},...v}=n,{dense:y}=u.useContext(nu.A),b=null!=a?a:r,w=h,S={...n,disableTypography:o,inset:s,primary:!!b,secondary:!!w,dense:y},A=(e=>{let{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return(0,f.A)({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},nh.b,t)})(S),C={slots:m,slotProps:{primary:c,secondary:p,...g}},[k,M]=(0,nd.A)("root",{className:(0,d.A)(A.root,i),elementType:np,externalForwardedProps:{...C,...v},ownerState:S,ref:t}),[O,T]=(0,nd.A)("primary",{className:A.primary,elementType:nc.A,externalForwardedProps:C,ownerState:S}),[_,I]=(0,nd.A)("secondary",{className:A.secondary,elementType:nc.A,externalForwardedProps:C,ownerState:S});return null==b||b.type===nc.A||o||(b=(0,l.jsx)(O,{variant:y?"body2":"body1",component:T?.variant?void 0:"span",...T,children:b})),null==w||w.type===nc.A||o||(w=(0,l.jsx)(_,{variant:"body2",color:"textSecondary",...I,children:w})),(0,l.jsxs)(k,{...M,children:[b,w]})});var nm=n("i"),ng=n("Dd");function nv(e){return(0,M.Ay)("MuiListItemButton",e)}let ny=(0,k.A)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),nb=(0,y.A)(w.A,{shouldForwardProp:e=>(0,v.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((0,b.A)(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ny.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${ny.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${ny.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${ny.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${ny.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),nx=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:s,dense:a=!1,disableGutters:c=!1,divider:h=!1,focusVisibleClassName:p,selected:m=!1,className:g,...v}=n,y=u.useContext(nu.A),b=u.useMemo(()=>({dense:a||y.dense||!1,alignItems:r,disableGutters:c}),[r,y.dense,a,c]),w=u.useRef(null);(0,nm.A)(()=>{i&&w.current&&w.current.focus()},[i]);let S={...n,alignItems:r,dense:b.dense,disableGutters:c,divider:h,selected:m},A=(e=>{let{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:s,selected:a}=e,l=(0,f.A)({root:["root",r&&"dense",!o&&"gutters",s&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",a&&"selected"]},nv,n);return{...n,...l}})(S),C=(0,ng.A)(w,t);return(0,l.jsx)(nu.A.Provider,{value:b,children:(0,l.jsx)(nb,{ref:C,href:v.href||v.to,component:(v.href||v.to)&&"div"===o?"button":o,focusVisibleClassName:(0,d.A)(A.focusVisible,p),ownerState:S,className:(0,d.A)(A.root,g),...v,classes:A,children:s})})});function nw(...e){return e.flatMap(e=>void 0===e?[]:Array.isArray(e)?e:[e])}let nS=(0,u.memo)(function(e){let t,n,r,i,o,s,a=(0,c.c)(12);return a[0]!==e?({color:t,sx:r,...n}=e,a[0]=e,a[1]=t,a[2]=n,a[3]=r):(t=a[1],n=a[2],r=a[3]),a[4]!==r?(i=nw({height:4,width:16,margin:nA},r),a[4]=r,a[5]=i):i=a[5],a[6]!==t?(o={backgroundColor:t},a[6]=t,a[7]=o):o=a[7],a[8]!==n||a[9]!==i||a[10]!==o?(s=(0,l.jsx)(e7.A,{...n,sx:i,style:o}),a[8]=n,a[9]=i,a[10]=o,a[11]=s):s=a[11],s});function nA(e){return e.spacing(.5)}let nC=(0,u.forwardRef)(function(e,t){let n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k=(0,c.c)(47);k[0]!==e?({item:i,sx:d,truncateLabel:p,onClick:o,isVisuallySelected:r,onMouseOver:a,onMouseOut:s,index:n,...h}=e,k[0]=e,k[1]=n,k[2]=r,k[3]=i,k[4]=o,k[5]=s,k[6]=a,k[7]=h,k[8]=d,k[9]=p):(n=k[1],r=k[2],i=k[3],o=k[4],s=k[5],a=k[6],h=k[7],d=k[8],p=k[9]);let[M,O]=(0,u.useState)(p);k[10]!==p?(f=function(){p&&O(!1)},k[10]=p,k[11]=f):f=k[11];let T=f;k[12]!==p?(m=function(){p&&O(!0)},k[12]=p,k[13]=m):m=k[13];let _=m;k[14]!==i||k[15]!==o?(g=e=>{o(e,i.id),i.onClick?.(e)},k[14]=i,k[15]=o,k[16]=g):g=k[16];let I=g;return k[17]!==d?(v=nw({padding:0,cursor:"pointer"},d),k[17]=d,k[18]=v):v=k[18],k[19]!==n||k[20]!==i.id||k[21]!==a?(y=e=>a?.(e,{id:i.id,index:n}),k[19]=n,k[20]=i.id,k[21]=a,k[22]=y):y=k[22],k[23]!==n||k[24]!==i.id||k[25]!==s?(b=e=>s?.(e,{id:i.id,index:n}),k[23]=n,k[24]=i.id,k[25]=s,k[26]=b):b=k[26],k[27]===Symbol.for("react.memo_cache_sentinel")?(x={display:"flex",alignItems:"center"},k[27]=x):x=k[27],k[28]!==i.color?(w=(0,l.jsx)(e7.A,{sx:x,children:(0,l.jsx)(nS,{color:i.color})}),k[28]=i.color,k[29]=w):w=k[29],k[30]!==M?(S={noWrap:M},k[30]=M,k[31]=S):S=k[31],k[32]!==_||k[33]!==T||k[34]!==i.label||k[35]!==S?(A=(0,l.jsx)(nf,{primary:i.label,primaryTypographyProps:S,onMouseOver:T,onMouseOut:_}),k[32]=_,k[33]=T,k[34]=i.label,k[35]=S,k[36]=A):A=k[36],k[37]!==I||k[38]!==r||k[39]!==h||k[40]!==t||k[41]!==A||k[42]!==v||k[43]!==y||k[44]!==b||k[45]!==w?(C=(0,l.jsxs)(nx,{...h,role:"listitem",sx:v,dense:!0,onClick:I,onMouseOver:y,onMouseOut:b,selected:r,ref:t,children:[w,A]}),k[37]=I,k[38]=r,k[39]=h,k[40]=t,k[41]=A,k[42]=v,k[43]=y,k[44]=b,k[45]=w,k[46]=C):C=k[46],C}),nk=(0,u.memo)(nC);function nM(e){let t,n,r,i,o=(0,c.c)(17),{height:s,items:a,selectedItems:u,onLegendItemClick:h,onItemMouseOver:d,onItemMouseOut:p}=e;if(o[0]===Symbol.for("react.memo_cache_sentinel")?(t=[0,1,0,0],o[0]=t):t=o[0],o[1]!==s?(n={width:"100%",height:s,padding:t,overflowY:"scroll",margin:0},o[1]=s,o[2]=n):n=o[2],o[3]!==a||o[4]!==p||o[5]!==d||o[6]!==h||o[7]!==u){let e;o[9]!==p||o[10]!==d||o[11]!==h||o[12]!==u?(e=(e,t)=>(0,l.jsx)(nk,{item:e,index:t,isVisuallySelected:na(e,u),onMouseOver:d,onMouseOut:p,onClick:h,sx:{width:"auto",float:"left",paddingRight:1.5}},e.id),o[9]=p,o[10]=d,o[11]=h,o[12]=u,o[13]=e):e=o[13],r=a.map(e),o[3]=a,o[4]=p,o[5]=d,o[6]=h,o[7]=u,o[8]=r}else r=o[8];return o[14]!==n||o[15]!==r?(i=(0,l.jsx)(e7.A,{component:"ul",sx:n,children:r}),o[14]=n,o[15]=r,o[16]=i):i=o[16],i}var nO=n("A");function nT(e){e()}function n_(e,t){return n=>e(t(n))}function nI(e){return void 0!==e}function nD(){}function nR(e,t){return t(e)}function nE(...e){return e}function nP(e){e(2)}function nL(e){return e(4)}function nN(e,t){return e(1,e=>t(0,e))}function nB(e,t){let n=e(1,e=>{n(),t(e)});return n}function nj(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function nz(e,t){return e===t}function n$(e=nz){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function nF(e){return t=>n=>{e(n)&&t(n)}}function nV(e){return t=>n_(t,e)}function nH(e){return t=>()=>{t(e)}}function nW(e,...t){let n=function(...e){return t=>e.reduceRight(nR,t)}(...t);return(t,r)=>{switch(t){case 2:nP(e);return;case 1:return e(1,n(r))}}}function nU(e,t){return n=>r=>{n(t=e(t,r))}}function nG(e){return t=>n=>{e>0?e--:t(n)}}function nq(e){let t=null,n;return r=>i=>{t=i,n||(n=setTimeout(()=>{n=void 0,r(t)},e))}}function nX(...e){let t=Array.from({length:e.length}),n=0,r=null,i=2**e.length-1;return e.forEach((e,o)=>{let s=2**o;e(1,e=>{let a=n;n|=s,t[o]=e,a!==i&&n===i&&r&&(r(),r=null)})}),e=>o=>{let s=()=>{e([o].concat(t))};n===i?s():r=s}}function nY(e){let t=e,n=nQ();return(e,r)=>{switch(e){case 0:t=r;break;case 1:r(t);break;case 4:return t}return n(e,r)}}function nK(e,t){var n;return n=nY(t),nN(e,n),n}function nQ(){let e=[];return(t,n)=>{switch(t){case 0:e.slice().forEach(e=>{e(n)});return;case 2:e.splice(0);return;case 1:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}}}function nZ(e){var t;return t=nQ(),nN(e,t),t}let nJ={singleton:!0};function n0(e,t=[],n=nJ){let{singleton:r}=n;return{constructor:e,dependencies:t,id:n1(),singleton:r}}let n1=()=>Symbol("id");function n2(...e){let t=nQ(),n=Array.from({length:e.length}),r=0,i=2**e.length-1;return e.forEach((e,o)=>{let s=2**o;e(1,e=>{n[o]=e,(r|=s)===i&&t(0,n)})}),function(e,o){switch(e){case 2:return void nP(t);case 1:return r===i&&o(n),t(1,o)}}}function n5(e,t=nz){return nW(e,n$(t))}function n3(...e){return function(t,n){switch(t){case 2:return;case 1:return function(...e){return()=>{e.map(nT)}}(...e.map(e=>e(1,n)))}}}let n4={DEBUG:0,INFO:1,WARN:2,ERROR:3},n6={[n4.DEBUG]:"debug",[n4.ERROR]:"error",[n4.INFO]:"log",[n4.WARN]:"warn"},n9=n0(()=>{let e=nY(n4.ERROR);return{log:nY((t,n,r=n4.INFO)=>{r>=((typeof globalThis>"u"?window:globalThis).VIRTUOSO_LOG_LEVEL??nL(e))&&console[n6[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function n8(e){let t="self"in e?e.document.documentElement:e;return"rtl"===t.ownerDocument.defaultView.getComputedStyle(t).direction}function n7(e,t){return n8(e)?-t:t}function re(e,t,n){return rt(e,t,n).callbackRef}function rt(e,t,n){let r=u.useRef(null),i=u.useMemo(()=>"u">typeof ResizeObserver?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;null!==n.offsetParent&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return{callbackRef:e=>{e&&t?(i?.observe(e),r.current=e):(r.current&&i?.unobserve(r.current),r.current=null)},ref:r}}function rn(e,t,n,r,i,o,s,a,l){return rt(u.useCallback(n=>{let l,c=function(e,t,n,r){let i=e.length;if(0===i)return null;let o=[];for(let s=0;s<i;s++){let i=e.item(s);if(void 0===i.dataset.index)continue;let a=parseInt(i.dataset.index,10),l=parseFloat(i.dataset.knownSize),c=t(i,n);if(0===c&&r("Zero-sized element, this should not happen",{child:i},n4.ERROR),c===l)continue;let u=o[o.length-1];0===o.length||u.size!==c||u.endIndex!==a-1?o.push({endIndex:a,size:c,startIndex:a}):o[o.length-1].endIndex++}return o}(n.children,t,a?"offsetWidth":"offsetHeight",i),u=n.parentElement;for(;void 0===u.dataset.virtuosoScroller;)u=u.parentElement;let h=u.lastElementChild?.dataset.viewportType==="window";h&&(l=u.ownerDocument.defaultView);let d=s?a?s.scrollWidth:s.scrollHeight:h?a?l.document.documentElement.scrollWidth:l.document.documentElement.scrollHeight:a?u.scrollWidth:u.scrollHeight,p=s?a?s.offsetWidth:s.offsetHeight:h?a?l.innerWidth:l.innerHeight:a?u.offsetWidth:u.offsetHeight;r({scrollHeight:d,scrollTop:Math.max(s?a?n7(s,s.scrollLeft):s.scrollTop:h?a?n7(l,l.scrollX||l.document.documentElement.scrollLeft):l.scrollY||l.document.documentElement.scrollTop:a?n7(u,u.scrollLeft):u.scrollTop,0),viewportHeight:p}),o?.(a?rr("column-gap",getComputedStyle(n).columnGap,i):rr("row-gap",getComputedStyle(n).rowGap,i)),null!==c&&e(c)},[e,t,i,o,s,r,a]),n,l)}function rr(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,n4.WARN),"normal"===t?0:parseInt(t??"0",10)}let ri=typeof document>"u"?u.useEffect:u.useLayoutEffect;function ro(e){return e?.currentCSSZoom??1}function rs(e,t){return 1===t?e:Math.round(e*t*64)/64}function ra(e,t,n=e.parentElement){return rs(e.getBoundingClientRect()[t],1/ro(n))}function rl(e,t,n=e.parentElement){return Math.round(ra(e,t,n))}function rc(e,t,n){let r=u.useRef(null),i=u.useCallback(n=>{let i,o,a;if(!n?.offsetParent)return;let l=n.getBoundingClientRect(),c=ro(n);if(t){let e=t.getBoundingClientRect(),n=l.top-e.top;o=ro(t),a=rs(e.height-Math.max(0,n),1/c),i=rs(n,1/o)+t.scrollTop}else{let e=s.current.ownerDocument.defaultView;o=1,a=rs(e.innerHeight-Math.max(0,l.top),1/c),i=l.top+e.scrollY}r.current={listHeight:rs(l.height,1/c),offsetTop:i,visibleHeight:a,visibleWidth:rs(l.width,1/c),zoomRatio:o/c},e(r.current)},[e,t]),{callbackRef:o,ref:s}=rt(i,!0,n),a=u.useCallback(()=>{i(s.current)},[i,s]);return u.useEffect(()=>{if(t){t.addEventListener("scroll",a);let e=new ResizeObserver(()=>{requestAnimationFrame(a)});return e.observe(t),()=>{t.removeEventListener("scroll",a),e.unobserve(t)}}let e=s.current?.ownerDocument.defaultView;return e?.addEventListener("scroll",a),e?.addEventListener("resize",a),()=>{e?.removeEventListener("scroll",a),e?.removeEventListener("resize",a)}},[a,t,s]),o}let ru=n0(()=>{let e=nQ(),t=nQ(),n=nY(0),r=nQ(),i=nQ(),o=nY(0),s=nQ(),a=nQ(),l=nY(0),c=nY(0),u=nY(0),h=nY(0),d=nQ(),p=nQ(),f=nY(!1),m=nY(!1),g=nY(!1);return nN(nW(e,nV(({scrollTop:e})=>e)),t),nN(nW(e,nV(({scrollHeight:e})=>e)),a),nN(t,o),{deviation:n,deviationCommitted:r,fixedFooterHeight:u,fixedHeaderHeight:c,footerHeight:h,headerHeight:l,horizontalDirection:m,scrollBy:p,scrollContainerState:e,scrollHeight:a,scrollingInProgress:f,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:g,smoothScrollTargetReached:i,statefulScrollTop:o,viewportHeight:s}},[],{singleton:!0}),rh={lvl:0};function rd(e,t){let n=e.length;if(0===n)return[];let{index:r,value:i}=t(e[0]),o=[];for(let s=1;s<n;s++){let{index:n,value:a}=t(e[s]);o.push({end:n-1,start:r,value:i}),r=n,i=a}return o.push({end:1/0,start:r,value:i}),o}function rp(e){return e===rh}function rf(e,t){if(!rp(e))return t===e.k?e.v:t<e.k?rf(e.l,t):rf(e.r,t)}function rm(e,t,n="k"){if(rp(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=rm(e.r,t,n);return -1/0===r[0]?[e.k,e.v]:r}return rm(e.l,t,n)}function rg(e,t,n){return rp(e)?rS(t,n,1):t===e.k?rx(e,{k:t,v:n}):t<e.k?rC(rA(rx(e,{l:rg(e.l,t,n)}))):rC(rA(rx(e,{r:rg(e.r,t,n)})))}function rv(e,t,n){if(rp(e))return[];let r=rm(e,t)[0];return rd(function e(t,n,r){if(rp(t))return[];let{k:i,l:o,r:s,v:a}=t,l=[];return i>n&&(l=l.concat(e(o,n,r))),i>=n&&i<=r&&l.push({k:i,v:a}),i<=r&&(l=l.concat(e(s,n,r))),l}(e,r,n),({k:e,v:t})=>({index:e,value:t}))}function ry(e){return rp(e)?[]:[...ry(e.l),{k:e.k,v:e.v},...ry(e.r)]}function rb(e){let{l:t,lvl:n,r:r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(rw(t))return rA(rx(e,{lvl:n-1}));if(!rp(t)&&!rp(t.r))return rx(t.r,{l:rx(t,{r:t.r.l}),lvl:n,r:rx(e,{l:t.r.r,lvl:n-1})});throw Error("Unexpected empty nodes")}if(rw(e))return rC(rx(e,{lvl:n-1}));if(!rp(r)&&!rp(r.l)){let t=r.l,i=rw(t)?r.lvl-1:r.lvl;return rx(t,{l:rx(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:rC(rx(r,{l:t.r,lvl:i}))})}throw Error("Unexpected empty nodes")}function rx(e,t){return rS(void 0===t.k?e.k:t.k,void 0===t.v?e.v:t.v,void 0===t.lvl?e.lvl:t.lvl,void 0===t.l?e.l:t.l,void 0===t.r?e.r:t.r)}function rw(e){return rp(e)||e.lvl>e.r.lvl}function rS(e,t,n,r=rh,i=rh){return{k:e,l:r,lvl:n,r:i,v:t}}function rA(e){let{l:t}=e;return rp(t)||t.lvl!==e.lvl?e:rx(t,{r:rx(e,{l:t.r})})}function rC(e){let{lvl:t,r:n}=e;return rp(n)||rp(n.r)||n.lvl!==t||n.r.lvl!==t?e:rx(n,{l:rx(e,{r:n.l}),lvl:t+1})}function rk(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function rM(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}let rO=n0(()=>({recalcInProgress:nY(!1)}),[],{singleton:!0});function rT(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let o=Math.floor((r+i)/2),s=n(e[o],t);if(0===s)return o;if(-1===s){if(i-r<2)return o-1;i=o-1}else{if(i===r)return o;r=o+1}}throw Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function r_(e){return!rp(e.groupOffsetTree)}function rI({index:e},t){return t===e?0:t<e?-1:1}function rD(){return{groupIndices:[],groupOffsetTree:rh,lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:rh}}function rR({offset:e},t){return t===e?0:t<e?-1:1}function rE(e,t,n){if(0===t.length)return 0;let{index:r,offset:i,size:o}=t[rT(t,e,rI)],s=e-r,a=o*s+(s-1)*n+i;return a>0?a+n:a}function rP(e,t){if(!r_(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function rL(e,t,n){if(void 0!==e.groupIndex)return t.groupIndices[e.groupIndex]+1;let r=rP("LAST"===e.index?n:e.index,t);return Math.max(0,Math.min(n,r))}function rN(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n!==e)}function rB(e,t,n,r){let i=e,o=0,s=0,a=0,l=0;if(0===t)i=[];else{l=rT(i,t-1,rI),a=i[l].offset;let e=rm(n,t-1);o=e[0],s=e[1],i.length&&i[l].size===rm(n,t)[1]&&(l-=1),i=i.slice(0,l+1)}for(let{start:e,value:l}of rv(n,t,1/0)){let t=e-o,n=t*s+a+t*r;i.push({index:e,offset:n,size:l}),o=e,a=n,s=l}return{lastIndex:o,lastOffset:a,lastSize:s,offsetTree:i}}function rj(e){return{index:e.index,value:e}}let rz={offsetHeight:"height",offsetWidth:"width"},r$=n0(([{log:e},{recalcInProgress:t}])=>{let n=nQ(),r=nQ(),i=nK(r,0),o=nQ(),s=nQ(),a=nY(0),l=nY([]),c=nY(void 0),u=nY(void 0),h=nY(void 0),d=nY(void 0),p=nY((e,t)=>rl(e,rz[t])),f=nY(void 0),m=nY(0),g=rD(),v=nQ(),y=nK(nW(n3(n,v),nX(l,e,m),nU((e,[t,...n])=>{if(null===t){let[e]=n;return{...rD(),groupIndices:e,groupOffsetTree:e.reduce((e,t,n)=>rg(e,t,n),rh)}}return function(e,[t,n,r,i]){t.length>0&&r("received item sizes",t,n4.DEBUG);let o=e.sizeTree,s=o,a=0;if(n.length>0&&rp(o)&&2===t.length){let e=t[0].size,r=t[1].size;s=n.reduce((t,n)=>rg(rg(t,n,e),n+1,r),s)}else[s,a]=function(e,t){let n=rp(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:o}=r;if(n=Math.min(n,o),rp(e)){e=rg(e,0,i);continue}let s=rv(e,o-1,t+1);if(s.some(function(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||1/0===e.end)&&e.value===n}(r)))continue;let a=!1,l=!1;for(let{end:n,start:r,value:o}of s)a?(t>=r||i===o)&&(e=function e(t,n){if(rp(t))return rh;let{k:r,l:i,r:o}=t;if(n===r){if(rp(i))return o;if(rp(o))return i;let[e,n]=function e(t){return rp(t.r)?[t.k,t.v]:e(t.r)}(i);return rb(rx(t,{k:e,l:function e(t){return rp(t.r)?t.l:rb(rx(t,{r:e(t.r)}))}(i),v:n}))}return n<r?rb(rx(t,{l:e(i,n)})):rb(rx(t,{r:e(o,n)}))}(e,r)):(l=o!==i,a=!0),n>t&&t>=r&&o!==i&&(e=rg(e,t+1,o));l&&(e=rg(e,o,i))}return[e,n]}(s,t);if(s===o)return e;let{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:h}=rB(e.offsetTree,a,s,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>rg(e,t,rE(t,h,i)),rh),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:h,sizeTree:s}}(e,[t,...n])},g),n$()),g),b=nK(nW(l,n$(),nU((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),nV(({prev:e})=>e)),[]);nN(nW(l,nF(e=>e.length>0),nX(y,m),nV(([e,t,n])=>{let r=e.reduce((e,r,i)=>rg(e,r,rE(r,t.offsetTree,n)||i),rh);return{...t,groupIndices:e,groupOffsetTree:r}})),y),nN(nW(r,nX(y),nF(([e,{lastIndex:t}])=>e<t),nV(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),nN(c,u);let x=nK(nW(c,nV(e=>void 0===e)),!0);nN(nW(u,nF(e=>void 0!==e&&rp(nL(y).sizeTree)),nV(e=>{let t=nL(h),n=nL(l).length>0;return void 0!==t&&0!==t?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),nN(nW(d,nF(e=>void 0!==e&&e.length>0&&rp(nL(y).sizeTree)),nV(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let o=e[i];o!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=o,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),nN(nW(l,nX(h,u),nF(([,e,t])=>void 0!==e&&void 0!==t),nV(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let o=e[i],s=e[i+1];r.push({startIndex:o,endIndex:o,size:t}),void 0!==s&&r.push({startIndex:o+1,endIndex:s-1,size:n})}return r})),n);let w=nZ(nW(n,nX(y),nU(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),nV(e=>e.changed)));nW(a,nU((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),nV(e=>e.diff))(1,e=>{let{groupIndices:n}=nL(y);if(e>0)t(0,!0),o(0,e+rN(e,n));else if(e<0){let t=nL(b);t.length>0&&(e-=rN(-e,t)),s(0,e)}}),nW(a,nX(e))(1,([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},n4.ERROR)});let S=nZ(o);nN(nW(o,nX(y),nV(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=rf(t.sizeTree,0),o=0,s=0;for(;o<e;){let e=t.groupIndices[s],a=t.groupIndices.length===s+1?1/0:t.groupIndices[s+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+a-1,size:i,startIndex:e+1}),s++,o+=a+1}let a=ry(t.sizeTree);return o!==e&&a.shift(),a.reduce((t,{k:n,v:r})=>{let i=t.ranges;return 0!==t.prevSize&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return ry(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let A=nZ(nW(s,nX(y,m),nV(([e,{offsetTree:t},n])=>rE(-e,t,n))));return nN(nW(s,nX(y,m),nV(([e,t,n])=>{if(t.groupIndices.length>0){if(rp(t.sizeTree))return t;let r=rh,i=nL(b),o=0,s=0,a=0;for(;o<-e;){a=i[s];let e=i[s+1]-a-1;s++,o+=e+1}return r=ry(t.sizeTree).reduce((t,{k:n,v:r})=>rg(t,Math.max(0,n+e),r),r),o!==-e&&(r=rg(r,0,rf(t.sizeTree,a)),r=rg(r,1,rm(t.sizeTree,-e+1)[1])),{...t,sizeTree:r,...rB(t.offsetTree,0,r,n)}}let r=ry(t.sizeTree).reduce((t,{k:n,v:r})=>rg(t,Math.max(0,n+e),r),rh);return{...t,sizeTree:r,...rB(t.offsetTree,0,r,n)}})),y),{beforeUnshiftWith:S,data:f,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:h,gap:m,groupIndices:l,heightEstimates:d,itemSize:p,listRefresh:w,resetSizes:v,shiftWith:s,shiftWithOffset:A,sizeRanges:n,sizes:y,statefulTotalCount:i,totalCount:r,trackItemSizes:x,unshiftWith:o}},nE(n9,rO),{singleton:!0});function rF(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}let rV=n0(([{groupIndices:e,resetSizes:t,sizeRanges:n,sizes:r,statefulTotalCount:i,totalCount:o,trackItemSizes:s},{headerHeight:a,scrollTop:l}])=>{let c=nQ(),u=nQ(),h=nZ(nW(c,nV(rF))),d=nK(nW(n,nX(i,e),nF(([,e,t])=>e>t.length),nH(!0)),!1);return nN(nW(h,nU(([,e],t)=>[e,t],[{groupIndices:[],totalCount:0},{groupIndices:[],totalCount:0}]),nX(r,s,d),nF(([[e,t],{sizeTree:n},r,i])=>{let o=e.groupIndices.length>0&&e.totalCount===e.groupIndices.length,s=t.totalCount>t.groupIndices.length;return r&&!i&&o&&s&&!rp(n)}),nH(null)),t),nN(nW(h,nV(e=>e.totalCount)),o),nN(nW(h,nV(e=>e.groupIndices)),e),nN(nW(n2(l,r,a),nF(([e,t])=>r_(t)),nV(([e,t,n])=>rm(t.groupOffsetTree,Math.max(e-n,0),"v")[0]),n$(),nV(e=>[e])),u),{groupCounts:c,topItemsIndexes:u}},nE(r$,ru)),rH=n0(([{log:e}])=>{let t=nY(!1),n=nZ(nW(t,nF(e=>e),n$()));return t(1,t=>{t&&nL(e)("props updated",{},n4.DEBUG)}),{didMount:n,propsReady:t}},nE(n9),{singleton:!0}),rW="u">typeof document&&"scrollBehavior"in document.documentElement.style;function rU(e){let t="number"==typeof e?{index:e}:{...e};return t.align||(t.align="start"),t.behavior&&rW||(t.behavior="auto"),void 0===t.offset&&(t.offset=0),t}let rG=n0(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:o,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:h},{log:d}])=>{let p=nQ(),f=nQ(),m=nY(0),g=null,v=null,y=null;function b(){null!==g&&(g(),g=null),null!==y&&(y(),y=null),v&&(clearTimeout(v),v=null),l(0,!1)}return nN(nW(p,nX(n,h,r,m,a,s,d),nX(e,o,i),nV(([[e,n,r,i,o,s,a,c],h,d,m])=>{let x=rU(e),{align:w,behavior:S,offset:A}=x,C=i-1,k=rL(x,n,C),M=rE(k,n.offsetTree,h)+s;"end"===w?(M+=d+rm(n.sizeTree,k)[1]-r+m,k===C&&(M+=a)):"center"===w?M+=(d+rm(n.sizeTree,k)[1]-r+m)/2:M-=o,void 0!==A&&0!==A&&(M+=A);let O=t=>{b(),t?(c("retrying to scroll to",{location:e},n4.DEBUG),p(0,e)):(f(0,!0),c("list did not change, scroll successful",{},n4.DEBUG))};if(b(),"smooth"===S){let e=!1;y=t(1,t=>{e=e||t}),g=nB(u,()=>{O(e)})}else g=nB(nW(t,e=>{let t=setTimeout(()=>{e(!1)},150);return n=>{n&&(e(!0),clearTimeout(t))}}),O);return v=setTimeout(()=>{b()},1200),l(0,!0),c("scrolling from index to",{behavior:S,index:k,top:M},n4.DEBUG),{behavior:S,top:M}})),c),{scrollTargetReached:f,scrollToIndex:p,topListHeight:m}},nE(r$,ru,n9),{singleton:!0});function rq(e,t){0===e?t():requestAnimationFrame(()=>{rq(e-1,t)})}function rX(e,t){if(void 0===e)return 0;let n=t-1;return Math.max(0,Math.min("number"==typeof e?e:"LAST"===e.index?n:e.index,n))}function rY(e){return void 0===e||("number"==typeof e?0===e:0===e.index&&(void 0===e.align||"start"===e.align)&&(void 0===e.offset||0===e.offset))}let rK=n0(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:o},{didMount:s}])=>{let a=nY(!0),l=nY(0),c=nY(!0);return nN(nW(s,nX(l),nF(([e,t])=>!rY(t)),nH(!1)),a),nN(nW(s,nX(l),nF(([e,t])=>!rY(t)),nH(!1)),c),nW(n2(t,s),nX(a,n,e,c),nF(([[,e],t,{sizeTree:n},r,i])=>e&&(!rp(n)||nI(r))&&!t&&!i),nX(l))(1,([,e])=>{if(void 0===e){a(0,!0),c(0,!0);return}nB(i,()=>{c(0,!0)}),rq(4,()=>{nB(r,()=>{a(0,!0)}),o(0,e)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},nE(r$,ru,rG,rH),{singleton:!0});function rQ(e,t){return 1.01>Math.abs(e-t)}let rZ="down",rJ={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},r0=n0(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:o}])=>{let s=nY(!1),a=nY(!0),l=nQ(),c=nQ(),u=nY(4),h=nY(0),d=nK(nW(n3(nW(n5(i),nG(1),nH(!0)),nW(n5(i),nG(1),nH(!1),nj(100))),n$()),!1),p=nK(nW(n3(nW(n,nH(!0)),nW(n,nH(!1),nj(200))),n$()),!1);nN(nW(n2(n5(i),n5(h)),nV(([e,t])=>e<=t),n$()),a),nN(nW(a,nq(50)),c);let f=nZ(nW(n2(r,n5(o),n5(t),n5(e),n5(u)),nU((e,[{scrollHeight:t,scrollTop:n},r,i,o,s])=>{let a={scrollHeight:t,scrollTop:n,viewportHeight:r};if(n+r-t>-s){let t,r;return n>e.state.scrollTop?(t="SCROLLED_DOWN",r=e.state.scrollTop-n):(t="SIZE_DECREASED",r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:a}}return{atBottom:!1,notAtBottomBecause:a.scrollHeight>e.state.scrollHeight?"SIZE_INCREASED":r<e.state.viewportHeight?"VIEWPORT_HEIGHT_DECREASING":n<e.state.scrollTop?"SCROLLING_UPWARDS":"NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",state:a}},rJ),n$((e,t)=>void 0!==e&&e.atBottom===t.atBottom))),m=nK(nW(r,nU((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!rQ(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),nF(e=>e.changed),nV(e=>e.jump)),0);nN(nW(f,nV(e=>e.atBottom)),s),nN(nW(s,nq(50)),l);let g=nY(rZ);nN(nW(r,nV(({scrollTop:e})=>e),n$(),nU((e,t)=>nL(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?"up":rZ,prevScrollTop:t},{direction:rZ,prevScrollTop:0}),nV(e=>e.direction)),g),nN(nW(r,nq(50),nH("none")),g);let v=nY(0);return nN(nW(d,nF(e=>!e),nH(0)),v),nN(nW(i,nq(100),nX(d),nF(([e,t])=>t),nU(([e,t],[n])=>[t,n],[0,0]),nV(([e,t])=>t-e)),v),{atBottomState:f,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:h,isAtBottom:s,isAtTop:a,isScrolling:d,lastJumpDueToItemResize:m,scrollDirection:g,scrollVelocity:v}},nE(ru)),r1="bottom",r2="none";function r5(e,t,n){return"number"==typeof e?"up"===n&&"top"===t||n===rZ&&t===r1?e:0:"up"===n?"top"===t?e.main:e.reverse:t===r1?e.main:e.reverse}function r3(e,t){return"number"==typeof e?e:e[t]??0}let r4=n0(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let o=nQ(),s=nY(0),a=nY(0),l=nY(0),c=nK(nW(n2(n5(r),n5(i),n5(n),n5(o,rM),n5(l),n5(s),n5(t),n5(e),n5(a)),nV(([e,t,n,[r,i],o,s,a,l,c])=>{let u=e-l,h=Math.max(n-u,0),d=r2,p=r3(c,"top"),f=r3(c,r1);return r-=l,r+=n+a,i+=n+a,r>e+(s+a)-p&&(d="up"),(i-=l)<e-h+t+f&&(d=rZ),d!==r2?[Math.max(u-n-r5(o,"top",d)-p,0),u-h-a+t+r5(o,r1,d)+f]:null}),nF(e=>null!==e),n$(rM)),[0,0]);return{increaseViewportBy:a,listBoundary:o,overscan:l,topListHeight:s,visibleRange:c}},nE(ru),{singleton:!0}),r6={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function r9(e,t,n,r,i,o){let{lastIndex:s,lastOffset:a,lastSize:l}=i,c=0,u=0;if(e.length>0){c=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let h=n-s,d=c,p=a+h*l+(h-1)*r-u;return{bottom:u,firstItemIndex:o,items:r7(e,i,o),offsetBottom:p,offsetTop:c,top:d,topItems:r7(t,i,o),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function r8(e,t,n,r,i,o){let s=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-s>=e)break;s++}let a=e+s,l=void 0!==o,c=o?.length??0,u=rX(t,l?c:a),h=l?Math.max(0,Math.min(a,c-u)):a;return r9(Array.from({length:h}).map((e,t)=>({data:o?.[t+u],index:t+u,offset:0,size:0})),[],h,i,n,r)}function r7(e,t,n){if(0===e.length)return[];if(!r_(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,o=[],s=rv(t.groupOffsetTree,r,i),a,l=0;for(let r of e){let e;(!a||a.end<r.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start)),e=r.index===a.start?{index:l,type:"group"}:{groupIndex:l,index:r.index-(l+1)+n},o.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return o}function ie(e,t){return void 0===e?0:"number"==typeof e?e:e[t]??0}let it=n0(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},o,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:h},d,{didMount:p},{recalcInProgress:f}])=>{let m=nY([]),g=nY(0),v=nK(nW(r,nF(({sizeTree:e})=>!rp(e)),nH(!0)),!1),y=nQ(),b=nY(0);nN(o.topItemsIndexes,m);let x=nK(nW(n2(p,f,n5(l,rM),n5(i),n5(r),n5(c),u,n5(m),n5(t),n5(n),n5(b),e,n5(g)),nF(([e,t,,n,,,,,,,,r])=>{let i=void 0!==r&&r.length!==n;return e&&!t&&!i}),nV(([,,[e,t],n,r,i,o,s,a,l,c,u,h])=>{var d;let{offsetTree:p,sizeTree:f}=r;if(0===n)return{...r6,totalCount:n};if(0===e&&0===t)return 0===h?{...r6,totalCount:n}:r8(h,i,r,a,l,u);if(rp(f))return h>0&&!nL(v)?null:r9(function(e,t,n,r){if(r_(t)){let i=r-t.groupIndices.length;if(i<=0)return[{index:t.groupIndices[0],offset:0,size:0}];let o=rP(Math.min(e,i-1),t);return[{index:rm(t.groupOffsetTree,o)[0],offset:0,size:0},{data:n?.[0],index:o,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}(rX(i,n),r,u,n),[],n,l,r,a);let m=[];if(s.length>0){let e=s[0],t=s[s.length-1],n=0;for(let r of rv(f,e,t)){let i=r.value,o=Math.max(r.start,e),s=Math.min(r.end,t);for(let e=o;e<=s;e++)m.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!o)return r9([],m,n,l,r,a);let g=s.length>0?s[s.length-1]+1:0,y=function(e,t,n,r=0){let i,o;return r>0&&(t=Math.max(t,e[rT(e,r,rI)].offset)),rd((i=rT(e,t,rR),o=rT(e,n,rR,i),e.slice(i,o+1)),rj)}(p,e,t,g);if(0===y.length)return null;let b=n-1,x=((n=>{for(let r of y){let i=r.value,o=i.offset,s=r.start,a=i.size;if(i.offset<e){let t=(s+=Math.floor((e-i.offset+l)/(a+l)))-r.start;o+=t*a+t*l}s<g&&(o+=(g-s)*a,s=g);let c=Math.min(r.end,b);for(let e=s;e<=c&&!(o>=t);e++)n.push({data:u?.[e],index:e,offset:o,size:a}),o+=a+l}})(d=[]),d),w=ie(c,"top"),S=ie(c,r1);if(x.length>0&&(w>0||S>0)){let e=x[0],t=x[x.length-1];if(w>0&&e.index>g){let t=Math.min(w,e.index-g),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=rv(f,i,i)[0]?.value??e.size;r-=t+l,n.unshift({data:u?.[i],index:i,offset:r,size:t})}x.unshift(...n)}if(S>0&&t.index<b){let e=Math.min(S,b-t.index),n=t.offset+t.size+l;for(let r=t.index+1;r<=t.index+e;r++){let e=rv(f,r,r)[0]?.value??t.size;x.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+l}}}return r9(x,m,n,l,r,a)}),nF(e=>null!==e),n$()),r6);nN(nW(e,nF(nI),nV(e=>e?.length)),i),nN(nW(x,nV(e=>e.topListHeight)),h),nN(h,a),nN(nW(x,nV(e=>[e.top,e.bottom])),s),nN(nW(x,nV(e=>e.items)),y);let w=nZ(nW(x,nF(({items:e})=>e.length>0),nX(i,e),nF(([{items:e},t])=>e[e.length-1].originalIndex===t-1),nV(([{items:e},t,n])=>{let r=e[e.length-1];return[t-1-("group"===r.type?r.index+1:(r.groupIndex??-1)+1),n]}),n$(rM),nF(([e])=>e>=0),nV(([e])=>e))),S=nZ(nW(x,nq(200),nF(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),nV(({items:e})=>e[0].index),n$())),A=nZ(nW(x,nF(({items:e})=>e.length>0),nV(({items:e})=>{let t=0,n=e.length-1;for(;"group"===e[t].type&&t<n;)t++;for(;"group"===e[n].type&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),n$(rk)));return{endReached:w,initialItemCount:g,itemsRendered:y,listState:x,minOverscanItemCount:b,rangeChanged:A,startReached:S,topItemsIndexes:m,...d}},nE(r$,rV,r4,rK,rG,r0,rH,rO),{singleton:!0}),ir=n0(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let o=nQ(),s=nK(nW(n2(n,e,r,t,i),nV(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return nN(n5(s),o),{totalListHeight:s,totalListHeightChanged:o}},nE(ru,it),{singleton:!0}),ii=n0(([{viewportHeight:e},{totalListHeight:t}])=>{let n=nY(!1),r=nK(nW(n2(n,e,t),nF(([e])=>e),nV(([,e,t])=>Math.max(0,e-t)),nq(0),n$()),0);return{alignToBottom:n,paddingTopAddition:r}},nE(ru,ir),{singleton:!0}),io=n0(()=>({context:nY(null)})),is=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:o,viewportTop:s})=>t<s?{...i,align:n??"start",...void 0===r?{}:{behavior:r}}:e>o?{...i,align:n??"end",...void 0===r?{}:{behavior:r}}:null,ia=n0(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:o,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{let u=nQ();return nN(nW(u,nX(t,l,n,o,i,r,a),nX(e),nV(([[e,t,n,r,i,o,a,l],c])=>{let{calculateViewLocation:u=is,done:h,...d}=e,p=rL(e,t,r-1),f=rE(p,t.offsetTree,c)+i+o,m=u({itemBottom:f+rm(t.sizeTree,p)[1],itemTop:f,locationParams:d,viewportBottom:l+n-a,viewportTop:l+o});return null===m?h?.():h&&nB(nW(s,nF(e=>!e),nG(nL(s)?1:2)),h),m}),nF(e=>null!==e)),c),{scrollIntoView:u}},nE(r$,ru,rG,it,n9),{singleton:!0});function il(e){return!1!==e&&("smooth"===e?"smooth":"auto")}let ic=n0(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:o},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:h},{context:d},{scrollIntoView:p}])=>{let f=nY(!1),m=nQ(),g=null;function v(e){s(0,{align:"end",behavior:e,index:"LAST"})}function y(e){setTimeout(nB(i,t=>{e&&!t.atBottom&&"SIZE_INCREASED"===t.notAtBottomBecause&&null===g&&(nL(u)("scrolling to bottom due to increased size",{},n4.DEBUG),v("auto"))}),100)}nW(n2(nW(n5(t),nG(1)),l),nX(n5(f),o,a,h),nV(([[e,t],n,r,i,o])=>{let s,a=t&&i,l="auto";return a&&(s=r||o,l="function"==typeof n?il(n(s)):s&&il(n),a=a&&!1!==l),{followOutputBehavior:l,shouldFollow:a,totalCount:e}}),nF(({shouldFollow:e})=>e))(1,({followOutputBehavior:t,totalCount:r})=>{null!==g&&(g(),g=null),void 0===nL(n)?g=nB(e,()=>{nL(u)("following output to ",{totalCount:r},n4.DEBUG),v(t),g=null}):requestAnimationFrame(()=>{nL(u)("following output to ",{totalCount:r},n4.DEBUG),v(t)})}),nW(n2(n5(f),t,c),nF(([e,,t])=>!1!==e&&t),nU(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),nF(({refreshed:e})=>e),nX(f,t))(1,([,e])=>{nL(a)&&y(!1!==e)}),m(1,()=>{y(!1!==nL(f))}),n2(n5(f),i)(1,([e,t])=>{!1===e||t.atBottom||"VIEWPORT_HEIGHT_DECREASING"!==t.notAtBottomBecause||v("auto")});let b=nY(null),x=nQ();return nN(n3(nW(n5(r),nV(e=>e?.length??0)),nW(n5(t))),x),nW(n2(nW(x,nG(1)),l),nX(n5(b),a,h,d),nV(([[e,t],n,r,i,o])=>t&&r&&n?.({context:o,totalCount:e,scrollingInProgress:i})),nF(e=>!!e),nq(0))(1,t=>{null!==g&&(g(),g=null),void 0===nL(n)?g=nB(e,()=>{nL(u)("scrolling into view",{}),p(0,t),g=null}):requestAnimationFrame(()=>{nL(u)("scrolling into view",{}),p(0,t)})}),{autoscrollToBottom:m,followOutput:f,scrollIntoViewOnChange:b}},nE(r$,r0,rG,rK,rH,n9,ru,io,ia)),iu=n0(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:o,listState:s},{didMount:a}])=>(nN(nW(a,nX(o),nF(([,e])=>0!==e),nX(i,r,t,n,e),nV(([[,e],t,n,r,i,o])=>r8(e,t,n,r,i,o))),s),{}),nE(r$,rK,it,rH),{singleton:!0}),ih=n0(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=nY(0);return nW(e,nX(r),nF(([,e])=>0!==e),nV(([,e])=>({top:e})))(1,e=>{nB(nW(n,nG(1),nF(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{t(0,e)})})}),{initialScrollTop:r}},nE(rH,ru,it),{singleton:!0}),id=n0(([{scrollVelocity:e}])=>{let t=nY(!1),n=nQ(),r=nY(!1);return nN(nW(e,nX(r,t,n),nF(([e,t])=>!1!==t&&void 0!==t),nV(([e,t,n,r])=>{let{enter:i,exit:o}=t;if(n){if(o(e,r))return!1}else if(i(e,r))return!0;return n}),n$()),t),nW(n2(t,e,n),nX(r))(1,([[e,t,n],r])=>{e&&!1!==r&&void 0!==r&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},nE(r0),{singleton:!0}),ip=n0(([{scrollBy:e,scrollContainerState:t,scrollTo:n}])=>{let r=nQ(),i=nQ(),o=nQ(),s=nQ(),a=nY(!1),l=nY(void 0),c=nK(nW(i,nV(({zoomRatio:e})=>e??1)),1);return nN(nW(n2(r,i),nV(([{scrollTop:e,viewportHeight:t},{listHeight:n,offsetTop:r,zoomRatio:i=1}])=>({scrollHeight:n,scrollTop:Math.max(0,rs(e-r,i)),viewportHeight:rs(t,i)}))),t),nN(nW(n,nX(i),nV(([e,{offsetTop:t,zoomRatio:n=1}])=>({...e,top:rs(e.top,1/n)+t}))),o),nN(nW(e,nX(c),nV(([e,t])=>void 0===e.top?e:{...e,top:rs(e.top,1/t)})),s),{customScrollParent:l,useWindowScroll:a,windowScrollContainerState:r,windowScrollBy:s,windowScrollTo:o,windowViewportRect:i}},nE(ru)),im=n0(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:o},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{let c=nQ(),u=nY(void 0),h=nY(null),d=nY(null);return nN(a,h),nN(l,d),nW(c,nX(t,r,s,h,d,n))(1,([e,t,n,r,i,o,s])=>{let a=ry(t.sizeTree).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:void 0===i?1/0:i.k-1,size:t,startIndex:e}});r&&null!==i&&null!==o&&(n=rs(i.scrollTop-o.offsetTop,o.zoomRatio??1)),e({ranges:a,scrollTop:n-=s})}),nN(nW(u,nF(nI),nV(ig)),i),nN(nW(o,nX(u),nF(([,e])=>void 0!==e),n$(),nV(([,e])=>e.ranges)),e),{getState:c,restoreStateFrom:u}},nE(r$,ru,rK,rH,ip));function ig(e){return{align:"start",index:0,offset:e.scrollTop}}let iv=n0(([{topItemsIndexes:e}])=>{let t=nY(0);return nN(nW(t,nF(e=>e>=0),nV(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},nE(it));function iy(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}let ib=iy(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),ix=n0(([{deviation:e,deviationCommitted:t,scrollBy:n,scrollingInProgress:r,scrollTop:i},{isAtBottom:o,isScrolling:s,lastJumpDueToItemResize:a,scrollDirection:l},{listState:c},{beforeUnshiftWith:u,gap:h,shiftWithOffset:d,sizes:p},{log:f},{recalcInProgress:m}])=>{let g=nZ(nW(c,nX(a),nU(([,e,t,n],[{bottom:r,items:i,offsetBottom:o,totalCount:s},a])=>{let l=r+o,c=0;return t===s&&e.length>0&&i.length>0&&(0===i[0].originalIndex&&0===e[0].originalIndex||0!=(c=l-n)&&(c+=a)),[c,i,s,l]},[0,[],0,0]),nF(([e])=>0!==e),nX(i,l,r,o,f,m),nF(([,e,t,n,,,r])=>!r&&!n&&0!==e&&"up"===t),nV(([[e],,,,,t])=>(t("Upward scrolling compensation",{amount:e},n4.DEBUG),e))));function v(t){t>0?(n(0,{behavior:"auto",top:-t}),e(0,0)):(e(0,0),n(0,{behavior:"auto",top:-t}))}nW(g,nX(e,s))(1,([t,n,r])=>{r&&ib()?e(0,n-t):v(-t)}),nW(n2(nK(s,!1),e,m),nF(([e,t,n])=>!e&&!n&&0!==t),nV(([e,t])=>t),nq(1))(1,v),nN(nW(d,nV(e=>({top:-e}))),n);let y=null;function b(){if(null===y)return;let{offset:t}=y;y=null,n(0,{top:t}),requestAnimationFrame(()=>{e(0,0),m(0,!1)})}return t(1,e=>{null!==y&&y.acknowledgeable&&e===y.offset&&b()}),nW(u,nX(p,h),nV(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{if(0===t.length)return e*(n+i);let o=0,s=rf(r,0),a=0,l=0;for(;a<e;){a++,o+=s;let r=t.length===l+1?1/0:t[l+1]-t[l]-1;a+r>e&&(o-=s,r=e-a+1),a+=r,o+=r*(n+i),l++}return o}))(1,t=>{y={acknowledgeable:nL(e)!==t,offset:t},e(0,t),requestAnimationFrame(b)}),{deviation:e}},nE(ru,r0,it,r$,n9,rO)),iw=n0(([e,t,n,r,i,o,s,a,l,c,u])=>({...e,...t,...n,...r,...i,...o,...s,...a,...l,...c,...u}),nE(r4,iu,rH,id,ir,ih,ii,ip,ia,n9,io)),iS=n0(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:o,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:h,totalCount:d,trackItemSizes:p},{initialItemFinalLocationReached:f,initialTopMostItemIndex:m,scrolledToInitialItem:g},v,y,b,x,{scrollToIndex:w},S,{topItemCount:A},{groupCounts:C},k])=>{let{listState:M,minOverscanItemCount:O,topItemsIndexes:T,rangeChanged:_,...I}=x;return nN(_,k.scrollSeekRangeChanged),nN(nW(n2(k.windowViewportRect,v.headerHeight,v.fixedHeaderHeight),nV(([e,t,n])=>Math.max(t+n+1,e.visibleHeight))),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:o,groupCounts:C,heightEstimates:a,initialItemFinalLocationReached:f,initialTopMostItemIndex:m,scrolledToInitialItem:g,sizeRanges:c,topItemCount:A,topItemsIndexes:T,totalCount:d,...b,groupIndices:s,itemSize:l,listState:M,minOverscanItemCount:O,scrollToIndex:w,statefulTotalCount:h,trackItemSizes:p,rangeChanged:_,...I,...k,...v,sizes:u,...y}},nE(r$,rK,ru,im,ic,it,rG,ix,iv,rV,iw)),iA=typeof document>"u"?u.useEffect:u.useLayoutEffect;function iC(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),o=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=u.createContext({});function c(e,n){for(let i of(void 0!==e.propsReady&&(0,e.propsReady)(0,!1),r))(0,e[t.required[i]])(0,n[i]);for(let r of i)r in n&&(0,e[t.optional[r]])(0,n[r]);void 0!==e.propsReady&&(0,e.propsReady)(0,!0)}function h(e){return s.reduce((n,r)=>{var i;let o,s,a;return n[r]=(i=e[t.events[r]],a=()=>o?.(),function(e,t){switch(e){case 1:return t?s===t?void 0:(a(),s=t,o=i(1,t)):(a(),nD);case 2:a(),s=null;return}}),n},{})}return{Component:u.forwardRef(function(d,p){var f;let{children:m,...g}=d,[v]=u.useState(()=>{var t;let n,r;return n=new Map,c(t=(r=({constructor:e,dependencies:t,id:i,singleton:o})=>{if(o&&n.has(i))return n.get(i);let s=e(t.map(e=>r(e)));return o&&n.set(i,s),s})(e),g),t}),[y]=u.useState(()=>h(v));return iA(()=>{for(let e of s)e in g&&(0,y[e])(1,g[e]);return()=>{Object.values(y).map(nP)}},[g,y,v]),iA(()=>{c(v,g)}),u.useImperativeHandle(p,(f=o.reduce((e,n)=>(e[n]=e=>{(0,v[t.methods[n]])(0,e)},e),{}),()=>f)),(0,l.jsx)(a.Provider,{value:v,children:void 0===n?m:(0,l.jsx)(n,{...function(e,t){let n={},r={},i=0,o=e.length;for(;i<o;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}([...r,...i,...s],g),children:m})})}),useEmitter:(e,t)=>{let n=u.useContext(a)[e];iA(()=>n(1,t),[t,n])},useEmitterValue:parseInt(u.version,10)>=18?e=>{let t=u.useContext(a)[e],n=u.useCallback(e=>t(1,e),[t]);return u.useSyncExternalStore(n,()=>nL(t),()=>nL(t))}:e=>{let t=u.useContext(a)[e],[n,r]=u.useState(()=>nL(t));return iA(()=>t(1,e=>{e!==n&&r(()=>e)}),[t,n]),n},usePublisher:e=>{let t=u.useContext(a);return u.useCallback(n=>{(0,t[e])(0,n)},[t,e])}}}let ik=u.createContext(void 0),iM=u.createContext(void 0),iO="-webkit-sticky",iT="sticky",i_=iy(()=>{if(typeof document>"u")return iT;let e=document.createElement("div");return e.style.position=iO,e.style.position===iO?iO:iT});function iI(e){return"self"in e}function iD(e,t,n,r=nD,i,o){let s=u.useRef(null),a=u.useRef(null),l=u.useRef(null),c=u.useCallback(n=>{let r,i,s,c=n.target;if("body"in c||iI(c)){let e=iI(c)?c:c.defaultView;s=!0===o?n7(e,e.scrollX):e.scrollY,r=!0===o?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=!0===o?e.innerWidth:e.innerHeight}else s=!0===o?n7(c,c.scrollLeft):c.scrollTop,r=!0===o?c.scrollWidth:c.scrollHeight,i=!0===o?c.offsetWidth:c.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(s,0),viewportHeight:i})};!0===n.suppressFlushSync?u():nO.flushSync(u),null!==a.current&&(1>Math.abs(s-a.current)||s<=0||s===r-i)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,o]);return u.useEffect(()=>{let e=i??s.current;return r(i??s.current),c({suppressFlushSync:!0,target:e}),e.addEventListener("scroll",c,{passive:!0}),()=>{r(null),e.removeEventListener("scroll",c)}},[s,c,n,r,i]),{scrollByCallback:u.useCallback(e=>{var t,n;!0===o&&(e={...void 0===e.behavior?{}:{behavior:e.behavior},...void 0===e.top?{}:{left:(t=s.current,n=e.top,n8(t)?-n:n)}}),s.current.scrollBy(e)},[o]),scrollerRef:s,scrollToCallback:function(n){let r,i,c,u=s.current;if(!u||(!0===o?"offsetWidth"in u&&0===u.offsetWidth:"offsetHeight"in u&&0===u.offsetHeight))return;let h="smooth"===n.behavior;iI(u)?(i=Math.max(rl(u.document.documentElement,!0===o?"width":"height"),!0===o?u.document.documentElement.scrollWidth:u.document.documentElement.scrollHeight),r=!0===o?u.innerWidth:u.innerHeight,c=!0===o?n7(u,u.scrollX):u.scrollY):(i=u[!0===o?"scrollWidth":"scrollHeight"],r=rl(u,!0===o?"width":"height",u),c=!0===o?n7(u,u.scrollLeft):u.scrollTop);let d=i-r;if(void 0===n.top)return void u.scrollTo(n);let p=Math.ceil(Math.max(Math.min(d,n.top),0));if(n.top=p,rQ(r,i)||p===c){e({scrollHeight:i,scrollTop:c,viewportHeight:r}),h&&t(!0);return}h?(a.current=p,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,!0===o&&(n={...void 0===n.behavior?{}:{behavior:n.behavior},left:n8(u)?-p:p}),u.scrollTo(n)}}}function iR(e){return e}let iE=n0(()=>{let e=nY(e=>`Item ${e}`),t=nY(e=>`Group ${e}`),n=nY({}),r=nY(iR),i=nY("div"),o=nY(nD),s=(e,t=null)=>nK(nW(n,nV(t=>t[e]),n$()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:i,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),iP=n0(([e,t])=>({...e,...t}),nE(iS,iE)),iL=({height:e})=>(0,l.jsx)("div",{style:{height:e}}),iN={overflowAnchor:"none",position:i_(),zIndex:1},iB={overflowAnchor:"none"},ij={...iB,display:"inline-block",height:"100%"},iz=u.memo(function({showTopList:e=!1}){let t=i2("listState"),n=i5("sizeRanges"),r=i2("useWindowScroll"),i=i2("customScrollParent"),o=i5("windowScrollContainerState"),s=i5("scrollContainerState"),a=i2("itemContent"),c=i2("context"),h=i2("groupContent"),d=i2("trackItemSizes"),p=i2("itemSize"),f=i2("log"),m=i5("gap"),g=i2("horizontalDirection"),{callbackRef:v}=rn(n,p,d,e?nD:i||r?o:s,f,m,i,g,i2("skipAnimationFrameInResizeObserver")),[y,b]=u.useState(0);i1("deviation",e=>{y!==e&&b(e)});let x=i5("deviationCommitted");ri(()=>{x(y)},[y,x]);let w=i2("EmptyPlaceholder"),S=i2("ScrollSeekPlaceholder")??iL,A=i2("ListComponent"),C=i2("ItemComponent"),k=i2("GroupComponent"),M=i2("computeItemKey"),O=i2("isSeeking"),T=i2("groupIndices").length>0,_=i2("alignToBottom"),I=i2("initialItemFinalLocationReached"),D=e?{}:{boxSizing:"border-box",...g?{display:"inline-block",height:"100%",marginInlineStart:0===y?_?"auto":0:y,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:"nowrap"}:{marginTop:0===y?_?"auto":0:y,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...I?{}:{visibility:"hidden"}};return e||0!==t.totalCount||null==w?(0,l.jsx)(A,{...iU(A,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:v,style:D,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=M(n+t.firstItemIndex,e.data,c);return O?(0,u.createElement)(S,{...iU(S,c),height:e.size,index:e.index,key:r,type:e.type||"item",..."group"===e.type?{}:{groupIndex:e.groupIndex}}):"group"===e.type?(0,u.createElement)(k,{...iU(k,c),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:iN},h(e.index,c)):(0,u.createElement)(C,{...iU(C,c),...iG(C,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:g?ij:iB},T?a(e.index,e.groupIndex,e.data,c):a(e.index,e.data,c))})}):(0,l.jsx)(w,{...iU(w,c)})}),i$={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},iF={outline:"none",overflowX:"auto",position:"relative"},iV=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:void 0}),iH=(e,t,n=0)=>({...iV(e),position:t?"relative":"absolute",top:t?-n:0}),iW={position:i_(),top:0,width:"100%",zIndex:1};function iU(e,t){if("string"!=typeof e)return{context:t}}function iG(e,t){return{item:"string"==typeof e?void 0:t}}let iq=u.memo(function(){let e=i2("HeaderComponent"),t=i5("headerHeight"),n=i2("HeaderFooterTag"),r=re(u.useMemo(()=>e=>{t(rl(e,"height"))},[t]),!0,i2("skipAnimationFrameInResizeObserver")),i=i2("context");return null!=e?(0,l.jsx)(n,{ref:r,children:(0,l.jsx)(e,{...iU(e,i)})}):null}),iX=u.memo(function(){let e=i2("FooterComponent"),t=i5("footerHeight"),n=i2("HeaderFooterTag"),r=re(u.useMemo(()=>e=>{t(rl(e,"height"))},[t]),!0,i2("skipAnimationFrameInResizeObserver")),i=i2("context");return null!=e?(0,l.jsx)(n,{ref:r,children:(0,l.jsx)(e,{...iU(e,i)})}):null});function iY({useEmitter:e,useEmitterValue:t,usePublisher:n}){return u.memo(function({children:r,style:i,context:o,...s}){let a=n("scrollContainerState"),c=t("ScrollerComponent"),h=n("smoothScrollTargetReached"),d=t("scrollerRef"),p=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:m,scrollToCallback:g}=iD(a,h,c,d,void 0,p),v=u.useContext(ik),y=u.useRef(0);e("totalListHeight",u.useCallback(e=>{y.current=e},[]));let b=u.useCallback(e=>{if(!v||void 0===e.top)return;let t=Math.max(y.current,v.viewportHeight),n=Math.ceil(Math.max(Math.min(t-v.viewportHeight,e.top),0));a({scrollHeight:t,scrollTop:n,viewportHeight:v.viewportHeight}),"smooth"===e.behavior&&h(!0)},[v,a,h]);return e("scrollTo",v?b:g),e("scrollBy",f),(0,l.jsx)(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...p?iF:i$,...i},tabIndex:0,...s,...iU(c,o),children:r})})}function iK({useEmitter:e,useEmitterValue:t,usePublisher:n}){return u.memo(function({children:r,style:i,context:o,...s}){let a=n("windowScrollContainerState"),c=t("ScrollerComponent"),h=n("smoothScrollTargetReached"),d=t("totalListHeight"),p=t("deviation"),f=t("customScrollParent"),m=u.useRef(null),{scrollByCallback:g,scrollerRef:v,scrollToCallback:y}=iD(a,h,c,t("scrollerRef"),f);return ri(()=>(v.current=f??m.current?.ownerDocument.defaultView,()=>{v.current=null}),[v,f]),e("windowScrollTo",y),e("windowScrollBy",g),(0,l.jsx)(c,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...i,...0===d?void 0:{height:d+p}},...s,...iU(c,o),children:r})})}let iQ=({children:e})=>{let t=u.useContext(ik),n=i5("viewportHeight"),r=i5("fixedItemHeight"),i=i2("alignToBottom"),o=i2("horizontalDirection"),s=re(u.useMemo(()=>n_(n,e=>rl(e,o?"width":"height")),[n,o]),!0,i2("skipAnimationFrameInResizeObserver"));return u.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,l.jsx)("div",{"data-viewport-type":"element",ref:s,style:iV(i),children:e})},iZ=({children:e})=>{let t=u.useContext(ik),n=i5("windowViewportRect"),r=i5("fixedItemHeight"),i=i2("customScrollParent"),o=i2("useWindowScroll"),s=i2("topListHeight"),a=rc(n,i,i2("skipAnimationFrameInResizeObserver")),c=i2("alignToBottom");return u.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,l.jsx)("div",{"data-viewport-type":"window",ref:a,style:iH(c,o,s),children:e})},iJ=({children:e})=>{let t=i2("TopItemListComponent")??"div",n=i2("headerHeight"),r={...iW,marginTop:`${n}px`},i=i2("context");return(0,l.jsx)(t,{style:r,...iU(t,i),children:e})},{Component:i0,useEmitter:i1,useEmitterValue:i2,usePublisher:i5}=iC(iP,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},u.memo(function(e){let t=i2("useWindowScroll"),n=i2("topItemsIndexes").length>0,r=i2("customScrollParent"),i=i2("context");return(0,l.jsxs)(r||t?i4:i3,{...e,context:i,children:[n&&(0,l.jsx)(iJ,{children:(0,l.jsx)(iz,{showTopList:!0})}),(0,l.jsxs)(r||t?iZ:iQ,{children:[(0,l.jsx)(iq,{}),(0,l.jsx)(iz,{}),(0,l.jsx)(iX,{})]})]})})),i3=iY({useEmitter:i1,useEmitterValue:i2,usePublisher:i5}),i4=iK({useEmitter:i1,useEmitterValue:i2,usePublisher:i5}),i6=n0(()=>{let e=nY(e=>(0,l.jsxs)("td",{children:["Item $",e]})),t=nY(null),n=nY(e=>(0,l.jsxs)("td",{colSpan:1e3,children:["Group ",e]})),r=nY(null),i=nY(null),o=nY({}),s=nY(iR),a=nY(nD),c=(e,t=null)=>nK(nW(o,nV(t=>t[e]),n$()),t);return{components:o,computeItemKey:s,context:t,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}}),i9=n0(([e,t])=>({...e,...t}),nE(iS,i6)),i8=({height:e})=>(0,l.jsx)("tr",{children:(0,l.jsx)("td",{style:{height:e}})}),i7=({height:e})=>(0,l.jsx)("tr",{children:(0,l.jsx)("td",{style:{border:0,height:e,padding:0}})}),oe={overflowAnchor:"none"},ot={position:i_(),zIndex:2,overflowAnchor:"none"},on=u.memo(function({showTopList:e=!1}){let t=ol("listState"),n=ol("computeItemKey"),r=ol("firstItemIndex"),i=ol("context"),o=ol("isSeeking"),s=ol("fixedHeaderHeight"),a=ol("groupIndices").length>0,l=ol("itemContent"),c=ol("groupContent"),h=ol("ScrollSeekPlaceholder")??i8,d=ol("GroupComponent"),p=ol("TableRowComponent"),f=(e?t.topItems:[]).reduce((e,t,n)=>(0===n?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,g=n(m+r,t.data,i),v=e?0===m?0:f[m-1]:0;return o?(0,u.createElement)(h,{...iU(h,i),height:t.size,index:t.index,key:g,type:t.type||"item"}):"group"===t.type?(0,u.createElement)(d,{...iU(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:g,style:{...ot,top:s}},c(t.index,i)):(0,u.createElement)(p,{...iU(p,i),...iG(p,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:g,style:e?{...ot,top:s+v}:oe},a?l(t.index,t.groupIndex,t.data,i):l(t.index,t.data,i))})}),or=u.memo(function(){let e=ol("listState"),t=ol("topItemsIndexes").length>0,n=oc("sizeRanges"),r=ol("useWindowScroll"),i=ol("customScrollParent"),o=oc("windowScrollContainerState"),s=oc("scrollContainerState"),a=ol("trackItemSizes"),{callbackRef:c,ref:h}=rn(n,ol("itemSize"),a,i||r?o:s,ol("log"),void 0,i,!1,ol("skipAnimationFrameInResizeObserver")),[d,p]=u.useState(0);oa("deviation",e=>{d!==e&&(h.current.style.marginTop=`${e}px`,p(e))});let f=oc("deviationCommitted");ri(()=>{f(d)},[d,f]);let m=ol("EmptyPlaceholder"),g=ol("FillerRow")??i7,v=ol("TableBodyComponent"),y=ol("paddingTopAddition"),b=ol("statefulTotalCount"),x=ol("context");if(0===b&&null!=m)return(0,l.jsx)(m,{...iU(m,x)});let w=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),S=e.offsetTop+y+d-w,A=e.offsetBottom,C=S>0?(0,l.jsx)(g,{context:x,height:S},"padding-top"):null,k=A>0?(0,l.jsx)(g,{context:x,height:A},"padding-bottom"):null;return(0,l.jsxs)(v,{"data-testid":"virtuoso-item-list",ref:c,...iU(v,x),children:[C,t&&(0,l.jsx)(on,{showTopList:!0}),(0,l.jsx)(on,{}),k]})}),oi=({children:e})=>{let t=u.useContext(ik),n=oc("viewportHeight"),r=oc("fixedItemHeight"),i=re(u.useMemo(()=>n_(n,e=>rl(e,"height")),[n]),!0,ol("skipAnimationFrameInResizeObserver"));return u.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,l.jsx)("div",{"data-viewport-type":"element",ref:i,style:iV(!1),children:e})},oo=({children:e})=>{let t=u.useContext(ik),n=oc("windowViewportRect"),r=oc("fixedItemHeight"),i=ol("customScrollParent"),o=ol("useWindowScroll"),s=rc(n,i,ol("skipAnimationFrameInResizeObserver"));return u.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,l.jsx)("div",{"data-viewport-type":"window",ref:s,style:iH(!1,o),children:e})},{Component:os,useEmitter:oa,useEmitterValue:ol,usePublisher:oc}=iC(i9,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},u.memo(function(e){let t=ol("useWindowScroll"),n=ol("customScrollParent"),r=oc("fixedHeaderHeight"),i=oc("fixedFooterHeight"),o=ol("fixedHeaderContent"),s=ol("fixedFooterContent"),a=ol("context"),c=re(u.useMemo(()=>n_(r,e=>rl(e,"height")),[r]),!0,ol("skipAnimationFrameInResizeObserver")),h=re(u.useMemo(()=>n_(i,e=>rl(e,"height")),[i]),!0,ol("skipAnimationFrameInResizeObserver")),d=n||t?oh:ou,p=n||t?oo:oi,f=ol("TableComponent"),m=ol("TableHeadComponent"),g=ol("TableFooterComponent"),v=o?(0,l.jsx)(m,{ref:c,style:{position:"sticky",top:0,zIndex:2},...iU(m,a),children:o()},"TableHead"):null,y=s?(0,l.jsx)(g,{ref:h,style:{bottom:0,position:"sticky",zIndex:1},...iU(g,a),children:s()},"TableFoot"):null;return(0,l.jsx)(d,{...e,...iU(d,a),children:(0,l.jsx)(p,{children:(0,l.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:"none"},...iU(f,a),children:[v,(0,l.jsx)(or,{},"TableBody"),y]})})})})),ou=iY({useEmitter:oa,useEmitterValue:ol,usePublisher:oc}),oh=iK({useEmitter:oa,useEmitterValue:ol,usePublisher:oc}),od={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},op={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:of,floor:om,max:og,min:ov,round:oy}=Math;function ob(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:null===n?null:n[r+e],index:r+e}))}function ox(e,t){return void 0!==e&&e.width===t.width&&e.height===t.height}function ow(e,t){return void 0!==e&&e.column===t.column&&e.row===t.row}let oS=n0(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:o,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:h},d,p,{didMount:f,propsReady:m},{customScrollParent:g,useWindowScroll:v,windowScrollBy:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:w},S])=>{let A=nY(0),C=nY(0),k=nY(od),M=nY({height:0,width:0}),O=nY({height:0,width:0}),T=nQ(),_=nQ(),I=nY(0),D=nY(null),R=nY({column:0,row:0}),E=nQ(),P=nQ(),L=nY(!1),N=nY(0),B=nY(!0),j=nY(!1),z=nY(!1);nW(f,nX(N),nF(([e,t])=>!rY(t)))(1,()=>{B(0,!1)}),nW(n2(f,B,O,M,N,j),nF(([e,t,n,r,,i])=>e&&!t&&0!==n.height&&0!==r.height&&!i))(1,([,,,,e])=>{void 0===e?B(0,!0):(j(0,!0),rq(1,()=>{T(0,e)}),nB(nW(c),()=>{t(0,[0,0]),B(0,!0)}))}),nN(nW(P,nF(e=>null!=e&&e.scrollTop>0),nH(0)),C),nW(f,nX(P),nF(([,e])=>null!=e))(1,([,e])=>{e&&(M(0,e.viewport),O(0,e.item),R(0,e.gap),e.scrollTop>0&&(L(0,!0),nB(nW(c,nG(1)),e=>{L(0,!1)}),l(0,{top:e.scrollTop})))}),nN(nW(M,nV(({height:e})=>e)),h),nN(nW(n2(n5(M,ox),n5(O,ox),n5(R,(e,t)=>void 0!==e&&e.column===t.column&&e.row===t.row),n5(c)),nV(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),E),nN(nW(n2(n5(A),r,n5(R,ow),n5(O,ox),n5(M,ox),n5(D),n5(C),n5(L),n5(B),n5(N)),nF(([,,,,,,,e])=>!e),nV(([e,[t,n],r,i,o,s,a,,l,c])=>{let u,h,{column:d,row:p}=r,{height:f,width:m}=i,{width:g}=o;if(0===a&&(0===e||0===g))return od;if(0===m){var v;let t=rX(c,e),n=t+Math.max(a-1,0);return v=ob(t,n,s),{...op,items:v}}let y=oA(g,m,d);l?0===t&&0===n&&a>0?(u=0,h=a-1):(u=y*om((t+p)/(f+p)),h=ov(e-1,og(h=y*of((n+p)/(f+p))-1,y-1)),u=ov(h,og(0,u))):(u=0,h=-1);let b=ob(u,h,s),{bottom:x,top:w}=oC(o,r,i,b),S=of(e/y);return{bottom:x,itemHeight:f,items:b,itemWidth:m,offsetBottom:S*f+(S-1)*p-x,offsetTop:w,top:w}})),k),nN(nW(D,nF(e=>null!==e),nV(e=>e.length)),A),nN(nW(n2(M,O,k,R),nF(([e,t,{items:n}])=>n.length>0&&0!==t.height&&0!==e.height),nV(([e,t,{items:n},r])=>{let{bottom:i,top:o}=oC(e,r,t,n);return[o,i]}),n$(rM)),t);let $=nY(!1);nN(nW(c,nX($),nV(([e,t])=>t||0!==e)),$);let F=nZ(nW(n2(k,A),nF(([{items:e},t])=>{let n=nL(D);return e.length>0&&(null===n||n.length===t)}),nX($),nF(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&0===e.offsetBottom&&e.items.length===t)&&r}),nV(([[,e]])=>[e-1,nL(D)]),n$(rM),nV(([e])=>e))),V=nZ(nW(n5(k),nF(({items:e})=>e.length>0&&0===e[0].index),nH(0),n$())),H=nZ(nW(n5(k),nX(L),nF(([{items:e},t])=>e.length>0&&!t),nV(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),n$(rk),nq(0)));nN(H,p.scrollSeekRangeChanged),nN(nW(T,nX(M,O,A,R),nV(([e,t,n,r,i])=>{let o=rU(e),{align:s,behavior:a,offset:l}=o,c=o.index;"LAST"===c&&(c=r-1);let u=ok(t,i,n,c=og(0,ov(r-1,c)));return"end"===s?u=oy(u-t.height+n.height):"center"===s&&(u=oy(u-t.height/2+n.height/2)),void 0!==l&&0!==l&&(u+=l),{behavior:a,top:u}})),l);let W=nK(nW(k,nV(e=>e.offsetBottom+e.bottom)),0);return nN(nW(w,nV(e=>({height:e.visibleHeight,width:e.visibleWidth}))),M),{customScrollParent:g,data:D,deviation:I,footerHeight:i,gap:R,headerHeight:o,increaseViewportBy:e,initialItemCount:C,itemDimensions:O,overscan:n,restoreStateFrom:P,scrollBy:s,scrollContainerState:a,scrollHeight:_,scrollTo:l,scrollToIndex:T,scrollTop:c,smoothScrollTargetReached:u,totalCount:A,useWindowScroll:v,viewportDimensions:M,windowScrollBy:y,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:w,...p,gridState:k,horizontalDirection:z,initialTopMostItemIndex:N,totalListHeight:W,...d,endReached:F,propsReady:m,rangeChanged:H,startReached:V,stateChanged:E,stateRestoreInProgress:L,...S}},nE(r4,ru,r0,id,rH,ip,n9));function oA(e,t,n){return og(1,om((e+n)/(om(t)+n)))}function oC(e,t,n,r){let{height:i}=n;if(void 0===i||0===r.length)return{bottom:0,top:0};let o=ok(e,t,n,r[0].index);return{bottom:ok(e,t,n,r[r.length-1].index)+i,top:o}}function ok(e,t,n,r){let i=om(r/oA(e.width,n.width,t.column)),o=i*n.height+og(0,i-1)*t.row;return o>0?o+t.row:o}let oM=n0(()=>{let e=nY(e=>`Item ${e}`),t=nY({}),n=nY(null),r=nY("virtuoso-grid-item"),i=nY("virtuoso-grid-list"),o=nY(iR),s=nY("div"),a=nY(nD),l=(e,n=null)=>nK(nW(t,nV(t=>t[e]),n$()),n),c=nY(!1),u=nY(!1);return nN(n5(u),c),{components:t,computeItemKey:o,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:i,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),oO=n0(([e,t])=>({...e,...t}),nE(oS,oM)),oT=u.memo(function(){let e=oL("gridState"),t=oL("listClassName"),n=oL("itemClassName"),r=oL("itemContent"),i=oL("computeItemKey"),o=oL("isSeeking"),s=oN("scrollHeight"),a=oL("ItemComponent"),c=oL("ListComponent"),h=oL("ScrollSeekPlaceholder"),d=oL("context"),p=oN("itemDimensions"),f=oN("gap"),m=oL("log"),g=oL("stateRestoreInProgress"),v=oN("reportReadyState"),y=re(u.useMemo(()=>e=>{s(e.parentElement.parentElement.scrollHeight);let t=e.firstChild;null!==t&&p({height:ra(t,"height"),width:ra(t,"width")}),f({column:oz("column-gap",getComputedStyle(e).columnGap,m),row:oz("row-gap",getComputedStyle(e).rowGap,m)})},[s,p,f,m]),!0,!1);return ri(()=>{e.itemHeight>0&&e.itemWidth>0&&v(!0)},[e]),g?null:(0,l.jsx)(c,{className:t,ref:y,...iU(c,d),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let s=i(t.index,t.data,d);return o?(0,l.jsx)(h,{...iU(h,d),height:e.itemHeight,index:t.index,width:e.itemWidth},s):(0,u.createElement)(a,{...iU(a,d),className:n,"data-index":t.index,key:s},r(t.index,t.data,d))})})}),o_=u.memo(function(){let e=oL("HeaderComponent"),t=oN("headerHeight"),n=oL("headerFooterTag"),r=re(u.useMemo(()=>e=>{t(rl(e,"height"))},[t]),!0,!1),i=oL("context");return null!=e?(0,l.jsx)(n,{ref:r,children:(0,l.jsx)(e,{...iU(e,i)})}):null}),oI=u.memo(function(){let e=oL("FooterComponent"),t=oN("footerHeight"),n=oL("headerFooterTag"),r=re(u.useMemo(()=>e=>{t(rl(e,"height"))},[t]),!0,!1),i=oL("context");return null!=e?(0,l.jsx)(n,{ref:r,children:(0,l.jsx)(e,{...iU(e,i)})}):null}),oD=({children:e})=>{let t=u.useContext(iM),n=oN("itemDimensions"),r=oN("viewportDimensions"),i=re(u.useMemo(()=>e=>{r({height:ra(e,"height"),width:ra(e,"width")})},[r]),!0,!1);return u.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,l.jsx)("div",{ref:i,style:iV(!1),children:e})},oR=({children:e})=>{let t=u.useContext(iM),n=oN("windowViewportRect"),r=oN("itemDimensions"),i=oL("customScrollParent"),o=oL("useWindowScroll"),s=rc(n,i,!1);return u.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,l.jsx)("div",{ref:s,style:iH(!1,o),children:e})},{Component:oE,useEmitter:oP,useEmitterValue:oL,usePublisher:oN}=iC(oO,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},u.memo(function({...e}){let t=oL("useWindowScroll"),n=oL("customScrollParent"),r=n||t?oj:oB,i=n||t?oR:oD,o=oL("context");return(0,l.jsx)(r,{...e,...iU(r,o),children:(0,l.jsxs)(i,{children:[(0,l.jsx)(o_,{}),(0,l.jsx)(oT,{}),(0,l.jsx)(oI,{})]})})})),oB=iY({useEmitter:oP,useEmitterValue:oL,usePublisher:oN}),oj=iK({useEmitter:oP,useEmitterValue:oL,usePublisher:oN});function oz(e,t,n){return"normal"!==t&&t?.endsWith("px")!==!0&&n(`${e} was not resolved to pixel value correctly`,t,n4.WARN),"normal"===t?0:parseInt(t??"0",10)}function o$(e){let t,n,r,i=(0,c.c)(13),{items:o,height:s,width:a,selectedItems:u,onLegendItemClick:h,onItemMouseOver:d,onItemMouseOut:p}=e,f=o.length>5;return i[0]!==s||i[1]!==a?(t={height:s,width:a},i[0]=s,i[1]=a,i[2]=t):t=i[2],i[3]!==p||i[4]!==d||i[5]!==h||i[6]!==u||i[7]!==f?(n=(e,t)=>(0,l.jsx)(nk,{item:t,index:e,truncateLabel:f,isVisuallySelected:na(t,u),onClick:h,onMouseOver:d,onMouseOut:p,sx:{width:"100%",wordBreak:"break-word",overflow:"hidden"}},t.id),i[3]=p,i[4]=d,i[5]=h,i[6]=u,i[7]=f,i[8]=n):n=i[8],i[9]!==o||i[10]!==t||i[11]!==n?(r=(0,l.jsx)(i0,{style:t,data:o,itemContent:n,role:"list"}),i[9]=o,i[10]=t,i[11]=n,i[12]=r):r=i[12],r}function oF(e,t){var n,r;let i;if(null==e)return null;return"function"==typeof(n=e)&&(i=Object.getPrototypeOf(n)).prototype&&i.prototype.isReactComponent||"function"==typeof e||"object"==typeof(r=e)&&"symbol"==typeof r.$$typeof&&["react.memo","react.forward_ref"].includes(r.$$typeof.description)?u.createElement(e,t):e}function oV(e){if("cell"in e&&e.cell){let t=e.cell,n=t.column.columnDef;return t.getIsAggregated?.()?oF(n.aggregatedCell??n.cell,t.getContext()):t.getIsPlaceholder?.()?null:oF(n.cell,t.getContext())}return"header"in e&&e.header?oF(e.header.column.columnDef.header,e.header.getContext()):"footer"in e&&e.footer?oF(e.footer.column.columnDef.footer,e.footer.getContext()):null}var oH=n("N1");function oW(e,t){return e===t}function oU(e,t=e=>e,n){let r=n?.compare??oW,i=(0,u.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),o=(0,u.useCallback)(()=>e.get(),[e]);return(0,oH.useSyncExternalStoreWithSelector)(i,o,o,t,r)}function oG(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=oq(e);if(n.length!==oq(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function oq(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}function oX(e){let t=oU(e.source,e.selector,{compare:oG});return"function"==typeof e.children?e.children(t):e.children}let oY=[],oK=0,{link:oQ,unlink:oZ,propagate:oJ,checkDirty:o0,shallowPropagate:o1}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let r=t.depsTail;if(void 0!==r&&r.dep===e)return;let i=void 0!==r?r.nextDep:t.deps;if(void 0!==i&&i.dep===e){i.version=n,t.depsTail=i;return}let o=e.subsTail;if(void 0!==o&&o.version===n&&o.sub===t)return;let s=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:o,nextSub:void 0};void 0!==i&&(i.prevDep=s),void 0!==r?r.nextDep=s:t.deps=s,void 0!==o?o.nextSub=s:e.subs=s},unlink:function(e,t=e.sub){let r=e.dep,i=e.prevDep,o=e.nextDep,s=e.nextSub,a=e.prevSub;return void 0!==o?o.prevDep=i:t.depsTail=i,void 0!==i?i.nextDep=o:t.deps=o,void 0!==s?s.prevSub=a:r.subsTail=a,void 0!==a?a.nextSub=s:void 0===(r.subs=s)&&n(r),o},propagate:function(e){let n,r=e.nextSub;e:for(;;){let i=e.sub,o=i.flags;if(60&o?12&o?4&o?!(48&o)&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,i)?(i.flags=40|o,o&=1):o=0:i.flags=-9&o|32:o=0:i.flags=32|o,2&o&&t(i),1&o){let t=i.subs;if(void 0!==t){let i=(e=t).nextSub;void 0!==i&&(n={value:r,prev:n},r=i);continue}}if(void 0!==(e=r)){r=e.nextSub;continue}for(;void 0!==n;)if(e=n.value,n=n.prev,void 0!==e){r=e.nextSub;continue e}break}},checkDirty:function(t,n){let i,o=0,s=!1;e:for(;;){let a=t.dep,l=a.flags;if(16&n.flags)s=!0;else if((17&l)==17){if(e(a)){let e=a.subs;void 0!==e.nextSub&&r(e),s=!0}}else if((33&l)==33){(void 0!==t.nextSub||void 0!==t.prevSub)&&(i={value:t,prev:i}),t=a.deps,n=a,++o;continue}if(!s){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;o--;){let o=n.subs,a=void 0!==o.nextSub;if(a?(t=i.value,i=i.prev):t=o,s){if(e(n)){a&&r(o),n=t.sub;continue}s=!1}else n.flags&=-33;n=t.sub;let l=t.nextDep;if(void 0!==l){t=l;continue e}}return s}},shallowPropagate:r};function r(e){do{let n=e.sub,r=n.flags;(48&r)==32&&(n.flags=16|r,(6&r)==2&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){oY[o5++]=e,e.flags&=-3},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=17,o6(e))}}),o2=0,o5=0,o3=0;function o4(e){try{++o3,e()}finally{--o3||o9()}}function o6(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=oZ(n,e)}function o9(){if(!(o3>0)){for(;o2<o5;){let e=oY[o2];oY[o2++]=void 0,e.notify()}o2=0,o5=0}}function o8(e,t){let n="function"==typeof e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get:()=>(void 0!==r&&oQ(i,r,oK),i._snapshot),subscribe(e){var t;let n,o,s,a,l=(a=(s="object"==typeof e)?e:void 0,{next:(s?e.next:e)?.bind(a),error:(s?e.error:void 0)?.bind(a),complete:(s?e.complete:void 0)?.bind(a)}),c={current:!1},u=(t=()=>{i.get(),c.current?(r=void 0,l.next?.(i._snapshot)):c.current=!0},n=()=>{let e=r;r=o,++oK,o.depsTail=void 0,o.flags=6;try{return t()}finally{r=e,o.flags&=-5,o6(o)}},o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;16&e||32&e&&o0(this.deps,this)?n():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,o6(this)}},n(),o);return{unsubscribe:()=>{u.stop()}}},_update(o){let s=r,a=t?.compare??Object.is;if(n)r=i,++oK,i.depsTail=void 0;else if(void 0===o)return!1;n&&(i.flags=5);try{let t=i._snapshot,r="function"==typeof o?o(t):void 0===o&&n?e(t):o;if(void 0===t||!a(t,r))return i._snapshot=r,!0;return!1}finally{r=s,n&&(i.flags&=-5),o6(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(16&e||32&e&&o0(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&o1(e)}}else 32&e&&(i.flags=-33&e);return void 0!==r&&oQ(i,r,oK),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;void 0!==e&&(oJ(e),o1(e),o9())}},i}function o7(e,t){return"function"==typeof e?e(t):e}function se(e){if(Array.isArray(e))return e.map(se);if(e&&"object"==typeof e){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&null!==t)return e;let n=null===t?sn():{},r=Object.keys(e);for(let t=0;t<r.length;t++){let i=r[t];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,value:se(e[i]),writable:!0})}return n}return e}function st(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];i.startsWith("_memo_")||"_cellsCache"===i||(e[i]=t[i])}return e}function sn(){return Object.create(null)}function sr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function si(e,t){return n=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(e=>o7(n,e))}}function so(e){if("object"!=typeof e||null===e)return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function ss(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function sa(e,t){return function e(t,n,r){if(Object.is(t,n))return!0;if(r<=0||!so(t)||!so(n)||(Array.isArray(t)||Array.isArray(n))&&(!Array.isArray(t)||!Array.isArray(n)||t.length!==n.length))return!1;let i=ss(t),o=ss(n);if(i.length!==o.length)return!1;for(let o=0;o<i.length;o++){let s=i[o];if(!Object.prototype.propertyIsEnumerable.call(n,s)||!e(t[s],n[s],r-1))return!1}return!0}(e,t,3)}function sl(e,t,n,r=sa){let i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,o=e.options[i];o&&o(e=>{let t=o7(n,e);return r(e,t)?e:t})}function sc(e){return e instanceof Function}function su(e){let t=!1;return()=>{if(!t){t=!0;return}e()}}function sh({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...o}){let s=r?()=>{let{schedule:e,untrack:t}=i._reactivity;e(()=>t(()=>r()))}:void 0;return(({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:o})=>{let s,a=[];return l=>{i?.();let c=t?.(l),u=!c||c.length!==a?.length;if(!u&&c){for(let e=0;e<c.length;e++)if(c[e]!==a[e]){u=!0;break}}return n?.(u),u&&(a=c,o?.(),s=e(...c??[]),r?.(s)),s}})({...o,onAfterUpdate:s})}function sd(e,t="_"){let[n,r]=e.replace(t," ").split(" ");return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function sp(e,t,n){for(let[r,{fn:i,memoDeps:o}]of Object.entries(n)){let{fnKey:n,fnName:s}=sd(r);t[n]=o?sh({memoDeps:o,fn:i,fnName:s,table:t,feature:e}):i}}function sf(e,t,n,r){for(let[i,{fn:o,memoDeps:s}]of Object.entries(r)){let{fnKey:r,fnName:a}=sd(i);if(s){let i=`_memo_${r}`;t[r]=function(...t){if(!this[i]){let t=this;this[i]=sh({memoDeps:e=>s(t,e),fn:(...e)=>o(t,...e),fnName:a,objectId:t.id,table:n,feature:e})}return this[i](...t)}}else t[r]=function(...e){return o(this,...e)}}}function sm(e,t,n,...r){return e[t]?.(...r)??n(e,...r)}function sg(e,t,n=(e,t)=>e===t){let r=void 0===t?e.options.state:t;e._reactivity.batch(()=>{if(r)for(let t in r){let i=e.baseAtoms[t];if(!i)continue;let o=r[t],s=void 0===o?e.initialState[t]:o;n(e._reactivity.untrack(()=>i.get()),s)||i.set(()=>s)}})}function sv(e,t,n=(e,t)=>e===t){e._reactivity.batch(()=>{sg(e,t,n),e._reactivity.commit?.()})}function sy(e,t,n){let r=function(e,t){let{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};let o=e.options.mergeOptions(e.options,t),s={...Object.getOwnPropertyDescriptors(o)};return Object.defineProperties(Object.create(Object.getPrototypeOf(o)),{...s,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}(e,o7(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,n?.syncExternalState!==!1&&sv(e,r.state??null)}function sb(e){return e.getIsVisible?.()??!0}function sx(e){return e.getVisibleLeafColumns?.()??e.getAllLeafColumns()}function sw(e,t){return e.getOrderColumnsFn?.()(t)??e._orderGroupedColumns?.(t)??t}function sS(e,t,n,r){return e._orderByColumnPinning?.(t,n,r)??t}function sA(e,t){return e.getPinnedVisibleLeafColumns?.(t)??(t&&"center"!==t?[]:sx(e))}function sC(e){return e.getCanGlobalFilter?.()??!1}function sk(e,t){return e._expandRows?.(t)??t}function sM(e){e.autoResetPageIndex?.()}function sO(e,t){return e.getAllFlatColumnsById()[t]}function sT(e,t,n){let r=Object.create(function(e){if(!e._headerPrototype){e._headerPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}(e));r.colSpan=0,r.column=t,r.depth=n.depth,r.headerGroup=null,r.id=n.id??t.id,r.index=n.index,r.isPlaceholder=!!n.isPlaceholder,r.placeholderId=n.placeholderId,r.rowSpan=0,r.subHeaders=[];let i=e._headerInstanceInitFns;for(let e=0;e<i.length;e++)i[e](r);return r}let s_=(e,t,n,r,i,o,s)=>{let a=Object.create(function(e){if(!e._rowPrototype){e._rowPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}(e));a._displayIndexCache=-1,a._uniqueValuesCache=sn(),a._valuesCache=sn(),a.depth=i,a.id=t,a.index=r,a.original=n,a.parentId=s,a.subRows=o??[];let l=e._rowInstanceInitFns;for(let e=0;e<l.length;e++)l[e](a);return a},sI={coreCellsFeature:{assignCellPrototype:(e,t)=>{sf("coreCellsFeature",e,t,{cell_getValue:{fn:e=>e.row.getValue(e.column.id)},cell_renderValue:{fn:e=>e.getValue()??e.table.options.renderFallbackValue},cell_getContext:{fn:e=>({table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}),memoDeps:e=>[e]}})}},coreColumnsFeature:{assignColumnPrototype:(e,t)=>{sf("coreColumnsFeature",e,t,{column_getFlatColumns:{fn:e=>[e,...e.columns.flatMap(e=>e.getFlatColumns())],memoDeps:e=>[e.table.options.columns]},column_getLeafColumns:{fn:e=>(function(e){if(e.columns.length){let t=e.columns.flatMap(e=>e.getLeafColumns());return sw(e.table,t)}return[e]})(e),memoDeps:e=>[e.table.atoms.columnOrder?.get(),e.table.atoms.grouping?.get(),e.table.options.columns,e.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{sp("coreColumnsFeature",e,{table_getDefaultColumnDef:{fn:()=>({header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>e.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>(function e(t,n,r,i=0){let o=Array(n.length);for(let s=0;s<n.length;s++){if(!(s in n))continue;let a=n[s],l=function(e,t,n,r){let i,o={...e.getDefaultColumnDef(),...t},s=o.accessorKey,a=void 0===s?void 0:String(s),l=o.id??a?.replaceAll(".","_")??("string"==typeof o.header?o.header:void 0);if(o.accessorFn)i=o.accessorFn;else if(void 0!==s)if("string"==typeof s&&s.includes(".")){let e=s.split(".");i=t=>{let n=t;for(let t=0;t<e.length;t++){let r=e[t];n=n?.[r]}return n}}else i=e=>e[o.accessorKey];if(!l)throw Error();let c=Object.create(function(e){if(!e._columnPrototype){e._columnPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}(e));c.accessorFn=i,c.columnDef=o,c.columns=[],c.depth=n,c.id=`${String(l)}`,c.parent=r;let u=e._columnInstanceInitFns;for(let e=0;e<u.length;e++)u[e](c);return c}(t,a,i,r);l.columns=a.columns?e(t,a.columns,l,i+1):[],o[s]=l}return o})(e,e.options.columns),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>e.getAllColumns().flatMap(e=>e.getFlatColumns()),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>(function(e){let t=sn(),n=e.getAllFlatColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t})(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>{let t;return t=e.getAllColumns().flatMap(e=>e.getLeafColumns()),sw(e,t)},memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>(function(e){let t=sn(),n=e.getAllLeafColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t})(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>sO(e,t)}})}},coreHeadersFeature:{assignHeaderPrototype:(e,t)=>{sf("coreHeadersFeature",e,t,{header_getLeafHeaders:{fn:e=>{let t;return!function e(t,n){for(let r=0;r<t.subHeaders.length;r++)e(t.subHeaders[r],n);n.push(t)}(e,t=[]),t},memoDeps:e=>[e.column.table.options.columns]},header_getContext:{fn:e=>({column:e.column,header:e,table:e.column.table}),memoDeps:e=>[e.column.table.options.columns]}})},constructTableAPIs:e=>{sp("coreHeadersFeature",e,{table_getHeaderGroups:{fn:()=>(function(e,t,n){let r=function e(t,n=1){let r=n;for(let i=0;i<t.length;i++){let o=t[i];sb(o)&&o.columns.length&&(r=Math.max(r,e(o.columns,n+1)))}return r}(e),i=[],o=n._headerGroupInstanceInitFns,s=Array(t.length);for(let e=0;e<t.length;e++)e in t&&(s[e]=sT(n,t[e],{depth:r,index:e}));return!function e(t,n,r,i,o,s){let a={depth:n,id:i?`${i}_${n}`:String(n),headers:[]},l=[];for(let e=0;e<t.length;e++){let o;if(!(e in t))continue;let s=t[e],c=l[l.length-1],u=s.column.depth===a.depth,h=!1;if(u&&s.column.parent?o=s.column.parent:(o=s.column,h=!0),c&&c.column===o)c.subHeaders.push(s);else{let e=sT(r,o,{id:function(e,t,n,r){let i=e??"";return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}(i,n,o.id,s.id),isPlaceholder:h,placeholderId:h?String(function(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}(l,o)):void 0,depth:n,index:l.length});e.subHeaders.push(s),l.push(e)}a.headers.push(s),s.headerGroup=a}for(let e=0;e<s.length;e++)s[e](a);o.push(a),n>0&&e(l,n-1,r,i,o,s)}(s,r-1,n,void 0,i,o),i.reverse(),!function e(t){for(let n=0;n<t.length;n++){let r=t[n];if(!sb(r.column))continue;let i=0;if(r.subHeaders.length){e(r.subHeaders);for(let e=0;e<r.subHeaders.length;e++){let t=r.subHeaders[e];sb(t.column)&&(i+=t.colSpan)}}else i=1;if(r.colSpan=i,r.isPlaceholder&&1===r.subHeaders.length&&r.subHeaders[0].column===r.column){let e=1,t=r.subHeaders[0];for(;t;)t.rowSpan=0,e++,t=1===t.subHeaders.length&&t.subHeaders[0].column===r.column?t.subHeaders[0]:void 0;r.rowSpan=e}else r.rowSpan=1}}(i[0]?.headers??[]),i})(e.getAllColumns(),sS(e,sx(e),e=>e.id),e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>[...e.getHeaderGroups()].reverse(),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>(function(e){let t=e.getHeaderGroups(),n=[];for(let e=0;e<t.length;e++){let r=t[e].headers;for(let e=0;e<r.length;e++)n.push(r[e])}return n})(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>(function(e){let t=e.getHeaderGroups()[0]?.headers??[],n=[];for(let e=0;e<t.length;e++){let r=t[e].getLeafHeaders();for(let e=0;e<r.length;e++)n.push(r[e])}return n})(e),memoDeps:()=>[e.getHeaderGroups()]}})}},coreRowModelsFeature:{constructTableAPIs:e=>{sp("coreRowModelsFeature",e,{table_getCoreRowModel:{fn:()=>(e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??sh({feature:"coreRowModelsFeature",table:e,fnName:"table.getCoreRowModel",memoDeps:()=>[e.options.data],fn:()=>{var t;let n;return t=e.options.data,(n={rows:[],flatRows:[],rowsById:sn()}).rows=function e(t,n,r,i=0,o){let s=[];for(let a=0;a<r.length;a++){let l=r[a],c=s_(t,t.getRowId(l,a,o),l,a,i,void 0,o?.id);n.flatRows.push(c),n.rowsById[c.id]=c,s.push(c),t.options.getSubRows&&(c.originalSubRows=t.options.getSubRows(l,a),c.originalSubRows?.length&&(c.subRows=e(t,n,c.originalSubRows,i+1,c)))}return s}(e,n,t),n},onAfterUpdate:su(()=>{e.autoResetExpanded?.(),sM(e),e.autoResetSorting?.(),e.autoResetCellSelection?.()})})),e._rowModels.coreRowModel())},table_getPreFilteredRowModel:{fn:()=>e.getCoreRowModel()},table_getFilteredRowModel:{fn:()=>(e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel)?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()},table_getPreGroupedRowModel:{fn:()=>e.getFilteredRowModel()},table_getGroupedRowModel:{fn:()=>(e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel)?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()},table_getPreSortedRowModel:{fn:()=>e.getGroupedRowModel()},table_getSortedRowModel:{fn:()=>(e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel)?e.getPreSortedRowModel():e._rowModels.sortedRowModel()},table_getPreExpandedRowModel:{fn:()=>e.getSortedRowModel()},table_getExpandedRowModel:{fn:()=>(e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel)?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()},table_getPrePaginatedRowModel:{fn:()=>e.getExpandedRowModel()},table_getPaginatedRowModel:{fn:()=>(e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel)?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()},table_getRowModel:{fn:()=>e.getPaginatedRowModel()}})}},coreRowsFeature:{assignRowPrototype:(e,t)=>{sf("coreRowsFeature",e,t,{row_getDisplayIndex:{fn:e=>{let t,n;return t=e.table.getRowsInDisplayOrder(),t[n=e._displayIndexCache]===e?n:-1}},row_getAllCellsByColumnId:{fn:e=>(function(e){let t=sn(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];t[r.column.id]=r}return t})(e),memoDeps:e=>[e.getAllCells()]},row_getAllCells:{fn:e=>(function(e){let t=e.table.getAllLeafColumns(),n=e._cellsCache;n||(n=e._cellsCache=new WeakMap);let r=Array(t.length);for(let i=0;i<t.length;i++){let o=t[i],s=n.get(o);s||(s=function(e,t,n){let r=Object.create(function(e){if(!e._cellPrototype){e._cellPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}(n));r.column=e,r.id=`${t.id}_${e.id}`,r.row=t;let i=n._cellInstanceInitFns;for(let e=0;e<i.length;e++)i[e](r);return r}(o,e,e.table),n.set(o,s)),r[i]=s}return r})(e),memoDeps:e=>[e.table.getAllLeafColumns()]},row_getLeafRows:{fn:e=>{var t,n;let r,i;return t=e.subRows,n=e=>e.subRows,r=[],(i=e=>{e.forEach(e=>{r.push(e);let t=n(e);t.length&&i(t)})})(t),r},memoDeps:e=>[e.subRows]},row_getParentRow:{fn:e=>(function(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)})(e)},row_getParentRows:{fn:e=>(function(e){let t=[],n=e;for(;;){let e=n.getParentRow();if(!e)break;t.push(e),n=e}return t.reverse()})(e)},row_getUniqueValues:{fn:(e,t)=>(function(e,t){if(sr(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return n.columnDef.getUniqueValues?e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index):e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t]})(e,t)},row_getValue:{fn:(e,t)=>(function(e,t){if(sr(e._valuesCache,t))return e._valuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]})(e,t)},row_renderValue:{fn:(e,t)=>e.getValue(t)??e.table.options.renderFallbackValue}})},constructTableAPIs:e=>{sp("coreRowsFeature",e,{table_getRowsInDisplayOrder:{fn:()=>(function(e){let t=e.getPrePaginatedRowModel(),n=!1===e.options.paginateExpandedRows?sk(e,t).rows:t.rows;for(let e=0;e<n.length;e++)n[e]._displayIndexCache=e;return n})(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,!1===e.options.paginateExpandedRows?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,n,r)=>e.options.getRowId?.(t,n,r)??(r?`${r.id}.${n}`:String(n))},table_getRow:{fn:(t,n)=>(function(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&!(r=e.getCoreRowModel().rowsById[t]))throw Error();return r})(e,t,n)},table_getMaxSubRowDepth:{fn:()=>(function(e){let t=e.getCoreRowModel().flatRows,n=0;for(let e=0;e<t.length;e++)n=Math.max(n,t[e].depth);return n})(e),memoDeps:()=>[e.getCoreRowModel()]}})}},coreTablesFeature:{constructTableAPIs:e=>{sp("coreTablesFeature",e,{table_reset:{fn:()=>(function(e){let t=se(e.initialState);e._reactivity.batch(()=>{let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];e.baseAtoms[i].set(t[i])}});let n=Object.values(e._features);for(let t=0;t<n.length;t++)n[t].resetTableInstanceData?.(e)})(e)},table_setOptions:{fn:t=>sy(e,t)}})}}},sD="u"<typeof window?u.useEffect:u.useLayoutEffect,sR={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},sE=RegExp(Object.keys(sR).join("|"),"g"),sP={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function sL(e,t,n){let r;return(e=sN(e,n),(t=sN(t,n)).length>e.length)?sP.NO_MATCH:e===t?sP.CASE_SENSITIVE_EQUAL:(e=e.toLowerCase())===(t=t.toLowerCase())?sP.EQUAL:e.startsWith(t)?sP.STARTS_WITH:e.includes(` ${t}`)?sP.WORD_STARTS_WITH:e.includes(t)?sP.CONTAINS:1===t.length?sP.NO_MATCH:(r="",e.split(" ").forEach(e=>{e.split("-").forEach(e=>{r+=e.substr(0,1)})}),r).includes(t)?sP.ACRONYM:function(e,t){var n;let r,i=0,o=0;function s(e,t,n){for(let r=n,o=t.length;r<o;r++)if(t[r]===e)return i+=1,r+1;return -1}let a=s(t[0],e,0);if(a<0)return sP.NO_MATCH;o=a;for(let n=1,r=t.length;n<r;n++)if(!((o=s(t[n],e,o))>-1))return sP.NO_MATCH;return n=o-a,r=i/t.length,sP.MATCHES+1/n*r}(e,t)}function sN(e,t){let{keepDiacritics:n}=t;return e=`${e}`,n||(e=e.replace(sE,e=>sR[e])),e}let sB={maxRanking:1/0,minRanking:-1/0},sj=/([0-9]+)/gm;function sz(e){let t=Object.assign((e,n,r)=>{let i=e.getValue(r),o=n.getValue(r),s=t.resolveDataValue;return s&&(i=s(i),o=s(o)),t.sort(i,o,e,n,r)},e);return t}let s$=sz({resolveDataValue:e=>sq(e).toLowerCase(),sort:(e,t)=>sX(e,t)}),sF=sz({resolveDataValue:e=>sq(e),sort:(e,t)=>sX(e,t)}),sV=sz({resolveDataValue:e=>sq(e).toLowerCase(),sort:(e,t)=>sG(e,t)}),sH=sz({resolveDataValue:e=>sq(e),sort:(e,t)=>sG(e,t)}),sW=sz({resolveDataValue:e=>{var t;return(t=e)instanceof Date?t.getTime():t},sort:(e,t)=>e>t?1:e<t?-1:0}),sU=sz({sort:(e,t)=>sG(e,t)});function sG(e,t){return e===t?0:e>t?1:-1}function sq(e){return"number"==typeof e?isNaN(e)||1/0===e||-1/0===e?"":String(e):"string"==typeof e?e:""}function sX(e,t){let n=0,r=0,i=e.length,o=t.length;for(;n<i&&r<o;){let i=sY(e.charCodeAt(n)),o=sY(t.charCodeAt(r)),s=sK(e,n,i),a=sK(t,r,o);if(!i&&!o){let i=function(e,t,n,r,i,o){let s=n-t,a=o-i,l=s<a?s:a;for(let n=0;n<l;n++){let o=e.charCodeAt(t+n),s=r.charCodeAt(i+n);if(o>s)return 1;if(s>o)return -1}return s>a?1:a>s?-1:0}(e,n,s,t,r,a);if(i)return i;n=s,r=a;continue}if(i!==o)return i?1:-1;let l=function(e,t,n,r,i,o){let s=t;for(;s<n&&48===e.charCodeAt(s);)s++;let a=i;for(;a<o&&48===r.charCodeAt(a);)a++;let l=n-s,c=o-a;if(0===l&&0===c)return 0;if(l<=15&&c<=15){let t=sQ(e,s,n),i=sQ(r,a,o);return t>i?1:i>t?-1:0}let u=parseInt(e.slice(t,n),10),h=parseInt(r.slice(i,o),10);return u>h?1:h>u?-1:0}(e,n,s,t,r,a);if(l)return l;n=s,r=a}return sZ(e,n)-sZ(t,r)}function sY(e){return e>=48&&e<=57}function sK(e,t,n){let r=t+1;for(;r<e.length&&sY(e.charCodeAt(r))===n;)r++;return r}function sQ(e,t,n){let r=0;for(let i=t;i<n;i++)r=10*r+e.charCodeAt(i)-48;return r}function sZ(e,t){let n=0,r=t;for(;r<e.length;)n++,r=sK(e,r,sY(e.charCodeAt(r)));return n}function sJ(e,t){sl(e,"sorting",t)}function s0(e,t){sJ(e,t?[]:se(e.initialState.sorting??[]))}function s1(e){let t,n=e.table._rowModelFns.sortFns,r=e.table.getFilteredRowModel().flatRows.slice(0,10),i=!1;for(let n=0;n<r.length;n++){let o=r[n].getValue(e.id);if("[object Date]"===Object.prototype.toString.call(o)){t="datetime";break}if("string"==typeof o&&(i=!0,o.split(sj).length>1)){t="alphanumeric";break}}if(!t&&i&&(t="text"),t){let e=n?.[t];if(e||"alphanumeric"===t&&(e=n?.text),e)return e}return sU}function s2(e){let t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){let r=t[n].getValue(e.id);if(null!=r)return"string"==typeof r?"asc":"desc"}return"desc"}function s5(e){let t=e.table._rowModelFns.sortFns;return sc(e.columnDef.sortFn)?e.columnDef.sortFn:"auto"===e.columnDef.sortFn?s1(e):t?.[e.columnDef.sortFn]??sU}function s3(e,t,n){let r=s6(e,n&&s8(e)),i=void 0!==t;sJ(e.table,o=>{let s,a=o.findIndex(t=>t.id===e.id),l=-1===a?void 0:o[a],c=[],u=i?t:"desc"===r,h=!!(o.length&&s8(e)&&n);return"toggle"!=(s=h?l?"toggle":"add":l?"toggle":"replace")||i||r||(s="remove"),"add"===s?(c=[...o,{id:e.id,desc:u}]).splice(0,c.length-(e.table.options.maxMultiSortColCount??Number.MAX_SAFE_INTEGER)):c="toggle"===s?h?o.map(t=>t.id===e.id?{...t,desc:u}:t):[{id:e.id,desc:u}]:"remove"===s?h?o.filter(t=>t.id!==e.id):[]:[{id:e.id,desc:u}],c})}function s4(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??"desc"===s2(e)?"desc":"asc"}function s6(e,t){let n=s4(e),r=s7(e);return r?(r===n||!(e.table.options.enableSortingRemoval??!0)||!!t&&!(e.table.options.enableMultiRemove??!0))&&("desc"===r?"asc":"desc"):n}function s9(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function s8(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function s7(e){let t=e.table.atoms.sorting?.get()?.find(t=>t.id===e.id);return!!t&&(t.desc?"desc":"asc")}function ae(e,t){e.options.onRowSelectionChange?.(t)}function at(e,t,n){e._lastSelectedRowId=null,ae(e,r=>{if(t=void 0!==t?t:!sm(e,"getIsAllRowsSelected",ai),n?.deselectAll&&!t)return sn();let i=Object.assign(sn(),r),o=e.getPreGroupedRowModel().flatRows;if(t){let e=new Map;o.forEach(t=>{af(t,e)&&(i[t.id]=!0)})}else o.forEach(e=>{au(e)&&delete i[e.id]});return i})}function an(e,t,n){e._lastSelectedRowId=null,ae(e,r=>{let i=void 0!==t?t:!sm(e,"getIsAllPageRowsSelected",ao);if(n?.deselectAll&&!i)return sn();let o=Object.assign(sn(),r);return e.getRowModel().rows.forEach(t=>{ap(o,t.id,i,!0,e,!0)}),o})}function ar(e){return Object.keys(e.atoms.rowSelection?.get()??{})}function ai(e){let t=e.getFilteredRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=!!(t.length&&Object.keys(n).length);if(r){let e=new Map;t.some(t=>!av(t,n)&&af(t,e))&&(r=!1)}return r}function ao(e){let t=e.getPaginatedRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=new Map,i=!1;for(let e=0;e<t.length;e++){let o=t[e];if(av(o,n))!i&&af(o,r)&&(i=!0);else if(af(o,r))return!1}return i}function as(e){return sm(e,"getSelectedRowIds",ar).length>0}function aa(e,t,n){let r=al(e);ae(e.table,i=>{t=void 0!==t?t:!r;let o=Object.assign(sn(),i);return ap(o,e.id,t,(n?.selectChildren??!0)&&ad(e),e.table),!t&&n?.deselectParents&&am(o,e),o})}function al(e){return av(e,e.table.atoms.rowSelection?.get()??{})}function ac(e){return"some"===ay(e)}function au(e){let t=e.table.options;return"function"==typeof t.enableRowSelection?t.enableRowSelection(e):t.enableRowSelection??!0}function ah(e){let t=e.table.options;return"function"==typeof t.enableSubRowSelection?t.enableSubRowSelection(e):t.enableSubRowSelection??!0}function ad(e){let t=e.table.options;return"function"==typeof t.enableMultiRowSelection?t.enableMultiRowSelection(e):t.enableMultiRowSelection??!0}function ap(e,t,n,r,i,o){let s=i.getRow(t,!0);n?(ad(s)||Object.keys(e).forEach(t=>delete e[t]),au(s)&&(e[t]=!0)):(!o||au(s))&&delete e[t],r&&s.subRows.length&&ah(s)&&s.subRows.forEach(t=>ap(e,t.id,n,r,i,o))}function af(e,t){if(!au(e))return!1;let n=e.table;if(!0===n.options.enableSubRowSelection)return!0;let r=e.parentId;if(void 0===r)return!0;let i=t.get(r);if(void 0!==i)return i;let o=n.getCoreRowModel().rowsById,s=[],a=!0,l=r;for(;void 0!==l;){let e=t.get(l);if(void 0!==e){a=e;break}s.push(l);let r=o[l]??n.getRow(l,!0);if(!ah(r)){a=!1;break}l=r.parentId}return s.forEach(e=>t.set(e,a)),a}function am(e,t){let n=t.table.getCoreRowModel().rowsById,r=t.parentId;for(;void 0!==r;)delete e[r],r=(n[r]??t.table.getRow(r,!0)).parentId}function ag(e,t){let n=[],r=sn(),i=t.atoms.rowSelection?.get()??{};return{rows:function e(t,n,r,i){let o=[];for(let s=0;s<t.length;s++){let a=t[s],l=av(a,n);if(l&&(r.push(a),i[a.id]=a),a.subRows.length){let t=e(a.subRows,n,r,i);if(l){let e=Object.create(Object.getPrototypeOf(a));st(e,a),e.subRows=t,o.push(e)}}else l&&o.push(a)}return o}(e.rows,i,n,r),flatRows:n,rowsById:r}}function av(e,t){return!!(sr(t,e.id)&&t[e.id])}function ay(e){if(!e.subRows.length)return!1;let t=e.table.atoms.rowSelection?.get()??{},n=!1,r=!0,i=!1;for(let o=0;o<e.subRows.length;o++){let s=e.subRows[o];if(n&&!r)break;if(au(s)&&(i=!0,av(s,t)?n=!0:r=!1),s.subRows.length){let e=ay(s);"all"===e?(n=!0,i=!0):"some"===e?(n=!0,r=!1,i=!0):r=!1}}return!!i&&(r?"all":!!n&&"some")}function ab(e,t){aw(e)&&aA(e.table,n=>{let r=Object.assign(sn(),n),i=t??!sm(e,"getIsVisible",ax),o=e.getLeafColumns();for(let e=0;e<o.length;e++){let t=o[e];aw(t)&&(r[t.id]=i)}return r})}function ax(e){let t=e.table.atoms.columnVisibility?.get();if(!t)return!0;let n=e.columns;return n.length?n.some(e=>sm(e,"getIsVisible",ax)):(sr(t,e.id)?t[e.id]:void 0)??!0}function aw(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function aS(e){let t=sn(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];sm(r.column,"getIsVisible",ax)&&(t[r.column.id]=r)}return t}function aA(e,t){sl(e,"columnVisibility",t)}function aC(e,t){t=t??!ak(e);let n=sn(),r=e.getAllLeafColumns();for(let e=0;e<r.length;e++){let i=r[e];n[i.id]=t||!aw(i)}aA(e,n)}function ak(e){return!e.getAllLeafColumns().some(e=>!sm(e,"getIsVisible",ax))}function aM(){return{size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER}}function aO(e){let t=aM(),n=e.table.atoms.columnSizing?.get(),r=n&&sr(n,e.id)?n[e.id]:void 0;return Math.min(Math.max(e.columnDef.minSize??t.minSize,r??e.columnDef.size??t.size),e.columnDef.maxSize??t.maxSize)}function aT(e){let t=sn(),n=sn(),r=Array(e.length),i=0;for(let n=0;n<e.length;n++){let o=e[n],s=sm(o,"getSize",aO);r[n]=s,t[o.id]=i,i+=s}let o=0;for(let t=e.length-1;t>=0;t--)n[e[t].id]=o,o+=r[t];return{starts:t,afters:n}}function a_(e){return{all:aT(sA(e)),center:aT(sA(e,"center")),start:aT(sA(e,"start")),end:aT(sA(e,"end"))}}function aI(e){return"start"===e?"start":"end"===e?"end":"center"===e?"center":"all"}function aD(e){return function e(t){if(!t.subHeaders.length)return aO(t.column);let n=0;for(let r=0;r<t.subHeaders.length;r++)n+=e(t.subHeaders[r]);return n}(e)}function aR(e,t){e.options.onColumnSizingChange?.(t)}function aE(e){let t=0;for(let n=0;n<e.length;n++)t+=sm(e[n],"getSize",aO);return t}function aP(){return{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}}function aL(e){return(e.columnDef.enableResizing??!0)&&(e.table.options.enableColumnResizing??!0)}function aN(e,t){e.options.onColumnResizingChange?.(t)}let aB=null;function aj(e){return"touchstart"===e.type}function az(e){let t,n,r=e.table._rowModelFns.filterFns,i=e.table.getCoreRowModel().flatRows;for(let n=0;n<i.length;n++){let r=i[n].getValue(e.id);if(null!=r){t=r;break}}return n="string"==typeof t?"includesString":"number"==typeof t?"inNumberRange":"boolean"==typeof t?"equals":Array.isArray(t)?"arrIncludes":"[object Date]"===Object.prototype.toString.call(t)?"inDateRange":null!==t&&"object"==typeof t?"equals":"weakEquals",r?.[n]}function a$(e){let t=null,n=e.table._rowModelFns.filterFns;return(t=sc(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?az(e):n?.[e.columnDef.filterFn])??void 0}function aF(e){return e.table.atoms.columnFilters?.get()?.findIndex(t=>t.id===e.id)??-1}function aV(e,t){let n=e.getAllLeafColumnsById();sl(e,"columnFilters",e=>o7(t,e).filter(e=>{let t=n[e.id];return!(t&&aH(a$(t),e.value,t))}))}function aH(e,t,n){return void 0===t||(e?.autoRemove?!!e.autoRemove(t,n):"string"==typeof t&&!t)}let aW=a=Object.assign((e,t,n,r)=>{let i=e.getValue(t),o=a.resolveDataValue?a.resolveDataValue(i):i;return a.filter(o,n,e,t,r)},{filter:(e,t)=>!!e?.includes(t),autoRemove:e=>{var t;return null==(t=e)||""===t},resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>null==e?void 0:String(e).toLowerCase()});function aU(e,t){e.options.onGlobalFilterChange?.(t)}function aG(e,t){e.options.onExpandedChange?.(t)}function aq(e,t){let n=e.atoms.expanded?.get()??{};if(t??!aK(e)){if(!0===n||!aY(e))return;aG(e,!0)}else{if(!0!==n&&!Object.keys(n).length)return;aG(e,sn())}}function aX(e,t){let n=e.initialState.expanded;sl(e,"expanded",t?sn():!0===n||Object.assign(sn(),se(n??{})))}function aY(e){return e.getPrePaginatedRowModel().flatRows.some(e=>a0(e))}function aK(e){let t=e.atoms.expanded?.get()??{};if(!0===t)return!0;if(!Object.keys(t).length)return!1;let n=e.getRowModel().flatRows.filter(e=>a0(e));return!(!n.length||n.some(e=>!aZ(e)))}function aQ(e,t){let n=e.table.atoms.expanded?.get()??{},r=!0===n||aJ(n,e.id),i=t??!r;i===r||(!i||a0(e))&&aG(e.table,t=>{let n=!0===t||aJ(t,e.id),r=sn();if(!0===t?Object.values(e.table.getRowModel().rowsById).forEach(e=>{a0(e)&&(r[e.id]=!0)}):r=Object.assign(sn(),t),!n&&i)return r[e.id]=!0,r;if(n&&!i){let t=sn(),n=Object.keys(r);for(let i=0;i<n.length;i++){let o=n[i];o!==e.id&&r[o]&&(t[o]=!0)}return t}return t})}function aZ(e){let t=e.table.atoms.expanded?.get()??{};return!!(e.table.options.getIsRowExpanded?.(e)??(!0===t||aJ(t,e.id)))}function aJ(e,t){return!!(e&&!0!==e&&sr(e,t)&&e[t])}function a0(e){return e.table.options.getRowCanExpand?.(e)??((e.table.options.enableExpanding??!0)&&!!e.subRows.length)}function a1(e){let t=[],n=e=>{t.push(e),e.subRows.length&&aZ(e)&&e.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function a2(){return{pageIndex:0,pageSize:10}}function a5(e,t){sl(e,"pagination",t)}function a3(e,t){a5(e,n=>{let r=o7(t,n.pageIndex);return r=Math.max(0,Math.min(r,void 0===e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1)),{...n,pageIndex:r}})}function a4(e,t){a3(e,t?0:e.initialState.pagination?.pageIndex??0)}function a6(e,t){a5(e,e=>{let n=Math.max(1,o7(t,e.pageSize)),r=1/0===e.pageSize?0:e.pageSize*e.pageIndex,i=1/0===n?0:Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})}function a9(e){let t=e.options.pageCount;if(null!=t)return t;let n=a8(e),r=e.atoms.pagination?.get()?.pageSize??10;return 1/0===r&&Number.isFinite(n)&&n>0?1:Math.ceil(n/r)}function a8(e){return e.options.rowCount??e.getPrePaginatedRowModel().rows.length}function a7(e,t,n){for(let r of e)t.push(r),n[r.id]=r,r.subRows.length&&a7(r.subRows,t,n)}let le={rowSortingFeature:{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortFn:"auto",sortUndefined:1}),getDefaultTableOptions:e=>({autoResetSorting:!1,onSortingChange:si("sorting",e),isMultiSortEvent:e=>e.shiftKey}),assignColumnPrototype(e,t){sf("rowSortingFeature",e,t,{column_getAutoSortFn:{fn:e=>s1(e)},column_getAutoSortDir:{fn:e=>s2(e)},column_getSortFn:{fn:e=>s5(e)},column_toggleSorting:{fn:(e,t,n)=>s3(e,t,n)},column_getFirstSortDir:{fn:e=>s4(e)},column_getNextSortingOrder:{fn:(e,t)=>s6(e,t)},column_getCanSort:{fn:e=>s9(e)},column_getCanMultiSort:{fn:e=>s8(e)},column_getIsSorted:{fn:e=>s7(e)},column_getSortIndex:{fn:e=>e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1},column_clearSorting:{fn:e=>{sJ(e.table,t=>t.length?t.filter(t=>t.id!==e.id):[])}},column_getToggleSortingHandler:{fn:e=>{let t;return t=s9(e),n=>{t&&s3(e,void 0,!!s8(e)&&e.table.options.isMultiSortEvent?.(n))}}}})},constructTableAPIs(e){sp("rowSortingFeature",e,{table_autoResetSorting:{fn:()=>{e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting)&&s0(e)}},table_setSorting:{fn:t=>sJ(e,t)},table_resetSorting:{fn:t=>s0(e,t)}})}},rowSelectionFeature:{initTableInstanceData:e=>{e._lastSelectedRowId=null},resetTableInstanceData:e=>{e._lastSelectedRowId=null},getInitialState:e=>({rowSelection:sn(),...e}),getDefaultTableOptions:e=>({onRowSelectionChange:si("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableRowRangeSelection:!0,enableSubRowSelection:!0,isRowRangeSelectionEvent:e=>!!(e.shiftKey||e.nativeEvent?.shiftKey)}),assignRowPrototype:(e,t)=>{sf("rowSelectionFeature",e,t,{row_toggleSelected:{fn:(e,t,n)=>aa(e,t,n)},row_getIsSelected:{fn:e=>al(e)},row_getIsSomeSelected:{fn:e=>ac(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getIsAllSubRowsSelected:{fn:e=>"all"===ay(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getCanSelect:{fn:e=>au(e)},row_getCanSelectSubRows:{fn:e=>ah(e)},row_getCanMultiSelect:{fn:e=>ad(e)},row_getToggleSelectedHandler:{fn:(e,t)=>{let n;return n=au(e),r=>{if(!n)return;let i=e.table,o=r.target.checked,s=i._lastSelectedRowId;!1!==i.options.enableRowRangeSelection&&null!==s&&ad(e)&&i.options.isRowRangeSelectionEvent?.(r)&&function(e,t,n,r){let i=r?.selectChildren??!0,o=e.table,s=o.getRowsInDisplayOrder(),a=o.getPrePaginatedRowModel().rowsById[t]??o.getCoreRowModel().rowsById[t];if(!a)return!1;let l=a.getDisplayIndex(),c=e.getDisplayIndex(),u=s[l],h=s[c];if(l<0||c<0||l>=s.length||c>=s.length||u?.id!==a.id||h?.id!==e.id||!ad(a)||!ad(e))return!1;let d=Math.min(l,c),p=Math.max(l,c);return ae(o,e=>{let t=Object.assign(sn(),e);for(let e=d;e<=p;e++){let a=s[e];au(a)&&ad(a)&&(ap(t,a.id,n,i,o),!n&&r?.deselectParents&&am(t,a))}return t}),!0}(e,s,o,t)||aa(e,o,t),i._lastSelectedRowId=e.id}}}})},constructTableAPIs:e=>{sp("rowSelectionFeature",e,{table_setRowSelection:{fn:t=>ae(e,t)},table_resetRowSelection:{fn:t=>{e._lastSelectedRowId=null,ae(e,t?sn():Object.assign(sn(),se(e.initialState.rowSelection??{})))}},table_toggleAllRowsSelected:{fn:(t,n)=>at(e,t,n)},table_toggleAllPageRowsSelected:{fn:(t,n)=>an(e,t,n)},table_getPreSelectedRowModel:{fn:()=>e.getCoreRowModel()},table_getSelectedRowModel:{fn:()=>{let t;return t=e.getCoreRowModel(),sm(e,"getIsSomeRowsSelected",as)?ag(t,e):{rows:[],flatRows:[],rowsById:sn()}},memoDeps:()=>[e.atoms.rowSelection?.get(),e.getCoreRowModel()]},table_getFilteredSelectedRowModel:{fn:()=>{let t;return t=e.getFilteredRowModel(),sm(e,"getIsSomeRowsSelected",as)?ag(t,e):{rows:[],flatRows:[],rowsById:sn()}},memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel()]},table_getGroupedSelectedRowModel:{fn:()=>{let t;return t=e.getSortedRowModel(),sm(e,"getIsSomeRowsSelected",as)?ag(t,e):{rows:[],flatRows:[],rowsById:sn()}},memoDeps:()=>[e.atoms.rowSelection?.get(),e.getSortedRowModel()]},table_getSelectedRowIds:{fn:()=>ar(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsAllRowsSelected:{fn:()=>ai(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsAllPageRowsSelected:{fn:()=>ao(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsSomeRowsSelected:{fn:()=>as(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsSomePageRowsSelected:{fn:()=>e.getPaginatedRowModel().flatRows.filter(e=>au(e)).some(e=>al(e)||sm(e,"getIsSomeSelected",ac)),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection]},table_getToggleAllRowsSelectedHandler:{fn:()=>t=>{at(e,t.target.checked)}},table_getToggleAllPageRowsSelectedHandler:{fn:()=>t=>{an(e,t.target.checked)}}})}},columnVisibilityFeature:{getInitialState:e=>({columnVisibility:sn(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:si("columnVisibility",e)}),assignColumnPrototype:(e,t)=>{sf("columnVisibilityFeature",e,t,{column_getIsVisible:{fn:e=>ax(e),memoDeps:e=>[t.options.columns,t.atoms.columnVisibility?.get(),e.columns]},column_getCanHide:{fn:e=>aw(e)},column_getToggleVisibilityHandler:{fn:e=>t=>{ab(e,t.target.checked)}},column_toggleVisibility:{fn:(e,t)=>ab(e,t)}})},assignRowPrototype:(e,t)=>{sf("columnVisibilityFeature",e,t,{row_getVisibleCells:{fn:e=>(function(e){let t=e.getAllCells(),n=[];for(let e=0;e<t.length;e++){let r=t[e];sm(r.column,"getIsVisible",ax)&&n.push(r)}return sS(e.table,n,e=>e.column.id,()=>sm(e,"getVisibleCellsByColumnId",aS))})(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get()]},row_getVisibleCellsByColumnId:{fn:e=>aS(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnVisibility?.get()]}})},constructTableAPIs:e=>{sp("columnVisibilityFeature",e,{table_getVisibleFlatColumns:{fn:()=>e.getAllFlatColumns().filter(e=>sm(e,"getIsVisible",ax)),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getVisibleLeafColumns:{fn:()=>e.getAllLeafColumns().filter(e=>sm(e,"getIsVisible",ax)),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_setColumnVisibility:{fn:t=>aA(e,t)},table_resetColumnVisibility:{fn:t=>{aA(e,t?sn():Object.assign(sn(),se(e.initialState.columnVisibility??{})))}},table_toggleAllColumnsVisible:{fn:t=>aC(e,t)},table_getIsAllColumnsVisible:{fn:()=>ak(e)},table_getIsSomeColumnsVisible:{fn:()=>e.getAllLeafColumns().some(e=>sm(e,"getIsVisible",ax))},table_getToggleAllColumnsVisibilityHandler:{fn:()=>t=>{aC(e,t.target.checked)}}})}},columnResizingFeature:{getInitialState:e=>({columnResizing:aP(),...e}),getDefaultTableOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnResizingChange:si("columnResizing",e)}),assignColumnPrototype:(e,t)=>{sf("columnResizingFeature",e,t,{column_getCanResize:{fn:e=>aL(e)},column_getIsResizing:{fn:e=>e.table.atoms.columnResizing?.get()?.isResizingColumn===e.id}})},assignHeaderPrototype:(e,t)=>{sf("columnResizingFeature",e,t,{header_getResizeHandler:{fn:(e,t)=>{let n,r;return r=aL(n=e.table.getColumn(e.column.id)),i=>{let o;if(!r||aj(i)&&i.touches.length>1)return;let s=aD(e),a=e.getLeafHeaders().map(e=>[e.column.id,aO(e.column)]),l=aj(i)?Math.round(i.touches[0].clientX):i.clientX,c=sn(),u=(e,t)=>{if("number"!=typeof t)return;let r=n.table,i="onChange"===r.options.columnResizeMode||"end"===e;r._reactivity.batch(()=>{aN(r,e=>{let n="rtl"===r.options.columnResizeDirection?-1:1,o=(t-(e.startOffset??0))*n,s=e.startSize??0,a=Math.max(s>0?o/s:0,-.999999);if(i){let t=e.columnSizingStart;for(let e=0;e<t.length;e++){let n=t[e],r=n[1];c[n[0]]=Math.round(100*Math.max(r>0?r+r*a:o/t.length,0))/100}}return{...e,deltaOffset:o,deltaPercentage:a}}),i&&aR(r,e=>Object.assign(sn(),e,c))})},h=null,d=!1,p=()=>{d?(d=!1,u("move",o),h=requestAnimationFrame(p)):h=null},f=e=>{if(o=e,"function"!=typeof requestAnimationFrame)return void u("move",e);if(null!==h){d=!0;return}u("move",e),h=requestAnimationFrame(p)},m=e=>{null!==h&&(cancelAnimationFrame(h),h=null,d=!1),n.table._reactivity.batch(()=>{u("end",e??o),aN(n.table,e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))})},g=t||("u">typeof document?document:null),v={moveHandler:e=>f(e.clientX),upHandler:e=>{g?.removeEventListener("mousemove",v.moveHandler),g?.removeEventListener("mouseup",v.upHandler),m(e.clientX)}},y=e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(e.touches[0].clientX),!1),b=e=>{w(),e.cancelable&&(e.preventDefault(),e.stopPropagation()),m(e.touches[0]?.clientX)},x=()=>{w(),m()},w=()=>{g?.removeEventListener("touchmove",y),g?.removeEventListener("touchend",b),g?.removeEventListener("touchcancel",x)},S=!!function(){if("boolean"==typeof aB)return aB;let e=!1;try{let t=()=>{};window.addEventListener("test",t,{get passive(){return e=!0,!1}}),window.removeEventListener("test",t)}catch(t){e=!1}return aB=e}()&&{passive:!1};aj(i)?(g?.addEventListener("touchmove",y,S),g?.addEventListener("touchend",b,S),g?.addEventListener("touchcancel",x,S)):(g?.addEventListener("mousemove",v.moveHandler,S),g?.addEventListener("mouseup",v.upHandler,S)),aN(n.table,e=>({...e,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id}))}}}})},constructTableAPIs:e=>{sp("columnResizingFeature",e,{table_setColumnResizing:{fn:t=>aN(e,t)},table_resetHeaderSizeInfo:{fn:t=>{aN(e,t?aP():se(e.initialState.columnResizing??aP()))}}})}},columnSizingFeature:{getInitialState:e=>({columnSizing:sn(),...e}),getDefaultColumnDef:()=>aM(),getDefaultTableOptions:e=>({onColumnSizingChange:si("columnSizing",e)}),assignColumnPrototype:(e,t)=>{sf("columnSizingFeature",e,t,{column_getSize:{fn:e=>aO(e),memoDeps:e=>[t.options.columns,t.atoms.columnSizing?.get()?.[e.id]]},column_getStart:{fn:(e,t)=>sm(e.table,"getColumnOffsets",a_)[aI(t)].starts[e.id]??0},column_getAfter:{fn:(e,t)=>sm(e.table,"getColumnOffsets",a_)[aI(t)].afters[e.id]??0},column_resetSize:{fn:e=>{aR(e.table,t=>{let n=sn(),r=Object.keys(t);for(let i=0;i<r.length;i++){let o=r[i];o!==e.id&&(n[o]=t[o])}return n})}}})},assignHeaderPrototype:(e,t)=>{sf("columnSizingFeature",e,t,{header_getSize:{fn:e=>aD(e),memoDeps:e=>[t.options.columns,e.column.columns.length>0?t.atoms.columnSizing?.get():t.atoms.columnSizing?.get()?.[e.column.id]]},header_getStart:{fn:e=>(function e(t){if(t.index>0){let n=t.headerGroup?.headers[t.index-1];if(n)return sm(n,"getStart",e)+sm(n,"getSize",aD)}return 0})(e),memoDeps:()=>[t.options.columns,t.atoms.columnSizing?.get(),t.atoms.columnOrder?.get(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get(),t.atoms.grouping?.get(),t.options.groupedColumnMode]}})},constructTableAPIs:e=>{sp("columnSizingFeature",e,{table_getColumnOffsets:{fn:()=>a_(e),memoDeps:()=>[e.options.columns,e.atoms.columnSizing?.get(),e.atoms.columnOrder?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.atoms.grouping?.get(),e.options.groupedColumnMode]},table_setColumnSizing:{fn:t=>aR(e,t)},table_resetColumnSizing:{fn:t=>{aR(e,t?sn():Object.assign(sn(),se(e.initialState.columnSizing??{})))}},table_getTotalSize:{fn:()=>e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+aD(t),0)??0,memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getStartTotalSize:{fn:()=>aE(sA(e,"start")),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getCenterTotalSize:{fn:()=>aE(sA(e,"center")),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getEndTotalSize:{fn:()=>aE(sA(e,"end")),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]}})}},columnFilteringFeature:{getInitialState:e=>({columnFilters:[],...e}),getDefaultColumnDef:()=>({filterFn:"auto"}),getDefaultTableOptions:e=>({onColumnFiltersChange:si("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{sf("columnFilteringFeature",e,t,{column_getAutoFilterFn:{fn:e=>az(e)},column_getFilterFn:{fn:e=>a$(e)},column_getCanFilter:{fn:e=>(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn},column_getIsFiltered:{fn:e=>aF(e)>-1},column_getFilterValue:{fn:e=>e.table.atoms.columnFilters?.get()?.find(t=>t.id===e.id)?.value},column_getFilterIndex:{fn:e=>aF(e)},column_setFilterValue:{fn:(e,t)=>{aV(e.table,n=>{let r=a$(e),i=n.find(t=>t.id===e.id),o=o7(t,i?i.value:void 0);if(aH(r,o,e))return n.filter(t=>t.id!==e.id);let s={id:e.id,value:o};return i?n.map(t=>t.id===e.id?s:t):n.length?[...n,s]:[s]})}}})},initRowInstanceData:e=>{e.columnFilters=sn(),e.columnFiltersMeta=sn()},constructTableAPIs:e=>{sp("columnFilteringFeature",e,{table_setColumnFilters:{fn:t=>aV(e,t)},table_resetColumnFilters:{fn:t=>{aV(e,t?[]:se(e.initialState.columnFilters??[]))}}})}},globalFilteringFeature:{getInitialState:e=>({globalFilter:void 0,...e}),getDefaultTableOptions:e=>({onGlobalFilterChange:si("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{if("enableGlobalFilter"in t.columnDef&&!0===t.columnDef.enableGlobalFilter)return!0;let n=e.getCoreRowModel().flatRows.find(e=>e.getAllCellsByColumnId()[t.id]?.getValue()!=null)?.getAllCellsByColumnId()[t.id]?.getValue();return"string"==typeof n||"number"==typeof n}}),assignColumnPrototype:(e,t)=>{sf("globalFilteringFeature",e,t,{column_getCanGlobalFilter:{fn:e=>(e.columnDef.enableGlobalFilter??!0)&&(e.table.options.enableGlobalFilter??!0)&&(e.table.options.enableFilters??!0)&&(e.table.options.getColumnCanGlobalFilter?.(e)??!0)&&!!e.accessorFn}})},constructTableAPIs:e=>{sp("globalFilteringFeature",e,{table_getGlobalAutoFilterFn:{fn:()=>aW},table_getGlobalFilterFn:{fn:()=>(function(e){let{globalFilterFn:t}=e.options,n=e._rowModelFns.filterFns;return sc(t)?t:"auto"===t?aW:n?.[t]})(e)},table_setGlobalFilter:{fn:t=>aU(e,t)},table_resetGlobalFilter:{fn:t=>{aU(e,t?void 0:se(e.initialState.globalFilter))}}})}},rowExpandingFeature:{getInitialState:e=>({expanded:sn(),...e}),getDefaultTableOptions:e=>({onExpandedChange:si("expanded",e),paginateExpandedRows:!0}),assignRowPrototype:(e,t)=>{sf("rowExpandingFeature",e,t,{row_toggleExpanded:{fn:(e,t)=>aQ(e,t)},row_getIsExpanded:{fn:e=>aZ(e)},row_getCanExpand:{fn:e=>a0(e)},row_getIsAllParentsExpanded:{fn:e=>(function(e){let t=!0,n=e;for(;t&&n.parentId;)t=aZ(n=e.table.getRow(n.parentId,!0));return t})(e)},row_getToggleExpandedHandler:{fn:e=>{let t;return t=a0(e),()=>{t&&aQ(e)}}}})},constructTableAPIs:e=>{sp("rowExpandingFeature",e,{table_autoResetExpanded:{fn:()=>{e.atoms.expanded&&(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding)&&e._reactivity.schedule(()=>aX(e))}},table_setExpanded:{fn:t=>aG(e,t)},table_toggleAllRowsExpanded:{fn:t=>aq(e,t)},table_resetExpanded:{fn:t=>aX(e,t)},table_getCanSomeRowsExpand:{fn:()=>aY(e)},table_getToggleAllRowsExpandedHandler:{fn:()=>t=>{aq(e)}},table_getIsSomeRowsExpanded:{fn:()=>{let t;return!0===(t=e.atoms.expanded?.get()??{})||Object.values(t).some(Boolean)}},table_getIsAllRowsExpanded:{fn:()=>aK(e)},table_getExpandedDepth:{fn:()=>{let t,n;return t=0,(!0===(n=e.atoms.expanded?.get())?Object.values(e.getRowModel().rowsById).filter(e=>a0(e)).map(e=>e.id):Object.keys(n??{})).forEach(e=>{let n=e.split(".");t=Math.max(t,n.length)}),t}},table__expandRows:{fn:a1}})}},rowPaginationFeature:{getInitialState:e=>({...e,pagination:{...a2(),...e.pagination}}),getDefaultTableOptions:e=>({onPaginationChange:si("pagination",e)}),constructTableAPIs:e=>{sp("rowPaginationFeature",e,{table_autoResetPageIndex:{fn:()=>{(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination)&&(e.atoms.pagination?.get()?.pageIndex??0)!==0&&a4(e,!0)}},table_setPagination:{fn:t=>a5(e,t)},table_resetPagination:{fn:t=>{a5(e,t?a2():se(e.initialState.pagination??a2()))}},table_setPageIndex:{fn:t=>a3(e,t)},table_resetPageIndex:{fn:t=>a4(e,t)},table_setPageSize:{fn:t=>a6(e,t)},table_getPageCount:{fn:()=>a9(e)},table_resetPageSize:{fn:t=>{a6(e,t?10:e.initialState.pagination?.pageSize??10)}},table_getPageOptions:{fn:()=>{let t,n;return t=a9(e),n=[],t&&t>0&&(n=[...Array(t)].fill(null).map((e,t)=>t)),n}},table_getCanPreviousPage:{fn:()=>(e.atoms.pagination?.get()?.pageIndex??0)>0},table_getCanNextPage:{fn:()=>{let t,n;return t=e.atoms.pagination?.get()?.pageIndex??0,-1===(n=a9(e))||0!==n&&t<n-1}},table_getCanLastPage:{fn:()=>{let t,n;return t=e.atoms.pagination?.get()?.pageIndex??0,Number.isFinite(n=a9(e))&&n>0&&t<n-1}},table_previousPage:{fn:()=>a3(e,e=>e-1)},table_nextPage:{fn:()=>a3(e,e=>e+1)},table_firstPage:{fn:()=>a3(e,0)},table_lastPage:{fn:()=>(function(e){let t=a9(e);if(Number.isFinite(t)&&!(t<=0))return a3(e,t-1)})(e)},table_getRowCount:{fn:()=>a8(e)}})}},sortedRowModel:e=>sh({feature:"rowSortingFeature",table:e,fnName:"table.getSortedRowModel",memoDeps:()=>[e.atoms.sorting?.get(),e.getPreSortedRowModel()],fn:()=>(function(e){let t=e.getPreSortedRowModel(),n=e.atoms.sorting?.get();if(!t.rows.length||!n?.length)return t;let r=[],i=n.filter(t=>{let n=e.getColumn(t.id);return!!n&&s9(n)});if(!i.length)return t;let o=[];for(let t=0;t<i.length;t++){let n=i[t],r=e.getColumn(n.id);r&&o.push({id:n.id,desc:n.desc,sortUndefined:r.columnDef.sortUndefined,invertSorting:r.columnDef.invertSorting,sortFn:s5(r)})}let s=(e,t)=>{for(let n=0;n<o.length;n++){let r=o[n],i=r.sortUndefined,s=r.desc,a=0;if(i){let n=e.getValue(r.id),o=t.getValue(r.id),s=void 0===n,l=void 0===o;if(s&&l)continue;if(s||l){if("first"===i)return s?-1:1;if("last"===i)return s?1:-1;a=s?i:-i}}if(0===a&&(a=r.sortFn(e,t,r.id)),0!==a)return s&&(a*=-1),r.invertSorting&&(a*=-1),a}return e.index-t.index},a=e=>{let t=e.slice();t.sort(s);let n=!1;for(let i=0;i<t.length;i++){let o=t[i];o!==e[i]&&(n=!0);let s=r.length;if(r.push(o),o.subRows.length){let e=a(o.subRows);if(e.changed){let a=Object.create(Object.getPrototypeOf(o));st(a,o),a.subRows=e.rows,t[i]=a,r[s]=a,n=!0}}}return{rows:t,changed:n}};return{rows:a(t.rows).rows,flatRows:r,rowsById:t.rowsById}})(e),onAfterUpdate:su(()=>sM(e))}),paginatedRowModel:e=>sh({feature:"rowPaginationFeature",table:e,fnName:"table.getPaginatedRowModel",memoDeps:()=>[e.getPrePaginatedRowModel(),e.atoms.pagination?.get(),e.options.paginateExpandedRows?void 0:e.atoms.expanded?.get()],fn:()=>(function(e){let t,n=e.getPrePaginatedRowModel(),r=e.atoms.pagination?.get();if(!n.rows.length)return n;let{pageSize:i,pageIndex:o}=r??a2(),{rows:s,flatRows:a,rowsById:l}=n,c=s;if(1/0!==i||0!==o){let e=i*o;c=s.slice(e,e+i)}(t=e.options.paginateExpandedRows?{rows:c,flatRows:a,rowsById:l}:sk(e,{rows:c,flatRows:a,rowsById:l})).flatRows=[];let u=new Set,h=e=>{!u.has(e.id)&&(u.add(e.id),t.flatRows.push(e),e.subRows.length&&e.subRows.forEach(h))};return t.rows.forEach(h),t})(e)}),expandedRowModel:e=>sh({feature:"rowExpandingFeature",table:e,fnName:"table.getExpandedRowModel",memoDeps:()=>[e.atoms.expanded?.get(),e.getPreExpandedRowModel(),e.options.paginateExpandedRows,e.options.manualPagination],fn:()=>{var t;let n,r;return n=(t=e).getPreExpandedRowModel(),r=t.atoms.expanded?.get(),n.rows.length&&(!0===r||Object.keys(r??{}).length)&&(t.options.paginateExpandedRows||t.options.manualPagination)?a1(n):n}}),filteredRowModel:e=>sh({feature:"columnFilteringFeature",table:e,fnName:"table.getFilteredRowModel",memoDeps:()=>[e.getPreFilteredRowModel(),e.atoms.columnFilters?.get(),e.atoms.globalFilter?.get()],fn:()=>(function(e){var t,n,r,i,o,s,a,l;let c,u,h,d,p,f,m,g,v,y=e.getPreFilteredRowModel(),b=e.atoms.columnFilters?.get(),x=e.atoms.globalFilter?.get(),w=null!=x&&""!==x;if(!y.rows.length||!b?.length&&!w){let e=y.flatRows;for(let t=0;t<e.length;t++){let n=e[t];n.columnFilters=sn(),n.columnFiltersMeta=sn()}return y}let S=[],A=[];b?.forEach(t=>{let n=sO(e,t.id);if(!n)return;let r=a$(n);r&&S.push({id:t.id,filterFn:r,resolvedValue:r.resolveFilterValue?.(t.value)??t.value})});let C=b?.map(e=>e.id)??[];if(w){let t=e.getGlobalFilterFn?.(),n=t?e.getAllLeafColumns().filter(sC):[];t&&n.length&&(C.push("__global__"),n.forEach(e=>{A.push({id:e.id,filterFn:t,resolvedValue:t.resolveFilterValue?.(x)??x})}))}let k=y.flatRows;for(let e=0;e<k.length;e++){let t=k[e];if(t.columnFilters=sn(),t.columnFiltersMeta=sn(),S.length)for(let e=0;e<S.length;e++){let n=S[e],r=n.id;t.columnFilters[r]=n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||(t.columnFiltersMeta=sn()),t.columnFiltersMeta[r]=e})}if(A.length){for(let e=0;e<A.length;e++){let n=A[e],r=n.id;if(n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||(t.columnFiltersMeta=sn()),t.columnFiltersMeta[r]=e})){t.columnFilters.__global__=!0;break}}!0!==t.columnFilters.__global__&&(t.columnFilters.__global__=!1)}}return t=y.rows,n=e=>{for(let t=0;t<C.length;t++)if(!1===e.columnFilters[C[t]])return!1;return!0},e.options.filterFromLeafRows?(r=t,i=n,o=e,c=[],u=sn(),h=o.options.maxLeafRowFilterDepth??100,a7(p=(d=(e,t=0)=>{let n=[];for(let r of e){let e=s_(o,r.id,r.original,r.index,r.depth,void 0,r.parentId);e.columnFilters=r.columnFilters,e.columnFiltersMeta=r.columnFiltersMeta,r.subRows.length&&t<h?(e.subRows=d(r.subRows,t+1),(e.subRows.length||i(e))&&n.push(e)):i(e)&&(e.subRows=r.subRows,n.push(e))}return n})(r),c,u),{rows:p,flatRows:c,rowsById:u}):(s=t,a=n,l=e,f=[],m=sn(),g=l.options.maxLeafRowFilterDepth??100,{rows:(v=(e,t=0)=>{let n=[];for(let r of e)if(a(r))if(r.subRows.length&&t<g){let e=s_(l,r.id,r.original,r.index,r.depth,void 0,r.parentId);e.columnFilters=r.columnFilters,e.columnFiltersMeta=r.columnFiltersMeta,n.push(e),f.push(e),m[e.id]=e,e.subRows=v(r.subRows,t+1)}else n.push(r),f.push(r),m[r.id]=r,r.subRows.length&&t>=g&&a7(r.subRows,f,m);return n})(s),flatRows:f,rowsById:m})})(e),onAfterUpdate:su(()=>sM(e))}),filterMeta:{},sortFns:{alphanumeric:s$,alphanumericCaseSensitive:sF,basic:sU,datetime:sW,text:sV,textCaseSensitive:sH}};function lt(e,t,{isHeader:n,isLastColumn:r,isFirstColumn:i,defaultColumnHeight:o}={}){var s,a;let l=e.spacing(1),c=e.spacing(1.25),u=e.spacing(2),h=i?u:c,d=r?u:c,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize;"compact"===t&&(l=e.spacing(.5),c=e.spacing(.5),u=e.spacing(1),h=i?u:c,d=r?u:c,p=e.typography.body2.lineHeight,f=e.typography.body2.fontSize),"comfortable"===t&&(l=e.spacing(2),c=e.spacing(1.5),u=e.spacing(2),h=i?u:c,d=r?u:c,p=e.typography.body1.lineHeight,f=e.typography.body1.fontSize);let m=n||!o||"auto"===o?(s=p,a=l,("string"==typeof s?parseInt(s,10):s??0)+2*("string"==typeof a?parseInt(a,10):a)):o;return{padding:`${l} ${d} ${l} ${h}`,height:m,fontSize:f,lineHeight:p}}function ln(e,t){return e.map(({width:e,align:n,headerDescription:r,cellDescription:i,enableSorting:o,dataLink:s,enableResizing:a,sortingFn:l,...c})=>{var u,h,d,p,f,m,g;let v=a??t?.enableResizing??!1,y="auto"===e||void 0===e?(u=v,h=t?.minWidth,d=t?.maxWidth,u?{size:150,minSize:h??60,maxSize:d??1e3}:{size:0,minSize:0,maxSize:0}):(p=v,f=e,m=t?.minWidth,g=t?.maxWidth,p?{size:f,minSize:m??60,maxSize:g??1e3}:{size:f});return{...c,...y,enableSorting:!!o,...l?{sortFn:l}:{},enableResizing:v,meta:{align:n,headerDescription:r,cellDescription:i,dataLink:s}}})}var lr=n("qm"),li=n("Va"),lo=(0,li.A)((0,l.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),ls=(0,li.A)((0,l.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),la=(0,li.A)((0,l.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function ll(e){return(0,M.Ay)("MuiCheckbox",e)}let lc=(0,k.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var lu=n("TB");let lh=(0,y.A)(lr.A,{shouldForwardProp:e=>(0,v.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,A.A)(n.size)}`],"default"!==n.color&&t[`color${(0,A.A)(n.color)}`]]}})((0,b.A)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t},style:{[`&.${lc.checked}, &.${lc.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${lc.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),ld=(0,l.jsx)(ls,{}),lp=(0,l.jsx)(lo,{}),lf=(0,l.jsx)(la,{}),lm=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:r=ld,color:i="primary",icon:o=lp,indeterminate:s=!1,indeterminateIcon:a=lf,inputProps:c,size:h="medium",disableRipple:p=!1,className:m,slots:g={},slotProps:v={},...y}=n,b=s?a:o,w=s?a:r,S={...n,disableRipple:p,color:i,indeterminate:s,size:h},C=(e=>{let{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${(0,A.A)(r)}`,`size${(0,A.A)(i)}`]},s=(0,f.A)(o,ll,t);return{...t,...s}})(S),k=v.input??c,[M,O]=(0,nd.A)("root",{ref:t,elementType:lh,className:(0,d.A)(C.root,m),shouldForwardComponentProp:!0,externalForwardedProps:{slots:g,slotProps:v,...y},ownerState:S,additionalProps:{type:"checkbox",icon:u.cloneElement(b,{fontSize:b.props.fontSize??h}),checkedIcon:u.cloneElement(w,{fontSize:w.props.fontSize??h}),disableRipple:p,slots:g,slotProps:{input:(0,lu.A)("function"==typeof k?k(S):k,{"data-indeterminate":s})}}});return(0,l.jsx)(M,{...O,classes:C})});function lg(e){let t,n,r,i,o,s,a,u,h,d,p=(0,c.c)(23);p[0]!==e?({color:t,density:n,...r}=e,p[0]=e,p[1]=t,p[2]=n,p[3]=r):(t=p[1],n=p[2],r=p[3]);let f="compact"===n,g=f?"small":"medium";p[4]!==f?(i=e=>e.spacing(f?.25:.5),p[4]=f,p[5]=i):i=p[5],p[6]!==t?(o={color:t},s=t?(0,m.X4)(t,.5):void 0,p[6]=t,p[7]=o,p[8]=s):(o=p[7],s=p[8]),p[9]!==s?(a={background:s},p[9]=s,p[10]=a):a=p[10];let v=f?16:18;return p[11]!==v?(u={fontSize:v},p[11]=v,p[12]=u):u=p[12],p[13]!==t||p[14]!==i||p[15]!==o||p[16]!==a||p[17]!==u?(h={color:t,padding:i,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)","&.Mui-checked":o,"&.Mui-focusVisible":a,"& .MuiSvgIcon-root":u},p[13]=t,p[14]=i,p[15]=o,p[16]=a,p[17]=u,p[18]=h):h=p[18],p[19]!==r||p[20]!==g||p[21]!==h?(d=(0,l.jsx)(lm,{size:g,...r,focusRipple:!1,tabIndex:-1,sx:h}),p[19]=r,p[20]=g,p[21]=h,p[22]=d):d=p[22],d}let lv=u.createContext();function ly(e){return(0,M.Ay)("MuiTableRow",e)}let lb=(0,k.A)("MuiTableRow",["root","selected","hover","head","footer"]),lx=(0,y.A)("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})((0,b.A)(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${lb.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${lb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),lw=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTableRow"}),{className:r,component:i="tr",hover:o=!1,selected:s=!1,...a}=n,c=u.useContext(lv),h={...n,component:i,hover:o,selected:s,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant},p=(e=>{let{classes:t,selected:n,hover:r,head:i,footer:o}=e;return(0,f.A)({root:["root",n&&"selected",r&&"hover",i&&"head",o&&"footer"]},ly,t)})(h);return(0,l.jsx)(lx,{as:i,ref:t,className:(0,d.A)(p.root,r),role:"tr"===i?null:"row",ownerState:h,...a})});var lS=n("nA"),lA=n("FA"),lC=n("sG");let lk=u.createContext();function lM(e){return(0,M.Ay)("MuiTableCell",e)}let lO=(0,k.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),lT=(0,y.A)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${(0,A.A)(n.size)}`],"normal"!==n.padding&&t[`padding${(0,A.A)(n.padding)}`],"inherit"!==n.align&&t[`align${(0,A.A)(n.align)}`],n.stickyHeader&&t.stickyHeader]}})((0,b.A)(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
|
|
30
|
+
${"light"===e.palette.mode?(0,m.a)((0,m.X4)(e.palette.divider,1),.88):(0,m.e$)((0,m.X4)(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${lO.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),l_=u.forwardRef(function(e,t){let n,r=(0,x.b)({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:s,padding:a,scope:c,size:h,sortDirection:p,variant:m,...g}=r,v=u.useContext(lk),y=u.useContext(lv),b=y&&"head"===y.variant,w=c;"td"===(n=s||(b?"th":"td"))?w=void 0:!w&&b&&(w="col");let S=m||y&&y.variant,C={...r,align:i,component:n,padding:a||(v&&v.padding?v.padding:"normal"),size:h||(v&&v.size?v.size:"medium"),sortDirection:p,stickyHeader:"head"===S&&v&&v.stickyHeader,variant:S},k=(e=>{let{classes:t,variant:n,align:r,padding:i,size:o,stickyHeader:s}=e,a={root:["root",n,s&&"stickyHeader","inherit"!==r&&`align${(0,A.A)(r)}`,"normal"!==i&&`padding${(0,A.A)(i)}`,`size${(0,A.A)(o)}`]};return(0,f.A)(a,lM,t)})(C),M=null;return p&&(M="asc"===p?"ascending":"descending"),(0,l.jsx)(lT,{as:n,ref:t,className:(0,d.A)(k.root,o),"aria-sort":M,scope:w,ownerState:C,...g})});function lI(e){return(0,M.Ay)("MuiToolbar",e)}(0,k.A)("MuiToolbar",["root","gutters","regular","dense"]);let lD=(0,y.A)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})((0,b.A)(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),lR=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiToolbar"}),{className:r,component:i="div",disableGutters:o=!1,variant:s="regular",...a}=n,c={...n,component:i,disableGutters:o,variant:s},u=(e=>{let{classes:t,disableGutters:n,variant:r}=e;return(0,f.A)({root:["root",!n&&"gutters",r]},lI,t)})(c);return(0,l.jsx)(lD,{as:i,className:(0,d.A)(u.root,r),ref:t,ownerState:c,...a})});var lE=n("Cn"),lP=(0,li.A)((0,l.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),lL=(0,li.A)((0,l.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),lN=(0,li.A)((0,l.jsx)("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),lB=(0,li.A)((0,l.jsx)("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage");let lj=u.forwardRef(function(e,t){let{backIconButtonProps:n,count:r,disabled:i=!1,getItemAriaLabel:o,nextIconButtonProps:s,onPageChange:a,page:c,rowsPerPage:u,showFirstButton:h,showLastButton:d,slots:p={},slotProps:f={},...m}=e,g=(0,lE.I)(),v=p.firstButton??er,y=p.lastButton??er,b=p.nextButton??er,x=p.previousButton??er,w=p.firstButtonIcon??lB,S=p.lastButtonIcon??lN,A=p.nextButtonIcon??lL,C=p.previousButtonIcon??lP,k=g?y:v,M=g?b:x,O=g?x:b,T=g?v:y,_=g?f.lastButton:f.firstButton,I=g?f.nextButton:f.previousButton,D=g?f.previousButton:f.nextButton,R=g?f.firstButton:f.lastButton;return(0,l.jsxs)("div",{ref:t,...m,children:[h&&(0,l.jsx)(k,{onClick:e=>{a(e,0)},disabled:i||0===c,"aria-label":o("first",c),title:o("first",c),..._,children:g?(0,l.jsx)(S,{...f.lastButtonIcon}):(0,l.jsx)(w,{...f.firstButtonIcon})}),(0,l.jsx)(M,{onClick:e=>{a(e,c-1)},disabled:i||0===c,color:"inherit","aria-label":o("previous",c),title:o("previous",c),...I??n,children:g?(0,l.jsx)(A,{...f.nextButtonIcon}):(0,l.jsx)(C,{...f.previousButtonIcon})}),(0,l.jsx)(O,{onClick:e=>{a(e,c+1)},disabled:i||-1!==r&&c>=Math.ceil(r/u)-1,color:"inherit","aria-label":o("next",c),title:o("next",c),...D??s,children:g?(0,l.jsx)(C,{...f.previousButtonIcon}):(0,l.jsx)(A,{...f.nextButtonIcon})}),d&&(0,l.jsx)(T,{onClick:e=>{a(e,Math.max(0,Math.ceil(r/u)-1))},disabled:i||c>=Math.ceil(r/u)-1,"aria-label":o("last",c),title:o("last",c),...R,children:g?(0,l.jsx)(w,{...f.firstButtonIcon}):(0,l.jsx)(S,{...f.lastButtonIcon})})]})});function lz(e){return(0,M.Ay)("MuiTablePagination",e)}let l$=(0,k.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),lF=(0,y.A)(l_,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((0,b.A)(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),lV=(0,y.A)(lR,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${l$.actions}`]:t.actions,...t.toolbar})})((0,b.A)(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${l$.actions}`]:{flexShrink:0,marginLeft:20}}))),lH=(0,y.A)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),lW=(0,y.A)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((0,b.A)(({theme:e})=>({...e.typography.body2,flexShrink:0}))),lU=(0,y.A)(lC.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${l$.selectIcon}`]:t.selectIcon,[`& .${l$.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${l$.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),lG=(0,y.A)(lA.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),lq=(0,y.A)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((0,b.A)(({theme:e})=>({...e.typography.body2,flexShrink:0})));function lX({from:e,to:t,count:n}){return`${e}–${t} of ${-1!==n?n:`more than ${t}`}`}function lY(e){return`Go to ${e} page`}let lK=u.forwardRef(function(e,t){let n,r=(0,x.b)({props:e,name:"MuiTablePagination"}),{ActionsComponent:i=lj,backIconButtonProps:o,colSpan:s,component:a=l_,count:c,disabled:h=!1,getItemAriaLabel:p=lY,labelDisplayedRows:m=lX,labelRowsPerPage:v="Rows per page:",nextIconButtonProps:y,onPageChange:b,onRowsPerPageChange:w,page:S,rowsPerPage:A,rowsPerPageOptions:C=[10,25,50,100],SelectProps:k={},showFirstButton:M=!1,showLastButton:O=!1,slotProps:T={},slots:_={},...I}=r,D=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},lz,t)})(r),R=T?.select??k,E=R.native?"option":lG;(a===l_||"td"===a)&&(n=s||1e3);let P=(0,g.A)(R.id),L=(0,g.A)(R.labelId),N={slots:_,slotProps:T},[B,j]=(0,nd.A)("root",{ref:t,className:D.root,elementType:lF,externalForwardedProps:{...N,component:a,...I},ownerState:r,additionalProps:{colSpan:n}}),[z,$]=(0,nd.A)("toolbar",{className:D.toolbar,elementType:lV,externalForwardedProps:N,ownerState:r}),[F,V]=(0,nd.A)("spacer",{className:D.spacer,elementType:lH,externalForwardedProps:N,ownerState:r}),[H,W]=(0,nd.A)("selectLabel",{className:D.selectLabel,elementType:lW,externalForwardedProps:N,ownerState:r,additionalProps:{id:L}}),[U,G]=(0,nd.A)("select",{className:D.select,elementType:lU,externalForwardedProps:N,ownerState:r}),[q,X]=(0,nd.A)("menuItem",{className:D.menuItem,elementType:E,externalForwardedProps:N,ownerState:r}),[Y,K]=(0,nd.A)("displayedRows",{className:D.displayedRows,elementType:lq,externalForwardedProps:N,ownerState:r});return(0,l.jsx)(B,{...j,children:(0,l.jsxs)(z,{...$,children:[(0,l.jsx)(F,{...V}),C.length>1&&(0,l.jsx)(H,{...W,children:v}),C.length>1&&(0,l.jsx)(U,{variant:"standard",...!R.variant&&{input:Xj||(Xj=(0,l.jsx)(lS.Ay,{}))},value:A,onChange:w,id:P,labelId:L,...R,classes:{...R.classes,root:(0,d.A)(D.input,D.selectRoot,(R.classes||{}).root),select:(0,d.A)(D.select,(R.classes||{}).select),icon:(0,d.A)(D.selectIcon,(R.classes||{}).icon)},disabled:h,...G,children:C.map(e=>(0,u.createElement)(q,{...X,key:e.label?e.label:e,value:e.value?e.value:e},e.label?e.label:e))}),(0,l.jsx)(Y,{...K,children:m({from:0===c?0:S*A+1,to:-1===c?(S+1)*A:-1===A?c:Math.min(c,(S+1)*A),count:-1===c?-1:c,page:S})}),(0,l.jsx)(i,{className:D.actions,backIconButtonProps:o,count:c,nextIconButtonProps:y,onPageChange:b,page:S,rowsPerPage:A,showFirstButton:M,showLastButton:O,slotProps:T.actions,slots:_.actions,getItemAriaLabel:p,disabled:h})]})})}),lQ={row:0,column:0},lZ=new Set(["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"]);function lJ(e){return(0,M.Ay)("MuiTable",e)}(0,k.A)("MuiTable",["root","stickyHeader"]);let l0=(0,y.A)("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})((0,b.A)(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]}))),l1="table",l2=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTable"}),{className:r,component:i=l1,padding:o="normal",size:s="medium",stickyHeader:a=!1,...c}=n,h={...n,component:i,padding:o,size:s,stickyHeader:a},p=(e=>{let{classes:t,stickyHeader:n}=e;return(0,f.A)({root:["root",n&&"stickyHeader"]},lJ,t)})(h),m=u.useMemo(()=>({padding:o,size:s,stickyHeader:a}),[o,s,a]);return(0,l.jsx)(lk.Provider,{value:m,children:(0,l.jsx)(l0,{as:i,role:i===l1?null:"table",ref:t,className:(0,d.A)(p.root,r),ownerState:h,...c})})}),l5=(0,y.A)(l2)(({theme:e})=>({tableLayout:"fixed",borderCollapse:"separate",backgroundColor:e.palette.background.default})),l3={compact:"small",standard:"medium",comfortable:"medium"},l4=(0,u.forwardRef)(function(e,t){let n,r,i,o,s=(0,c.c)(8);s[0]!==e?({density:n,...r}=e,s[0]=e,s[1]=n,s[2]=r):(n=s[1],r=s[2]);let a=l3[n];return s[3]===Symbol.for("react.memo_cache_sentinel")?(i={width:"100%"},s[3]=i):i=s[3],s[4]!==r||s[5]!==t||s[6]!==a?(o=(0,l.jsx)(l5,{...r,tabIndex:-1,size:a,ref:t,sx:i}),s[4]=r,s[5]=t,s[6]=a,s[7]=o):o=s[7],o});function l6(e){return(0,M.Ay)("MuiTableBody",e)}(0,k.A)("MuiTableBody",["root"]);let l9=(0,y.A)("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),l8={variant:"body"},l7="tbody",ce=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTableBody"}),{className:r,component:i=l7,...o}=n,s={...n,component:i},a=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},l6,t)})(s);return(0,l.jsx)(lv.Provider,{value:l8,children:(0,l.jsx)(l9,{className:(0,d.A)(a.root,r),as:i,ref:t,role:i===l7?null:"rowgroup",ownerState:s,...o})})}),ct=(0,u.forwardRef)(function(e,t){let n,r=(0,c.c)(3);return r[0]!==e||r[1]!==t?(n=(0,l.jsx)(ce,{...e,ref:t}),r[0]=e,r[1]=t,r[2]=n):n=r[2],n});var cn=n("DB");function cr(e){return(0,M.Ay)("MuiLink",e)}let ci=(0,k.A)("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var co=n("Rx");let cs={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},ca=(0,y.A)(nc.A,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`underline${(0,A.A)(n.underline)}`],"button"===n.component&&t.button]}})((0,b.A)(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:e,ownerState:t})=>"always"===e&&"inherit"!==t.color,style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:(0,m.X4)(e.palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,m.X4)(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:(0,m.X4)(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${ci.focusVisible}`]:{outline:"auto"}}}]}))),cl=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiLink"}),r=(0,e8.A)(),{className:i,color:o="primary",component:s="a",onBlur:a,onFocus:c,TypographyClasses:h,underline:p="always",variant:g="inherit",sx:v,...y}=n,[b,w]=u.useState(!1),S={...n,color:o,component:s,focusVisible:b,underline:p,variant:g},C=(e=>{let{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${(0,A.A)(i)}`,"button"===n&&"button",r&&"focusVisible"]};return(0,f.A)(o,cr,t)})(S);return(0,l.jsx)(ca,{color:o,className:(0,d.A)(C.root,i),classes:h,component:s,onBlur:e=>{(0,cn.A)(e.target)||w(!1),a&&a(e)},onFocus:e=>{(0,cn.A)(e.target)&&w(!0),c&&c(e)},ref:t,ownerState:S,variant:g,...y,sx:[...void 0===cs[o]?[{color:o}]:[],...Array.isArray(v)?v:[v]],style:{...y.style,..."always"===p&&"inherit"!==o&&!cs[o]&&{"--Link-underlineColor":(({theme:e,ownerState:t})=>{let n=t.color,r=(0,co.Yn)(e,`palette.${n}.main`,!1)||(0,co.Yn)(e,`palette.${n}`,!1)||t.color,i=(0,co.Yn)(e,`palette.${n}.mainChannel`)||(0,co.Yn)(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:(0,m.X4)(r,.4)})({theme:r,ownerState:S})}}})});var cc=((Xy={}).CSV="csv",Xy.DISTRIBUTED="distributed",Xy.DOUBLEQUOTE="doublequote",Xy.GLOB="glob",Xy.JSON="json",Xy.LUCENE="lucene",Xy.PERCENTENCODE="percentencode",Xy.PIPE="pipe",Xy.PROMETHEUS="prometheus",Xy.RAW="raw",Xy.REGEX="regex",Xy.SINGLEQUOTE="singlequote",Xy.SQLSTRING="sqlstring",Xy.TEXT="text",Xy.QUERYPARAM="queryparam",Xy.REGEX_LITERAL="regexliteral",Xy);function cu(e){if(!e)return;let t=e.toLowerCase();return Object.values(cc).find(e=>e===t)||void 0}function ch(e,t,n){switch(n){case"csv":case"raw":return e.join(",");case"distributed":{let[n,...r]=e;return`${[n,...r.map(e=>`${t}=${e}`)].join(",")}`}case"doublequote":return e.map(e=>`"${e}"`).join(",");case"glob":return`{${e.join(",")}}`;case"json":return JSON.stringify(e.map(e=>{try{return JSON.parse(e)}catch{return e}}));case"lucene":return`(${e.map(e=>`"${e}"`).join(" OR ")})`;case"percentencode":return encodeURIComponent(e.join(","));case"pipe":return e.join("|");case"regex":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"));return`(${t.join("|")})`}case"regexliteral":{let t=e.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\\\$&"));return`(${t.join("|")})`}case"singlequote":return e.map(e=>`'${e}'`).join(",");case"sqlstring":return e.map(e=>`'${e.replace(/'/g,"''")}'`).join(",");case"text":return e.join(" + ");case"queryparam":return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&");default:return`(${e.join("|")})`}}function cd(e,t,n,r){let i="$"+t,o="${"+t+(r?":"+r:"")+"}",s="";return Array.isArray(n)&&(s=ch(n,t,r||"prometheus")),"string"==typeof n&&(s=ch([n],t,r||"raw")),(e=e.replaceAll(i,s)).replaceAll(o,s)}let cp=/\$(\w+)|\${(\w+)(?:\.([^:^}]+))?(?::([^}]+))?}/gm;function cf(e){let t,n=new Set;for(;null!==(t=cp.exec(e));)t&&(t[1]?n.add(t[1]):t[2]&&n.add(t[2]));return Array.from(n.values())}function cm(e){let t,n=new Map;for(;null!==(t=cp.exec(e));)if(t){let e;t[4]&&(e=t[4]),t[1]?n.set(t[1],cu(e)):t[2]&&n.set(t[2],cu(e))}return n}function cg(e,t){let n=cm(e),r=Array.from(n.keys()),i=e;return r.toSorted((e,t)=>t.length-e.length).forEach(e=>{let r=t[e];r&&void 0!==r.value&&(i=cd(i,e,r?.value,n.get(e)))}),i}function cv(e,t){let n={};for(let[e,r]of Object.entries(t))n[e]=void 0===r.displayValue?r:{...r,value:r.displayValue};return cg(e,n)}function cy(e,t){let n=cg(e,t);try{let e=/^https?:\/\//i.test(n),r=n.startsWith("//"),i=/^[a-z][a-z0-9+.-]*:/i.test(n);if(!e&&!r&&i)return n;let o=r?`http:${n}`:n,s=new URL(o,e||r?void 0:"http://perses.local"),a=Array.from(s.searchParams.entries()),l=!1,c=a.map(([e,n])=>{let r=cg(n,t);return r!==n&&(l=!0),[e,r]});if(!l)return n;for(let e of[...new Set(a.map(([e])=>e))])s.searchParams.delete(e);for(let[e,t]of c)s.searchParams.append(e,t);if(e)return s.href;if(r)return`//${s.host}${s.pathname}${s.search}${s.hash}`;let u=n.indexOf("?"),h=n.indexOf("#"),d=n.length;u>=0?d=u:h>=0&&(d=h);let p=n.slice(0,d);return`${p}${s.search}${s.hash}`}catch{return n}}let cb=/\$\{__data\.fields(?:\[(?:"|')([^"']+)(?:"|')\]|\.([a-zA-Z_][a-zA-Z0-9_]*))(?::([a-z]+))?\}/g,cx=/\$\{__data\[(\d+)\]\.fields\[(?:"|')([^"']+)(?:"|')\]\}/g,cw=/\$\{__data\.index\}/g,cS=/\$\{__data\.count\}/g,cA=/("|')?\$\{__data(?::([a-z]+))?\}("|')?/g;function cC(e,t){if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];return null==n?"":"object"==typeof n?JSON.stringify(n):String(n)}if(t.includes(".")){let n=t.split("."),r=e;for(let e of n){if(null==r||"object"!=typeof r)return"";r=r[e]}return null==r?"":"object"==typeof r?JSON.stringify(r):String(r)}return""}function ck(e){if(!e)return;let t=e.toLowerCase();return Object.values(cc).find(e=>e===t)}function cM(e,t,n={}){let{urlEncode:r=!0,index:i,count:o}=n,s=e,a=[];return void 0!==i&&(s=s.replaceAll(cw,String(i))),void 0!==o&&(s=s.replaceAll(cS,String(o))),s=s.replaceAll(cA,(e,n,r,i)=>{let o=ck(r)??cc.RAW;return o===cc.JSON?JSON.stringify(t):ch(Object.values(t).map(e=>JSON.stringify(e)),"",o)}),cb.lastIndex=0,{text:s=s.replaceAll(cb,(e,n,i,o)=>{let s=n??i??"",l=cC(t,s);""===l&&void 0===t[s]&&a.push(`Field "${s}" not found in data`);let c=ck(o);if(c)return ch([l],s,c);if(r){if(c===cc.RAW)return l;if(c!==cc.QUERYPARAM&&c!==cc.PERCENTENCODE)return encodeURIComponent(l)}return l}),errors:a.length>0?a:void 0}}function cO(e,t,n={}){let{urlEncode:r=!0}=n,i=e,o=[];return i=i.replaceAll(cS,String(t.length)),cx.lastIndex=0,cb.lastIndex=0,{text:i=(i=(i=i.replaceAll(cA,(e,n,r,i)=>{let o=ck(r)??cc.RAW,s=ch(Object.values(t).map(e=>JSON.stringify(e)),"",o);return n&&i?s:`${n??""}${s}${i??""}`})).replaceAll(cx,(e,n,i)=>{let s=parseInt(n,10);if(s<0||s>=t.length)return o.push(`Index ${s} out of bounds (0-${t.length-1})`),e;let a=cC(t[s],i);return""===a&&void 0===t[s][i]&&o.push(`Field "${i}" not found in data at index ${s}`),r?encodeURIComponent(a):a})).replaceAll(cb,(e,n,r,i)=>{let o=n??r??"";return ch(t.map(e=>cC(e,o)),o,ck(i)||cc.CSV)}),errors:o.length>0?o:void 0}}function cT(e){return cx.lastIndex=0,cx.test(e)||/\$\{__data\.fields(?:\[["'][^"']+["']\]|\.[a-zA-Z_][a-zA-Z0-9_]*):[a-z]+\}/.test(e)}function c_(e){return cx.lastIndex=0,cx.test(e)}function cI(e){return cb.lastIndex=0,cx.lastIndex=0,cb.test(e)||cx.test(e)}function cD(e){let t,n=new Set;for(cb.lastIndex=0,cx.lastIndex=0;null!==(t=cb.exec(e));)n.add(t[1]??t[2]);for(;null!==(t=cx.exec(e));)n.add(t[2]);return Array.from(n)}let cR=new Set(["http:","https:","mailto:","tel:","sms:","slack:","msteams:","vscode:","vscode-insiders:","zoommtg:"]);function cE(e){try{return cR.has(new URL(e,"http://perses.local").protocol)}catch{return!1}}function cP(e){if(void 0!==e&&cE(e))return e}let cL=(0,y.A)(l_)(({theme:e})=>({padding:0,backgroundColor:"inherit","&.MuiTableCell-head":{backgroundColor:e.palette.background.default},"&:focus-visible":{outline:`solid 1px ${e.palette.primary.main}`,outlineOffset:"-1px",borderRadius:0}}));function cN(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O,T,_,I,D,R,E=(0,c.c)(66);E[0]!==e?({children:i,density:h,variant:y,width:b,defaultColumnHeight:a,focusState:v,onFocusTrigger:m,isFirstColumn:p,isLastColumn:f,description:d,align:n,color:o,backgroundColor:r,dataLink:s,adjacentCellsValuesMap:t,...g}=e,E[0]=e,E[1]=t,E[2]=n,E[3]=r,E[4]=i,E[5]=o,E[6]=s,E[7]=a,E[8]=h,E[9]=d,E[10]=p,E[11]=f,E[12]=m,E[13]=g,E[14]=v,E[15]=y,E[16]=b):(t=E[1],n=E[2],r=E[3],i=E[4],o=E[5],s=E[6],a=E[7],h=E[8],d=E[9],p=E[10],f=E[11],m=E[12],g=E[13],v=E[14],y=E[15],b=E[16]);let P=void 0===v?"none":v,L=(0,e8.A)(),N=(0,u.useRef)(null),B="head"===y;E[17]!==P?(x=()=>{"trigger-focus"===P&&N.current&&N.current.focus()},w=[P],E[17]=P,E[18]=x,E[19]=w):(x=E[18],w=E[19]),(0,u.useEffect)(x,w),E[20]!==m?(S=e=>{m?.(e)},E[20]=m,E[21]=S):S=E[21];let j=S;t:{let e,n;if(!s){A=void 0;break t}let r=s.url;if(t&&cI(r)){let e;E[22]!==t||E[23]!==r?(e=cM(r,t,{urlEncode:!0}),E[22]=t,E[23]=r,E[24]=e):e=E[24],r=e.text}E[25]!==r?(e=cP(r),E[25]=r,E[26]=e):e=E[26];let i=e;if(void 0===i){A=void 0;break t}E[27]!==s||E[28]!==i?(n={...s,url:i},E[27]=s,E[28]=i,E[29]=n):n=E[29],A=n}let z=A,$="none"!==P?0:-1;E[30]!==b?(C={width:b},E[30]=b,E[31]=C):C=E[31];let F=B?`solid 1px ${L.palette.grey[100]}`:`solid 1px ${L.palette.grey[50]}`,V=`${r??L.palette.background.default} !important`,H=`solid 1px ${L.palette.info.main}`;E[32]!==H||E[33]!==V?(k={position:"absolute",top:0,left:0,zIndex:10,width:"fit-content",minWidth:"100%",whiteSpace:"nowrap",overflow:"visible",backgroundColor:V,outline:H,outlineOffset:"-1px"},E[32]=H,E[33]=V,E[34]=k):k=E[34],E[35]!==k||E[36]!==F?(M={position:"relative",borderBottom:F,"&:hover #original-cell":k},E[35]=k,E[36]=F,E[37]=M):M=E[37],E[38]!==a||E[39]!==h||E[40]!==p||E[41]!==B||E[42]!==f||E[43]!==L?(O=lt(L,h,{isHeader:B,isLastColumn:f,isFirstColumn:p,defaultColumnHeight:a}),E[38]=a,E[39]=h,E[40]=p,E[41]=B,E[42]=f,E[43]=L,E[44]=O):O=E[44],E[45]!==O?(T={...O,position:"relative",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexDirection:"inherit"},E[45]=O,E[46]=T):T=E[46];let W=r??"inherit",U=o??"inherit";return E[47]!==W||E[48]!==U?(_={backgroundColor:W,color:U},E[47]=W,E[48]=U,E[49]=_):_=E[49],E[50]!==i||E[51]!==z?(I=z?(0,l.jsx)(cl,{href:z.url,target:z.targetBlank?"_blank":"_self",rel:z.targetBlank?"noopener noreferrer":void 0,children:i}):i,E[50]=i,E[51]=z,E[52]=I):I=E[52],E[53]!==n||E[54]!==d||E[55]!==T||E[56]!==_||E[57]!==I?(D=(0,l.jsx)(e7.A,{id:"original-cell",sx:T,style:_,title:d,"aria-label":d,textAlign:n,children:I}),E[53]=n,E[54]=d,E[55]=T,E[56]=_,E[57]=I,E[58]=D):D=E[58],E[59]!==j||E[60]!==g||E[61]!==M||E[62]!==D||E[63]!==$||E[64]!==C?(R=(0,l.jsx)(cL,{...g,tabIndex:$,onFocus:cB,onClick:j,onKeyUp:j,style:C,sx:M,ref:N,children:D}),E[59]=j,E[60]=g,E[61]=M,E[62]=D,E[63]=$,E[64]=C,E[65]=R):R=E[65],R}function cB(e){let t=e.currentTarget?.querySelector('a[href], button, input, textarea, select, details,[role="button"]');t&&t.focus()}function cj(e){return(0,M.Ay)("MuiTableFooter",e)}(0,k.A)("MuiTableFooter",["root"]);let cz=(0,y.A)("tfoot",{name:"MuiTableFooter",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-footer-group"}),c$={variant:"footer"},cF="tfoot",cV=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTableFooter"}),{className:r,component:i=cF,...o}=n,s={...n,component:i},a=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},cj,t)})(s);return(0,l.jsx)(lv.Provider,{value:c$,children:(0,l.jsx)(cz,{as:i,className:(0,d.A)(a.root,r),ref:t,role:i===cF?null:"rowgroup",ownerState:s,...o})})}),cH=(0,u.forwardRef)(function(e,t){let n,r=(0,c.c)(3);return r[0]!==e||r[1]!==t?(n=(0,l.jsx)(cV,{...e,ref:t}),r[0]=e,r[1]=t,r[2]=n):n=r[2],n});function cW(e){return(0,M.Ay)("MuiTableHead",e)}(0,k.A)("MuiTableHead",["root"]);let cU=(0,y.A)("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),cG={variant:"head"},cq="thead",cX=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTableHead"}),{className:r,component:i=cq,...o}=n,s={...n,component:i},a=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},cW,t)})(s);return(0,l.jsx)(lv.Provider,{value:cG,children:(0,l.jsx)(cU,{as:i,className:(0,d.A)(a.root,r),ref:t,role:i===cq?null:"rowgroup",ownerState:s,...o})})}),cY=(0,u.forwardRef)(function(e,t){let n,r=(0,c.c)(3);return r[0]!==e||r[1]!==t?(n=(0,l.jsx)(cX,{...e,ref:t}),r[0]=e,r[1]=t,r[2]=n):n=r[2],n});var cK=(0,li.A)((0,l.jsx)("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function cQ(e){return(0,M.Ay)("MuiTableSortLabel",e)}let cZ=(0,k.A)("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]),cJ=(0,y.A)(w.A,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.active&&t.active]}})((0,b.A)(({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${cZ.icon}`]:{opacity:.5}},[`&.${cZ.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${cZ.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}}))),c0=(0,y.A)("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,t[`iconDirection${(0,A.A)(n.direction)}`]]}})((0,b.A)(({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]}))),c1=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:i,className:o,direction:s="asc",hideSortIcon:a=!1,IconComponent:c=cK,slots:u={},slotProps:h={},...p}=n,m={...n,active:r,direction:s,hideSortIcon:a,IconComponent:c},g=(e=>{let{classes:t,direction:n,active:r}=e,i={root:["root",r&&"active",`direction${(0,A.A)(n)}`],icon:["icon",`iconDirection${(0,A.A)(n)}`]};return(0,f.A)(i,cQ,t)})(m),v={slots:u,slotProps:h},[y,b]=(0,nd.A)("root",{elementType:cJ,externalForwardedProps:v,ownerState:m,className:(0,d.A)(g.root,o),ref:t}),[w,S]=(0,nd.A)("icon",{elementType:c0,externalForwardedProps:v,ownerState:m,className:g.icon});return(0,l.jsxs)(y,{disableRipple:!0,component:"span",...b,...p,children:[i,a&&!r?null:(0,l.jsx)(w,{as:c,...S})]})});var c2=n("x4");let c5=(0,y.A)("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})((0,b.A)(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:(0,m.X4)(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),c3=(0,y.A)("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})((0,b.A)(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),c4=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,orientation:s="horizontal",component:a=i||"vertical"===s?"div":"hr",flexItem:c=!1,light:u=!1,role:h="hr"!==a?"separator":void 0,textAlign:p="center",variant:m="fullWidth",...g}=n,v={...n,absolute:r,component:a,flexItem:c,light:u,orientation:s,role:h,textAlign:p,variant:m},y=(e=>{let{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:a,variant:l}=e;return(0,f.A)({root:["root",t&&"absolute",l,o&&"light","vertical"===s&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===s&&"withChildrenVertical","right"===a&&"vertical"!==s&&"textAlignRight","left"===a&&"vertical"!==s&&"textAlignLeft"],wrapper:["wrapper","vertical"===s&&"wrapperVertical"]},c2.K,r)})(v);return(0,l.jsx)(c5,{as:a,className:(0,d.A)(y.root,o),role:h,ref:t,ownerState:v,"aria-orientation":"separator"===h&&("hr"!==a||"vertical"===s)?s:void 0,...g,children:i?(0,l.jsx)(c3,{className:y.wrapper,ownerState:v,children:i}):null})});function c6(e){let t,n,r,i,o,s,a,u,h,d,p=(0,c.c)(21);p[0]!==e?({onSort:i,sortDirection:s,nextSortDirection:r,children:n,resizeConfig:o,...t}=e,p[0]=e,p[1]=t,p[2]=n,p[3]=r,p[4]=i,p[5]=o,p[6]=s):(t=p[1],n=p[2],r=p[3],i=p[4],o=p[5],s=p[6]);let f=!!i;p[7]!==n?(a=(0,l.jsx)(nc.A,{noWrap:!0,variant:"inherit",component:"div",color:"inherit",children:n}),p[7]=n,p[8]=a):a=p[8];let m=a,g=!!s,v=g?s:r;return p[9]!==v||p[10]!==m||p[11]!==g||p[12]!==i||p[13]!==f?(u=f?(0,l.jsx)(c1,{onClick:i,direction:v,active:g,sx:{verticalAlign:"unset",maxWidth:"100%","&:focus-visible":{[`& .${cZ.icon}`]:{opacity:g?1:.5}}},children:m}):m,p[9]=v,p[10]=m,p[11]=g,p[12]=i,p[13]=f,p[14]=u):u=p[14],p[15]!==o?(h=o&&(0,l.jsx)(e7.A,{onMouseDown:e=>{2===e.detail?o.resetSizeHandler():o.resizeHandler(e)},onTouchStart:o.resizeHandler,sx:{position:"absolute",height:"100%",top:0,right:"4px",cursor:"col-resize"},children:(0,l.jsx)(c4,{flexItem:!0,orientation:"vertical",sx:e=>({backgroundColor:o.isResizing?e.palette.action.active:e.palette.divider,borderRadius:"2px",borderWidth:"2px",height:"100%",touchAction:"none",transform:"translateX(4px)",userSelect:"none"})})}),p[15]=o,p[16]=h):h=p[16],p[17]!==t||p[18]!==u||p[19]!==h?(d=(0,l.jsxs)(cN,{...t,children:[u,h]}),p[17]=t,p[18]=u,p[19]=h,p[20]=d):d=p[20],d}c4&&(c4.muiSkipListHighlight=!0);let c9=(0,u.forwardRef)(function(e,t){let n,r,i=(0,c.c)(4);return i[0]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:c8,"&:hover":{backgroundColor:c7}},i[0]=n):n=i[0],i[1]!==e||i[2]!==t?(r=(0,l.jsx)(lw,{...e,ref:t,sx:n}),i[1]=e,i[2]=t,i[3]=r):r=i[3],r});function c8(e){return e.palette.background.default}function c7(e){return(0,m.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}var ue=n("MX"),ut=n("wJ");function un(e){return(0,M.Ay)("MuiInputAdornment",e)}let ur=(0,k.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),ui=(0,y.A)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${(0,A.A)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})((0,b.A)(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${ur.positionStart}&:not(.${ur.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),uo=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:o="div",disablePointerEvents:s=!1,disableTypography:a=!1,position:c,variant:h,...p}=n,m=(0,ut.A)()||{},g=h;h&&m.variant,m&&!g&&(g=m.variant);let v={...n,hiddenLabel:m.hiddenLabel,size:m.size,disablePointerEvents:s,position:c,variant:g},y=(e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:o,variant:s}=e,a={root:["root",n&&"disablePointerEvents",i&&`position${(0,A.A)(i)}`,s,r&&"hiddenLabel",o&&`size${(0,A.A)(o)}`]};return(0,f.A)(a,un,t)})(v);return(0,l.jsx)(ue.A.Provider,{value:null,children:(0,l.jsx)(ui,{as:o,ownerState:v,className:(0,d.A)(y.root,i),ref:t,...p,children:"string"!=typeof r||a?(0,l.jsxs)(u.Fragment,{children:["start"===c?Xz||(Xz=(0,l.jsx)("span",{className:"notranslate","aria-hidden":!0,children:""})):null,r]}):(0,l.jsx)(nc.A,{color:"textSecondary",children:r})})})});var us=n("g0"),ua=n("TA"),ul=n("MU"),uc=n("Ih"),uu=n("A8"),uh=n("x3");function ud(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function up(e){var t=ud(e).Element;return e instanceof t||e instanceof Element}function uf(e){var t=ud(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function um(e){if("u"<typeof ShadowRoot)return!1;var t=ud(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var ug=Math.max,uv=Math.min,uy=Math.round;function ub(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ux(){return!/^((?!chrome|android).)*safari/i.test(ub())}function uw(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&uf(e)&&(i=e.offsetWidth>0&&uy(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&uy(r.height)/e.offsetHeight||1);var s=(up(e)?ud(e):window).visualViewport,a=!ux()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.offsetTop:0))/o,u=r.width/i,h=r.height/o;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l,x:l,y:c}}function uS(e){var t=ud(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function uA(e){return e?(e.nodeName||"").toLowerCase():null}function uC(e){return((up(e)?e.ownerDocument:e.document)||window.document).documentElement}function uk(e){return uw(uC(e)).left+uS(e).scrollLeft}function uM(e){return ud(e).getComputedStyle(e)}function uO(e){var t=uM(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function uT(e){var t=uw(e),n=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function u_(e){return"html"===uA(e)?e:e.assignedSlot||e.parentNode||(um(e)?e.host:null)||uC(e)}function uI(e,t){void 0===t&&(t=[]);var n,r=function e(t){return["html","body","#document"].indexOf(uA(t))>=0?t.ownerDocument.body:uf(t)&&uO(t)?t:e(u_(t))}(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=ud(r),s=i?[o].concat(o.visualViewport||[],uO(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(uI(u_(s)))}function uD(e){return uf(e)&&"fixed"!==uM(e).position?e.offsetParent:null}function uR(e){for(var t=ud(e),n=uD(e);n&&["table","td","th"].indexOf(uA(n))>=0&&"static"===uM(n).position;)n=uD(n);return n&&("html"===uA(n)||"body"===uA(n)&&"static"===uM(n).position)?t:n||function(e){var t=/firefox/i.test(ub());if(/Trident/i.test(ub())&&uf(e)&&"fixed"===uM(e).position)return null;var n=u_(e);for(um(n)&&(n=n.host);uf(n)&&0>["html","body"].indexOf(uA(n));){var r=uM(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var uE="bottom",uP="right",uL="left",uN="auto",uB=["top",uE,uP,uL],uj="start",uz="viewport",u$="popper",uF=uB.reduce(function(e,t){return e.concat([t+"-"+uj,t+"-end"])},[]),uV=([].concat(uB,[uN])).reduce(function(e,t){return e.concat([t,t+"-"+uj,t+"-end"])},[]),uH=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"],uW={placement:"bottom",modifiers:[],strategy:"absolute"};function uU(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}var uG={passive:!0};function uq(e){return e.split("-")[0]}function uX(e){return e.split("-")[1]}function uY(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function uK(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?uq(i):null,s=i?uX(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case"top":t={x:a,y:n.y-r.height};break;case uE:t={x:a,y:n.y+n.height};break;case uP:t={x:n.x+n.width,y:l};break;case uL:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?uY(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case uj:t[c]=t[c]-(n[u]/2-r[u]/2);break;case"end":t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var uQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function uZ(e){var t,n,r,i,o,s,a,l=e.popper,c=e.popperRect,u=e.placement,h=e.variation,d=e.offsets,p=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,v=e.isFixed,y=d.x,b=void 0===y?0:y,x=d.y,w=void 0===x?0:x,S="function"==typeof g?g({x:b,y:w}):{x:b,y:w};b=S.x,w=S.y;var A=d.hasOwnProperty("x"),C=d.hasOwnProperty("y"),k=uL,M="top",O=window;if(m){var T=uR(l),_="clientHeight",I="clientWidth";T===ud(l)&&"static"!==uM(T=uC(l)).position&&"absolute"===p&&(_="scrollHeight",I="scrollWidth"),("top"===u||(u===uL||u===uP)&&"end"===h)&&(M=uE,w-=(v&&T===O&&O.visualViewport?O.visualViewport.height:T[_])-c.height,w*=f?1:-1),(u===uL||("top"===u||u===uE)&&"end"===h)&&(k=uP,b-=(v&&T===O&&O.visualViewport?O.visualViewport.width:T[I])-c.width,b*=f?1:-1)}var D=Object.assign({position:p},m&&uQ),R=!0===g?(t={x:b,y:w},n=ud(l),r=t.x,i=t.y,{x:uy(r*(o=n.devicePixelRatio||1))/o||0,y:uy(i*o)/o||0}):{x:b,y:w};return(b=R.x,w=R.y,f)?Object.assign({},D,((a={})[M]=C?"0":"",a[k]=A?"0":"",a.transform=1>=(O.devicePixelRatio||1)?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",a)):Object.assign({},D,((s={})[M]=C?w+"px":"",s[k]=A?b+"px":"",s.transform="",s))}var uJ={left:"right",right:"left",bottom:"top",top:"bottom"};function u0(e){return e.replace(/left|right|bottom|top/g,function(e){return uJ[e]})}var u1={start:"end",end:"start"};function u2(e){return e.replace(/start|end/g,function(e){return u1[e]})}function u5(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&um(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function u3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function u4(e,t,n){var r,i,o,s,a,l,c,u,h,d;return t===uz?u3(function(e,t){var n=ud(e),r=uC(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=ux();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+uk(e),y:l}}(e,n)):up(t)?((r=uw(t,!1,"fixed"===n)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):u3((i=uC(e),s=uC(i),a=uS(i),l=null==(o=i.ownerDocument)?void 0:o.body,c=ug(s.scrollWidth,s.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),u=ug(s.scrollHeight,s.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),h=-a.scrollLeft+uk(i),d=-a.scrollTop,"rtl"===uM(l||s).direction&&(h+=ug(s.clientWidth,l?l.clientWidth:0)-c),{width:c,height:u,x:h,y:d}))}function u6(){return{top:0,right:0,bottom:0,left:0}}function u9(e){return Object.assign({},u6(),e)}function u8(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function u7(e,t){void 0===t&&(t={});var n,r,i,o,s,a,l,c,u=t,h=u.placement,d=void 0===h?e.placement:h,p=u.strategy,f=void 0===p?e.strategy:p,m=u.boundary,g=u.rootBoundary,v=u.elementContext,y=void 0===v?u$:v,b=u.altBoundary,x=u.padding,w=void 0===x?0:x,S=u9("number"!=typeof w?w:u8(w,uB)),A=e.rects.popper,C=e.elements[void 0!==b&&b?y===u$?"reference":u$:y],k=(n=up(C)?C:C.contextElement||uC(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?uz:g,l=(a=[].concat("clippingParents"===r?(o=uI(u_(n)),!up(s=["absolute","fixed"].indexOf(uM(n).position)>=0&&uf(n)?uR(n):n)?[]:o.filter(function(e){return up(e)&&u5(e,s)&&"body"!==uA(e)})):[].concat(r),[i]))[0],(c=a.reduce(function(e,t){var r=u4(n,t,f);return e.top=ug(r.top,e.top),e.right=uv(r.right,e.right),e.bottom=uv(r.bottom,e.bottom),e.left=ug(r.left,e.left),e},u4(n,l,f))).width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c),M=uw(e.elements.reference),O=uK({reference:M,element:A,strategy:"absolute",placement:d}),T=u3(Object.assign({},A,O)),_=y===u$?T:M,I={top:k.top-_.top+S.top,bottom:_.bottom-k.bottom+S.bottom,left:k.left-_.left+S.left,right:_.right-k.right+S.right},D=e.modifiersData.offset;if(y===u$&&D){var R=D[d];Object.keys(I).forEach(function(e){var t=[uP,uE].indexOf(e)>=0?1:-1,n=["top",uE].indexOf(e)>=0?"y":"x";I[e]+=R[n]*t})}return I}function he(e,t,n){return ug(e,uv(t,n))}function ht(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function hn(e){return["top",uP,uE,uL].some(function(t){return e[t]>=0})}var hr=(Xw=void 0===(Xx=(Xb={defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,l=ud(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(e){e.addEventListener("scroll",n.update,uG)}),a&&l.addEventListener("resize",n.update,uG),function(){o&&c.forEach(function(e){e.removeEventListener("scroll",n.update,uG)}),a&&l.removeEventListener("resize",n.update,uG)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=uK({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=n.adaptive,o=n.roundOffsets,s=void 0===o||o,a={placement:uq(t.placement),variation:uX(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,uZ(Object.assign({},a,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,uZ(Object.assign({},a,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];uf(i)&&uA(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});uf(r)&&uA(r)&&(Object.assign(r.style,o),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,s=uV.reduce(function(e,n){var r,i,s,a,l,c;return e[n]=(r=t.rects,s=[uL,"top"].indexOf(i=uq(n))>=0?-1:1,l=(a="function"==typeof o?o(Object.assign({},r,{placement:n})):o)[0],c=a[1],l=l||0,c=(c||0)*s,[uL,uP].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}),e},{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=uq(g)===g,y=l||(v||!f?[u0(g)]:function(e){if(uq(e)===uN)return[];var t=u0(e);return[u2(e),t,u2(t)]}(g)),b=[g].concat(y).reduce(function(e,n){var r,i,o,s,a,l,d,p,g,v,y,b;return e.concat(uq(n)===uN?(i=(r={placement:n,boundary:u,rootBoundary:h,padding:c,flipVariations:f,allowedAutoPlacements:m}).placement,o=r.boundary,s=r.rootBoundary,a=r.padding,l=r.flipVariations,p=void 0===(d=r.allowedAutoPlacements)?uV:d,0===(y=(v=(g=uX(i))?l?uF:uF.filter(function(e){return uX(e)===g}):uB).filter(function(e){return p.indexOf(e)>=0})).length&&(y=v),Object.keys(b=y.reduce(function(e,n){return e[n]=u7(t,{placement:n,boundary:o,rootBoundary:s,padding:a})[uq(n)],e},{})).sort(function(e,t){return b[e]-b[t]})):n)},[]),x=t.rects.reference,w=t.rects.popper,S=new Map,A=!0,C=b[0],k=0;k<b.length;k++){var M=b[k],O=uq(M),T=uX(M)===uj,_=["top",uE].indexOf(O)>=0,I=_?"width":"height",D=u7(t,{placement:M,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),R=_?T?uP:uL:T?uE:"top";x[I]>w[I]&&(R=u0(R));var E=u0(R),P=[];if(o&&P.push(D[O]<=0),a&&P.push(D[R]<=0,D[E]<=0),P.every(function(e){return e})){C=M,A=!1;break}S.set(M,P)}if(A)for(var L=f?3:1,N=function(e){var t=b.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return C=t,"break"},B=L;B>0&&"break"!==N(B);B--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=n.altAxis,s=n.boundary,a=n.rootBoundary,l=n.altBoundary,c=n.padding,u=n.tether,h=void 0===u||u,d=n.tetherOffset,p=void 0===d?0:d,f=u7(t,{boundary:s,rootBoundary:a,padding:c,altBoundary:l}),m=uq(t.placement),g=uX(t.placement),v=!g,y=uY(m),b="x"===y?"y":"x",x=t.modifiersData.popperOffsets,w=t.rects.reference,S=t.rects.popper,A="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,C="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(x){if(void 0===i||i){var O,T="y"===y?"top":uL,_="y"===y?uE:uP,I="y"===y?"height":"width",D=x[y],R=D+f[T],E=D-f[_],P=h?-S[I]/2:0,L=g===uj?w[I]:S[I],N=g===uj?-S[I]:-w[I],B=t.elements.arrow,j=h&&B?uT(B):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:u6(),$=z[T],F=z[_],V=he(0,w[I],j[I]),H=v?w[I]/2-P-V-$-C.mainAxis:L-V-$-C.mainAxis,W=v?-w[I]/2+P+V+F+C.mainAxis:N+V+F+C.mainAxis,U=t.elements.arrow&&uR(t.elements.arrow),G=U?"y"===y?U.clientTop||0:U.clientLeft||0:0,q=null!=(O=null==k?void 0:k[y])?O:0,X=he(h?uv(R,D+H-q-G):R,D,h?ug(E,D+W-q):E);x[y]=X,M[y]=X-D}if(void 0!==o&&o){var Y,K,Q="x"===y?"top":uL,Z="x"===y?uE:uP,J=x[b],ee="y"===b?"height":"width",et=J+f[Q],en=J-f[Z],er=-1!==["top",uL].indexOf(m),ei=null!=(K=null==k?void 0:k[b])?K:0,eo=er?et:J-w[ee]-S[ee]-ei+C.altAxis,es=er?J+w[ee]+S[ee]-ei-C.altAxis:en,ea=h&&er?(Y=he(eo,J,es))>es?es:Y:he(h?eo:et,J,h?es:en);x[b]=ea,M[b]=ea-J}t.modifiersData[r]=M}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=uq(n.placement),l=uY(a),c=[uL,uP].indexOf(a)>=0?"height":"width";if(o&&s){var u,h=(u=i.padding,u9("number"!=typeof(u="function"==typeof u?u(Object.assign({},n.rects,{placement:n.placement})):u)?u:u8(u,uB))),d=uT(o),p="y"===l?"top":uL,f="y"===l?uE:uP,m=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],v=uR(o),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,b=h[p],x=y-d[c]-h[f],w=y/2-d[c]/2+(m/2-g/2),S=he(b,w,x);n.modifiersData[r]=((t={})[l]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&u5(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=u7(t,{elementContext:"reference"}),a=u7(t,{altBoundary:!0}),l=ht(s,r),c=ht(a,i,o),u=hn(l),h=hn(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]}).defaultModifiers)?[]:Xx,XA=void 0===(XS=Xb.defaultOptions)?uW:XS,function(e,t,n){void 0===n&&(n=XA);var r,i,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},uW,XA),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],a=!1,l={state:o,setOptions:function(n){var r,i,a,u,h,d,p="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},XA,o.options,p),o.scrollParents={reference:up(e)?uI(e):e.contextElement?uI(e.contextElement):[],popper:uI(t)};var f=(i=Object.keys(r=[].concat(Xw,o.options.modifiers).reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{})).map(function(e){return r[e]}),a=new Map,u=new Set,h=[],i.forEach(function(e){a.set(e.name,e)}),i.forEach(function(e){u.has(e.name)||function e(t){u.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!u.has(t)){var n=a.get(t);n&&e(n)}}),h.push(t)}(e)}),d=h,uH.reduce(function(e,t){return e.concat(d.filter(function(e){return e.phase===t}))},[]));return o.orderedModifiers=f.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=e.effect;if("function"==typeof r){var i=r({state:o,name:t,instance:l,options:void 0===n?{}:n});s.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!a){var e=o.elements,t=e.reference,n=e.popper;if(uU(t,n)){o.rects={reference:(r=uR(n),i="fixed"===o.options.strategy,s=uf(r),d=uf(r)&&(u=uy((c=r.getBoundingClientRect()).width)/r.offsetWidth||1,h=uy(c.height)/r.offsetHeight||1,1!==u||1!==h),p=uC(r),f=uw(t,d,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(s||!s&&!i)&&(("body"!==uA(r)||uO(p))&&(m=function(e){return e!==ud(e)&&uf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:uS(e)}(r)),uf(r)?(g=uw(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):p&&(g.x=uk(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:uT(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,s,c,u,h,d,p,f,m,g,v=0;v<o.orderedModifiers.length;v++){if(!0===o.reset){o.reset=!1,v=-1;continue}var y=o.orderedModifiers[v],b=y.fn,x=y.options,w=void 0===x?{}:x,S=y.name;"function"==typeof b&&(o=b({state:o,options:w,name:S,instance:l})||o)}}}},update:(r=function(){return new Promise(function(e){l.forceUpdate(),e(o)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){c(),a=!0}};if(!uU(e,t))return l;function c(){s.forEach(function(e){return e()}),s=[]}return l.setOptions(n).then(function(e){!a&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}),hi=n("tT"),ho=n("QZ");function hs(e){return(0,M.Ay)("MuiPopper",e)}function ha(e){return"function"==typeof e?e():e}(0,k.A)("MuiPopper",["root"]);let hl={},hc=u.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:o,modifiers:s,open:a,placement:c,popperOptions:h,popperRef:d,slotProps:p={},slots:m={},TransitionProps:g,ownerState:v,...y}=e,b=u.useRef(null),x=(0,uc.A)(b,t),w=u.useRef(null),S=(0,uc.A)(w,d),A=u.useRef(S);(0,uu.A)(()=>{A.current=S},[S]),u.useImperativeHandle(d,()=>w.current,[]);let C=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(c,i),[k,M]=u.useState(C),[O,T]=u.useState(ha(n));u.useEffect(()=>{w.current&&w.current.forceUpdate()}),u.useEffect(()=>{n&&T(ha(n))},[n]),(0,uu.A)(()=>{if(!O||!a)return;let e=[{name:"preventOverflow",options:{altBoundary:o}},{name:"flip",options:{altBoundary:o}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{M(e.placement)}}];null!=s&&(e=e.concat(s)),h&&null!=h.modifiers&&(e=e.concat(h.modifiers));let t=hr(O,b.current,{placement:C,...h,modifiers:e});return A.current(t),()=>{t.destroy(),A.current(null)}},[O,o,s,a,h,C]);let _={placement:k};null!==g&&(_.TransitionProps=g);let I=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},hs,t)})(e),D=m.root??"div",R=(0,hi.A)({elementType:D,externalSlotProps:p.root,externalForwardedProps:y,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:I.root});return(0,l.jsx)(D,{...R,children:"function"==typeof r?r(_):r})}),hu=u.forwardRef(function(e,t){let n,{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:a=!1,keepMounted:c=!1,modifiers:h,open:d,placement:p="bottom",popperOptions:f=hl,popperRef:m,style:g,transition:v=!1,slotProps:y={},slots:b={},...x}=e,[w,S]=u.useState(!0);if(!c&&!d&&(!v||w))return null;if(o)n=o;else if(r){let e=ha(r);n=e&&void 0!==e.nodeType?(0,uh.A)(e).body:(0,uh.A)(null).body}let A=!d&&c&&(!v||w)?"none":void 0,C=v?{in:d,onEnter:()=>{S(!1)},onExited:()=>{S(!0)}}:void 0;return(0,l.jsx)(ho.A,{disablePortal:a,container:n,children:(0,l.jsx)(hc,{anchorEl:r,direction:s,disablePortal:a,modifiers:h,ref:t,open:v?!w:d,placement:p,popperOptions:f,popperRef:m,slotProps:y,slots:b,...x,style:{position:"fixed",top:0,left:0,display:A,...g},TransitionProps:C,children:i})})}),hh=(0,y.A)(hu,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),hd=u.forwardRef(function(e,t){let n=(0,lE.I)(),{anchorEl:r,component:i,components:o,componentsProps:s,container:a,disablePortal:c,keepMounted:u,modifiers:h,open:d,placement:p,popperOptions:f,popperRef:m,transition:g,slots:v,slotProps:y,...b}=(0,x.b)({props:e,name:"MuiPopper"}),w=v?.root??o?.Root,S={anchorEl:r,container:a,disablePortal:c,keepMounted:u,modifiers:h,open:d,placement:p,popperOptions:f,popperRef:m,transition:g,...b};return(0,l.jsx)(hh,{as:i,direction:n?"rtl":"ltr",slots:{root:w},slotProps:y??s,...S,ref:t})});var hp=n("LF"),hf=n("o0");function hm(e){return(0,M.Ay)("MuiTooltip",e)}let hg=(0,k.A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),hv=(0,y.A)(hd,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((0,b.A)(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e})=>!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:e})=>!e,style:{pointerEvents:"none"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${hg.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${hg.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${hg.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${hg.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="right"] .${hg.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="right"] .${hg.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!e.isRtl,style:{[`&[data-popper-placement*="left"] .${hg.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:e})=>e.arrow&&!!e.isRtl,style:{[`&[data-popper-placement*="left"] .${hg.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),hy=(0,y.A)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${(0,A.A)(n.placement.split("-")[0])}`]]}})((0,b.A)(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:(0,m.X4)(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${hg.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${hg.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${hg.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${hg.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",margin:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Math.round(16/14*1e5)/1e5}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>!e.isRtl,style:{[`.${hg.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${hg.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:e})=>!e.isRtl&&e.touch,style:{[`.${hg.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${hg.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:e})=>!!e.isRtl,style:{[`.${hg.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${hg.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:e})=>!!e.isRtl&&e.touch,style:{[`.${hg.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${hg.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${hg.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:e})=>e.touch,style:{[`.${hg.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),hb=(0,y.A)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((0,b.A)(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:(0,m.X4)(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))),hx=!1,hw=new us.E,hS={x:0,y:0};function hA(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}let hC=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTooltip"}),{arrow:r=!1,children:i,classes:o,components:s={},componentsProps:a={},describeChild:c=!1,disableFocusListener:h=!1,disableHoverListener:p=!1,disableInteractive:m=!1,disableTouchListener:v=!1,enterDelay:y=100,enterNextDelay:b=0,enterTouchDelay:w=700,followCursor:S=!1,id:C,leaveDelay:k=0,leaveTouchDelay:M=1500,onClose:O,onOpen:T,open:_,placement:I="bottom",PopperComponent:D,PopperProps:R={},slotProps:E={},slots:P={},title:L,TransitionComponent:N,TransitionProps:B,...j}=n,z=u.isValidElement(i)?i:(0,l.jsx)("span",{children:i}),$=(0,e8.A)(),F=(0,lE.I)(),[V,H]=u.useState(),[W,U]=u.useState(null),G=u.useRef(!1),q=m||S,X=(0,us.A)(),Y=(0,us.A)(),K=(0,us.A)(),Q=(0,us.A)(),[Z,J]=(0,hf.A)({controlled:_,default:!1,name:"Tooltip",state:"open"}),ee=Z,et=(0,g.A)(C),en=u.useRef(),er=(0,hp.A)(()=>{void 0!==en.current&&(document.body.style.WebkitUserSelect=en.current,en.current=void 0),Q.clear()});u.useEffect(()=>er,[er]);let ei=e=>{hw.clear(),hx=!0,J(!0),T&&!ee&&T(e)},eo=(0,hp.A)(e=>{hw.start(800+k,()=>{hx=!1}),J(!1),O&&ee&&O(e),X.start($.transitions.duration.shortest,()=>{G.current=!1})}),es=e=>{G.current&&"touchstart"!==e.type||(V&&V.removeAttribute("title"),Y.clear(),K.clear(),y||hx&&b?Y.start(hx?b:y,()=>{ei(e)}):ei(e))},ea=e=>{Y.clear(),K.start(k,()=>{eo(e)})},[,el]=u.useState(!1),ec=e=>{(0,cn.A)(e.target)||(el(!1),ea(e))},eu=e=>{V||H(e.currentTarget),(0,cn.A)(e.target)&&(el(!0),es(e))},eh=e=>{G.current=!0;let t=z.props;t.onTouchStart&&t.onTouchStart(e)};u.useEffect(()=>{if(ee)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"===e.key&&eo(e)}},[eo,ee]);let ed=(0,ng.A)((0,ua.A)(z),H,t);L||0===L||(ee=!1);let ep=u.useRef(),ef={},em="string"==typeof L;c?(ef.title=ee||!em||p?null:L,ef["aria-describedby"]=ee?et:null):(ef["aria-label"]=em?L:null,ef["aria-labelledby"]=ee&&!em?et:null);let eg={...ef,...j,...z.props,className:(0,d.A)(j.className,z.props.className),onTouchStart:eh,ref:ed,...S?{onMouseMove:e=>{let t=z.props;t.onMouseMove&&t.onMouseMove(e),hS={x:e.clientX,y:e.clientY},ep.current&&ep.current.update()}}:{}},ev={};v||(eg.onTouchStart=e=>{eh(e),K.clear(),X.clear(),er(),en.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Q.start(w,()=>{document.body.style.WebkitUserSelect=en.current,es(e)})},eg.onTouchEnd=e=>{z.props.onTouchEnd&&z.props.onTouchEnd(e),er(),K.start(M,()=>{eo(e)})}),!p&&(eg.onMouseOver=hA(es,eg.onMouseOver),eg.onMouseLeave=hA(ea,eg.onMouseLeave),q||(ev.onMouseOver=es,ev.onMouseLeave=ea)),!h&&(eg.onFocus=hA(eu,eg.onFocus),eg.onBlur=hA(ec,eg.onBlur),q||(ev.onFocus=eu,ev.onBlur=ec));let ey={...n,isRtl:F,arrow:r,disableInteractive:q,placement:I,PopperComponentProp:D,touch:G.current},eb="function"==typeof E.popper?E.popper(ey):E.popper,ex=u.useMemo(()=>{let e=[{name:"arrow",enabled:!!W,options:{element:W,padding:4}}];return R.popperOptions?.modifiers&&(e=e.concat(R.popperOptions.modifiers)),eb?.popperOptions?.modifiers&&(e=e.concat(eb.popperOptions.modifiers)),{...R.popperOptions,...eb?.popperOptions,modifiers:e}},[W,R.popperOptions,eb?.popperOptions]),ew=(e=>{let{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${(0,A.A)(o.split("-")[0])}`],arrow:["arrow"]};return(0,f.A)(s,hm,t)})(ey),eS="function"==typeof E.transition?E.transition(ey):E.transition,eA={slots:{popper:s.Popper,transition:s.Transition??N,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:E.arrow??a.arrow,popper:{...R,...eb??a.popper},tooltip:E.tooltip??a.tooltip,transition:{...B,...eS??a.transition}}},[eC,ek]=(0,nd.A)("popper",{elementType:hv,externalForwardedProps:eA,ownerState:ey,className:(0,d.A)(ew.popper,R?.className)}),[eM,eO]=(0,nd.A)("transition",{elementType:ul.A,externalForwardedProps:eA,ownerState:ey}),[eT,e_]=(0,nd.A)("tooltip",{elementType:hy,className:ew.tooltip,externalForwardedProps:eA,ownerState:ey}),[eI,eD]=(0,nd.A)("arrow",{elementType:hb,className:ew.arrow,externalForwardedProps:eA,ownerState:ey,ref:U});return(0,l.jsxs)(u.Fragment,{children:[u.cloneElement(z,eg),(0,l.jsx)(eC,{as:D??hd,placement:I,anchorEl:S?{getBoundingClientRect:()=>({top:hS.y,left:hS.x,right:hS.x,bottom:hS.y,width:0,height:0})}:V,popperRef:ep,open:!!V&&ee,id:et,transition:!0,...ev,...ek,popperOptions:ex,children:({TransitionProps:e})=>(0,l.jsx)(eM,{timeout:$.transitions.duration.shorter,...e,...eO,children:(0,l.jsxs)(eT,{...e_,children:[L,r?(0,l.jsx)(eI,{...eD}):null]})})})]})});var hk=n("XE"),hM=n("eI"),hO=n("lG"),hT=n("dG"),h_=n("O7"),hI=n("Zr"),hD=n("K23");let hR=(0,u.forwardRef)(function(e,t){let n,r,i,o,s,a,h,d,p,f,m=(0,c.c)(16);m[0]!==e?({debounceMs:i,value:o,onChange:n,...r}=e,m[0]=e,m[1]=n,m[2]=r,m[3]=i,m[4]=o):(n=m[1],r=m[2],i=m[3],o=m[4]);let g=void 0===i?250:i,[v,y]=(0,u.useState)(o),b=(0,u.useRef)(n);m[5]!==n?(s=()=>{b.current=n},a=[n],m[5]=n,m[6]=s,m[7]=a):(s=m[6],a=m[7]),(0,u.useLayoutEffect)(s,a);let x=(0,u.useRef)(null);m[8]!==g?(h=()=>{let e=hD(e=>b.current?.(e),g);return x.current=e,()=>e.cancel()},d=[g],m[8]=g,m[9]=h,m[10]=d):(h=m[9],d=m[10]),(0,u.useLayoutEffect)(h,d),m[11]===Symbol.for("react.memo_cache_sentinel")?(p=e=>{y(e.target.value),x.current?.(e.target.value)},m[11]=p):p=m[11];let w=p;return m[12]!==v||m[13]!==r||m[14]!==t?(f=(0,l.jsx)(ex.A,{ref:t,value:v,onChange:w,...r}),m[12]=v,m[13]=r,m[14]=t,m[15]=f):f=m[15],f});function hE(e){let t,n,r,i,o,s,a=(0,c.c)(24),{isSearchEnabled:h,globalFilter:d,onGlobalFilterChange:p,isColumnFilterEnabled:f,columns:m,width:g,columnFilterMenuMaxHeight:v,isExpandAllEnabled:y,isAllExpanded:b,onExpandAllChange:x}=e,w=void 0===v?400:v,[S,A]=(0,u.useState)(null),C=!!S,[k,M]=(0,u.useState)(0);a[0]!==p?(t=()=>{p(""),M(hN)},a[0]=p,a[1]=t):t=a[1];let O=t;return h||f||y?(a[2]===Symbol.for("react.memo_cache_sentinel")?(n={backgroundColor:hL},a[2]=n):n=a[2],a[3]!==d||a[4]!==O||a[5]!==h||a[6]!==p||a[7]!==k?(r=h&&(0,l.jsx)(hR,{placeholder:"Search...",value:d,onChange:p,variant:"standard",slotProps:{htmlInput:{"aria-label":"search table"},input:{startAdornment:(0,l.jsx)(uo,{position:"start",children:(0,l.jsx)(hO,{fontSize:"small"})}),endAdornment:""!==d&&(0,l.jsx)(uo,{position:"end",children:(0,l.jsx)(er,{onClick:O,children:(0,l.jsx)(hM,{fontSize:"small"})})})}},sx:{flexGrow:1}},k),a[3]=d,a[4]=O,a[5]=h,a[6]=p,a[7]=k,a[8]=r):r=a[8],a[9]!==b||a[10]!==y||a[11]!==x?(i=y&&(0,l.jsx)(hC,{title:b?"Collapse all":"Expand all",children:(0,l.jsx)(er,{onClick:x,color:"info","aria-label":b?"collapse all rows":"expand all rows",children:b?(0,l.jsx)(hT,{}):(0,l.jsx)(h_,{})})}),a[9]=b,a[10]=y,a[11]=x,a[12]=i):i=a[12],a[13]!==S||a[14]!==C||a[15]!==w||a[16]!==m||a[17]!==f?(o=f&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(er,{onClick:e=>A(e.currentTarget),"aria-haspopup":"listbox","aria-expanded":C,color:"info",children:(0,l.jsx)(hI,{})}),(0,l.jsx)(hk.A,{anchorEl:S,open:C,onClose:()=>A(null),slotProps:{list:{dense:!0}},sx:{maxHeight:w},children:m.map(hP)})]}),a[13]=S,a[14]=C,a[15]=w,a[16]=m,a[17]=f,a[18]=o):o=a[18],a[19]!==r||a[20]!==i||a[21]!==o||a[22]!==g?(s=(0,l.jsxs)(eb,{direction:"row",gap:1,alignItems:"center",justifyContent:"flex-end",width:g,padding:"0.5rem",sx:n,children:[r,i,o]}),a[19]=r,a[20]=i,a[21]=o,a[22]=g,a[23]=s):s=a[23],s):null}function hP(e){let t=e.columnDef.header,n="string"==typeof t?t:e.id;return(0,l.jsxs)(lA.A,{disabled:!e.getCanHide(),onClick:e.getCanHide()?e.getToggleVisibilityHandler():void 0,dense:!0,children:[(0,l.jsx)(oX,{source:e.table.atoms.columnVisibility,children:()=>(0,l.jsx)(lm,{checked:e.getIsVisible(),disabled:!e.getCanHide(),size:"small",disableRipple:!0,sx:{p:0,mr:1}})}),(0,l.jsx)(nf,{primary:n})]},e.id)}function hL(e){return e.palette.background.default}function hN(e){return e+1}function hB(e){return(0,M.Ay)("MuiTableContainer",e)}hR.displayName="TextField",(0,k.A)("MuiTableContainer",["root"]);let hj=(0,y.A)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),hz=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTableContainer"}),{className:r,component:i="div",...o}=n,s={...n,component:i},a=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},hB,t)})(s);return(0,l.jsx)(hj,{ref:t,as:i,className:(0,d.A)(a.root,r),ownerState:s,...o})}),h$=(0,u.forwardRef)(function(e,t){let n,r,i=(0,c.c)(6);return i[0]!==e.sx?(n=nw({flexGrow:1},e.sx),i[0]=e.sx,i[1]=n):n=i[1],i[2]!==e||i[3]!==t||i[4]!==n?(r=(0,l.jsx)(hz,{...e,tabIndex:-1,ref:t,sx:n}),i[2]=e,i[3]=t,i[4]=n,i[5]=r):r=i[5],r}),hF={Scroller:(0,u.forwardRef)((e,t)=>{let n,r,i=(0,c.c)(5);if(i[0]!==e){let{context:t,...r}=e;n=r,i[0]=e,i[1]=n}else n=i[1];return i[2]!==n||i[3]!==t?(r=(0,l.jsx)(h$,{...n,ref:t}),i[2]=n,i[3]=t,i[4]=r):r=i[4],r}),Table:({context:e,...t})=>(0,l.jsx)(l4,{...t,width:e.width,density:e.density,onKeyDown:e.onTableKeyDown,onBlur:e.onTableBlur}),TableHead:(0,u.forwardRef)((e,t)=>{let n,r,i=(0,c.c)(5);if(i[0]!==e){let{context:t,...r}=e;n=r,i[0]=e,i[1]=n}else n=i[1];return i[2]!==n||i[3]!==t?(r=(0,l.jsx)(cY,{...n,ref:t}),i[2]=n,i[3]=t,i[4]=r):r=i[4],r}),TableFoot:(0,u.forwardRef)((e,t)=>{let n,r,i=(0,c.c)(5);if(i[0]!==e){let{context:t,...r}=e;n=r,i[0]=e,i[1]=n}else n=i[1];return i[2]!==n||i[3]!==t?(r=(0,l.jsx)(cH,{...n,ref:t}),i[2]=n,i[3]=t,i[4]=r):r=i[4],r}),TableRow:({item:e,context:t,...n})=>{if(!e)return null;let r={id:e.id,index:e.index};return(0,l.jsx)(c9,{...n,onClick:n=>t.onRowClick(n,e),density:t.density,onMouseOver:e=>{t.onRowMouseOver?.(e,r)},onMouseOut:e=>{t.onRowMouseOut?.(e,r)}})},TableBody:(0,u.forwardRef)((e,t)=>{let n,r,i=(0,c.c)(5);if(i[0]!==e){let{context:t,...r}=e;n=r,i[0]=e,i[1]=n}else n=i[1];return i[2]!==n||i[3]!==t?(r=(0,l.jsx)(ct,{...n,ref:t}),i[2]=n,i[3]=t,i[4]=r):r=i[4],r})};function hV(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w=(0,c.c)(65),{width:S,height:A,density:C,defaultColumnWidth:k,defaultColumnHeight:M,onRowClick:O,onRowMouseOver:T,onRowMouseOut:_,table:I,cellConfigs:D,pagination:R,onPaginationChange:E,toolbarConfig:P}=e;w[0]!==I?(t=I.getRowModel(),w[0]=I,w[1]=t):t=w[1];let L=t.rows;w[2]!==I?(n=I.getVisibleFlatColumns(),w[2]=I,w[3]=n):n=w[3];let N=n.length,B=(0,u.useRef)(null);w[4]===Symbol.for("react.memo_cache_sentinel")?(r={startIndex:0,endIndex:0},w[4]=r):r=w[4];let j=(0,u.useRef)(r);w[5]===Symbol.for("react.memo_cache_sentinel")?(i=e=>{j.current=e},w[5]=i):i=w[5];let z=i,$=L.length+1;w[6]!==N||w[7]!==$?(o={visibleRange:j,virtualTable:B,maxRows:$,maxColumns:N},w[6]=N,w[7]=$,w[8]=o):o=w[8];let F=function(e){let t,n,r=(0,c.c)(8),{visibleRange:i,virtualTable:o,maxRows:s,maxColumns:a}=e;r[0]!==s||r[1]!==o||r[2]!==i?(t=(e,t,n)=>{let r=e.key,a=n&&(t.column!==n.column||t.row!==n.row),l=n?.row??t.row;if("ArrowDown"===r&&a)(l-1<i.current.startIndex||l-1>i.current.endIndex)&&o.current?.scrollToIndex({index:l-1,align:"end"});else if("ArrowUp"===r&&a)(l-1<i.current.startIndex||l-1>i.current.endIndex)&&o.current?.scrollToIndex({index:l-1,align:"start"});else if(a&&("Home"===r||"End"===r))o.current?.scrollToIndex({index:Math.max(l-1,0),align:"start"});else if("PageDown"===r){let n;return e.preventDefault(),n=Math.min(s-1,i.current.endIndex+1),o.current?.scrollToIndex({index:n-1,align:"start"}),{row:n,column:t.column}}else if("PageUp"===r){let e;return e=Math.max(0,i.current.startIndex-1),o.current?.scrollToIndex({index:e-1,align:"end"}),{row:e,column:t.column}}return n},r[0]=s,r[1]=o,r[2]=i,r[3]=t):t=r[3];let l=t;return r[4]!==a||r[5]!==s||r[6]!==l?(n={maxRows:s,maxColumns:a,onActiveCellChange:l},r[4]=a,r[5]=s,r[6]=l,r[7]=n):n=r[7],function(e){let t,n,r,i,o=(0,c.c)(13),{maxRows:s,maxColumns:a,onActiveCellChange:l}=e,[h,d]=(0,u.useState)(lQ),[p,f]=(0,u.useState)(!1);o[0]!==h||o[1]!==p?(t=e=>{e.column===h.column&&e.row===h.row&&p||(f(!0),d(e))},o[0]=h,o[1]=p,o[2]=t):t=o[2];let m=t;o[3]!==a||o[4]!==s||o[5]!==l?(n=e=>{let t=e.key;(lZ.has(t)||"Home"===t||"End"===t||"PageDown"===t||"PageUp"===t)&&d(n=>{let r=n.row,i=n.column;"ArrowRight"===t&&i<a-1?(e.preventDefault(),i+=1):"ArrowLeft"===t&&i>0?(e.preventDefault(),i-=1):"ArrowDown"===t&&r<s-1?(e.preventDefault(),r+=1):"ArrowUp"===t&&r>0?(e.preventDefault(),r-=1):"Home"===t?(e.preventDefault(),r=0,i=0):"End"===t&&(e.preventDefault(),r=s-1,i=a-1);let o={column:i,row:r},c=l?.(e,n,o)||o;return c.row===n.row&&c.column===n.column?n:c})},o[3]=a,o[4]=s,o[5]=l,o[6]=n):n=o[6];let g=n;o[7]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{e.currentTarget.contains(e.relatedTarget)||(f(!1),d(lQ))},o[7]=r):r=o[7];let v=r;return o[8]!==h||o[9]!==m||o[10]!==g||o[11]!==p?(i={activeCell:h,isActive:p,onTableKeyDown:g,onCellFocus:m,onTableBlur:v},o[8]=h,o[9]=m,o[10]=g,o[11]=p,o[12]=i):i=o[12],i}(n)}(o);w[9]!==F.activeCell||w[10]!==F.isActive?(s=e=>e.row===F.activeCell.row&&e.column===F.activeCell.column?F.isActive?"trigger-focus":"focus-next":"none",w[9]=F.activeCell,w[10]=F.isActive,w[11]=s):s=w[11];let V=s;w[12]!==C||w[13]!==F.onTableBlur||w[14]!==F.onTableKeyDown||w[15]!==O||w[16]!==_||w[17]!==T||w[18]!==S?(a={width:S,density:C,onTableKeyDown:F.onTableKeyDown,onTableBlur:F.onTableBlur,onRowClick:O,onRowMouseOver:T,onRowMouseOut:_},w[12]=C,w[13]=F.onTableBlur,w[14]=F.onTableKeyDown,w[15]=O,w[16]=_,w[17]=T,w[18]=S,w[19]=a):a=w[19];let H=a;w[20]!==E||w[21]!==R?(h=(e,t)=>{R&&E&&E({...R,pageIndex:t})},w[20]=E,w[21]=R,w[22]=h):h=w[22];let W=h;w[23]!==E||w[24]!==R?(d=e=>{R&&E&&E({pageIndex:0,pageSize:parseInt(e.target.value,10)})},w[23]=E,w[24]=R,w[25]=d):d=w[25];let U=d;return w[26]!==I?(p={},I.getHeaderGroups().forEach(e=>{e.headers.filter(hG).forEach(e=>{p[`--header-${e.id}-size`]=e.getSize(),p[`--col-${e.column.id}-size`]=e.column.getSize()})}),w[26]=I,w[27]=p):p=w[27],w[28]!==p||w[29]!==A||w[30]!==S?(f={width:S,height:A,...p},w[28]=p,w[29]=A,w[30]=S,w[31]=f):f=w[31],w[32]!==P||w[33]!==S?(m=(0,l.jsx)(hE,{...P,width:S}),w[32]=P,w[33]=S,w[34]=m):m=w[34],w[35]!==M||w[36]!==k||w[37]!==C||w[38]!==V||w[39]!==F||w[40]!==I?(g=()=>(0,l.jsx)(l.Fragment,{children:I.getHeaderGroups().map(e=>(0,l.jsx)(c9,{density:C,children:e.headers.map((e,t,n)=>{let r=e.column,i={row:0,column:t},o=r.getIsSorted(),s=r.getNextSortingOrder();return(0,l.jsx)(c6,{onSort:r.getCanSort()?r.getToggleSortingHandler():void 0,sortDirection:"string"==typeof o?o:void 0,nextSortDirection:"string"==typeof s?s:void 0,width:e.column.getCanResize()?`calc(var(--header-${e?.id}-size) * 1px)`:r.getSize()||k,defaultColumnHeight:M,align:r.columnDef.meta?.align,variant:"head",density:C,description:r.columnDef.meta?.headerDescription,focusState:V(i),onFocusTrigger:()=>F.onCellFocus(i),isFirstColumn:0===t,isLastColumn:t===n.length-1,resizeConfig:e.column.getCanResize()?{resizeHandler:e.getResizeHandler(),resetSizeHandler:()=>e.column.resetSize(),isResizing:e.column.getIsResizing()}:void 0,children:oF(r.columnDef.header,e.getContext())},e.id)})},e.id))}),w[35]=M,w[36]=k,w[37]=C,w[38]=V,w[39]=F,w[40]=I,w[41]=g):g=w[41],w[42]!==W||w[43]!==U||w[44]!==R||w[45]!==I?(v=R?()=>(0,l.jsx)(lw,{sx:{backgroundColor:hU},children:(0,l.jsx)(lK,{colSpan:I.getVisibleFlatColumns().length,count:I.getRowCount(),page:R.pageIndex,rowsPerPage:R.pageSize,onPageChange:W,onRowsPerPageChange:U})}):void 0,w[42]=W,w[43]=U,w[44]=R,w[45]=I,w[46]=v):v=w[46],w[47]!==D||w[48]!==M||w[49]!==k||w[50]!==C||w[51]!==V||w[52]!==F||w[53]!==I?(y=e=>{let t=I.getRowModel().rows[e];return t?(0,l.jsx)(l.Fragment,{children:t.getVisibleCells().map((n,r,i)=>{let o,s={row:e+1,column:r},a=n.getContext(),c=D?.[a.cell.id],u=n.column.columnDef.cell,h="function"==typeof u?u(a):null,d=n.column.columnDef.meta?.cellDescription;"function"==typeof d?o=d(a):d&&"string"==typeof h&&(o=h);let p=Object.entries(t.original)?.filter(hW).reduce(hH,{});return(0,l.jsx)(cN,{"data-testid":n.id,title:o||c?.text||h,width:n.column.getCanResize()?`calc(var(--col-${n.column.id}-size) * 1px)`:n.column.getSize()||k,defaultColumnHeight:M,align:n.column.columnDef.meta?.align,density:C,focusState:V(s),onFocusTrigger:()=>F.onCellFocus(s),isFirstColumn:0===r,isLastColumn:r===i.length-1,description:o,color:c?.textColor??void 0,backgroundColor:c?.backgroundColor??void 0,dataLink:n.column.columnDef.meta?.dataLink,adjacentCellsValuesMap:p,children:c?.text||h},n.id)})}):null},w[47]=D,w[48]=M,w[49]=k,w[50]=C,w[51]=V,w[52]=F,w[53]=I,w[54]=y):y=w[54],w[55]!==L||w[56]!==g||w[57]!==v||w[58]!==y||w[59]!==H?(b=(0,l.jsx)(os,{ref:B,data:L,components:hF,context:H,rangeChanged:z,fixedHeaderContent:g,fixedFooterContent:v,itemContent:y}),w[55]=L,w[56]=g,w[57]=v,w[58]=y,w[59]=H,w[60]=b):b=w[60],w[61]!==f||w[62]!==m||w[63]!==b?(x=(0,l.jsxs)(e7.A,{style:f,children:[m,b]}),w[61]=f,w[62]=m,w[63]=b,w[64]=x):x=w[64],x}function hH(e,t){let[n,r]=t;return{...e,[n]:String(r)}}function hW(e){let[,t]=e;return["string","number"].includes(typeof t)}function hU(e){return e.palette.background.default}function hG(e){return e.column.getCanResize()}let hq=(e,t)=>`${t}`,hX={},hY=[];function hK(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O,T,_,I,D,R,E,P,L,N,B,j,z,$,F,V,H,W,U,G,q,X=(0,c.c)(108);X[0]!==e?({data:i,columns:r,cellConfigs:t,density:b,defaultColumnWidth:x,defaultColumnHeight:w,checkboxSelection:n,onRowSelectionChange:m,onSortingChange:g,getCheckboxColor:s,getRowId:S,rowSelection:A,sorting:C,getItemActions:a,hasItemActions:d,pagination:y,onPaginationChange:f,rowSelectionVariant:k,getSubRows:h,hiddenColumns:p,tableToolbarConfig:O,columnResizeMode:M,defaultColumnConfig:o,...v}=e,X[0]=e,X[1]=t,X[2]=n,X[3]=r,X[4]=i,X[5]=o,X[6]=s,X[7]=a,X[8]=h,X[9]=d,X[10]=p,X[11]=f,X[12]=m,X[13]=g,X[14]=v,X[15]=y,X[16]=b,X[17]=x,X[18]=w,X[19]=S,X[20]=A,X[21]=C,X[22]=k,X[23]=M,X[24]=O):(t=X[1],n=X[2],r=X[3],i=X[4],o=X[5],s=X[6],a=X[7],h=X[8],d=X[9],p=X[10],f=X[11],m=X[12],g=X[13],v=X[14],y=X[15],b=X[16],x=X[17],w=X[18],S=X[19],A=X[20],C=X[21],k=X[22],M=X[23],O=X[24]);let Y=void 0===b?"standard":b,K=void 0===x?150:x,Q=void 0===w?"auto":w,Z=void 0===S?hq:S,J=void 0===A?hX:A,ee=void 0===C?hY:C,et=void 0===k?"standard":k,en=void 0===M?"onChange":M,er=(0,e8.A)(),ei=!!h;X[25]===Symbol.for("react.memo_cache_sentinel")?(T={},X[25]=T):T=X[25];let[eo,es]=(0,u.useState)(T),{globalFilter:ea,setGlobalFilter:el,fuzzySearchOptions:ec}=function(e,t,n,r){let i,o,s,a=(0,c.c)(12),[l,h]=(0,u.useState)(""),[d,p]=(0,u.useState)(n);a[0]!==n||a[1]!==d||a[2]!==r?(i=e=>{h(t=>(t?t&&!e&&r(d):(p(n),r(!0)),e))},a[0]=n,a[1]=d,a[2]=r,a[3]=i):i=a[3];let f=i;if(a[4]!==f||a[5]!==e||a[6]!==t)o={globalFilterFn:e?(e,n,r,i)=>{let o=function(e,t,n){var r;if((n=n||{}).threshold=null!=(r=n.threshold)?r:sP.MATCHES,!n.accessors){let r=sL(e,t,n);return{rankedValue:e,rank:r,accessorIndex:-1,accessorThreshold:n.threshold,passed:r>=n.threshold}}let i=function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r],o="function"==typeof i?sB:{...sB,...i},s=function(e,t){let n=t;"object"==typeof t&&(n=t.accessor);let r=n(e);return null==r?[]:Array.isArray(r)?r:[String(r)]}(e,i);for(let e=0,t=s.length;e<t;e++)n.push({itemValue:s[e],attributes:o})}return n}(e,n.accessors),o={rankedValue:e,rank:sP.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let e=0;e<i.length;e++){let r=i[e],s=sL(r.itemValue,t,n),{minRanking:a,maxRanking:l,threshold:c=n.threshold}=r.attributes;s<a&&s>=sP.MATCHES?s=a:s>l&&(s=l),(s=Math.min(s,l))>=c&&s>o.rank&&(o.rank=s,o.passed=!0,o.accessorIndex=e,o.accessorThreshold=c,o.rankedValue=r.itemValue)}return o}(e.getValue(n),r,{threshold:sP[t]});return i?.({itemRank:o}),o.passed}:void 0,filterFromLeafRows:e,onGlobalFilterChange:f},a[4]=f,a[5]=e,a[6]=t,a[7]=o;else o=a[7];return a[8]!==l||a[9]!==f||a[10]!==o?(s={globalFilter:l,setGlobalFilter:f,fuzzySearchOptions:o},a[8]=l,a[9]=f,a[10]=o,a[11]=s):s=a[11],s}(O?.isSearchEnabled,O?.fuzzyMatchThreshold??"CONTAINS",eo,es);X[26]!==p?(_=p?.reduce(hQ,{})??{},X[26]=p,X[27]=_):_=X[27];let[eu,eh]=(0,u.useState)(_);X[28]!==m||X[29]!==J?(I=e=>{let t="function"==typeof e?e(J):e;m?.(t)},X[28]=m,X[29]=J,X[30]=I):I=X[30];let ed=I;X[31]!==m||X[32]!==et?(D=(e,t,n)=>{"standard"===et||n?t.toggleSelected():t.getIsSelected()&&!e.getIsAllRowsSelected()?e.toggleAllRowsSelected():m?.({[t.id]:!0})},X[31]=m,X[32]=et,X[33]=D):D=X[33];let ep=D;X[34]!==ep?(R=(e,t,n)=>{let r=e.nativeEvent&&(e.nativeEvent instanceof MouseEvent||e.nativeEvent instanceof KeyboardEvent)?e.nativeEvent:void 0;ep(t,n,!!r?.metaKey||!!r?.shiftKey)},X[34]=ep,X[35]=R):R=X[35];let ef=R;X[36]!==g||X[37]!==ee?(E=e=>{let t="function"==typeof e?e(ee):e;g?.(t)},X[36]=g,X[37]=ee,X[38]=E):E=X[38];let em=E;X[39]!==a?(P={id:"itemActions",header:"Actions",cell:e=>{let{row:t}=e;return(0,l.jsx)(eb,{direction:"row",alignItems:"center",children:a?.({id:t.id,data:t.original})})},enableSorting:!1,enableResizing:!1},X[39]=a,X[40]=P):P=X[40];let eg=P;X[41]!==Y||X[42]!==er.palette.text.primary?(L=e=>{let{table:t}=e;return(0,l.jsx)(lg,{checked:t.getIsAllRowsSelected(),indeterminate:t.getIsSomeRowsSelected()&&!t.getIsAllRowsSelected(),onChange:t.getToggleAllRowsSelectedHandler(),color:er.palette.text.primary,density:Y})},X[41]=Y,X[42]=er.palette.text.primary,X[43]=L):L=X[43],X[44]!==Y||X[45]!==s||X[46]!==ef?(N=e=>{let{row:t,table:n}=e;return(0,l.jsx)(lg,{checked:t.getIsSelected(),indeterminate:t.getIsSomeSelected(),onChange:e=>{ef(e,n,t)},color:s?.(t.original),density:Y})},X[44]=Y,X[45]=s,X[46]=ef,X[47]=N):N=X[47],X[48]!==L||X[49]!==N?(B={id:"checkboxRowSelect",size:28,header:L,cell:N,enableSorting:!1,enableResizing:!1},X[48]=L,X[49]=N,X[50]=B):B=X[50];let ev=B;X[51]!==eg||X[52]!==ev||X[53]!==n||X[54]!==r||X[55]!==o||X[56]!==d?(j=ln(r,o),d&&j.unshift(eg),n&&j.unshift(ev),X[51]=eg,X[52]=ev,X[53]=n,X[54]=r,X[55]=o,X[56]=d,X[57]=j):j=X[57];let ey=j,ex=!y,ew=!!n,eS=O?.isSearchEnabled?ea:void 0;X[58]!==y?(z=y?{pagination:y}:{},X[58]=y,X[59]=z):z=X[59],X[60]!==eu||X[61]!==eo||X[62]!==J||X[63]!==ee||X[64]!==eS||X[65]!==z?($={rowSelection:J,sorting:ee,globalFilter:eS,columnVisibility:eu,...z,expanded:eo},X[60]=eu,X[61]=eo,X[62]=J,X[63]=ee,X[64]=eS,X[65]=z,X[66]=$):$=X[66],X[67]!==en||X[68]!==i||X[69]!==ec||X[70]!==Z||X[71]!==h||X[72]!==ed||X[73]!==em||X[74]!==ex||X[75]!==ew||X[76]!==$||X[77]!==ey?(F={features:le,...ec,data:i,columns:ey,getRowId:Z,manualPagination:ex,enableRowSelection:ew,onRowSelectionChange:ed,onSortingChange:em,onColumnVisibilityChange:eh,getSubRows:h,sortDescFirst:!0,columnResizeMode:en,onExpandedChange:es,state:$},X[67]=en,X[68]=i,X[69]=ec,X[70]=Z,X[71]=h,X[72]=ed,X[73]=em,X[74]=ex,X[75]=ew,X[76]=$,X[77]=ey,X[78]=F):F=X[78];let eA=function(e){let[{table:t,rootSource:n}]=(0,u.useState)(()=>{let t=function(e){var t;let n=e.features.coreReactivityFeature,{aggregationFns:r,columnMeta:i,coreRowModel:o,expandedRowModel:s,facetedMinMaxValues:a,facetedRowModel:l,facetedUniqueValues:c,filterFns:u,filterMeta:h,filteredRowModel:d,groupedRowModel:p,paginatedRowModel:f,sortFns:m,sortedRowModel:g,tableMeta:v,...y}=e.features,b={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...sI,...y},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:n,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:r,filterFns:u,sortFns:m},_rowModels:{},atoms:{},baseAtoms:{}},x=Object.values(b._features),w={...x.reduce((e,t)=>Object.assign(e,t.getDefaultTableOptions?.(b)),{}),...e};if(n.wrapExternalAtoms&&w.atoms)for(let[e,t]of Object.entries(w.atoms)){let r=t,i=n.createWritableAtom(r.get(),{debugName:`externalAtom/${e}`});w.atoms[e]=i;let o=!1,s=r.subscribe(e=>{o||i.set(e)}),a=i.subscribe(e=>{o=!0,r.set(e),o=!1});n.addSubscription(s),n.addSubscription(a)}n.createOptionsStore?(b.optionsStore=n.createWritableAtom(w,{debugName:"table/optionsStore"}),Object.defineProperty(b,"options",{configurable:!0,enumerable:!0,get:()=>b.optionsStore.get(),set(e){b.optionsStore.set(()=>e)}})):b.options=w,b.initialState=function(e,t={}){return Object.values(e).forEach(e=>{t=e.getInitialState?.(t)??t}),se(t)}(b._features,b.options.initialState);let S=Object.keys(b.initialState);for(let e=0;e<S.length;e++){let t=S[e];b.baseAtoms[t]=n.createWritableAtom(b.initialState[t],{debugName:`table/baseAtoms/${t}`}),b.atoms[t]=n.createReadonlyAtom(()=>{let e=b.options,n=e.atoms?.[t],r=n?n.get():b.baseAtoms[t].get();if(n)return r;let i=e.state;if(i&&sr(i,t)){let e=i[t];return void 0===e?b.initialState[t]:e}return r},{debugName:`table/atoms/${t}`})}sg(b),Object.defineProperty(t=n.createReadonlyAtom(()=>{let e={};for(let t=0;t<S.length;t++){let n=S[t];e[n]=b.atoms[n].get()}return e},{compare:oG,debugName:"table/store"}),"state",{get:()=>t.get()}),"set"in t&&(t.setState=t.set.bind(t)),b.store=t;for(let e=0;e<x.length;e++){let t=x[e];t.initTableInstanceData?.(b),t.initCellInstanceData&&b._cellInstanceInitFns.push(t.initCellInstanceData.bind(t)),t.initColumnInstanceData&&b._columnInstanceInitFns.push(t.initColumnInstanceData.bind(t)),t.initHeaderGroupInstanceData&&b._headerGroupInstanceInitFns.push(t.initHeaderGroupInstanceData.bind(t)),t.initHeaderInstanceData&&b._headerInstanceInitFns.push(t.initHeaderInstanceData.bind(t)),t.initRowInstanceData&&b._rowInstanceInitFns.push(t.initRowInstanceData.bind(t)),t.constructTableAPIs?.(b)}return b}({...e,features:{coreReactivityFeature:function(e){let{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw Error("Feature not supported in current reactivity implementation")},unmount:()=>{throw Error("Feature not supported in current reactivity implementation")},schedule:e.schedule??(e=>queueMicrotask(e)),batch:n,untrack:e=>e(),createReadonlyAtom:(e,n)=>{let i,o=n?.compare??Object.is,s=!1,a=()=>{let t=e();return s&&o(i,t)||(i=t,s=!0),i},l=t(()=>(r.get(),a()),{compare:o});return{get:a,subscribe:l.subscribe.bind(l)}},createWritableAtom:(e,n)=>t(e,{compare:n?.compare}),commit:()=>{r.set(e=>e+1)}}}({createAtom:o8,batch:o4}),...e.features}});return t.Subscribe=e=>oX({...e,source:e.source??t.store}),t.FlexRender=oV,{table:t,rootSource:function(e,t=Object.is){let n,r=!1;return{get:e.get,markCommitted:e=>{n=e,r=!0},subscribe:i=>e.subscribe(e=>{r&&t(n,e)||i(e)})}}(t.store,oG)}});sy(t,t=>({...t,...e}),{syncExternalState:!1});let r=t.options.state,i=n.get(),o=oU(n,void 0,{compare:oG});return sD(()=>{n.markCommitted(i),sv(t,r??null,oG)}),(0,u.useMemo)(()=>({...t,options:e,state:o}),[t,e,o])}(F);X[79]!==ep?(V=(e,t)=>{let n=e.metaKey||e.shiftKey;ep(t.table,t,n)},X[79]=ep,X[80]=V):V=X[80];let eC=V,ek=O?.isSearchEnabled,eM=O?.isColumnFilterEnabled;X[81]!==eA?(H=eA.getAllColumns(),X[81]=eA,X[82]=H):H=X[82];let eO=O?.columnFilterMenuMaxHeight;return X[83]!==eA?(W=eA.getIsAllRowsExpanded(),X[83]=eA,X[84]=W):W=X[84],X[85]!==eA?(U=eA.getToggleAllRowsExpandedHandler(),X[85]=eA,X[86]=U):U=X[86],X[87]!==ea||X[88]!==ei||X[89]!==el||X[90]!==ek||X[91]!==eM||X[92]!==H||X[93]!==eO||X[94]!==W||X[95]!==U?(G={isSearchEnabled:ek,globalFilter:ea,onGlobalFilterChange:el,isColumnFilterEnabled:eM,columns:H,columnFilterMenuMaxHeight:eO,isExpandAllEnabled:ei,isAllExpanded:W,onExpandAllChange:U},X[87]=ea,X[88]=ei,X[89]=el,X[90]=ek,X[91]=eM,X[92]=H,X[93]=eO,X[94]=W,X[95]=U,X[96]=G):G=X[96],X[97]!==t||X[98]!==Q||X[99]!==K||X[100]!==Y||X[101]!==eC||X[102]!==f||X[103]!==v||X[104]!==y||X[105]!==G||X[106]!==eA?(q=(0,l.jsx)(hV,{...v,density:Y,defaultColumnWidth:K,defaultColumnHeight:Q,onRowClick:eC,table:eA,cellConfigs:t,pagination:y,onPaginationChange:f,toolbarConfig:G}),X[97]=t,X[98]=Q,X[99]=K,X[100]=Y,X[101]=eC,X[102]=f,X[103]=v,X[104]=y,X[105]=G,X[106]=eA,X[107]=q):q=X[107],q}function hQ(e,t){return{...e,[t]:!1}}let hZ=[{accessorKey:"label",header:"Name",enableSorting:!0,enableResizing:!0,cell:({getValue:e})=>(0,l.jsx)("span",{title:e(),children:e()})}],hJ=e=>e.id,h0=e=>e.color,h1=[];function h2(e){let t,n,r,i,o=(0,c.c)(21),{items:s,selectedItems:a,onSelectedItemsChange:u,onItemMouseOver:h,onItemMouseOut:d,height:p,width:f,columns:m,sorting:g,onSortingChange:v}=e,y=void 0===m?h1:m;o[0]!==a||o[1]!==s?(t="string"!=typeof a?a:s.reduce(h3,{}),o[0]=a,o[1]=s,o[2]=t):t=o[2];let b=t;o[3]!==y?(n=y?.reduce(h5,0)??0,o[3]=y,o[4]=n):n=o[4];let x=Math.max(f-n-45,60*hZ.length)/hZ.length;if(o[5]!==y||o[6]!==x){let e;o[8]!==x?(e=e=>({...e,width:x}),o[8]=x,o[9]=e):e=o[9],r=[...hZ.map(e),...y],o[5]=y,o[6]=x,o[7]=r}else r=o[7];let w=r;return o[10]!==w||o[11]!==p||o[12]!==s||o[13]!==d||o[14]!==h||o[15]!==u||o[16]!==v||o[17]!==b||o[18]!==g||o[19]!==f?(i=(0,l.jsx)(hK,{height:p,width:f,rowSelection:b,onRowSelectionChange:u,onRowMouseOver:h,onRowMouseOut:d,sorting:g,onSortingChange:v,data:s,columns:w,density:"compact",defaultColumnWidth:"auto",getRowId:hJ,getCheckboxColor:h0,checkboxSelection:!0,rowSelectionVariant:"legend"}),o[10]=w,o[11]=p,o[12]=s,o[13]=d,o[14]=h,o[15]=u,o[16]=v,o[17]=b,o[18]=g,o[19]=f,o[20]=i):i=o[20],i}function h5(e,t){return e+("number"==typeof t.width?t.width:150)}function h3(e,t,n){return e[hJ(t)]=!0,e}function h4(e){let t,n,r,i,o,s,a=(0,c.c)(36),{width:u,height:h,options:d,data:p,selectedItems:f,onSelectedItemsChange:m,onItemMouseOver:g,onItemMouseOut:v,tableProps:y}=e;a[0]!==m||a[1]!==f?(t=(e,t)=>{let n=e.metaKey||e.shiftKey;m(t6(f,e=>{if("ALL"===e)return{[t]:!0};let r=!!e[t];return n?(r?delete e[t]:e[t]=!0,e):r?"ALL":{[t]:!0}}))},a[0]=m,a[1]=f,a[2]=t):t=a[2];let b=t,x=no(d.mode),w=p.length>=500;a[3]!==p||a[4]!==h||a[5]!==v||a[6]!==g||a[7]!==b||a[8]!==f?(n={height:h,items:p,selectedItems:f,onLegendItemClick:b,onItemMouseOver:g,onItemMouseOut:v},a[3]=p,a[4]=h,a[5]=v,a[6]=g,a[7]=b,a[8]=f,a[9]=n):n=a[9];let S=n;if("table"===x){let e;a[10]!==S||a[11]!==m||a[12]!==y||a[13]!==u?(e=(0,l.jsx)(h2,{...S,onSelectedItemsChange:m,width:u,...y}),a[10]=S,a[11]=m,a[12]=y,a[13]=u,a[14]=e):e=a[14],r=e}else if("right"===d.position||w){let e;a[15]!==S||a[16]!==b||a[17]!==u?(e=(0,l.jsx)(o$,{...S,width:u,onLegendItemClick:b}),a[15]=S,a[16]=b,a[17]=u,a[18]=e):e=a[18],r=e}else{let e;a[19]!==S||a[20]!==b?(e=(0,l.jsx)(nM,{...S,onLegendItemClick:b}),a[19]=S,a[20]=b,a[21]=e):e=a[21],r=e}if("right"===d.position){let e,t,n;return a[22]!==h||a[23]!==u?(e={width:u,height:h},a[22]=h,a[23]=u,a[24]=e):e=a[24],a[25]===Symbol.for("react.memo_cache_sentinel")?(t={position:"absolute",top:0,right:0,backgroundColor:h9},a[25]=t):t=a[25],a[26]!==r||a[27]!==e?(n=(0,l.jsx)(e7.A,{style:e,sx:t,children:r}),a[26]=r,a[27]=e,a[28]=n):n=a[28],n}return a[29]!==h||a[30]!==u?(i={width:u,height:h},a[29]=h,a[30]=u,a[31]=i):i=a[31],a[32]===Symbol.for("react.memo_cache_sentinel")?(o={position:"absolute",bottom:0,backgroundColor:h6},a[32]=o):o=a[32],a[33]!==r||a[34]!==i?(s=(0,l.jsx)(e7.A,{style:i,sx:o,children:r}),a[33]=r,a[34]=i,a[35]=s):s=a[35],s}function h6(e){return`${e.palette.background.default}`}function h9(e){return`${e.palette.background.default}`}let h8={medium:{bottom:6,right:250},small:{bottom:4,right:150}};function h7(e){let t,n,r,i,o,s,a,u,h,d,p,f=(0,c.c)(38),{children:m,legendProps:g,width:v,height:y,spacing:b,legendSize:x,minChildrenWidth:w,minChildrenHeight:S}=e,A=void 0===b?0:b,C=void 0===w?100:w,k=void 0===S?100:S,M=(0,e8.A)();if(f[0]!==m||f[1]!==y||f[2]!==g||f[3]!==x||f[4]!==k||f[5]!==C||f[6]!==A||f[7]!==M||f[8]!==v){let{content:e,legend:l,margin:c}=function({width:e,height:t,legendProps:n,legendSize:r,minChildrenHeight:i,minChildrenWidth:o,spacing:s,theme:a}){let l,c,u=n?.options,h={legend:{show:!1,width:0,height:0},content:{width:e,height:t},margin:{right:0,bottom:0}};if(!u)return h;let{position:d}=u;if("list"===no(u.mode))l="right"===d?200:e,c=40,"right"===d?c=t:t>=300&&(c=100);else{let i=lt(a,"compact"),o=(n?.tableProps?.columns||[]).reduce((e,t)=>("number"==typeof t.width&&(e+=t.width),e),0);l="right"===d?h8[r].right+o:e;let s=Math.min(h8[r].bottom,n.data.length+1);c="bottom"===d?s*i.height:t}let p="right"===d?e-l-s:e,f="bottom"===d?t-c-s:t;return"right"===d&&p<o||"bottom"===d&&f<i?h:{legend:{width:l,height:c,show:!0},content:{width:p,height:f},margin:{right:"right"===d?s:0,bottom:"bottom"===d?s:0}}}({width:v,height:y,legendProps:g,minChildrenHeight:k,minChildrenWidth:C,spacing:A,theme:M,legendSize:ns(x)});r=l,n=e7.A,f[17]!==y||f[18]!==v?(a={width:v,height:y},f[17]=y,f[18]=v,f[19]=a):a=f[19],f[20]===Symbol.for("react.memo_cache_sentinel")?(u={position:"relative",overflow:"hidden"},f[20]=u):u=f[20],t=e7.A,i={width:e.width,height:e.height};let h=`${c.right}px`,d=`${c.bottom}px`;f[21]!==h||f[22]!==d?(o={marginRight:h,marginBottom:d},f[21]=h,f[22]=d,f[23]=o):o=f[23],s="function"==typeof m?m({width:e.width,height:e.height}):m,f[0]=m,f[1]=y,f[2]=g,f[3]=x,f[4]=k,f[5]=C,f[6]=A,f[7]=M,f[8]=v,f[9]=t,f[10]=n,f[11]=r,f[12]=i,f[13]=o,f[14]=s,f[15]=a,f[16]=u}else t=f[9],n=f[10],r=f[11],i=f[12],o=f[13],s=f[14],a=f[15],u=f[16];return f[24]!==t||f[25]!==i||f[26]!==o||f[27]!==s?(h=(0,l.jsx)(t,{style:i,sx:o,children:s}),f[24]=t,f[25]=i,f[26]=o,f[27]=s,f[28]=h):h=f[28],f[29]!==r||f[30]!==g?(d=g&&r.show&&(0,l.jsx)(h4,{...g,height:r.height,width:r.width}),f[29]=r,f[30]=g,f[31]=d):d=f[31],f[32]!==n||f[33]!==d||f[34]!==a||f[35]!==u||f[36]!==h?(p=(0,l.jsxs)(n,{style:a,sx:u,children:[h,d]}),f[32]=n,f[33]=d,f[34]=a,f[35]=u,f[36]=h,f[37]=p):p=f[37],p}function de(e){return(0,M.Ay)("MuiDialogTitle",e)}let dt=(0,k.A)("MuiDialogTitle",["root"]),dn=u.createContext({}),dr=(0,y.A)(nc.A,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),di=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiDialogTitle"}),{className:r,id:i,...o}=n,s=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},de,t)})(n),{titleId:a=i}=u.useContext(dn);return(0,l.jsx)(dr,{component:"h2",className:(0,d.A)(s.root,r),ownerState:n,ref:t,variant:"h6",id:i??a,...o})});function ds(e){return(0,M.Ay)("MuiDialogContent",e)}(0,k.A)("MuiDialogContent",["root","dividers"]);let da=(0,y.A)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,b.A)(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${dt.root} + &`]:{paddingTop:0}}}]}))),dl=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiDialogContent"}),{className:r,dividers:i=!1,...o}=n,s={...n,dividers:i},a=(e=>{let{classes:t,dividers:n}=e;return(0,f.A)({root:["root",n&&"dividers"]},ds,t)})(s);return(0,l.jsx)(da,{className:(0,d.A)(a.root,r),ownerState:s,ref:t,...o})});var dc=n("uF"),du=n("YCF"),dh=n("ox"),dd=n("ai");function dp(e){return(0,M.Ay)("MuiDialog",e)}let df=(0,k.A)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var dm=n("yf");let dg=(0,y.A)(dm.A,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),dv=(0,y.A)(du.A,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),dy=(0,y.A)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${(0,A.A)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),db=(0,y.A)(dd.A,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,A.A)(n.scroll)}`],t[`paperWidth${(0,A.A)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,b.A)(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${df.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${df.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${df.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),dx=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiDialog"}),r=(0,e8.A)(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":s,"aria-modal":a=!0,BackdropComponent:c,BackdropProps:h,children:p,className:m,disableEscapeKeyDown:g=!1,fullScreen:v=!1,fullWidth:y=!1,maxWidth:b="sm",onBackdropClick:w,onClick:S,onClose:C,open:k,PaperComponent:M=dd.A,PaperProps:O={},scroll:T="paper",slots:_={},slotProps:I={},TransitionComponent:D=dh.A,transitionDuration:R=i,TransitionProps:E,...P}=n,L={...n,disableEscapeKeyDown:g,fullScreen:v,fullWidth:y,maxWidth:b,scroll:T},N=(e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${(0,A.A)(n)}`],paper:["paper",`paperScroll${(0,A.A)(n)}`,`paperWidth${(0,A.A)(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return(0,f.A)(s,dp,t)})(L),B=u.useRef(),j=(0,dc.A)(s),z=u.useMemo(()=>({titleId:j}),[j]),$={slots:{transition:D,..._},slotProps:{transition:E,paper:O,backdrop:h,...I}},[F,V]=(0,nd.A)("root",{elementType:dv,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:L,className:(0,d.A)(N.root,m),ref:t}),[H,W]=(0,nd.A)("backdrop",{elementType:dg,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:L}),[U,G]=(0,nd.A)("paper",{elementType:db,shouldForwardComponentProp:!0,externalForwardedProps:$,ownerState:L,className:(0,d.A)(N.paper,O.className)}),[q,X]=(0,nd.A)("container",{elementType:dy,externalForwardedProps:$,ownerState:L,className:(0,d.A)(N.container)}),[Y,K]=(0,nd.A)("transition",{elementType:dh.A,externalForwardedProps:$,ownerState:L,additionalProps:{appear:!0,in:k,timeout:R,role:"presentation"}});return(0,l.jsx)(F,{closeAfterTransition:!0,slots:{backdrop:H},slotProps:{backdrop:{transitionDuration:R,as:c,...W}},disableEscapeKeyDown:g,onClose:C,open:k,onClick:e=>{S&&S(e),B.current&&(B.current=null,w&&w(e),C&&C(e,"backdropClick"))},...V,...P,children:(0,l.jsx)(Y,{...K,children:(0,l.jsx)(q,{onMouseDown:e=>{B.current=e.target===e.currentTarget},...X,children:(0,l.jsx)(U,{as:M,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":j,"aria-modal":a,...G,children:(0,l.jsx)(dn.Provider,{value:z,children:p})})})})})});function dw(e){return(0,M.Ay)("MuiDialogActions",e)}(0,k.A)("MuiDialogActions",["root","spacing"]);let dS=(0,y.A)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),dA=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiDialogActions"}),{className:r,disableSpacing:i=!1,...o}=n,s={...n,disableSpacing:i},a=(e=>{let{classes:t,disableSpacing:n}=e;return(0,f.A)({root:["root",!n&&"spacing"]},dw,t)})(s);return(0,l.jsx)(dS,{className:(0,d.A)(a.root,r),ownerState:s,ref:t,...o})}),dC=(0,y.A)("form")({overflowY:"auto",display:"flex",flexDirection:"column"}),dk=e=>({position:"absolute",top:e.spacing(.5),right:e.spacing(.5)}),dM=e=>{let t,n,r,i=(0,c.c)(6);return i[0]!==e?({children:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t||i[4]!==n?(r=(0,l.jsx)(dx,{...n,children:t}),i[3]=t,i[4]=n,i[5]=r):r=i[5],r};dM.Header=e=>{let t,n,r,i,o,s,a,u=(0,c.c)(13);return u[0]!==e?({children:t,onClose:n,...r}=e,u[0]=e,u[1]=t,u[2]=n,u[3]=r):(t=u[1],n=u[2],r=u[3]),u[4]===Symbol.for("react.memo_cache_sentinel")?(i={textOverflow:"ellipsis",overflow:"hidden"},u[4]=i):i=u[4],u[5]!==t||u[6]!==r?(o=(0,l.jsx)(di,{style:i,...r,children:t}),u[5]=t,u[6]=r,u[7]=o):o=u[7],u[8]!==n?(s=n&&(0,l.jsx)(er,{"aria-label":"Close",onClick:n,sx:dk,children:(0,l.jsx)(hM,{})}),u[8]=n,u[9]=s):s=u[9],u[10]!==o||u[11]!==s?(a=(0,l.jsxs)(l.Fragment,{children:[o,s]}),u[10]=o,u[11]=s,u[12]=a):a=u[12],a},dM.Form=dC,dM.Content=e=>{let t,n,r,i,o,s=(0,c.c)(10);return s[0]!==e?({children:t,sx:r,...n}=e,s[0]=e,s[1]=t,s[2]=n,s[3]=r):(t=s[1],n=s[2],r=s[3]),s[4]!==r?(i=nw({minWidth:"500px",textWrap:"balance"},r),s[4]=r,s[5]=i):i=s[5],s[6]!==t||s[7]!==n||s[8]!==i?(o=(0,l.jsx)(dl,{dividers:!0,...n,sx:i,children:t}),s[6]=t,s[7]=n,s[8]=i,s[9]=o):o=s[9],o},dM.PrimaryButton=e=>{let t,n,r,i=(0,c.c)(6);return i[0]!==e?({children:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t||i[4]!==n?(r=(0,l.jsx)(G,{variant:"contained",type:"submit",...n,children:t}),i[3]=t,i[4]=n,i[5]=r):r=i[5],r},dM.SecondaryButton=e=>{let t,n,r,i=(0,c.c)(6);return i[0]!==e?({children:t,...n}=e,i[0]=e,i[1]=t,i[2]=n):(t=i[1],n=i[2]),i[3]!==t||i[4]!==n?(r=(0,l.jsx)(G,{variant:"outlined",color:"secondary",...n,children:t}),i[3]=t,i[4]=n,i[5]=r):r=i[5],r},dM.Actions=dA;let dO=e=>{let t,n,r,i,o,s,a=(0,c.c)(14),{description:u,isOpen:h,onCancel:d,onDiscardChanges:p}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsx)(dM.Header,{children:"Discard Changes"}),a[0]=t):t=a[0],a[1]!==u?(n=(0,l.jsx)(dM.Content,{children:u}),a[1]=u,a[2]=n):n=a[2],a[3]!==p?(r=(0,l.jsx)(G,{variant:"contained",onClick:p,children:"Discard Changes"}),a[3]=p,a[4]=r):r=a[4],a[5]!==d?(i=(0,l.jsx)(G,{variant:"outlined",color:"secondary",onClick:d,children:"Cancel"}),a[5]=d,a[6]=i):i=a[6],a[7]!==r||a[8]!==i?(o=(0,l.jsxs)(dM.Actions,{children:[r,i]}),a[7]=r,a[8]=i,a[9]=o):o=a[9],a[10]!==h||a[11]!==n||a[12]!==o?(s=(0,l.jsxs)(dM,{open:h,"aria-labelledby":"discard-dialog",children:[t,n,o]}),a[10]=h,a[11]=n,a[12]=o,a[13]=s):s=a[13],s};var dT=n("Tq"),d_=n("V5");function dI(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:"contentBoxSize"===t?e.contentRect["inlineSize"===n?"width":"height"]:void 0}function dD(e={}){var t,n;let r,i,o,s,a=e.onResize,l=(0,u.useRef)(void 0);l.current=a;let c=e.round||Math.round,h=(0,u.useRef)(void 0),[d,p]=(0,u.useState)({width:void 0,height:void 0}),f=(0,u.useRef)(!1);(0,u.useEffect)(()=>(f.current=!1,()=>{f.current=!0}),[]);let m=(0,u.useRef)({width:void 0,height:void 0}),g=(t=(0,u.useCallback)(t=>{if(!h.current||h.current.box!==e.box||h.current.round!==c){let n=t.ownerDocument.defaultView?.ResizeObserver??ResizeObserver;h.current={box:e.box,round:c,instance:new n(t=>{if(f.current)return;let n=t[0],r="border-box"===e.box?"borderBoxSize":"device-pixel-content-box"===e.box?"devicePixelContentBoxSize":"contentBoxSize",i=dI(n,r,"inlineSize"),o=dI(n,r,"blockSize"),s=void 0===i?void 0:c(i),a=void 0===o?void 0:c(o);if(m.current.width!==s||m.current.height!==a){let e={width:s,height:a};m.current.width=s,m.current.height=a,l.current?l.current({...e,entry:n}):p(e)}})}}return h.current.instance.observe(t,{box:e.box}),()=>{h.current&&h.current.instance.unobserve(t)}},[e.box,c]),n=e.ref,r=(0,u.useRef)(null),(i=(0,u.useRef)(null)).current=n,o=(0,u.useRef)(null),(0,u.useEffect)(()=>{s()}),s=(0,u.useCallback)(()=>{let e=o.current,n=i.current,s=e||(n?"nodeType"in n?n:n.current:null);r.current&&r.current.element===s&&r.current.subscriber===t||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:t,cleanup:s?t(s):void 0})},[t]),(0,u.useEffect)(()=>()=>{r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)},[]),(0,u.useCallback)(e=>{o.current=e,s()},[s]));return(0,u.useMemo)(()=>({ref:g,width:d.width,height:d.height}),[g,d.width,d.height])}Symbol.for("constructDateFrom");let dR={},dE={};function dP(e,t){try{let n=(dR[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];if(n in dE)return dE[n];return dN(n,n.split(":"))}catch{if(e in dE)return dE[e];let t=e?.match(dL);if(t)return dN(e,t.slice(1));return 0/0}}let dL=/([+-]\d\d):?(\d\d)?/;function dN(e,t){let n=+(t[0]||0),r=+(t[1]||0),i=(t[2]||0)/60;return dE[e]=60*n+r>0?60*n+r+i:60*n-r-i}class dB extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(dP(this.timeZone,this))?this.setTime(0/0):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),d$(this,e)):this.setTime(Date.now())}static tz(e,...t){return t.length?new dB(...t,e):new dB(Date.now(),e)}withTimeZone(e){return new dB(+this,e)}getTimezoneOffset(){let e=-dP(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),dz(this),+this}[Symbol.for("constructDateFrom")](e){return new dB(+new Date(e),this.timeZone)}}let dj=/^(get|set)(?!UTC)/;function dz(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-(60*dP(e.timeZone,e))))}function d$(e,t){var n;let r=Array.isArray(t)?Date.UTC((n=t)[0],n.length>1?n[1]:0,n.length>2?n[2]:1,...n.slice(3)):+e.internal,i=dP(e.timeZone,e),o=i>0?Math.floor(i):Math.ceil(i),s=new Date(+e);s.setUTCHours(s.getUTCHours()-1);let a=-new Date(+e).getTimezoneOffset(),l=-new Date(+s).getTimezoneOffset(),c=a;if(a-l&&a!==o&&Date.prototype.getHours.apply(e)!==(Array.isArray(t)?t[3]||0:e.internal.getUTCHours())){let t=new Date(+e),n=a-o;n&&t.setUTCMinutes(t.getUTCMinutes()+n);let r=dP(e.timeZone,t);(r>0?Math.floor(r):Math.ceil(r))===o&&(c=l)}let u=c-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);let h=new Date(+e);h.setUTCSeconds(0);let d=a>0?h.getSeconds():(h.getSeconds()-60)%60,p=Math.round(-(60*dP(e.timeZone,e)))%60;(p||d)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+d);let f=dP(e.timeZone,e),m=f>0?Math.floor(f):Math.ceil(f),g=-new Date(+e).getTimezoneOffset()-m-u,v=m-o,y=v>0&&dF(e)-r==60*v*1e3&&dF(e,r-60*m*1e3)!==r;if(m!==o&&g&&!y){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);let t=dP(e.timeZone,e),n=m-(t>0?Math.floor(t):Math.ceil(t));n&&g<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n)}dz(e);let b=(t?r:r+1e3*p)-e.internal;b&&18e5>Math.abs(b)&&(Date.prototype.setTime.call(e,+e+b),dz(e))}function dF(e,t){let n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-(60*dP(e.timeZone,n)))),+n}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!dj.test(e))return;let t=e.replace(dj,"$1UTC");dB.prototype[t]&&(e.startsWith("get")?dB.prototype[e]=function(){return this.internal[t]()}:(dB.prototype[e]=function(){var e;return Date.prototype[t].apply(this.internal,arguments),e=this,Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),d$(e),+this},dB.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),dz(this),+this}))});class dV extends dB{static tz(e,...t){return t.length?new dV(...t,e):new dV(Date.now(),e)}toISOString(){let[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){let[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){let e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){let e=this.getTimezoneOffset(),t=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),n=String(Math.abs(e)%60).padStart(2,"0");return[e>0?"-":"+",t,n]}withTimeZone(e){return new dV(+this,e)}[Symbol.for("constructDateFrom")](e){return new dV(+new Date(e),this.timeZone)}}var dH=n("kj");function dW(e,t){if(t){let n=t.toLowerCase();if("local"!==n&&"browser"!==n)return{...e,timeZone:"utc"===n?"UTC":t}}return e}function dU(e,t,n){let r,i=n?.toLowerCase();if(!n||"local"===i||"browser"===i)return(0,dH.format)(e,t);return(0,dH.format)(e,t,{in:(r="utc"===i?"UTC":n,e=>dV.tz(r,+new Date(e)))})}function dG(e){let t=e?.toLowerCase(),n=e;e&&"local"!==t&&"browser"!==t?"utc"===t&&(n="UTC"):n=Intl.DateTimeFormat().resolvedOptions().timeZone;try{let e=new Intl.DateTimeFormat("en-US",{timeZone:n,timeZoneName:"shortOffset"}).formatToParts(new Date).find(e=>"timeZoneName"===e.type),t=e?.value??"";if("GMT"===t)return"GMT+0";return t}catch{return"GMT+0"}}function dq(e){return e>15768e7?"{yyyy}":e>63072e6?"{MMM} {yyyy}":e>432e6&&e<1577664e4?"{MM}/{dd}":e>1728e5&&e<=432e6?"{MM}/{dd} {HH}:{mm}":{year:"{yearStyle|{yyyy}}\n{monthStyle|{MMM}}",month:"{MMM}",day:"{MM}/{dd}"}}let dX=(e,t)=>{if(!e)return{formattedDate:"",formattedTime:""};let n=new Date(e);return{formattedDate:t?t(n,"MMM dd, yyyy"):(0,dH.format)(n,"MMM dd, yyyy"),formattedTime:t?t(n,"HH:mm:ss"):(0,dH.format)(n,"HH:mm:ss")}},dY=(0,u.createContext)(void 0);function dK(e){let t,n=(0,c.c)(3),{children:r,timeZone:i}=e;return n[0]!==r||n[1]!==i?(t=(0,l.jsx)(dY.Provider,{value:i,children:r}),n[0]=r,n[1]=i,n[2]=t):t=n[2],t}function dQ(){let e,t=(0,c.c)(3),n=(0,u.useContext)(dY),r=n??"local";return t[0]!==r||t[1]!==n?(e={timeZone:r,formatWithUserTimeZone:(e,t)=>dU(e,t,n),dateFormatOptionsWithUserTimeZone:e=>dW(e,n)},t[0]=r,t[1]=n,t[2]=e):e=t[2],e}var dZ="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==n.g?n.g:"u">typeof self?self:{};function dJ(){if(XH)return XV;XH=1;let e=[{key:"ZiB",factor:11805916207174113e5},{key:"ZB",factor:1e21},{key:"YiB",factor:12089258196146292e8},{key:"YB",factor:1e24},{key:"TiB",factor:0x10000000000},{key:"TB",factor:1e12},{key:"PiB",factor:0x4000000000000},{key:"PB",factor:1e15},{key:"MiB",factor:1048576},{key:"MB",factor:1e6},{key:"KiB",factor:1024},{key:"KB",factor:1e3},{key:"GiB",factor:0x40000000},{key:"GB",factor:1e9},{key:"EiB",factor:0x1000000000000000},{key:"EB",factor:1e18},{key:"B",factor:1}];function t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}return XV={unformat:function(n,r){let i,o=d2(),s=o.currentDelimiters(),a=o.currentCurrency().symbol,l=o.currentOrdinal(),c=o.getZeroFormat(),u=o.currentAbbreviations();if("string"==typeof n)if(function(e,t){if(!(e.indexOf(":")&&":"!==t.thousands))return!1;let n=e.split(":");if(3!==n.length)return!1;let r=+n[0],i=+n[1],o=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(o)}(n,s)){let e,t,r;t=+(e=n.split(":"))[0],r=+e[1],i=+e[2]+60*r+3600*t}else i=function(n,r,i="",o,s,a){if(""!==n)return n===s?0:function n(r,i,o,s,a,l,c){if(!isNaN(+r))return+r;let u="",h=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==r)return -1*n(h,i,o,s,a,l);for(let t=0;t<e.length;t++){let c=e[t];if((u=r.replace(RegExp(`([0-9 ])(${c.key})$`),"$1"))!==r)return n(u,i,o,s,a,l)*c.factor}if((u=r.replace("%",""))!==r)return n(u,i,o,s,a,l)/100;let d=parseFloat(r);if(isNaN(d))return;let p=s(d);if(p&&"."!==p&&(u=r.replace(RegExp(`${t(p)}$`),""))!==r)return n(u,i,o,s,a,l);let f={};Object.keys(l).forEach(e=>{f[l[e]]=e});let m=Object.keys(f).sort().reverse(),g=m.length;for(let e=0;e<g;e++){let t=m[e],c=f[t];if((u=r.replace(t,""))!==r){let e;switch(c){case"thousand":e=1e3;break;case"million":e=1e6;break;case"billion":e=1e9;break;case"trillion":e=1e12}return n(u,i,o,s,a,l)*e}}}(n.replace(i,"").replace(RegExp(`([0-9])${t(r.thousands)}([0-9])`,"g"),"$1$2").replace(r.decimal,"."),r,i,o,s,a)}(n,s,a,l,c,u);else{if("number"!=typeof n)return;i=n}if(void 0!==i)return i}}}function d0(){if(XU)return XW;XU=1;let e=dJ(),t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(t){return void 0!==e.unformat(t)}function o(e,t,r,i=!1){let s=Object.keys(e).map(i=>{if(!t[i])return console.error(`${r} Invalid key: ${i}`),!1;let s=e[i],a=t[i];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!o(s,n,`[Validate ${i}]`,!0))return!1}else if(typeof s!==a.type)return console.error(`${r} ${i} type mismatched: "${a.type}" expected, "${typeof s}" provided`),!1;if(a.restrictions&&a.restrictions.length){let t=a.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:o}=a.restrictions[n];if(!t(s,e))return console.error(`${r} ${i} invalid value: ${o}`),!1}}return a.restriction&&!a.restriction(s,e)?(console.error(`${r} ${i} invalid value: ${a.message}`),!1):a.validValues&&-1===a.validValues.indexOf(s)?(console.error(`${r} ${i} invalid value: must be among ${JSON.stringify(a.validValues)}, "${s}" provided`),!1):(!a.children||!!o(s,a.children,`[Validate ${i}]`))&&!0});return i||s.push(...Object.keys(t).map(n=>{let i=t[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let t=i.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0})),s.reduce((e,t)=>e&&t,!0)}function s(e){return o(e,n,"[Validate format]")}return XW={validate:function(e,t){let n=i(e),r=s(t);return n&&r},validateFormat:s,validateInput:i,validateLanguage:function(e){return o(e,r,"[Validate language]")}}}var d1=function(e,t={}){var n,r,i,o,s,a;let l,c,u,h,d;if("string"!=typeof e)return e;r=e=(l=(n=e).match(/^{([^}]*)}/))?(t.prefix=l[1],n.slice(l[0].length)):n,function(e,t){if(-1!==e.indexOf("$")){t.output="currency";return}if(-1!==e.indexOf("%")){t.output="percent";return}if(-1!==e.indexOf("bd")){t.output="byte",t.base="general";return}if(-1!==e.indexOf("b")){t.output="byte",t.base="binary";return}if(-1!==e.indexOf("d")){t.output="byte",t.base="decimal";return}if(-1!==e.indexOf(":")){t.output="time";return}-1!==e.indexOf("o")&&(t.output="ordinal")}(e=(c=r.match(/{([^}]*)}$/))?(t.postfix=c[1],r.slice(0,-c[0].length)):r,t),(u=e.match(/[1-9]+[0-9]*/))&&(t.totalLength=+u[0]),(h=e.split(".")[0].match(/0+/))&&(t.characteristic=h[0].length),-1!==(i=e).indexOf(".")&&(t.optionalCharacteristic=-1===i.split(".")[0].indexOf("0")),-1!==e.indexOf("a")&&(t.average=!0),-1!==(o=e).indexOf("K")?t.forceAverage="thousand":-1!==o.indexOf("M")?t.forceAverage="million":-1!==o.indexOf("B")?t.forceAverage="billion":-1!==o.indexOf("T")&&(t.forceAverage="trillion");let p=e.split(".")[1];if(p){let e=p.match(/0+/);e&&(t.mantissa=e[0].length)}return(s=e).match(/\[\.]/)?t.optionalMantissa=!0:s.match(/\./)&&(t.optionalMantissa=!1),(d=e.split(".")[1])&&(t.trimMantissa=-1!==d.indexOf("[")),-1!==e.indexOf(",")&&(t.thousandSeparated=!0),-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0)),(a=e).match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),a.match(/^\+?-/)&&(t.negative="sign"),e.match(/^\+/)&&(t.forceSign=!0),t};function d2(){let e;if(Xq)return XG;Xq=1;let t=XF?X$:(XF=1,X$={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}),n=d0(),r={},i={},o=null,s={};function a(){return i[e]}return r.languages=()=>Object.assign({},i),r.currentLanguage=()=>e,r.currentBytes=()=>a().bytes||{},r.currentCurrency=()=>a().currency,r.currentAbbreviations=()=>a().abbreviations,r.currentDelimiters=()=>a().delimiters,r.currentOrdinal=()=>a().ordinal,r.currentDefaults=()=>Object.assign({},a().defaults,s),r.currentOrdinalDefaultFormat=()=>Object.assign({},r.currentDefaults(),a().ordinalFormat),r.currentByteDefaultFormat=()=>Object.assign({},r.currentDefaults(),a().byteFormat),r.currentPercentageDefaultFormat=()=>Object.assign({},r.currentDefaults(),a().percentageFormat),r.currentCurrencyDefaultFormat=()=>Object.assign({},r.currentDefaults(),a().currencyFormat),r.currentTimeDefaultFormat=()=>Object.assign({},r.currentDefaults(),a().timeFormat),r.setDefaults=e=>{e=d1(e),n.validateFormat(e)&&(s=e)},r.getZeroFormat=()=>o,r.setZeroFormat=e=>o="string"==typeof e?e:null,r.hasZeroFormat=()=>null!==o,r.languageData=e=>{if(e){if(i[e])return i[e];throw Error(`Unknown tag "${e}"`)}return a()},r.registerLanguage=(t,r=!1)=>{if(!n.validateLanguage(t))throw Error("Invalid language data");i[t.languageTag]=t,r&&(e=t.languageTag)},r.setLanguage=(n,r=t.languageTag)=>{if(!i[n]){let t=n.split("-")[0],o=Object.keys(i).find(e=>e.split("-")[0]===t);return i[o]?void(e=o):void(e=r)}e=n},r.registerLanguage(t),e=t.languageTag,XG=r}var d5={exports:{}};(function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,i=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",a=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function l(e){var t=0|e;return e>0||e===t?t:t-1}function c(e){for(var t,n,r=1,i=e.length,o=e[0]+"";r<i;){for(n=14-(t=e[r++]+"").length;n--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function u(e,t){var n,r,i=e.c,o=t.c,s=e.s,a=t.s,l=e.e,c=t.e;if(!s||!a)return null;if(n=i&&!i[0],r=o&&!o[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=l==c,!i||!o)return r?0:!i^n?1:-1;if(!r)return l>c^n?1:-1;for(a=(l=i.length)<(c=o.length)?l:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^n?1:-1;return l==c?0:l>c^n?1:-1}function h(e,t,n,r){if(e<t||e>n||e!==i(e))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function d(e){var t=e.c.length-1;return l(e.e/14)==t&&e.c[t]%2!=0}function p(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function f(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(r=e.length,++t>r){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(t=function e(t){var m,g,v,y,b,x,w,S,A,C=j.prototype={constructor:j,toString:null,valueOf:null},k=new j(1),M=20,O=4,T=-7,_=21,I=-1e7,D=1e7,R=!1,E=1,P=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",B=!0;function j(e,t){var r,o,a,l,c,u,d,p,f=this;if(!(f instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber){f.s=e.s,!e.c||e.e>D?f.c=f.e=null:e.e<I?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice());return}if((u="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,c=e;c>=10;c/=10,l++);l>D?f.c=f.e=null:(f.e=l,f.c=[e]);return}p=String(e)}else{if(!n.test(p=String(e)))return A(f,p,u);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(c=p.search(/e/i))>0?(l<0&&(l=c),l+=+p.slice(c+1),p=p.substring(0,c)):l<0&&(l=p.length)}else{if(h(t,2,N.length,"Base"),10==t&&B)return V(f=new j(e),M+f.e+1,O);if(p=String(e),u="number"==typeof e){if(0*e!=0)return A(f,p,u,t);if(f.s=1/e<0?(p=p.slice(1),-1):1,j.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=N.slice(0,t),l=c=0,d=p.length;c<d;c++)if(0>r.indexOf(o=p.charAt(c))){if("."==o){if(c>l){l=d;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,c=-1,l=0;continue}return A(f,String(e),u,t)}u=!1,(l=(p=S(p,t,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(c=0;48===p.charCodeAt(c);c++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(c,++d)){if(d-=c,u&&j.DEBUG&&d>15&&(e>0x1fffffffffffff||e!==i(e)))throw Error(s+f.s*e);if((l=l-c-1)>D)f.c=f.e=null;else if(l<I)f.c=[f.e=0];else{if(f.e=l,f.c=[],c=(l+1)%14,l<0&&(c+=14),c<d){for(c&&f.c.push(+p.slice(0,c)),d-=14;c<d;)f.c.push(+p.slice(c,c+=14));c=14-(p=p.slice(c)).length}else c-=d;for(;c--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function z(e,t,n,r){var i,o,s,a,l;if(null==n?n=O:h(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)l=c(e.c),l=1==r||2==r&&(s<=T||s>=_)?p(l,s):f(l,s,"0");else if(o=(e=V(new j(e),t,n)).e,a=(l=c(e.c)).length,1==r||2==r&&(t<=o||o<=T)){for(;a<t;l+="0",a++);l=p(l,o)}else if(t-=s,l=f(l,o,"0"),o+1>a){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=o-a)>0)for(o+1==a&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function $(e,t){for(var n,r,i=1,o=new j(e[0]);i<e.length;i++)(r=new j(e[i])).s&&(n=u(o,r))!==t&&(0!==n||o.s!==t)||(o=r);return o}function F(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+14*n-1)>D?e.c=e.e=null:n<I?e.c=[e.e=0]:(e.e=n,e.c=t),e}function V(e,t,n,o){var s,l,c,u,h,d,p,f=e.c;if(f){n:{for(s=1,u=f[0];u>=10;u/=10,s++);if((l=t-s)<0)l+=14,c=t,p=i((h=f[d=0])/a[s-c-1]%10);else if((d=r((l+1)/14))>=f.length)if(o){for(;f.length<=d;f.push(0));h=p=0,s=1,l%=14,c=l-14+1}else break n;else{for(h=u=f[d],s=1;u>=10;u/=10,s++);l%=14,p=(c=l-14+s)<0?0:i(h/a[s-c-1]%10)}if(o=o||t<0||null!=f[d+1]||(c<0?h:h%a[s-c-1]),o=n<4?(p||o)&&(0==n||n==(e.s<0?3:2)):p>5||5==p&&(4==n||o||6==n&&(l>0?c>0?h/a[s-c]:0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,o?(t-=e.e+1,f[0]=a[(14-t%14)%14],e.e=-t||0):f[0]=e.e=0,e;if(0==l?(f.length=d,u=1,d--):(f.length=d+1,u=a[14-l],f[d]=c>0?i(h/a[s-c]%a[c])*u:0),o)for(;;)if(0==d){for(l=1,c=f[0];c>=10;c/=10,l++);for(c=f[0]+=u,u=1;c>=10;c/=10,u++);l!=u&&(e.e++,1e14==f[0]&&(f[0]=1));break}else{if(f[d]+=u,1e14!=f[d])break;f[d--]=0,u=1}for(l=f.length;0===f[--l];f.pop());}e.e>D?e.c=e.e=null:e.e<I&&(e.c=[e.e=0])}return e}function H(e){var t,n=e.e;return null===n?e.toString():(t=c(e.c),t=n<=T||n>=_?p(t,n):f(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(h(n=e[t],0,1e9,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(h(n=e[t],0,8,t),O=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(h(n[0],-1e9,0,t),h(n[1],0,1e9,t),T=n[0],_=n[1]):(h(n,-1e9,1e9,t),T=-(_=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)h(n[0],-1e9,-1,t),h(n[1],1,1e9,t),I=n[0],D=n[1];else if(h(n,-1e9,1e9,t),n)I=-(D=n<0?-n:n);else throw Error(o+t+" cannot be zero: "+n);if(e.hasOwnProperty(t="CRYPTO"))if(!!(n=e[t])===n)if(n)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))R=n;else throw R=!n,Error(o+"crypto unavailable");else R=n;else throw Error(o+t+" not true or false: "+n);if(e.hasOwnProperty(t="MODULO_MODE")&&(h(n=e[t],0,9,t),E=n),e.hasOwnProperty(t="POW_PRECISION")&&(h(n=e[t],0,1e9,t),P=n),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(n=e[t]))L=n;else throw Error(o+t+" not an object: "+n);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);B="0123456789"==n.slice(0,10),N=n}}else throw Error(o+"Object expected: "+e);return{DECIMAL_PLACES:M,ROUNDING_MODE:O,EXPONENTIAL_AT:[T,_],RANGE:[I,D],CRYPTO:R,MODULO_MODE:E,POW_PRECISION:P,FORMAT:L,ALPHABET:N}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,s=e.e,a=e.s;n:if("[object Array]"==({}).toString.call(r)){if((1===a||-1===a)&&s>=-1e9&&s<=1e9&&s===i(s)){if(0===r[0]){if(0===s&&1===r.length)return!0;break n}if((t=(s+1)%14)<1&&(t+=14),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=1e14||n!==i(n))break n;if(0!==n)return!0}}}else if(null===r&&null===s&&(null===a||1===a||-1===a))return!0;throw Error(o+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return $(arguments,-1)},j.minimum=j.min=function(){return $(arguments,1)},m=0x20000000000000*Math.random()&2097151?function(){return i(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},j.random=function(e){var t,n,s,l,c,u=0,d=[],p=new j(k);if(null==e?e=M:h(e,0,1e9),l=r(e/14),R)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(l*=2));u<l;)(c=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(d.push(c%1e14),u+=2);u=l/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(l*=7);u<l;)(c=(31&t[u])*0x1000000000000+0x10000000000*t[u+1]+0x100000000*t[u+2]+0x1000000*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(d.push(c%1e14),u+=7);u=l/7}else throw R=!1,Error(o+"crypto unavailable");if(!R)for(;u<l;)(c=m())<9e15&&(d[u++]=c%1e14);for(l=d[--u],e%=14,l&&e&&(c=a[14-e],d[u]=i(l/c)*c);0===d[u];d.pop(),u--);if(u<0)d=[s=0];else{for(s=-1;0===d[0];d.splice(0,1),s-=14);for(u=1,c=d[0];c>=10;c/=10,u++);u<14&&(s-=14-u)}return p.e=s,p.c=d,p},j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},S=function(){var e="0123456789";function t(e,t,n,r){for(var i,o,s=[0],a=0,l=e.length;a<l;){for(o=s.length;o--;s[o]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(n,r,i,o,s){var a,l,u,h,d,p,m,g,v=n.indexOf("."),y=M,b=O;for(v>=0&&(h=P,P=0,n=n.replace(".",""),p=(g=new j(r)).pow(n.length-v),P=h,g.c=t(f(c(p.c),p.e,"0"),10,i,e),g.e=g.c.length),u=h=(m=t(n,r,i,s?(a=N,e):(a=e,N))).length;0==m[--h];m.pop());if(!m[0])return a.charAt(0);if(v<0?--u:(p.c=m,p.e=u,p.s=o,m=(p=w(p,g,y,b,i)).c,d=p.r,u=p.e),v=m[l=u+y+1],h=i/2,d=d||l<0||null!=m[l+1],d=b<4?(null!=v||d)&&(0==b||b==(p.s<0?3:2)):v>h||v==h&&(4==b||d||6==b&&1&m[l-1]||b==(p.s<0?8:7)),l<1||!m[0])n=d?f(a.charAt(1),-y,a.charAt(0)):a.charAt(0);else{if(m.length=l,d)for(--i;++m[--l]>i;)m[l]=0,l||(++u,m=[1].concat(m));for(h=m.length;!m[--h];);for(v=0,n="";v<=h;n+=a.charAt(m[v++]));n=f(n,u,a.charAt(0))}return n}}(),w=function(){function e(e,t,n){var r,i,o,s,a=0,l=e.length,c=t%1e7,u=t/1e7|0;for(e=e.slice();l--;)r=u*(o=e[l]%1e7)+(s=e[l]/1e7|0)*c,a=((i=c*o+r%1e7*1e7+a)/n|0)+(r/1e7|0)+u*s,e[l]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,o,s,a,c){var u,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O=r.s==o.s?1:-1,T=r.c,_=o.c;if(!T||!T[0]||!_||!_[0])return new j(!r.s||!o.s||(T?_&&T[0]==_[0]:!_)?0/0:T&&0==T[0]||!_?0*O:O/0);for(y=(v=new j(O)).c=[],O=s+(h=r.e-o.e)+1,c||(c=1e14,h=l(r.e/14)-l(o.e/14),O=O/14|0),d=0;_[d]==(T[d]||0);d++);if(_[d]>(T[d]||0)&&h--,O<0)y.push(1),p=!0;else{for(A=T.length,k=_.length,d=0,O+=2,(f=i(c/(_[0]+1)))>1&&(_=e(_,f,c),T=e(T,f,c),k=_.length,A=T.length),S=k,x=(b=T.slice(0,k)).length;x<k;b[x++]=0);M=[0].concat(M=_.slice()),C=_[0],_[1]>=c/2&&C++;do{if(f=0,(u=t(_,b,k,x))<0){if(w=b[0],k!=x&&(w=w*c+(b[1]||0)),(f=i(w/C))>1)for(f>=c&&(f=c-1),g=(m=e(_,f,c)).length,x=b.length;1==t(m,b,g,x);)f--,n(m,k<g?M:_,g,c),g=m.length,u=1;else 0==f&&(u=f=1),g=(m=_.slice()).length;if(g<x&&(m=[0].concat(m)),n(b,m,x,c),x=b.length,-1==u)for(;1>t(_,b,k,x);)f++,n(b,k<x?M:_,x,c),x=b.length}else 0===u&&(f++,b=[0]);y[d++]=f,b[0]?b[x++]=T[S]||0:(b=[T[S]],x=1)}while((S++<A||null!=b[0])&&O--)p=null!=b[0],y[0]||y.splice(0,1)}if(1e14==c){for(d=1,O=y[0];O>=10;O/=10,d++);V(v,s+(v.e=d+14*h-1)+1,a,p)}else v.e=h,v.r=+p;return v}}(),g=/^(-?)0([xbo])(?=\w[\w.]*$)/i,v=/^([^.]+)\.$/,y=/^\.([^.]+)$/,b=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,A=function(e,t,n,r){var i,s=n?t:t.replace(x,"");if(b.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(g,function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t}),r&&(i=r,s=s.replace(v,"$1").replace(y,"0.$1")),t!=s))return new j(s,i);if(j.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},C.absoluteValue=C.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},C.comparedTo=function(e,t){return u(this,new j(e,t))},C.decimalPlaces=C.dp=function(e,t){var n,r,i;if(null!=e)return h(e,0,1e9),null==t?t=O:h(t,0,8),V(new j(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-l(this.e/14))*14,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},C.dividedBy=C.div=function(e,t){return w(this,new j(e,t),M,O)},C.dividedToIntegerBy=C.idiv=function(e,t){return w(this,new j(e,t),0,1)},C.exponentiatedBy=C.pow=function(e,t){var n,s,a,l,c,u,h,p,f,m=this;if((e=new j(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+H(e));if(null!=t&&(t=new j(t)),u=e.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!e.c||!e.c[0])return f=new j(Math.pow(+H(m),u?e.s*(2-d(e)):+H(e))),t?f.mod(t):f;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(0/0);(s=!h&&m.isInteger()&&t.isInteger())&&(m=m.mod(t))}else{if(e.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||u&&m.c[1]>=24e7:m.c[0]<8e13||u&&m.c[0]<=9999975e7)))return l=m.s<0&&d(e)?-0:0,m.e>-1&&(l=1/l),new j(h?1/l:l);P&&(l=r(P/14+2))}for(u?(n=new j(.5),h&&(e.s=1),p=d(e)):p=(a=Math.abs(+H(e)))%2,f=new j(k);;){if(p){if(!(f=f.times(m)).c)break;l?f.c.length>l&&(f.c.length=l):s&&(f=f.mod(t))}if(a){if(0===(a=i(a/2)))break;p=a%2}else if(V(e=e.times(n),e.e+1,1),e.e>14)p=d(e);else{if(0==(a=+H(e)))break;p=a%2}m=m.times(m),l?m.c&&m.c.length>l&&(m.c.length=l):s&&(m=m.mod(t))}return s?f:(h&&(f=k.div(f)),t?f.mod(t):l?V(f,P,O,c):f)},C.integerValue=function(e){var t=new j(this);return null==e?e=O:h(e,0,8),V(t,t.e+1,e)},C.isEqualTo=C.eq=function(e,t){return 0===u(this,new j(e,t))},C.isFinite=function(){return!!this.c},C.isGreaterThan=C.gt=function(e,t){return u(this,new j(e,t))>0},C.isGreaterThanOrEqualTo=C.gte=function(e,t){return 1===(t=u(this,new j(e,t)))||0===t},C.isInteger=function(){return!!this.c&&l(this.e/14)>this.c.length-2},C.isLessThan=C.lt=function(e,t){return 0>u(this,new j(e,t))},C.isLessThanOrEqualTo=C.lte=function(e,t){return -1===(t=u(this,new j(e,t)))||0===t},C.isNaN=function(){return!this.s},C.isNegative=function(){return this.s<0},C.isPositive=function(){return this.s>0},C.isZero=function(){return!!this.c&&0==this.c[0]},C.minus=function(e,t){var n,r,i,o,s=this.s;if(t=(e=new j(e,t)).s,!s||!t)return new j(0/0);if(s!=t)return e.s=-t,this.plus(e);var a=this.e/14,c=e.e/14,u=this.c,h=e.c;if(!a||!c){if(!u||!h)return u?(e.s=-t,e):new j(h?this:0/0);if(!u[0]||!h[0])return h[0]?(e.s=-t,e):new j(u[0]?this:3==O?-0:0)}if(a=l(a),c=l(c),u=u.slice(),s=a-c){for((o=s<0)?(s=-s,i=u):(c=a,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(o=(s=u.length)<(t=h.length))?s:t,s=t=0;t<r;t++)if(u[t]!=h[t]){o=u[t]<h[t];break}if(o&&(i=u,u=h,h=i,e.s=-e.s),(t=(r=h.length)-(n=u.length))>0)for(;t--;u[n++]=0);for(t=1e14-1;r>s;){if(u[--r]<h[r]){for(n=r;n&&!u[--n];u[n]=t);--u[n],u[r]+=1e14}u[r]-=h[r]}for(;0==u[0];u.splice(0,1),--c);return u[0]?F(e,u,c):(e.s=3==O?-1:1,e.c=[e.e=0],e)},C.modulo=C.mod=function(e,t){var n,r;return(e=new j(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==E?(r=e.s,e.s=1,n=w(this,e,0,3),e.s=r,n.s*=r):n=w(this,e,0,E),(e=this.minus(n.times(e))).c[0]||1!=E||(e.s=this.s),e):new j(this):new j(0/0)},C.multipliedBy=C.times=function(e,t){var n,r,i,o,s,a,c,u,h,d,p,f,m,g=this.c,v=(e=new j(e,t)).c;if(!g||!v||!g[0]||!v[0])return this.s&&e.s&&(!g||g[0]||v)&&(!v||v[0]||g)?(e.s*=this.s,g&&v?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(r=l(this.e/14)+l(e.e/14),e.s*=this.s,(c=g.length)<(d=v.length)&&(m=g,g=v,v=m,i=c,c=d,d=i),i=c+d,m=[];i--;m.push(0));for(i=d;--i>=0;){for(n=0,p=v[i]%1e7,f=v[i]/1e7|0,o=i+(s=c);o>i;)a=f*(u=g[--s]%1e7)+(h=g[s]/1e7|0)*p,n=((u=p*u+a%1e7*1e7+m[o]+n)/1e14|0)+(a/1e7|0)+f*h,m[o--]=u%1e14;m[o]=n}return n?++r:m.splice(0,1),F(e,m,r)},C.negated=function(){var e=new j(this);return e.s=-e.s||null,e},C.plus=function(e,t){var n,r=this.s;if(t=(e=new j(e,t)).s,!r||!t)return new j(0/0);if(r!=t)return e.s=-t,this.minus(e);var i=this.e/14,o=e.e/14,s=this.c,a=e.c;if(!i||!o){if(!s||!a)return new j(r/0);if(!s[0]||!a[0])return a[0]?e:new j(s[0]?this:0*r)}if(i=l(i),o=l(o),s=s.slice(),r=i-o){for(r>0?(o=i,n=a):(r=-r,n=s),n.reverse();r--;n.push(0));n.reverse()}for((r=s.length)-(t=a.length)<0&&(n=a,a=s,s=n,t=r),r=0;t;)r=(s[--t]=s[t]+a[t]+r)/1e14|0,s[t]=1e14===s[t]?0:s[t]%1e14;return r&&(s=[r].concat(s),++o),F(e,s,o)},C.precision=C.sd=function(e,t){var n,r,i;if(null!=e&&!!e!==e)return h(e,1,1e9),null==t?t=O:h(t,0,8),V(new j(this),e,t);if(!(n=this.c))return null;if(r=14*(i=n.length-1)+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},C.shiftedBy=function(e){return h(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},C.squareRoot=C.sqrt=function(){var e,t,n,r,i,o=this.c,s=this.s,a=this.e,u=M+4,h=new j("0.5");if(1!==s||!o||!o[0])return new j(!s||s<0&&(!o||o[0])?0/0:o?this:1/0);if(0==(s=Math.sqrt(+H(this)))||1/0==s?(((t=c(o)).length+a)%2==0&&(t+="0"),s=Math.sqrt(+t),a=l((a+1)/2)-(a<0||a%2),n=new j(t=1/0==s?"5e"+a:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+a)):n=new j(s+""),n.c[0]){for((s=(a=n.e)+u)<3&&(s=0);;)if(i=n,n=h.times(i.plus(w(this,i,u,1))),c(i.c).slice(0,s)===(t=c(n.c)).slice(0,s)){if(n.e<a&&--s,"9999"!=(t=t.slice(s-3,s+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(V(n,n.e+M+2,1),e=!n.times(n).eq(this));break}if(!r&&(V(i,i.e+M+2,0),i.times(i).eq(this))){n=i;break}u+=4,s+=4,r=1}}return V(n,n.e+M+1,O,e)},C.toExponential=function(e,t){return null!=e&&(h(e,0,1e9),e++),z(this,e,t,1)},C.toFixed=function(e,t){return null!=e&&(h(e,0,1e9),e=e+this.e+1),z(this,e,t)},C.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=L;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,c=n.groupSeparator||"",u=s[0],h=s[1],d=this.s<0,p=d?u.slice(1):u,f=p.length;if(l&&(i=a,a=l,l=i,f-=i),a>0&&f>0){for(i=f%a||a,u=p.substr(0,i);i<f;i+=a)u+=c+p.substr(i,a);l>0&&(u+=c+p.slice(i)),d&&(u="-"+u)}r=h?u+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):u}return(n.prefix||"")+r+(n.suffix||"")},C.toFraction=function(e){var t,n,r,i,s,l,u,h,d,p,f,m,g=this.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(o+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+H(u));if(!g)return new j(this);for(t=new j(k),d=n=new j(k),r=h=new j(k),m=c(g),s=t.e=m.length-this.e-1,t.c[0]=a[(l=s%14)<0?14+l:l],e=!e||u.comparedTo(t)>0?s>0?t:d:u,l=D,D=1/0,u=new j(m),h.c[0]=0;p=w(u,t,0,1),1!=(i=n.plus(p.times(r))).comparedTo(e);)n=r,r=i,d=h.plus(p.times(i=d)),h=i,t=u.minus(p.times(i=t)),u=i;return i=w(e.minus(n),r,0,1),h=h.plus(i.times(d)),n=n.plus(i.times(r)),h.s=d.s=this.s,s*=2,f=1>w(d,r,s,O).minus(this).abs().comparedTo(w(h,n,s,O).minus(this).abs())?[d,r]:[h,n],D=l,f},C.toNumber=function(){return+H(this)},C.toPrecision=function(e,t){return null!=e&&h(e,1,1e9),z(this,e,t,2)},C.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=T||i>=_?p(c(n.c),i):f(c(n.c),i,"0"):10===e&&B?t=f(c((n=V(new j(n),M+i+1,O)).c),n.e,"0"):(h(e,2,N.length,"Base"),t=S(f(c(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},C.valueOf=C.toJSON=function(){return H(this)},C._isBigNumber=!0,null!=t&&j.set(t),j}()).default=t.BigNumber=t,d5.exports?d5.exports=t:(e||(e="u">typeof self&&self?self:window),e.BigNumber=t)})(dZ);var d3=d5.exports;let d4=d2(),d6=d0(),d9={trillion:1e12,billion:1e9,million:1e6,thousand:1e3},d8={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:d7,decimalSuffixes:pe}=d4.currentBytes(),pt={scale:1024,suffixes:pe,marker:"bd"},pn={scale:1024,suffixes:d7,marker:"b"},pr={scale:1e3,suffixes:pe,marker:"d"};function pi(e,t,n){let r=t[0],i=Math.abs(e);if(i>=n){for(let o=1;o<t.length;++o){let s=Math.pow(n,o),a=Math.pow(n,o+1);if(i>=s&&i<a){r=t[o],e/=s;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function po(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function ps({instance:e,providedFormat:t,state:n=d4,decimalSeparator:r,defaults:i=n.currentDefaults()}){var o,s,a,l,c;let u,h,d,p,f,m,g,v=e._value;if(0===v&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(v))return v.toString();let y=Object.assign({},d8,i,t),b=y.totalLength,x=b?0:y.characteristic,w=y.optionalCharacteristic,S=y.forceAverage,A=y.lowPrecision,C=!!b||!!S||y.average,k=b?-1:C&&void 0===t.mantissa?0:y.mantissa,M=!b&&(void 0===t.optionalMantissa?-1===k:y.optionalMantissa),O=y.trimMantissa,T=y.thousandSeparated,_=y.spaceSeparated,I=y.negative,D=y.forceSign,R=y.exponential,E=y.roundingFunction,P="";if(C){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:r,spaceSeparated:i=!1,totalLength:o=0,roundingFunction:s=Math.round}){let a="",l=Math.abs(e),c=-1;if(t&&r[t]&&d9[t]?(a=r[t],e/=d9[t]):l>=d9.trillion||n&&1===s(l/d9.trillion)?(a=r.trillion,e/=d9.trillion):l<d9.trillion&&l>=d9.billion||n&&1===s(l/d9.billion)?(a=r.billion,e/=d9.billion):l<d9.billion&&l>=d9.million||n&&1===s(l/d9.million)?(a=r.million,e/=d9.million):(l<d9.million&&l>=d9.thousand||n&&1===s(l/d9.thousand))&&(a=r.thousand,e/=d9.thousand),a&&(a=(i?" ":"")+a),o){let t=e<0,n=e.toString().split(".")[0];c=Math.max(o-(t?n.length-1:n.length),0)}return{value:e,abbreviation:a,mantissaPrecision:c}}({value:v,forceAverage:S,lowPrecision:A,abbreviations:n.currentAbbreviations(),spaceSeparated:_,roundingFunction:E,totalLength:b});v=e.value,P+=e.abbreviation,b&&(k=e.mantissaPrecision)}if(R){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),i=+n;return t&&1<t&&(i*=Math.pow(10,t-1),r-=t-1,r=r>=0?`+${r}`:r),{value:i,abbreviation:`e${r}`}}({value:v,characteristicPrecision:x});v=e.value,P=e.abbreviation+P}let L=function(e,t,n,r,i,o){if(-1===r)return e;let s=function(e,t,n=Math.round){return -1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[r,i]=n.split("e"),[o,s=""]=r.split(".");if(+i>0)n=o+s+po(i-s.length);else{let e=".";e=0>+o?`-0${e}`:`0${e}`;let r=(po(-i-1)+Math.abs(o)+s).substr(0,t);r.length<t&&(r+=po(t-r.length)),n=e+r}return+i>0&&t>0&&(n+=`.${po(t)}`),n}(e,t):new d3(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,r,o),[a,l=""]=s.toString().split(".");if(l.match(/^0+$/)&&(n||i))return a;let c=l.match(/0+$/);return i&&c?`${a}.${l.toString().slice(0,c.index)}`:s.toString()}(v.toString(),v,M,k,O,E);return o=L=function(e,t,n,r){let i=e,[o,s]=i.toString().split(".");if(o.match(/^-?0$/)&&n)return s?`${o.replace("0","")}.${s}`:o.replace("0","");let a=t<0&&0===o.indexOf("-");if(a&&(o=o.slice(1),i=i.slice(1)),o.length<r){let e=r-o.length;for(let t=0;t<e;t++)i=`0${i}`}return a&&(i=`-${i}`),i.toString()}(L,v,w,x),s=v,a=r,h=(u=n.currentDelimiters()).thousands,a=a||u.decimal,d=u.thousandsSize||3,f=(p=o.toString()).split(".")[0],m=p.split(".")[1],g=s<0&&0===f.indexOf("-"),T&&(g&&(f=f.slice(1)),(function(e,t){let n=[],r=0;for(let i=e;i>0;i--)r===t&&(n.unshift(i),r=0),r++;return n})(f.length,d).forEach((e,t)=>{f=f.slice(0,e+t)+h+f.slice(e+t)}),g&&(f=`-${f}`)),L=p=m?f+a+m:f,(C||R)&&(L+=P),(D||v<0)&&(l=L,L=0===(c=v)?l:0==+l?l.replace("-",""):c>0?`+${l}`:"sign"===I?l:`(${l.replace("-","")})`),L}function pa(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}function pl(e,t,n){let r=new d3(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new d3(i),e._value=r.minus(i).toNumber(),e}let pc=d2(),pu=d0(),ph={loadLanguagesInNode:e=>{e.forEach(e=>{let t;try{t=function(e){throw Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}t&&pv.registerLanguage(t)})}},pd=dJ(),pp={format:(...e)=>(function(e,t={},n){if("string"==typeof t&&(t=d1(t)),!d6.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",i=t.postfix||"",o=function(e,t,n){var r,i,o;switch(t.output){case"currency":let s,a,l,c,u,h,d,p,f,m;return r=t=pa(t,d4.currentCurrencyDefaultFormat()),s=d4.currentCurrency(),l=Object.assign({},d8,a=Object.assign({},r)),u="",h=!!l.totalLength||!!l.forceAverage||l.average,d=a.currencyPosition||s.position,p=a.currencySymbol||s.symbol,f=void 0!==l.spaceSeparatedCurrency?l.spaceSeparatedCurrency:l.spaceSeparated,void 0===a.lowPrecision&&(a.lowPrecision=!1),f&&(u=" "),"infix"===d&&(c=u+p+u),m=ps({instance:e,providedFormat:a,state:d4,decimalSeparator:c}),"prefix"===d&&(m=e._value<0&&"sign"===l.negative?`-${u}${p}${m.slice(1)}`:e._value>0&&l.forceSign?`+${u}${p}${m.slice(1)}`:p+u+m),d&&"postfix"!==d||(m=m+(u=!l.spaceSeparatedAbbreviation&&h?"":u)+p),m;case"percent":let g,v,y;return i=t=pa(t,d4.currentPercentageDefaultFormat()),g=i.prefixSymbol,v=ps({instance:n(100*e._value),providedFormat:i,state:d4}),y=Object.assign({},d8,i),g?`%${y.spaceSeparated?" ":""}${v}`:`${v}${y.spaceSeparated?" ":""}%`;case"byte":return function(e,t,n,r){let i=t.base||"binary",o=Object.assign({},d8,t),{binarySuffixes:s,decimalSuffixes:a}=n.currentBytes(),l={general:{scale:1024,suffixes:a||pe,marker:"bd"},binary:{scale:1024,suffixes:s||d7,marker:"b"},decimal:{scale:1e3,suffixes:a||pe,marker:"d"}}[i],{value:c,suffix:u}=pi(e._value,l.suffixes,l.scale),h=ps({instance:r(c),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()});return`${h}${o.spaceSeparated?" ":""}${u}`}(e,t=pa(t,d4.currentByteDefaultFormat()),d4,n);case"time":let b,x,w;return t=pa(t,d4.currentTimeDefaultFormat()),b=Math.floor(e._value/60/60),x=Math.floor((e._value-60*b*60)/60),w=Math.round(e._value-60*b*60-60*x),`${b}:${x<10?"0":""}${x}:${w<10?"0":""}${w}`;case"ordinal":let S,A,C,k;return o=t=pa(t,d4.currentOrdinalDefaultFormat()),S=d4.currentOrdinal(),A=Object.assign({},d8,o),C=ps({instance:e,providedFormat:o,state:d4}),k=S(e._value),`${C}${A.spaceSeparated?" ":""}${k}`;default:return ps({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return(o=r+o)+i})(...e,pv),getByteUnit:(...e)=>(function(e){return pi(e._value,pt.suffixes,pt.scale).suffix})(...e,pv),getBinaryByteUnit:(...e)=>(function(e){return pi(e._value,pn.suffixes,pn.scale).suffix})(...e,pv),getDecimalByteUnit:(...e)=>(function(e){return pi(e._value,pr.suffixes,pr.scale).suffix})(...e,pv),formatOrDefault:pa},pf={add:(e,t)=>{let n,r;return n=new d3(e._value),r=t,pv.isNumbro(t)&&(r=t._value),r=new d3(r),e._value=n.plus(r).toNumber(),e},subtract:(e,t)=>pl(e,t,pv),multiply:(e,t)=>{let n,r;return n=new d3(e._value),r=t,pv.isNumbro(t)&&(r=t._value),r=new d3(r),e._value=n.times(r).toNumber(),e},divide:(e,t)=>{let n,r;return n=new d3(e._value),r=t,pv.isNumbro(t)&&(r=t._value),r=new d3(r),e._value=n.dividedBy(r).toNumber(),e},set:(e,t)=>{let n;return n=t,pv.isNumbro(t)&&(n=t._value),e._value=n,e},difference:(e,t)=>{let n;return pl(n=pv(e._value),t,pv),Math.abs(n._value)},BigNumber:d3};class pm{constructor(e){this._value=e}clone(){return pv(this._value)}format(e={}){return pp.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=d1(e)),(e=pp.formatOrDefault(e,pc.currentCurrencyDefaultFormat())).output="currency",pp.format(this,e)}formatTime(e={}){return e.output="time",pp.format(this,e)}binaryByteUnits(){return pp.getBinaryByteUnit(this)}decimalByteUnits(){return pp.getDecimalByteUnit(this)}byteUnits(){return pp.getByteUnit(this)}difference(e){return pf.difference(this,e)}add(e){return pf.add(this,e)}subtract(e){return pf.subtract(this,e)}multiply(e){return pf.multiply(this,e)}divide(e){return pf.divide(this,e)}set(e){return pf.set(this,pg(e))}value(){return this._value}valueOf(){return this._value}}function pg(e){let t=e;return pv.isNumbro(e)?t=e._value:"string"==typeof e?t=pv.unformat(e):isNaN(e)&&(t=0/0),t}function pv(e){return new pm(pg(e))}pv.version="2.5.0",pv.isNumbro=function(e){return e instanceof pm},pv.language=pc.currentLanguage,pv.registerLanguage=pc.registerLanguage,pv.setLanguage=pc.setLanguage,pv.languages=pc.languages,pv.languageData=pc.languageData,pv.zeroFormat=pc.setZeroFormat,pv.defaultFormat=pc.currentDefaults,pv.setDefaults=pc.setDefaults,pv.defaultCurrencyFormat=pc.currentCurrencyDefaultFormat,pv.validate=pu.validate,pv.loadLanguagesInNode=ph.loadLanguagesInNode,pv.unformat=pd.unformat,pv.BigNumber=pf.BigNumber;var py=pv&&pv.__esModule&&Object.prototype.hasOwnProperty.call(pv,"default")?pv.default:pv;let pb=new Map([["time",new Map],["decimal",new Map],["bits",new Map],["bytes",new Map],["currency",new Map],["percent",new Map],["temperature",new Map],["throughput",new Map]]);function px(e,t,n,r="en-US"){let i=`${e.filter(e=>![void 0,null,"",0/0].includes(e)).join("|")}|${r}`,o=pb.get(t);if(!o)throw Error("No formatter found for the input type");let s=o.get(i);if(s)return s.format;let a=Intl.NumberFormat(r,n);return o?.set(`${i}`,a),a.format}let pw=()=>({countCacheItems:e=>"all"!==e?pb.get(e)?.size??0:Array.from(pb.values()).reduce((e,t)=>e+(t?.size??0),0),getKeys:e=>[...pb.get(e)?.keys()||[]]});function pS(e){return!1!==e}function pA(e){return"number"==typeof e}function pC(e){return e&&(e<0?e=0:e>20&&(e=20)),e}let pk={label:"Bits",decimalPlaces:!0,shortValues:!0},pM={bits:{group:"Bits",label:"Bits (IEC)"},decbits:{group:"Bits",label:"Bits (SI)"}};function pO(e,{unit:t="bits",shortValues:n,decimalPlaces:r}){let i="decbits"===t;if(!pS(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"decimal",useGrouping:!0};pA(r)?(i.minimumFractionDigits=pC(r),i.maximumFractionDigits=pC(r)):pS(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.maximumSignificantDigits,r,n,t];return`${px(o,"bits",i,"en-US")(e)} bits`}return py(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:pA(r)?r:2,trimMantissa:!pA(r),optionalMantissa:!pA(r)}).replace(/KB/g,"Kb").replace(/MB/g,"Mb").replace(/GB/g,"Gb").replace(/TB/g,"Tb").replace(/PB/g,"Pb").replace(/EB/g,"Eb").replace(/KiB/g,"Kib").replace(/MiB/g,"Mib").replace(/GiB/g,"Gib").replace(/TiB/g,"Tib").replace(/PiB/g,"Pib").replace(/EiB/g,"Eib")}let pT={label:"Bytes",decimalPlaces:!0,shortValues:!0},p_={bytes:{group:"Bytes",label:"Bytes (IEC)"},decbytes:{group:"Bytes",label:"Bytes (SI)"}};function pI(e,{unit:t="bytes",shortValues:n,decimalPlaces:r}){let i="decbytes"===t;if(!pS(n)||Math.abs(e)<(i?1e3:1024)){let i={style:"unit",unit:"byte",unitDisplay:"long",useGrouping:!0};return pA(r)?(i.minimumFractionDigits=pC(r),i.maximumFractionDigits=pC(r)):pS(n)&&(i.maximumSignificantDigits=3),px([i.style,i.unit,i.unitDisplay,i.useGrouping,i.maximumSignificantDigits,r,n,t],"bytes",i,"en-US")(e)}return py(e).format({output:"byte",base:i?"decimal":"binary",spaceSeparated:!0,mantissa:pA(r)?r:2,trimMantissa:!pA(r),optionalMantissa:!pA(r)})}var pD=n("H7");let pR="Currency",pE={label:"Currency",decimalPlaces:!0},pP={aud:{group:pR,label:"Australian Dollar (A$)"},cad:{group:pR,label:"Canadian Dollar (CA$)"},chf:{group:pR,label:"Swiss Franc (CHF)"},cny:{group:pR,label:"Renminbi (CN¥)"},eur:{group:pR,label:"Euro (€)"},gbp:{group:pR,label:"Pound (£)"},hkd:{group:pR,label:"Hong Kong Dollar (HK$)"},inr:{group:pR,label:"Indian Rupee (₹)"},jpy:{group:pR,label:"Yen (¥)"},krw:{group:pR,label:"South Korean Won (₩)"},nok:{group:pR,label:"Norwegian Krone (NOK)"},nzd:{group:pR,label:"New Zealand Dollar (NZ$)"},sek:{group:pR,label:"Swedish Krona (SEK)"},sgd:{group:pR,label:"Singapore Dollar (S$)"},usd:{group:pR,label:"US Dollar ($)"}};function pL(e,{unit:t,decimalPlaces:n}){let r={style:"currency",currency:(0,pD.toUpper)(t),currencyDisplay:"symbol"};return pA(n)?(r.minimumFractionDigits=pC(n),r.maximumFractionDigits=pC(n)):r.maximumSignificantDigits=3,px([r.style,r.currency,r.currencyDisplay,r.maximumSignificantDigits,n,t],"currency",r,"en-US")(e)}let pN=new Set(["datetime-iso","datetime-us","datetime-local","date-iso","date-us","date-local","time-local","time-iso","time-us","relative-time","unix-timestamp","unix-timestamp-ms"]),pB=new Set(["bytes","decbytes","bits","decbits","bytes/sec","decbytes/sec","bits/sec","decbits/sec"]),pj=new Set(["usd","eur","gbp","jpy","cny","cad","aud","chf","hkd","sgd","sek","krw","nok","nzd","inr","mxn","twd","zar","brl","dkk","pln","thb","ils","czk","clp","php","aed","cop","sar","myr","ron","afn"]);function pz(e){return!e||!pN.has(e)}let p$=/^[+-]?(?:\d{1,3}(?:,\d{3})*|\d+)(?:\.\d+)?(?:[eE][+-]?\d+)?/;function pF(e,t,n){let r=t?.trim();if(!r||!pz(n))return e;if(n&&pB.has(n))return function(e,t){let n="",r=e.trim(),i=r.match(/(\/s(?:ec)?)$/i);i?.[1]&&(n=i[1],r=r.slice(0,-n.length).trimEnd());let o=r.match(/^(.+?)\s+(bytes?|bits?)$/i);if(o?.[1])return`${o[1].trim()} ${t}${n}`;let s=r.match(/^(.+?)\s*([KMGTPE]i?)\s*([Bb])$/);if(s?.[1]&&s[2])return`${s[1].trim()} ${s[2]} ${t}${n}`;let a=pH(r);return null!==a?`${a} ${t}${n}`:`${e} ${t}`}(e,r);if(n&&pj.has(n)){var i,o;let t;return i=e,o=r,pH(t=(t=(t=(t=i.trim()).replace(/^([+-]?)\s*[^\d\s+-]+/,"$1")).replace(/\s*[A-Z]{3}$/,"")).trim()),`${t} ${o}`}if("0s"===e)return`0 ${r}`;if(("percent"===n||"percent-decimal"===n)&&e.endsWith("%"))return`${e.slice(0,-1).trimEnd()} ${r}`;if("celsius"===n&&e.endsWith("°C")||"fahrenheit"===n&&e.endsWith("°F"))return`${e.slice(0,-2).trimEnd()} ${r}`;if(n&&e.endsWith(` ${n}`))return`${e.slice(0,-(n.length+1))} ${r}`;if(n&&pV.has(n))return function(e,t){let n=e.trim();if("0s"===n||"0"===n)return`0 ${t}`;let r=n.replace(/\u03bc/g,"µ"),i=/(?:\s*)(?:milliseconds?|microseconds?|nanoseconds?|seconds?|minutes?|hours?|days?|weeks?|months?|years?|ms|us|ns|µs|[ywdhms])$/i,o=0;for(;i.test(r)&&o++<8;)r=r.replace(i,"").trimEnd();if(""!==r&&r!==n){let e=pH(r)??r;return`${e} ${t}`}let s=pH(n);return null!==s?`${s} ${t}`:`${n} ${t}`}(e,r);let s=pH(e);return null!==s?`${s} ${r}`:`${e} ${r}`}let pV=new Set(["nanoseconds","microseconds","milliseconds","seconds","minutes","hours","days","weeks","months","years"]);function pH(e){let t=e.trimStart(),n=t.match(p$);if(!n?.[0])return null;let r=n[0],i=t.slice(r.length).match(/^([KMBT])(?=\s|$)/i);return i?r+i[1]:r}let pW="Date",pU={label:"Decimal",decimalPlaces:!0,shortValues:!0},pG={decimal:{group:"Decimal",label:"Decimal"}};function pq(e,{shortValues:t,decimalPlaces:n}){let r={style:"decimal",useGrouping:!0};return pS(t)&&(r.notation="compact"),pA(n)?(r.minimumFractionDigits=pC(n),r.maximumFractionDigits=pC(n)):pS(t)&&(r.maximumSignificantDigits=3),px([r.style,r.useGrouping,r.notation,r.maximumSignificantDigits,n],"decimal",r,"en-US")(e)}let pX={label:"percent",decimalPlaces:!0},pY="Percent",pK={percent:{group:pY,label:"Percent (0-100)"},"percent-decimal":{group:pY,label:"Percent (0.0-1.0)"},"%":{disableSelectorOption:!0,group:pY,label:"%"}};function pQ(e,{unit:t,decimalPlaces:n}){let r={style:"percent",useGrouping:!0};return pA(n)?(r.minimumFractionDigits=pC(n),r.maximumFractionDigits=pC(n)):r.maximumSignificantDigits=3,"percent"===t&&(e/=100),px([r.style,r.useGrouping,r.maximumSignificantDigits,n,t],"percent",r,"en-US")(e)}let pZ="Temperature",pJ={label:pZ,decimalPlaces:!0},p0={celsius:{group:pZ,label:"Celsius (°C)"},fahrenheit:{group:pZ,label:"Fahrenheit (°F)"}},p1=(e,{unit:t,decimalPlaces:n})=>{let r={unit:t,style:"unit"};pA(n)?(r.minimumFractionDigits=pC(n),r.maximumFractionDigits=pC(n)):r.maximumSignificantDigits=3;let i="celsius"===t?"en-GB":"en-US";return px([r.style,r.unit,r.maximumSignificantDigits,n,i],"temperature",r,i)(e)},p2={label:"Throughput",decimalPlaces:!0},p5="Throughput",p3={"bits/sec":{group:p5,label:"Bits/sec (IEC)"},"decbits/sec":{group:p5,label:"Bits/sec (SI)"},"bytes/sec":{group:p5,label:"Bytes/sec (IEC)"},"decbytes/sec":{group:p5,label:"Bytes/sec (SI)"},"counts/sec":{group:p5,label:"Counts/sec"},"events/sec":{group:p5,label:"Events/sec"},"messages/sec":{group:p5,label:"Messages/sec"},"ops/sec":{group:p5,label:"Ops/sec"},"packets/sec":{group:p5,label:"Packets/sec"},"reads/sec":{group:p5,label:"Reads/sec"},"requests/sec":{group:p5,label:"Requests/sec"},"records/sec":{group:p5,label:"Records/sec"},"rows/sec":{group:p5,label:"Rows/sec"},"writes/sec":{group:p5,label:"Writes/sec"}};function p4(e,{unit:t,shortValues:n,decimalPlaces:r}){if("bits/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return pO(e,{unit:"bits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbits/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return pO(e,{unit:"decbits",shortValues:n,decimalPlaces:r})+"/"+t}if("decbytes/sec"===t){let t=1e3>Math.abs(e)?"sec":"s";return pI(e,{unit:"decbytes",shortValues:n,decimalPlaces:r})+"/"+t}if("bytes/sec"===t){let t=1024>Math.abs(e)?"sec":"s";return pI(e,{unit:"bytes",shortValues:n,decimalPlaces:r})+"/"+t}let i={style:"decimal",useGrouping:!0};pS(n)&&(i.notation="compact"),pA(r)?(i.minimumFractionDigits=pC(r),i.maximumFractionDigits=pC(r)):pS(n)&&(i.maximumSignificantDigits=3);let o=[i.style,i.useGrouping,i.notation,i.maximumSignificantDigits,r,n,t];return`${px(o,"throughput",i,"en-US")(e)} ${t}`}let p6="Time",p9={label:"Time",decimalPlaces:!0},p8={nanoseconds:{group:p6,label:"Nanoseconds"},microseconds:{group:p6,label:"Microseconds"},milliseconds:{group:p6,label:"Milliseconds"},seconds:{group:p6,label:"Seconds"},minutes:{group:p6,label:"Minutes"},hours:{group:p6,label:"Hours"},days:{group:p6,label:"Days"},weeks:{group:p6,label:"Weeks"},months:{group:p6,label:"Months"},years:{group:p6,label:"Years"}};var p7=((XC={}).nanoseconds="nanosecond",XC.microseconds="microsecond",XC.milliseconds="millisecond",XC.seconds="second",XC.minutes="minute",XC.hours="hour",XC.days="day",XC.weeks="week",XC.months="month",XC.years="year",XC);let fe={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1,milliseconds:.001,microseconds:1e-6,nanoseconds:1e-9},ft=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"];function fn(e,{unit:t,decimalPlaces:n}){var r;if(0===e)return"0s";let i=function(e,t){let n=e*fe[t],r=ft[0]||"years",i=r,o=n/fe[r];for(i of ft)if((o=n/fe[i])>=1)break;return{value:o,unit:i}}(e,t??"seconds"),o={style:"unit",unit:p7[i.unit],unitDisplay:"months"===(r=i.unit)||"years"===r?"long":"narrow"};return pA(n)?(o.minimumFractionDigits=pC(n),o.maximumFractionDigits=pC(n)):o.maximumSignificantDigits=3,px([o.style,o.unit,o.unitDisplay,o.maximumSignificantDigits,n,t??"seconds"],"time",o,"en-US")(i.value)}let fr={Time:p9,Percent:pX,Decimal:pU,Bytes:pT,Bits:pk,Throughput:p2,Currency:pE,Temperature:pJ,Date:{label:"Date & Time"}},fi={...p8,...pK,...pG,...p_,...pM,...p3,...pP,...p0,"datetime-iso":{group:pW,label:"DateTime (GMT)"},"datetime-us":{group:pW,label:"DateTime (US-East)"},"datetime-local":{group:pW,label:"DateTime (Browser Local)"},"date-iso":{group:pW,label:"Date (GMT)"},"date-us":{group:pW,label:"Date (US-East)"},"date-local":{group:pW,label:"Date (Browser Local)"},"time-local":{group:pW,label:"Time (Browser Local)"},"time-iso":{group:pW,label:"Time (GMT)"},"time-us":{group:pW,label:"Time (US-East)"},"relative-time":{group:pW,label:"Relative Time"},"unix-timestamp":{group:pW,label:"Unix Timestamp (s)"},"unix-timestamp-ms":{group:pW,label:"Unix Timestamp (ms)"}};function fo(e,t){let n;if(!t)return e.toString();if(fd(t))n=pI(e,t);else if(fp(t))n=pO(e,t);else if(fh(t))n=pq(e,t);else if(fu(t))n=pQ(e,t);else if(fc(t))n=fn(e,t);else if(fg(t))n=p4(e,t);else if(fv(t))n=pL(e,t);else if(fy(t))n=function(e,t={}){let n=Intl.DateTimeFormat().resolvedOptions().timeZone,{unit:r="datetime-local",locale:i=(()=>{if("u">typeof navigator){if(navigator.language)return navigator.language;if(navigator.languages&&navigator.languages.length>0){let e=navigator.languages[0];if(e)return e}let e=navigator;if(e.userLanguage)return e.userLanguage;if(e.browserLanguage)return e.browserLanguage;if(e.systemLanguage)return e.systemLanguage}return Intl.DateTimeFormat().resolvedOptions().locale||"en-US"})(),timeZone:o=n,referenceTime:s=Date.now()}=t;if("unix-timestamp"===r)return(e>1e12?Math.floor(e/1e3):e).toString();if("unix-timestamp-ms"===r)return Math.floor(e<1e11?1e3*e:e).toString();let a=function(e){if(e<0)if(Math.abs(e)>1e10)return new Date(e);else return new Date(1e3*e);if(e>=25e10&&e<=26e10){let t=new Date(1e3*e);if(t.getUTCFullYear()>=9999)return t}return new Date(e<1e10?1e3*e:e)}(e);if("relative-time"===r){let e=new Date(s),t=a.getTime()-e.getTime();for(let{unit:e,ms:n}of[{unit:"year",ms:31536e6},{unit:"month",ms:2592e6},{unit:"week",ms:6048e5},{unit:"day",ms:864e5},{unit:"hour",ms:36e5},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}]){let r=Math.round(t/n);if(Math.abs(r)>=1)return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(r,e)}return new Intl.RelativeTimeFormat(i,{numeric:"auto"}).format(0,"second")}let l={timeZone:o};switch(r){case"datetime-iso":return a.toISOString();case"datetime-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(a);case"datetime-local":l.year="numeric",l.month="2-digit",l.day="2-digit",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"date-iso":return a.toISOString().split("T")[0];case"date-us":return l.timeZone="America/New_York",l.year="numeric",l.month="2-digit",l.day="2-digit",new Intl.DateTimeFormat("en-US",l).format(a);case"date-local":l.year="numeric",l.month="2-digit",l.day="2-digit";break;case"time-local":l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!1;break;case"time-iso":return a.toISOString().split("T")[1].replace("Z","");case"time-us":return l.timeZone="America/New_York",l.hour="2-digit",l.minute="2-digit",l.second="2-digit",l.hour12=!0,new Intl.DateTimeFormat("en-US",l).format(a);default:throw Error(`Unknown date unit: ${r}`)}return new Intl.DateTimeFormat(i,l).format(a)}(e,t);else if(fb(t))n=p1(e,t);else throw Error(`Unknown unit options ${t}`);return pF(n,t.customLabel,t.unit)}function fs(e){let t=e.unit??"decimal",n=fi[t],r=e.customLabel?.trim();return r&&pz(t)?{...n,label:r}:n}function fa(e){return fs(e).group??"Decimal"}function fl(e){return fr[fs(e).group??"Decimal"]}function fc(e){return"Time"===fa(e)}function fu(e){return"Percent"===fa(e)}function fh(e){return"Decimal"===fa(e)}function fd(e){return"Bytes"===fa(e)}function fp(e){return"Bits"===fa(e)}function ff(e){return!!fl(e).decimalPlaces}function fm(e){return!!fl(e).shortValues}function fg(e){return"Throughput"===fa(e)}function fv(e){return"Currency"===fa(e)}function fy(e){return"Date"===fa(e)}function fb(e){return"Temperature"===fa(e)}let fx="nearby series showing in tooltip",fw="emphasized series showing as bold in tooltip",fS="#2E313E",fA=new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}),fC={coords:{plotCanvas:{x:0,y:0},zrender:{x:0,y:0},target:null},chartWidth:0},fk=[],fM=()=>{let e,t,n=(0,c.c)(2),[r,i]=(0,u.useState)(null);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{let e=e=>i({page:{x:e.pageX,y:e.pageY},client:{x:e.clientX,y:e.clientY},plotCanvas:{x:e.zrX??e.offsetX,y:e.zrY??e.offsetY},target:e.target});return window.addEventListener("mousemove",e),()=>{window.removeEventListener("mousemove",e)}},t=[],n[0]=e,n[1]=t):(e=n[0],t=n[1]),(0,u.useEffect)(e,t),r},fO={wrapLabels:!0,enablePinning:!0},fT="Click chart to pin",f_="Click chart to unpin";function fI(e,t,n,r,i){if(null===e||(null!==t&&(e=t),void 0===e.plotCanvas.x))return;let o=n>0?n:650,s=r>0?r:650,a=e.page.x+32,l=e.page.y+16,c=e.page.y;if(i){let e=i.getBoundingClientRect();a=a-e.left+i.scrollLeft,l=l-e.top+i.scrollTop,c=c-e.top+i.scrollTop;let t=e.top+i.scrollHeight;l+o>t&&((l=c-o-16)<i.scrollTop+4||l+o>t)&&(l=Math.max(t-o-16,4))}else l+o>window.innerHeight+window.scrollY&&((l=c-o-16)<window.scrollY+4||l+o>window.innerHeight+window.scrollY)&&(l=Math.max(window.innerHeight+window.scrollY-o-16,4));return a+s>window.innerWidth&&(a=e.page.x-s-32),a<32&&(a=32),l<4&&(l=4),`translate3d(${a}px, ${l}px, 0)`}function fD(e,t,n){return{minWidth:375,maxWidth:650,maxHeight:(n?n-8:void 0)??650,padding:0,position:"absolute",top:0,left:0,backgroundColor:e.palette.designSystem?.grey[800]??fS,borderRadius:"6px",color:"#fff",fontSize:"11px",visibility:"visible",opacity:1,transition:"opacity 0.1s ease-out, visibility 0.1s ease-out",zIndex:null!==t?3:e.zIndex.tooltip,overflow:"hidden","&:hover":{overflowY:"auto"}}}function fR(e,t){try{let n=t.convertToPixel("grid",[e,0]);return n?.[0]??null}catch{return null}}function fE(e,t,n,r){let i=n[e];if(!i)return t;let o=i.stack;if(!o)return t;let s=o.toString(),a=(r.get(s)??0)+t;return r.set(s,a),a}function fP(e,t,n){let r,i,o=t.indexOf(e);if(-1===o)return 20;let s=o>0?t[o-1]??null:null,a=o<t.length-1?t[o+1]??null:null,l=fR(e,n);if(null===l)return 20;if(null!==s&&null!==a){let e=fR(s,n)??l,t=fR(a,n)??l;r=(l+e)/2,i=(l+t)/2}else if(null!==s){let e=fR(s,n)??l;r=(l+e)/2,i=l+(l-r)}else{if(null===a)return 20;let e=fR(a,n)??l;i=(l+e)/2,r=l-(i-l)}return Math.max(1,i-r)}function fL(e,t,n,r){let i=t/Math.max(1,r),o=n-t/2+e*i;return{left:o,right:o+i}}function fN(e,t,n){try{let r=n.convertToPixel("grid",[0,e]),i=n.convertToPixel("grid",[0,t]);if(!r||!i||void 0===r[1]||void 0===i[1])return null;return{top:Math.min(i[1],r[1]),bottom:Math.max(i[1],r[1])}}catch{return null}}function fB(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k=(0,c.c)(63),{exemplar:M,seriesLabels:O,containerId:T,format:_,pinnedPos:I,enablePinning:D,onUnpinClick:R}=e,E=void 0===D||D,{formatWithUserTimeZone:P}=dQ(),L=fM(),{height:N,width:B,ref:j}=dD(),z=null!==I;if(!z&&null===L)return null;k[0]!==T||k[1]!==N||k[2]!==L||k[3]!==I||k[4]!==B?(n=(t=T?document.querySelector(T):void 0)?t.getBoundingClientRect().height:void 0,r=fI(L??I,I,N??0,B??0,t),k[0]=T,k[1]=N,k[2]=L,k[3]=I,k[4]=B,k[5]=t,k[6]=n,k[7]=r):(t=k[5],n=k[6],r=k[7]);let $=r,{labels:F,value:V,timestamp:H}=M;k[8]!==_||k[9]!==V?(i=fo(V,_),k[8]=_,k[9]=V,k[10]=i):i=k[10];let W=i;if(k[11]!==P||k[12]!==H){let e=new Date(H);o=P(e,"MMM dd, yyyy - "),s=P(e,"HH:mm:ss"),k[11]=P,k[12]=H,k[13]=o,k[14]=s}else o=k[13],s=k[14];let U=s;if(k[15]!==W||k[16]!==F||k[17]!==O){let e,t;if(a=[],O&&Object.keys(O).length>0){let e;k[19]!==O?(e={key:"series-labels",content:(0,l.jsx)(fW,{title:"Series labels",labels:O})},k[19]=O,k[20]=e):e=k[20],a.push(e)}if(Object.keys(F).length>0){let e;k[21]!==F?(e={key:"exemplar-labels",content:(0,l.jsx)(fW,{title:"Exemplar labels",labels:F})},k[21]=F,k[22]=e):e=k[22],a.push(e)}k[23]===Symbol.for("react.memo_cache_sentinel")?(e=(0,l.jsx)(nc.A,{variant:"overline",component:"div",children:"Value"}),k[23]=e):e=k[23],k[24]!==W?(t={key:"value",content:(0,l.jsxs)(e7.A,{children:[e,(0,l.jsx)(nc.A,{fontWeight:700,children:W})]})},k[24]=W,k[25]=t):t=k[25],a.push(t),k[15]=W,k[16]=F,k[17]=O,k[18]=a}else a=k[18];return k[26]!==n||k[27]!==I?(u=e=>fD(e,I,n),k[26]=n,k[27]=I,k[28]=u):u=k[28],k[29]!==$?(h={transform:$},k[29]=$,k[30]=h):h=k[30],k[31]===Symbol.for("react.memo_cache_sentinel")?(d={display:"flex",alignItems:"center",paddingBottom:.5,width:"100%"},k[31]=d):d=k[31],k[32]===Symbol.for("react.memo_cache_sentinel")?(p={flexGrow:1,minWidth:0},k[32]=p):p=k[32],k[33]!==o?(f=(0,l.jsx)(nc.A,{variant:"caption",sx:fV,children:o}),k[33]=o,k[34]=f):f=k[34],k[35]!==U?(m=(0,l.jsx)(nc.A,{variant:"caption",children:(0,l.jsx)("strong",{children:U})}),k[35]=U,k[36]=m):m=k[36],k[37]!==m||k[38]!==f?(g=(0,l.jsxs)(e7.A,{sx:p,children:[f,m]}),k[37]=m,k[38]=f,k[39]=g):g=k[39],k[40]!==E||k[41]!==z||k[42]!==R?(v=E&&(0,l.jsxs)(eb,{direction:"row",alignItems:"center",sx:{marginLeft:1,flexShrink:0},children:[(0,l.jsx)(nc.A,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:z?f_:fT}),z?(0,l.jsx)(er,{"aria-label":f_,onClick:()=>{void 0!==R&&R()},sx:{padding:0,color:"inherit"},children:(0,l.jsx)(dT,{sx:{fontSize:16}})}):(0,l.jsx)(d_,{sx:{fontSize:16}})]}),k[40]=E,k[41]=z,k[42]=R,k[43]=v):v=k[43],k[44]!==g||k[45]!==v?(y=(0,l.jsxs)(e7.A,{sx:d,children:[g,v]}),k[44]=g,k[45]=v,k[46]=y):y=k[46],k[47]===Symbol.for("react.memo_cache_sentinel")?(b=(0,l.jsx)(c4,{sx:fF}),k[47]=b):b=k[47],k[48]!==y?(x=(0,l.jsxs)(e7.A,{sx:fH,children:[y,b]}),k[48]=y,k[49]=x):x=k[49],k[50]!==a?(w=(0,l.jsx)(eb,{spacing:1,sx:f$,children:a.map(fj)}),k[50]=a,k[51]=w):w=k[51],k[52]!==x||k[53]!==w?(S=(0,l.jsxs)(eb,{spacing:.5,children:[x,w]}),k[52]=x,k[53]=w,k[54]=S):S=k[54],k[55]!==S||k[56]!==u||k[57]!==h||k[58]!==j?(A=(0,l.jsx)(e7.A,{ref:j,sx:u,style:h,children:S}),k[55]=S,k[56]=u,k[57]=h,k[58]=j,k[59]=A):A=k[59],k[60]!==t||k[61]!==A?(C=(0,l.jsx)(ho.A,{container:t,children:A}),k[60]=t,k[61]=A,k[62]=C):C=k[62],C}function fj(e,t){return(0,l.jsxs)(u.Fragment,{children:[t>0&&(0,l.jsx)(c4,{sx:fz}),e.content]},e.key)}function fz(e){return{borderColor:e.palette.grey["500"]}}function f$(e){return{padding:e.spacing(.5,2,1.5,2)}}function fF(e){return{width:"100%",borderColor:e.palette.grey["500"]}}function fV(e){return{color:e.palette.common.white}}function fH(e){return{width:"100%",maxWidth:650,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??fS,position:"sticky",top:0,left:0}}function fW(e){let t,n,r,i,o,s=(0,c.c)(10),{title:a,labels:u}=e;s[0]!==u?(t=Object.entries(u),s[0]=u,s[1]=t):t=s[1];let h=t;return s[2]!==a?(n=(0,l.jsx)(nc.A,{variant:"overline",component:"div",children:a}),s[2]=a,s[3]=n):n=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(r={display:"grid",gridTemplateColumns:"minmax(0, max-content) minmax(0, 1fr)",columnGap:.5,rowGap:.25},s[4]=r):r=s[4],s[5]!==h?(i=(0,l.jsx)(e7.A,{sx:r,children:h.map(fU)}),s[5]=h,s[6]=i):i=s[6],s[7]!==n||s[8]!==i?(o=(0,l.jsxs)(e7.A,{children:[n,i]}),s[7]=n,s[8]=i,s[9]=o):o=s[9],o}function fU(e){let[t,n]=e;return(0,l.jsxs)(u.Fragment,{children:[(0,l.jsxs)(nc.A,{sx:{wordBreak:"break-all"},children:[t,":"]}),(0,l.jsx)(nc.A,{fontWeight:700,sx:{wordBreak:"break-all"},children:n})]},t)}var fG=n("Wx"),fq=n("xq"),fX=n("oF");let fY=e=>{let t,n,r,i=(0,c.c)(12),{id:o,title:s,description:a,placement:u,children:h,enterDelay:d,enterNextDelay:p}=e;i[0]!==h?(t=(0,l.jsx)("span",{children:h}),i[0]=h,i[1]=t):t=i[1];let f=t,m=u??"top";i[2]!==a||i[3]!==s?(n=(0,l.jsx)(fK,{title:s,description:a}),i[2]=a,i[3]=s,i[4]=n):n=i[4];let g=d??500,v=p??500;return i[5]!==o||i[6]!==m||i[7]!==n||i[8]!==g||i[9]!==v||i[10]!==f?(r=(0,l.jsx)(fQ,{arrow:!0,id:o,placement:m,title:n,enterDelay:g,enterNextDelay:v,children:f}),i[5]=o,i[6]=m,i[7]=n,i[8]=g,i[9]=v,i[10]=f,i[11]=r):r=i[11],r},fK=e=>{let t,n,r,i=(0,c.c)(7),{title:o,description:s}=e;return i[0]!==o?(t=o&&(0,l.jsx)(nc.A,{variant:"body2",sx:fZ,children:o}),i[0]=o,i[1]=t):t=i[1],i[2]!==s?(n=(0,l.jsx)(nc.A,{variant:"caption",sx:fJ,children:s}),i[2]=s,i[3]=n):n=i[3],i[4]!==t||i[5]!==n?(r=(0,l.jsxs)(l.Fragment,{children:[t,n]}),i[4]=t,i[5]=n,i[6]=r):r=i[6],r},fQ=(0,y.A)(({className:e,...t})=>(0,l.jsx)(hC,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${hg.tooltip}`]:{backgroundColor:e.palette.background.tooltip,color:e.palette.text.primary,maxWidth:"300px",padding:e.spacing(1),boxShadow:e.shadows[1]},[`& .${hg.arrow}`]:{color:e.palette.background.tooltip}}));function fZ(e){return{color:e.palette.text.primary,fontWeight:e.typography.fontWeightMedium}}function fJ(e){return{color:e.palette.text.primary,whiteSpace:"pre-line"}}let f0=e=>{let t,n,r,i,o,s,a,h,d=(0,c.c)(21),{label:p,control:f,description:m}=e,g=`EditorSectionControl-${(0,u.useId)()}`,v=`${g}-control`,y=`${g}-label`;d[0]!==v||d[1]!==y?(t={id:v,"aria-labelledby":y},d[0]=v,d[1]=y,d[2]=t):t=d[2];let b=t;return d[3]!==v||d[4]!==p||d[5]!==y?(n=(0,l.jsx)(fG.A,{id:y,htmlFor:v,children:p}),d[3]=v,d[4]=p,d[5]=y,d[6]=n):n=d[6],d[7]!==m?(r=m&&(0,l.jsx)(fY,{description:m,enterDelay:100,children:(0,l.jsx)(er,{size:"small",sx:f1,children:(0,l.jsx)(fX,{"aria-describedby":"info-tooltip","aria-hidden":!1,fontSize:"inherit",sx:{color:f2}})})}),d[7]=m,d[8]=r):r=d[8],d[9]!==n||d[10]!==r?(i=(0,l.jsxs)(eb,{direction:"row",alignItems:"center",justifyContent:"center",children:[n,r]}),d[9]=n,d[10]=r,d[11]=i):i=d[11],d[12]===Symbol.for("react.memo_cache_sentinel")?(o={width:"180px",textAlign:"right"},d[12]=o):o=d[12],d[13]!==f||d[14]!==b?(s=u.cloneElement(f,b),d[13]=f,d[14]=b,d[15]=s):s=d[15],d[16]!==s?(a=(0,l.jsxs)(e7.A,{sx:o,children:[" ",s]}),d[16]=s,d[17]=a):a=d[17],d[18]!==i||d[19]!==a?(h=(0,l.jsx)(fq.A,{children:(0,l.jsxs)(eb,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[i,a]})}),d[18]=i,d[19]=a,d[20]=h):h=d[20],h};function f1(e){return{borderRadius:e.shape.borderRadius,padding:"4x",margin:"0 2px"}}function f2(e){return e.palette.grey[700]}var f5=n("Ij"),f3=n("yx"),f4=n("DA");function f6(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function f9(e={}){let{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:s=!1}=e;return(e,{inputValue:a,getOptionLabel:l})=>{let c=s?a.trim():a;n&&(c=c.toLowerCase()),t&&(c=f6(c));let u=c?e.filter(e=>{let r=(o||l)(e);return n&&(r=r.toLowerCase()),t&&(r=f6(r)),"start"===i?r.startsWith(c):r.includes(c)}):e;return"number"==typeof r?u.slice(0,r):u}}let f8=f9(),f7=e=>null!==e.current&&e.current.parentElement?.contains(document.activeElement),me=[];function mt(e,t,n){if(t||null==e)return"";let r=n(e);return"string"==typeof r?r:""}var mn=function(e){var t;let n,{unstable_isActiveElementInListbox:r=f7,unstable_classNamePrefix:i="Mui",autoComplete:o=!1,autoHighlight:s=!1,autoSelect:a=!1,blurOnSelect:l=!1,clearOnBlur:c=!e.freeSolo,clearOnEscape:h=!1,componentName:d="useAutocomplete",defaultValue:p=e.multiple?me:null,disableClearable:f=!1,disableCloseOnSelect:m=!1,disabled:g,disabledItemsFocusable:v=!1,disableListWrap:y=!1,filterOptions:b=f8,filterSelectedOptions:x=!1,freeSolo:w=!1,getOptionDisabled:S,getOptionKey:A,getOptionLabel:C=e=>e.label??e,groupBy:k,handleHomeEndKeys:M=!e.freeSolo,id:O,includeInputInList:T=!1,inputValue:_,isOptionEqualToValue:I=(e,t)=>e===t,multiple:D=!1,onChange:R,onClose:E,onHighlightChange:P,onInputChange:L,onOpen:N,open:B,openOnFocus:j=!1,options:z,readOnly:$=!1,selectOnFocus:F=!e.freeSolo,value:V}=e,H=(0,dc.A)(O),W=C;W=e=>{let t=C(e);return"string"!=typeof t?String(t):t};let U=u.useRef(!1),G=u.useRef(!0),q=u.useRef(null),X=u.useRef(null),[Y,K]=u.useState(null),[Q,Z]=u.useState(-1),J=s?0:-1,ee=u.useRef(J),et=u.useRef(mt(p??V,D,W)).current,[en,er]=(0,f5.A)({controlled:V,default:p,name:d}),[ei,eo]=(0,f5.A)({controlled:_,default:et,name:d,state:"inputValue"}),[es,ea]=u.useState(!1),el=u.useCallback((e,t,n)=>{if(!(D?en.length<t.length:null!==t)&&!c)return;let r=mt(t,D,W);ei!==r&&(eo(r),L&&L(e,r,n))},[W,ei,D,L,eo,c,en]),[ec,eu]=(0,f5.A)({controlled:B,default:!1,name:d,state:"open"}),[eh,ed]=u.useState(!0),ep=!D&&null!=en&&ei===W(en),ef=ec&&!$,em=ef?b(z.filter(e=>!(x&&(D?en:[en]).some(t=>null!==t&&I(e,t)))),{inputValue:ep&&eh?"":ei,getOptionLabel:W}):[],eg=(t={filteredOptions:em,value:en,inputValue:ei},n=u.useRef({}),u.useEffect(()=>{n.current=t}),n.current);u.useEffect(()=>{let e=en!==eg.value;es&&!e||(!w||e)&&el(null,en,"reset")},[en,el,es,eg.value,w]);let ev=ec&&em.length>0&&!$,ey=(0,f3.A)(e=>{-1===e?q.current.focus():Y.querySelector(`[data-tag-index="${e}"]`).focus()});u.useEffect(()=>{D&&Q>en.length-1&&(Z(-1),ey(-1))},[en,D,Q,ey]);let eb=(0,f3.A)(({event:e,index:t,reason:n})=>{if(ee.current=t,-1===t?q.current.removeAttribute("aria-activedescendant"):q.current.setAttribute("aria-activedescendant",`${H}-option-${t}`),P&&["mouse","keyboard","touch"].includes(n)&&P(e,-1===t?null:em[t],n),!X.current)return;let r=X.current.querySelector(`[role="option"].${i}-focused`);r&&(r.classList.remove(`${i}-focused`),r.classList.remove(`${i}-focusVisible`));let o=X.current;if("listbox"!==X.current.getAttribute("role")&&(o=X.current.parentElement.querySelector('[role="listbox"]')),!o)return;if(-1===t){o.scrollTop=0;return}let s=X.current.querySelector(`[data-option-index="${t}"]`);if(s&&(s.classList.add(`${i}-focused`),"keyboard"===n&&s.classList.add(`${i}-focusVisible`),o.scrollHeight>o.clientHeight&&"mouse"!==n&&"touch"!==n)){let e=o.clientHeight+o.scrollTop,t=s.offsetTop+s.offsetHeight;t>e?o.scrollTop=t-o.clientHeight:s.offsetTop-s.offsetHeight*(1.3*!!k)<o.scrollTop&&(o.scrollTop=s.offsetTop-s.offsetHeight*(1.3*!!k))}}),ex=(0,f3.A)(({event:e,diff:t,direction:n="next",reason:r})=>{if(!ef)return;let i=function(e,t){if(!X.current||e<0||e>=em.length)return -1;let n=e;for(;;){let r=X.current.querySelector(`[data-option-index="${n}"]`),i=!v&&(!r||r.disabled||"true"===r.getAttribute("aria-disabled"));if(r&&r.hasAttribute("tabindex")&&!i)return n;if((n="next"===t?(n+1)%em.length:(n-1+em.length)%em.length)===e)return -1}}((()=>{let e=em.length-1;if("reset"===t)return J;if("start"===t)return 0;if("end"===t)return e;let n=ee.current+t;return n<0?-1===n&&T?-1:y&&-1!==ee.current||Math.abs(t)>1?0:e:n>e?n===e+1&&T?-1:y||Math.abs(t)>1?e:0:n})(),n);if(eb({index:i,reason:r,event:e}),o&&"reset"!==t)if(-1===i)q.current.value=ei;else{let e=W(em[i]);q.current.value=e,0===e.toLowerCase().indexOf(ei.toLowerCase())&&ei.length>0&&q.current.setSelectionRange(ei.length,e.length)}}),ew=u.useCallback(()=>{if(!ef)return;let e=(()=>{var e;if(-1!==ee.current&&eg.filteredOptions&&eg.filteredOptions.length!==em.length&&eg.inputValue===ei&&(D?en.length===eg.value.length&&eg.value.every((e,t)=>W(en[t])===W(e)):(e=eg.value,(e?W(e):"")===(en?W(en):"")))){let e=eg.filteredOptions[ee.current];if(e)return em.findIndex(t=>W(t)===W(e))}return -1})();if(-1!==e){ee.current=e;return}let t=D?en[0]:en;if(0===em.length||null==t)return void ex({diff:"reset"});if(X.current){if(null!=t){let e=em[ee.current];if(D&&e&&-1!==en.findIndex(t=>I(e,t)))return;let n=em.findIndex(e=>I(e,t));-1===n?ex({diff:"reset"}):eb({index:n});return}if(ee.current>=em.length-1)return void eb({index:em.length-1});eb({index:ee.current})}},[em.length,!D&&en,x,ex,eb,ef,ei,D]),eS=(0,f3.A)(e=>{(0,f4.A)(X,e),e&&ew()});u.useEffect(()=>{ew()},[ew]);let eA=e=>{!ec&&(eu(!0),ed(!0),N&&N(e))},eC=(e,t)=>{ec&&(eu(!1),E&&E(e,t))},ek=(e,t,n,r)=>{if(D){if(en.length===t.length&&en.every((e,n)=>e===t[n]))return}else if(en===t)return;R&&R(e,t,n,r),er(t)},eM=u.useRef(!1),eO=(e,t,n="selectOption",r="options")=>{let i=n,o=t;if(D){let e=(o=Array.isArray(en)?en.slice():[]).findIndex(e=>I(t,e));-1===e?o.push(t):"freeSolo"!==r&&(o.splice(e,1),i="removeOption")}el(e,o,i),ek(e,o,i,{option:t}),m||e&&(e.ctrlKey||e.metaKey)||eC(e,i),(!0===l||"touch"===l&&eM.current||"mouse"===l&&!eM.current)&&q.current.blur()},eT=(e,t)=>{if(!D)return;""===ei&&eC(e,"toggleInput");let n=Q;-1===Q?""===ei&&"previous"===t&&(n=en.length-1):((n+="next"===t?1:-1)<0&&(n=0),n===en.length&&(n=-1)),Z(n=function(e,t){if(-1===e)return -1;let n=e;for(;;){if("next"===t&&n===en.length||"previous"===t&&-1===n)return -1;let e=Y.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t)),ey(n)},e_=e=>{U.current=!0,eo(""),L&&L(e,"","clear"),ek(e,D?[]:null,"clear")},eI=e=>{ea(!0),j&&!U.current&&eA(e)},eD=e=>{r(X)?q.current.focus():(ea(!1),G.current=!0,U.current=!1,a&&-1!==ee.current&&ef?eO(e,em[ee.current],"blur"):a&&w&&""!==ei?eO(e,ei,"blur","freeSolo"):c&&el(e,en,"blur"),eC(e,"blur"))},eR=e=>{let t=e.target.value;ei!==t&&(eo(t),ed(!1),L&&L(e,t,"input")),""===t?f||D||ek(e,null,"clear"):eA(e)},eE=e=>{let t=Number(e.currentTarget.getAttribute("data-option-index"));ee.current!==t&&eb({event:e,index:t,reason:"mouse"})},eP=e=>{eb({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"touch"}),eM.current=!0},eL=e=>{let t=Number(e.currentTarget.getAttribute("data-option-index"));eO(e,em[t],"selectOption"),eM.current=!1},eN=e=>{ec?eC(e,"toggleInput"):eA(e)},eB=e=>{e.currentTarget.contains(e.target)&&e.target.getAttribute("id")!==H&&e.preventDefault()},ej=e=>{e.currentTarget.contains(e.target)&&(q.current.focus(),F&&G.current&&q.current.selectionEnd-q.current.selectionStart==0&&q.current.select(),G.current=!1)},ez=e=>{g||""!==ei&&ec||eN(e)},e$=w&&ei.length>0;e$=e$||(D?en.length>0:null!==en);let eF=em;return k&&(eF=em.reduce((e,t,n)=>{let r=k(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),g&&es&&eD(),{getRootProps:(e={})=>({...e,onKeyDown:t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1===Q||["ArrowLeft","ArrowRight"].includes(t.key)||(Z(-1),ey(-1)),229!==t.which))switch(t.key){case"Home":ef&&M&&(t.preventDefault(),ex({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":ef&&M&&(t.preventDefault(),ex({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),ex({diff:-5,direction:"previous",reason:"keyboard",event:t}),eA(t);break;case"PageDown":t.preventDefault(),ex({diff:5,direction:"next",reason:"keyboard",event:t}),eA(t);break;case"ArrowDown":t.preventDefault(),ex({diff:1,direction:"next",reason:"keyboard",event:t}),eA(t);break;case"ArrowUp":t.preventDefault(),ex({diff:-1,direction:"previous",reason:"keyboard",event:t}),eA(t);break;case"ArrowLeft":eT(t,"previous");break;case"ArrowRight":eT(t,"next");break;case"Enter":if(-1!==ee.current&&ef){let e=em[ee.current],n=!!S&&S(e);if(t.preventDefault(),n)return;eO(t,e,"selectOption"),o&&q.current.setSelectionRange(q.current.value.length,q.current.value.length)}else w&&""!==ei&&!1===ep&&(D&&t.preventDefault(),eO(t,ei,"createOption","freeSolo"));break;case"Escape":ef?(t.preventDefault(),t.stopPropagation(),eC(t,"escape")):h&&(""!==ei||D&&en.length>0)&&(t.preventDefault(),t.stopPropagation(),e_(t));break;case"Backspace":if(D&&!$&&""===ei&&en.length>0){let e=-1===Q?en.length-1:Q,n=en.slice();n.splice(e,1),ek(t,n,"removeOption",{option:en[e]})}break;case"Delete":if(D&&!$&&""===ei&&en.length>0&&-1!==Q){let e=en.slice();e.splice(Q,1),ek(t,e,"removeOption",{option:en[Q]})}}},onMouseDown:eB,onClick:ej}),getInputLabelProps:()=>({id:`${H}-label`,htmlFor:H}),getInputProps:()=>({id:H,value:ei,onBlur:eD,onFocus:eI,onChange:eR,onMouseDown:ez,"aria-activedescendant":ef?"":null,"aria-autocomplete":o?"both":"list","aria-controls":ev?`${H}-listbox`:void 0,"aria-expanded":ev,autoComplete:"off",ref:q,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:g}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:e_}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:eN}),getTagProps:({index:e})=>({key:e,"data-tag-index":e,tabIndex:-1,...!$&&{onDelete:t=>{let n=en.slice();n.splice(e,1),ek(t,n,"removeOption",{option:en[e]})}}}),getListboxProps:()=>({role:"listbox",id:`${H}-listbox`,"aria-labelledby":`${H}-label`,ref:eS,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{let n=(D?en:[en]).some(e=>null!=e&&I(t,e)),r=!!S&&S(t);return{key:A?.(t)??W(t),tabIndex:-1,role:"option",id:`${H}-option-${e}`,onMouseMove:eE,onClick:eL,onTouchStart:eP,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:H,inputValue:ei,value:en,dirty:e$,expanded:ef&&Y,popupOpen:ef,focused:es||-1!==Q,anchorEl:Y,setAnchorEl:K,focusedTag:Q,groupedOptions:eF}};function mr(e){return(0,M.Ay)("MuiListSubheader",e)}(0,k.A)("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);let mi=(0,y.A)("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${(0,A.A)(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})((0,b.A)(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:72}},{props:({ownerState:e})=>!e.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),mo=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiListSubheader"}),{className:r,color:i="default",component:o="li",disableGutters:s=!1,disableSticky:a=!1,inset:c=!1,...u}=n,h={...n,color:i,component:o,disableGutters:s,disableSticky:a,inset:c},p=(e=>{let{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root","default"!==n&&`color${(0,A.A)(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return(0,f.A)(s,mr,t)})(h);return(0,l.jsx)(mi,{as:o,className:(0,d.A)(p.root,r),ref:t,ownerState:h,...u})});mo&&(mo.muiSkipListHighlight=!0);var ms=(0,li.A)((0,l.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function ma(e){return(0,M.Ay)("MuiChip",e)}let ml=(0,k.A)("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),mc=(0,y.A)("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${ml.avatar}`]:t.avatar},{[`& .${ml.avatar}`]:t[`avatar${(0,A.A)(a)}`]},{[`& .${ml.avatar}`]:t[`avatarColor${(0,A.A)(r)}`]},{[`& .${ml.icon}`]:t.icon},{[`& .${ml.icon}`]:t[`icon${(0,A.A)(a)}`]},{[`& .${ml.icon}`]:t[`iconColor${(0,A.A)(i)}`]},{[`& .${ml.deleteIcon}`]:t.deleteIcon},{[`& .${ml.deleteIcon}`]:t[`deleteIcon${(0,A.A)(a)}`]},{[`& .${ml.deleteIcon}`]:t[`deleteIconColor${(0,A.A)(r)}`]},{[`& .${ml.deleteIcon}`]:t[`deleteIcon${(0,A.A)(l)}Color${(0,A.A)(r)}`]},t.root,t[`size${(0,A.A)(a)}`],t[`color${(0,A.A)(r)}`],o&&t.clickable,o&&"default"!==r&&t[`clickableColor${(0,A.A)(r)})`],s&&t.deletable,s&&"default"!==r&&t[`deletableColor${(0,A.A)(r)}`],t[l],t[`${l}${(0,A.A)(r)}`]]}})((0,b.A)(({theme:e})=>{let t="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${ml.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${ml.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${ml.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${ml.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${ml.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${ml.icon}`]:{marginLeft:5,marginRight:-6},[`& .${ml.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:(0,m.X4)(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:(0,m.X4)(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${ml.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${ml.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter((0,C.A)(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText,[`& .${ml.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].contrastTextChannel} / 0.7)`:(0,m.X4)(e.palette[t].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].contrastText}}}})),{props:e=>e.iconColor===e.color,style:{[`& .${ml.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:e=>e.iconColor===e.color&&"default"!==e.color,style:{[`& .${ml.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${ml.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,m.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter((0,C.A)(["dark"])).map(([t])=>({props:{color:t,onDelete:!0},style:{[`&.${ml.focusVisible}`]:{background:(e.vars||e).palette[t].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,m.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${ml.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,m.X4)(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter((0,C.A)(["dark"])).map(([t])=>({props:{color:t,clickable:!0},style:{[`&:hover, &.${ml.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${ml.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${ml.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${ml.avatar}`]:{marginLeft:4},[`& .${ml.avatarSmall}`]:{marginLeft:2},[`& .${ml.icon}`]:{marginLeft:4},[`& .${ml.iconSmall}`]:{marginLeft:2},[`& .${ml.deleteIcon}`]:{marginRight:5},[`& .${ml.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{variant:"outlined",color:t},style:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,m.X4)(e.palette[t].main,.7)}`,[`&.${ml.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.hoverOpacity)},[`&.${ml.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.focusOpacity)},[`& .${ml.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.7)`:(0,m.X4)(e.palette[t].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t].main}}}}))]}})),mu=(0,y.A)("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{let{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${(0,A.A)(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function mh(e){return"Backspace"===e.key||"Delete"===e.key}let md=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiChip"}),{avatar:r,className:i,clickable:o,color:s="default",component:a,deleteIcon:c,disabled:h=!1,icon:p,label:m,onClick:g,onDelete:v,onKeyDown:y,onKeyUp:b,size:S="medium",variant:C="filled",tabIndex:k,skipFocusWhenDisabled:M=!1,...O}=n,T=u.useRef(null),_=(0,ng.A)(T,t),I=e=>{e.stopPropagation(),v&&v(e)},D=!1!==o&&!!g||o,R=D||v?w.A:a||"div",E={...n,component:R,disabled:h,size:S,color:s,iconColor:u.isValidElement(p)&&p.props.color||s,onDelete:!!v,clickable:D,variant:C},P=(e=>{let{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${(0,A.A)(r)}`,`color${(0,A.A)(i)}`,a&&"clickable",a&&`clickableColor${(0,A.A)(i)}`,s&&"deletable",s&&`deletableColor${(0,A.A)(i)}`,`${l}${(0,A.A)(i)}`],label:["label",`label${(0,A.A)(r)}`],avatar:["avatar",`avatar${(0,A.A)(r)}`,`avatarColor${(0,A.A)(i)}`],icon:["icon",`icon${(0,A.A)(r)}`,`iconColor${(0,A.A)(o)}`],deleteIcon:["deleteIcon",`deleteIcon${(0,A.A)(r)}`,`deleteIconColor${(0,A.A)(i)}`,`deleteIcon${(0,A.A)(l)}Color${(0,A.A)(i)}`]};return(0,f.A)(c,ma,t)})(E),L=R===w.A?{component:a||"div",focusVisibleClassName:P.focusVisible,...v&&{disableRipple:!0}}:{},N=null;v&&(N=c&&u.isValidElement(c)?u.cloneElement(c,{className:(0,d.A)(c.props.className,P.deleteIcon),onClick:I}):(0,l.jsx)(ms,{className:(0,d.A)(P.deleteIcon),onClick:I}));let B=null;r&&u.isValidElement(r)&&(B=u.cloneElement(r,{className:(0,d.A)(P.avatar,r.props.className)}));let j=null;return p&&u.isValidElement(p)&&(j=u.cloneElement(p,{className:(0,d.A)(P.icon,p.props.className)})),(0,l.jsxs)(mc,{as:R,className:(0,d.A)(P.root,i),disabled:!!D&&!!h||void 0,onClick:g,onKeyDown:e=>{e.currentTarget===e.target&&mh(e)&&e.preventDefault(),y&&y(e)},onKeyUp:e=>{e.currentTarget===e.target&&v&&mh(e)&&v(e),b&&b(e)},ref:_,tabIndex:M&&h?-1:k,ownerState:E,...L,...O,children:[B||j,(0,l.jsx)(mu,{className:(0,d.A)(P.label),ownerState:E,children:m}),N]})});var mp=n("Lh"),mf=n("FU"),mm=n("RS"),mg=n("yn"),mv=(0,li.A)((0,l.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),my=n("Os");function mb(e){return(0,M.Ay)("MuiAutocomplete",e)}let mx=(0,k.A)("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),mw=(0,y.A)("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:s,size:a}=n;return[{[`& .${mx.tag}`]:t.tag},{[`& .${mx.tag}`]:t[`tagSize${(0,A.A)(a)}`]},{[`& .${mx.inputRoot}`]:t.inputRoot},{[`& .${mx.input}`]:t.input},{[`& .${mx.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${mx.focused} .${mx.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${mx.clearIndicator}`]:{visibility:"visible"}},[`& .${mx.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${mx.inputRoot}`]:{[`.${mx.hasPopupIcon}&, .${mx.hasClearIcon}&`]:{paddingRight:30},[`.${mx.hasPopupIcon}.${mx.hasClearIcon}&`]:{paddingRight:56},[`& .${mx.input}`]:{width:0,minWidth:30}},[`& .${mp.A.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${mp.A.root}.${mf.A.sizeSmall}`]:{[`& .${mp.A.input}`]:{padding:"2px 4px 3px 0"}},[`& .${mm.A.root}`]:{padding:9,[`.${mx.hasPopupIcon}&, .${mx.hasClearIcon}&`]:{paddingRight:39},[`.${mx.hasPopupIcon}.${mx.hasClearIcon}&`]:{paddingRight:65},[`& .${mx.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${mx.endAdornment}`]:{right:9}},[`& .${mm.A.root}.${mf.A.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${mx.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${mg.A.root}`]:{paddingTop:19,paddingLeft:8,[`.${mx.hasPopupIcon}&, .${mx.hasClearIcon}&`]:{paddingRight:39},[`.${mx.hasPopupIcon}.${mx.hasClearIcon}&`]:{paddingRight:65},[`& .${mg.A.input}`]:{padding:"7px 4px"},[`& .${mx.endAdornment}`]:{right:9}},[`& .${mg.A.root}.${mf.A.sizeSmall}`]:{paddingBottom:1,[`& .${mg.A.input}`]:{padding:"2.5px 4px"}},[`& .${mf.A.hiddenLabel}`]:{paddingTop:8},[`& .${mg.A.root}.${mf.A.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${mx.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${mg.A.root}.${mf.A.hiddenLabel}.${mf.A.sizeSmall}`]:{[`& .${mx.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${mx.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${mx.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${mx.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${mx.inputRoot}`]:{flexWrap:"wrap"}}}]}),mS=(0,y.A)("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),mA=(0,y.A)(er,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),mC=(0,y.A)(er,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.popupIndicator,n.popupOpen&&t.popupIndicatorOpen]}})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),mk=(0,y.A)(hd,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${mx.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((0,b.A)(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),mM=(0,y.A)(dd.A,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((0,b.A)(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),mO=(0,y.A)("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((0,b.A)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),mT=(0,y.A)("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((0,b.A)(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),m_=(0,y.A)("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((0,b.A)(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${mx.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${mx.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${mx.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${mx.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${mx.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,m.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),mI=(0,y.A)(mo,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((0,b.A)(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),mD=(0,y.A)("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${mx.option}`]:{paddingLeft:24}}),mR=u.forwardRef(function(e,t){let n,r=(0,x.b)({props:e,name:"MuiAutocomplete"}),{autoComplete:i=!1,autoHighlight:o=!1,autoSelect:s=!1,blurOnSelect:a=!1,ChipProps:c,className:h,clearIcon:p=XX||(XX=(0,l.jsx)(mv,{fontSize:"small"})),clearOnBlur:m=!r.freeSolo,clearOnEscape:g=!1,clearText:v="Clear",closeText:y="Close",componentsProps:b,defaultValue:w=r.multiple?[]:null,disableClearable:S=!1,disableCloseOnSelect:C=!1,disabled:k=!1,disabledItemsFocusable:M=!1,disableListWrap:O=!1,disablePortal:T=!1,filterOptions:_,filterSelectedOptions:I=!1,forcePopupIcon:D="auto",freeSolo:R=!1,fullWidth:E=!1,getLimitTagsText:P=e=>`+${e}`,getOptionDisabled:L,getOptionKey:N,getOptionLabel:B,isOptionEqualToValue:j,groupBy:z,handleHomeEndKeys:$=!r.freeSolo,id:F,includeInputInList:V=!1,inputValue:H,limitTags:W=-1,ListboxComponent:U,ListboxProps:G,loading:q=!1,loadingText:X="Loading…",multiple:Y=!1,noOptionsText:K="No options",onChange:Q,onClose:Z,onHighlightChange:J,onInputChange:ee,onOpen:et,open:en,openOnFocus:er=!1,openText:ei="Open",options:eo,PaperComponent:es,PopperComponent:ea,popupIcon:el=XY||(XY=(0,l.jsx)(my.A,{})),readOnly:ec=!1,renderGroup:eu,renderInput:eh,renderOption:ed,renderTags:ep,selectOnFocus:ef=!r.freeSolo,size:em="medium",slots:eg={},slotProps:ev={},value:ey,...eb}=r,{getRootProps:ex,getInputProps:ew,getInputLabelProps:eS,getPopupIndicatorProps:eA,getClearProps:eC,getTagProps:ek,getListboxProps:eM,getOptionProps:eO,value:eT,dirty:e_,expanded:eI,id:eD,popupOpen:eR,focused:eE,focusedTag:eP,anchorEl:eL,setAnchorEl:eN,inputValue:eB,groupedOptions:ej}=mn({...r,componentName:"Autocomplete"}),ez=!S&&!k&&e_&&!ec,e$=(!R||!0===D)&&!1!==D,{onMouseDown:eF}=ew(),{ref:eV,...eH}=eM(),eW=B||(e=>e.label??e),eU={...r,disablePortal:T,expanded:eI,focused:eE,fullWidth:E,getOptionLabel:eW,hasClearIcon:ez,hasPopupIcon:e$,inputFocused:-1===eP,popupOpen:eR,size:em},eG=(e=>{let{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:c,size:u}=e,h={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${(0,A.A)(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return(0,f.A)(h,mb,t)})(eU),eq={slots:{paper:es,popper:ea,...eg},slotProps:{chip:c,listbox:G,...b,...ev}},[eX,eY]=(0,nd.A)("listbox",{elementType:m_,externalForwardedProps:eq,ownerState:eU,className:eG.listbox,additionalProps:eH,ref:eV}),[eK,eQ]=(0,nd.A)("paper",{elementType:dd.A,externalForwardedProps:eq,ownerState:eU,className:eG.paper}),[eZ,eJ]=(0,nd.A)("popper",{elementType:hd,externalForwardedProps:eq,ownerState:eU,className:eG.popper,additionalProps:{disablePortal:T,style:{width:eL?eL.clientWidth:null},role:"presentation",anchorEl:eL,open:eR}});if(Y&&eT.length>0){let e=e=>({className:eG.tag,disabled:k,...ek(e)});n=ep?ep(eT,e,eU):eT.map((t,n)=>{let{key:r,...i}=e({index:n});return(0,l.jsx)(md,{label:eW(t),size:em,...i,...eq.slotProps.chip},r)})}if(W>-1&&Array.isArray(n)){let e=n.length-W;!eE&&e>0&&(n=n.splice(0,W)).push((0,l.jsx)("span",{className:eG.tag,children:P(e)},n.length))}let e0=eu||(e=>(0,l.jsxs)("li",{children:[(0,l.jsx)(mI,{className:eG.groupLabel,ownerState:eU,component:"div",children:e.group}),(0,l.jsx)(mD,{className:eG.groupUl,ownerState:eU,children:e.children})]},e.key)),e1=ed||((e,t)=>{let{key:n,...r}=e;return(0,l.jsx)("li",{...r,children:eW(t)},n)}),e2=(e,t)=>{let n=eO({option:e,index:t});return e1({...n,className:eG.option},e,{selected:n["aria-selected"],index:t,inputValue:eB},eU)},e5=eq.slotProps.clearIndicator,e3=eq.slotProps.popupIndicator;return(0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)(mw,{ref:t,className:(0,d.A)(eG.root,h),ownerState:eU,...ex(eb),children:eh({id:eD,disabled:k,fullWidth:!0,size:"small"===em?"small":void 0,InputLabelProps:eS(),InputProps:{ref:eN,className:eG.inputRoot,startAdornment:n,onMouseDown:e=>{e.target===e.currentTarget&&eF(e)},...(ez||e$)&&{endAdornment:(0,l.jsxs)(mS,{className:eG.endAdornment,ownerState:eU,children:[ez?(0,l.jsx)(mA,{...eC(),"aria-label":v,title:v,ownerState:eU,...e5,className:(0,d.A)(eG.clearIndicator,e5?.className),children:p}):null,e$?(0,l.jsx)(mC,{...eA(),disabled:k,"aria-label":eR?y:ei,title:eR?y:ei,ownerState:eU,...e3,className:(0,d.A)(eG.popupIndicator,e3?.className),children:el}):null]})}},inputProps:{className:eG.input,disabled:k,readOnly:ec,...ew()}})}),eL?(0,l.jsx)(mk,{as:eZ,...eJ,children:(0,l.jsxs)(mM,{as:eK,...eQ,children:[q&&0===ej.length?(0,l.jsx)(mO,{className:eG.loading,ownerState:eU,children:X}):null,0!==ej.length||R||q?null:(0,l.jsx)(mT,{className:eG.noOptions,ownerState:eU,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:K}),ej.length>0?(0,l.jsx)(eX,{as:U,...eY,children:ej.map((e,t)=>z?e0({key:e.key,group:e.group,children:e.options.map((t,n)=>e2(t,e.index+n))}):e2(e,t))}):null]})}):null]})});function mE(e){return(0,l.jsx)(ex.A,{...e})}function mP(e){let t,n,r,i,o,s,a,u,h,d=(0,c.c)(16);d[0]!==e?({options:r,renderInput:o,id:n,"aria-labelledby":t,...i}=e,d[0]=e,d[1]=t,d[2]=n,d[3]=r,d[4]=i,d[5]=o):(t=d[1],n=d[2],r=d[3],i=d[4],o=d[5]);let p=void 0===o?mE:o,f=mj;d[6]!==t||d[7]!==n||d[8]!==p?(s=e=>p({...e,inputProps:{...e.inputProps,id:n,"aria-labelledby":t}}),d[6]=t,d[7]=n,d[8]=p,d[9]=s):s=d[9];let m=s;return d[10]===Symbol.for("react.memo_cache_sentinel")?(a=(e,t)=>{let{key:n,...r}=e;return(0,l.jsx)("li",{...r,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(nc.A,{variant:"body1",component:"div",children:f(t)}),t.description&&(0,l.jsx)(nc.A,{variant:"body2",component:"div",sx:{color:mL},children:t.description})]})},n)},d[10]=a):a=d[10],d[11]===Symbol.for("react.memo_cache_sentinel")?(u=f9({stringify:e=>`${f(e)} ${e.description||""}`}),d[11]=u):u=d[11],d[12]!==m||d[13]!==r||d[14]!==i?(h=(0,l.jsx)(mR,{isOptionEqualToValue:mB,getOptionDisabled:mN,getOptionLabel:f,options:r,renderInput:m,renderOption:a,filterOptions:u,...i}),d[12]=m,d[13]=r,d[14]=i,d[15]=h):h=d[15],h}function mL(e){return e.palette.text.secondary}function mN(e){return!!e.disabled}function mB(e,t){return e.id===t.id}function mj(e){return e.label??e.id}let mz=[{id:"compact",label:"Compact"},{id:"standard",label:"Standard"},{id:"comfortable",label:"Comfortable"}];function m$(e){let t,n,r,i=(0,c.c)(7),{onChange:o,value:s}=e,a=void 0===s?"standard":s;i[0]!==o?(t=(e,t)=>{let{id:n}=t;o(n)},i[0]=o,i[1]=t):t=i[1];let u=t;return i[2]!==a?(n=mz.find(e=>e.id===a),i[2]=a,i[3]=n):n=i[3],i[4]!==u||i[5]!==n?(r=(0,l.jsx)(f0,{label:"Density",control:(0,l.jsx)(mP,{value:n,options:mz,getOptionLabel:mF,onChange:u,disableClearable:!0})}),i[4]=u,i[5]=n,i[6]=r):r=i[6],r}function mF(e){return e.label}function mV(){let e,t,n=(0,c.c)(2);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,l.jsx)(e7.A,{sx:{content:'""',width:8,height:8,boxSizing:"border-box",position:"absolute",backgroundColor:mU,border:mW,borderRadius:"50%"}}),n[0]=e):e=n[0],n[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,l.jsxs)(eb,{direction:"row",alignItems:"center",children:[e,(0,l.jsx)(e7.A,{sx:{content:'""',height:2,background:mH,width:"100%"}})]}),n[1]=t):t=n[1],t}function mH(e){return e.palette.info.main}function mW(e){return`2px solid ${e.palette.info.main}`}function mU(e){return e.palette.background.default}function mG(e){return(mG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mq(e,t,n){var r;return(r=function(e,t){if("object"!=mG(e)||!e)return e;if("u">typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var n,r=n.call(e,t||"default");if("object"!=mG(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==mG(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mX(Object(n),!0).forEach(function(t){mq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var mK={top:function(e,t){return Math.abs(t.y-e.top)},right:function(e,t){return Math.abs(e.right-t.x)},bottom:function(e,t){return Math.abs(e.bottom-t.y)},left:function(e,t){return Math.abs(t.x-e.left)}},mQ=Symbol("closestEdge");function mZ(e){var t;return null!=(t=e[mQ])?t:null}function mJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m0(e,t){if(e){if("string"==typeof e)return mJ(e,t);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mJ(e,t):void 0}}function m1(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||m0(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m2(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){t.forEach(function(e){return e()})}}var m5=n("sK"),m3="data-pdnd-honey-pot";function m4(e){return e instanceof Element&&e.hasAttribute(m3)}function m6(e){var t=m1(document.elementsFromPoint(e.x,e.y),2),n=t[0],r=t[1];return n?m4(n)?null!=r?r:null:n:null}var m9={inset:"unset",border:"none",padding:0,margin:0,overflow:"visible",color:"inherit",background:"transparent"};function m8(e){var t=null;return function(){if(!t){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t={result:e.apply(this,r)}}return t.result}}var m7=m8(function(){return"u">typeof HTMLElement&&"function"==typeof HTMLElement.prototype.showPopover});function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach(function(t){mq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gn(e){var t,n,r,i,o={x:Math.min((i={x:Math.max((r={x:(n={x:Math.floor((t=e.client).x),y:Math.floor(t.y)}).x-1,y:n.y-1}).x,0),y:Math.max(r.y,0)}).x,window.innerWidth-2),y:Math.min(i.y,window.innerHeight-2)};return DOMRect.fromRect({x:o.x,y:o.y,width:2,height:2})}function gr(e){var t=e.clientRect;return{left:"".concat(t.left,"px"),top:"".concat(t.top,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")}}function gi(e){return function(e){if(Array.isArray(e))return mJ(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m0(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var go=m8(function(){return navigator.userAgent.includes("Firefox")}),gs=m8(function(){var e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}),ga={isLeavingWindow:Symbol("leaving"),isEnteringWindow:Symbol("entering")};if(!("u"<typeof window)&&gs()){var gl=gc();(0,m5.vJ)(window,[{type:"dragstart",listener:function(){gl.enterCount=0,gl.isOverWindow=!0}},{type:"drop",listener:gu},{type:"dragend",listener:gu},{type:"dragenter",listener:function(e){gl.isOverWindow||0!==gl.enterCount||(e[ga.isEnteringWindow]=!0),gl.isOverWindow=!0,gl.enterCount++}},{type:"dragleave",listener:function(e){gl.enterCount--,gl.isOverWindow&&0===gl.enterCount&&(e[ga.isLeavingWindow]=!0,gl.isOverWindow=!1)}}],{capture:!0})}function gc(){return{enterCount:0,isOverWindow:!1}}function gu(){gl=gc()}function gh(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY}}var gd=(Xk=function(e){return e()},XM=[],XO=null,(XT=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];XM=t,XO||(XO=requestAnimationFrame(function(){XO=null,Xk.apply(void 0,XM)}))}).cancel=function(){XO&&(cancelAnimationFrame(XO),XO=null)},XT),gp=(X_=null,{schedule:function(e){X_={frameId:requestAnimationFrame(function(){X_=null,e()}),fn:e}},flush:function(){X_&&(cancelAnimationFrame(X_.frameId),X_.fn(),X_=null)}}),gf={isActive:!1};function gm(){return!gf.isActive}function gg(e){var t,n=e.event,r=null==(t=e.current[0])?void 0:t.dropEffect;null!=r&&n.dataTransfer&&(n.dataTransfer.dropEffect=r)}var gv=function(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=e.dispatchEvent;if(gm()){var o,s,a=function(e){var t=e.event,n=e.dragType,r=e.getDropTargetsOver,i=gh(t);if("external"===n.startedFrom)return{input:i,dropTargets:[]};var o=r({input:i,source:n.payload,target:t.target,current:[]});return{input:i,dropTargets:o}}({event:t,dragType:n,getDropTargetsOver:r});gf.isActive=!0;var l={current:a};gg({event:t,current:a.dropTargets});var c=function(e){var t=e.source,n=e.initial,r=e.dispatchEvent,i={dropTargets:[]};function o(e){r(e),i={dropTargets:e.payload.location.current.dropTargets}}return{start:function(e){var r=e.nativeSetDragImage,s={current:n,previous:i,initial:n};o({eventName:"onGenerateDragPreview",payload:{source:t,location:s,nativeSetDragImage:r}}),gp.schedule(function(){o({eventName:"onDragStart",payload:{source:t,location:s}})})},dragUpdate:function(e){var r=e.current;gp.flush(),gd.cancel(),o({eventName:"onDropTargetChange",payload:{source:t,location:{initial:n,previous:i,current:r}}})},drag:function(e){var r=e.current;gd(function(){gp.flush(),o({eventName:"onDrag",payload:{source:t,location:{initial:n,previous:i,current:r}}})})},drop:function(e){var r=e.current,s=e.updatedSourcePayload;gp.flush(),gd.cancel(),o({eventName:"onDrop",payload:{source:null!=s?s:t,location:{current:r,previous:i,initial:n}}})}}}({source:n.payload,dispatchEvent:i,initial:a}),u=(0,m5.vJ)(window,[{type:"dragover",listener:function(e){d(e),c.drag({current:l.current})}},{type:"dragenter",listener:d},{type:"dragleave",listener:function(e){(function(e){var t=e.dragLeave,n=t.type,r=t.relatedTarget;return"dragleave"===n&&(gs()?!!gs()&&t.hasOwnProperty(ga.isLeavingWindow):null==r||(go()?"nodeName"in r&&r.ownerDocument!==document:r instanceof HTMLIFrameElement))})({dragLeave:e})&&(h({input:l.current.input,dropTargets:[]}),"external"===n.startedFrom&&p())}},{type:"drop",listener:function(e){(l.current={dropTargets:l.current.dropTargets,input:gh(e)},l.current.dropTargets.length)?(e.preventDefault(),gg({event:e,current:l.current.dropTargets}),c.drop({current:l.current,updatedSourcePayload:"external"===n.type?n.getDropPayload(e):null}),f()):p()}},{type:"dragend",listener:function(e){l.current={dropTargets:l.current.dropTargets,input:gh(e)},p()}}].concat(gi([{type:"pointermove",listener:(s=0,function(){s<20?s++:o()})},{type:"pointerdown",listener:o=p}])),{capture:!0});c.start({nativeSetDragImage:t.dataTransfer?t.dataTransfer.setDragImage.bind(t.dataTransfer):null})}function h(e){var t=function(e){var t=e.current,n=e.next;if(t.length!==n.length)return!0;for(var r=0;r<t.length;r++)if(t[r].element!==n[r].element)return!0;return!1}({current:l.current.dropTargets,next:e.dropTargets});l.current=e,t&&c.dragUpdate({current:l.current})}function d(e){var t=gh(e),i=r({target:m4(e.target)?m6({x:t.clientX,y:t.clientY}):e.target,input:t,source:n.payload,current:l.current.dropTargets});i.length&&(e.preventDefault(),gg({event:e,current:i})),h({dropTargets:i,input:t})}function p(){l.current.dropTargets.length&&h({dropTargets:[],input:l.current.input}),c.drop({current:l.current,updatedSourcePayload:null}),f()}function f(){gf.isActive=!1,u()}},gy=new Map;function gb(e,t){var n=t.attribute,r=t.value;return e.setAttribute(n,r),function(){return e.removeAttribute(n)}}function gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gx(Object(n),!0).forEach(function(t){mq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gS(e,t){var n="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return gA(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gA(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function gA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gC(e){return e.slice(0).reverse()}function gk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var gO=m8(function(){return navigator.userAgent.toLocaleLowerCase().includes("android")}),gT="text/plain",g_=new WeakMap,gI=(XI=null,{bindEvents:function(){return XI=null,(0,m5.oI)(window,{type:"pointermove",listener:function(e){XI={x:e.clientX,y:e.clientY}},options:{capture:!0}})},getOnPostDispatch:function(){var e=null;return function(t){var n=t.eventName,r=t.payload;if("onDragStart"===n){var i,o,s,a=r.location.initial.input,l=null!=XI?XI:{x:a.clientX,y:a.clientY};(i=document.createElement("div")).setAttribute(m3,"true"),m7()&&i.setAttribute("popover","manual"),o=gn({client:l}),Object.assign(i.style,gt(gt({position:"fixed"},m7()?m9:{zIndex:0x7fffffff}),{},{backgroundColor:"transparent",padding:0,margin:0,boxSizing:"border-box",pointerEvents:"auto"},gr({clientRect:o}))),document.body.appendChild(i),m7()&&i.showPopover(),s=(0,m5.oI)(window,{type:"pointermove",listener:function(e){o=gn({client:{x:e.clientX,y:e.clientY}}),Object.assign(i.style,gr({clientRect:o}))},options:{capture:!0}}),e=function(e){var t,n,r,a=e.current;if(s(),n=(t={client:a,clientRect:o}).client,r=t.clientRect,n.x>=r.x&&n.x<=r.x+r.width&&n.y>=r.y&&n.y<=r.y+r.height)return void i.remove();function l(){c(),i.remove()}var c=(0,m5.vJ)(window,[{type:"pointerdown",listener:l},{type:"pointermove",listener:l},{type:"focusin",listener:l},{type:"focusout",listener:l},{type:"dragstart",listener:l},{type:"dragenter",listener:l},{type:"dragover",listener:l}],{capture:!0})}}if("onDrop"===n){var c,u=r.location.current.input;null==(c=e)||c({current:{x:u.clientX,y:u.clientY}}),e=null,XI=null}}}}),gD=function(e){var t=e.typeKey,n=e.mount,r=e.dispatchEventToSource,i=e.onPostDispatch,o=e.defaultDropEffect,s=function(){var e=new Set,t=null;function n(e){t&&(!e.canMonitor||e.canMonitor(t.canMonitorArgs))&&t.active.add(e)}return{dispatchEvent:function(r){var i=r.eventName,o=r.payload;if("onGenerateDragPreview"===i){t={canMonitorArgs:{initial:o.location.initial,source:o.source},active:new Set};var s,a=function(e){var t="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e){if(e){if("string"==typeof e)return gk(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?gk(e,void 0):void 0}}(e))){t&&(e=t);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==t.return||t.return()}finally{if(s)throw i}}}}(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;n(l)}}catch(e){a.e(e)}finally{a.f()}}if(t){for(var c=Array.from(t.active),u=0;u<c.length;u++){var h,d=c[u];t.active.has(d)&&(null==(h=d[i])||h.call(d,o))}"onDrop"===i&&(t.active.clear(),t=null)}},monitorForConsumers:function(r){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gM(Object(n),!0).forEach(function(t){mq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},r);return e.add(i),n(i),m8(function(){e.delete(i),t&&t.active.delete(i)})}}}(),a=function(e){var t=e.typeKey,n=e.defaultDropEffect,r=new WeakMap,i="data-drop-target-for-".concat(t),o="[".concat(i,"]");function s(e){var t,n=e.eventName,i=e.payload,o=gS(i.location.current.dropTargets);try{for(o.s();!(t=o.n()).done;){var s,a=t.value,l=r.get(a.element),c=gw(gw({},i),{},{self:a});null==l||null==(s=l[n])||s.call(l,c)}}catch(e){o.e(e)}finally{o.f()}}var a={onGenerateDragPreview:s,onDrag:s,onDragStart:s,onDrop:s,onDropTargetChange:function(e){var t,n=e.payload,i=new Set(n.location.current.dropTargets.map(function(e){return e.element})),o=new Set,s=gS(n.location.previous.dropTargets);try{for(s.s();!(t=s.n()).done;){var a,l,c=t.value;o.add(c.element);var u=r.get(c.element),h=i.has(c.element),d=gw(gw({},n),{},{self:c});null==u||null==(a=u.onDropTargetChange)||a.call(u,d),h||null==u||null==(l=u.onDragLeave)||l.call(u,d)}}catch(e){s.e(e)}finally{s.f()}var p,f=gS(n.location.current.dropTargets);try{for(f.s();!(p=f.n()).done;){var m,g,v=p.value;if(!o.has(v.element)){var y=gw(gw({},n),{},{self:v}),b=r.get(v.element);null==b||null==(m=b.onDropTargetChange)||m.call(b,y),null==b||null==(g=b.onDragEnter)||g.call(b,y)}}}catch(e){f.e(e)}finally{f.f()}}};return{dropTargetForConsumers:function(e){return m8(m2(gb(e.element,{attribute:i,value:"true"}),(r.set(e.element,e),function(){return r.delete(e.element)})))},getIsOver:function(e){var t=e.source,i=e.target,s=e.input,a=e.current,l=function e(t){var i,s,a,l,c=t.source,u=t.target,h=t.input,d=t.result,p=void 0===d?[]:d;if(null==u)return p;if(!(u instanceof Element))return u instanceof Node?e({source:c,target:u.parentElement,input:h,result:p}):p;var f=u.closest(o);if(null==f)return p;var m=r.get(f);if(null==m)return p;var g={input:h,source:c,element:m.element};if(m.canDrop&&!m.canDrop(g))return e({source:c,target:m.element.parentElement,input:h,result:p});var v=null!=(i=null==(s=m.getData)?void 0:s.call(m,g))?i:{},y=null!=(a=null==(l=m.getDropEffect)?void 0:l.call(m,g))?a:n,b={data:v,element:m.element,dropEffect:y,isActiveDueToStickiness:!1};return e({source:c,target:m.element.parentElement,input:h,result:[].concat(gi(p),[b])})}({source:t,target:i,input:s});if(l.length>=a.length)return l;for(var c=gC(a),u=gC(l),h=[],d=0;d<c.length;d++){var p,f=c[d],m=u[d];if(null!=m){h.push(m);continue}var g=h[d-1],v=c[d-1];if((null==g?void 0:g.element)!==(null==v?void 0:v.element))break;var y=r.get(f.element);if(!y)break;var b={input:s,source:t,element:y.element};if(y.canDrop&&!y.canDrop(b)||!(null!=(p=y.getIsSticky)&&p.call(y,b)))break;h.push(gw(gw({},f),{},{isActiveDueToStickiness:!0}))}return gC(h)},dispatchEvent:function(e){a[e.eventName](e)}}}({typeKey:t,defaultDropEffect:o});function l(e){null==r||r(e),a.dispatchEvent(e),s.dispatchEvent(e),null==i||i(e)}function c(e){gv({event:e.event,dragType:e.dragType,getDropTargetsOver:a.getIsOver,dispatchEvent:l})}return{registerUsage:function(){var e,r;return r=function(e){var t=e.typeKey,n=e.mount,r=gy.get(t);if(r)return r.usageCount++,r;var i={typeKey:t,unmount:n(),usageCount:1};return gy.set(t,i),i}(e={typeKey:t,mount:function(){return n({canStart:gm,start:c})}}),function(){r.usageCount--,r.usageCount>0||(r.unmount(),gy.delete(e.typeKey))}},dropTarget:a.dropTargetForConsumers,monitor:s.monitorForConsumers}}({typeKey:"element",defaultDropEffect:"move",mount:function(e){return m2(gI.bindEvents(),(0,m5.oI)(document,{type:"dragstart",listener:function(t){if(e.canStart(t)&&!t.defaultPrevented&&t.dataTransfer){var n,r,i,o,s,a,l=t.target;if(l instanceof HTMLElement){var c=g_.get(l);if(c){var u=gh(t),h={element:c.element,dragHandle:null!=(n=c.dragHandle)?n:null,input:u};if(c.canDrag&&!c.canDrag(h))return void t.preventDefault();if(c.dragHandle){var d=m6({x:u.clientX,y:u.clientY});if(!c.dragHandle.contains(d))return void t.preventDefault()}var p=null!=(r=null==(i=c.getInitialDataForExternal)?void 0:i.call(c,h))?r:null;if(p)for(var f=0,m=Object.entries(p);f<m.length;f++){var g=m1(m[f],2),v=g[0],y=g[1];t.dataTransfer.setData(v,null!=y?y:"")}!gO()||t.dataTransfer.types.includes(gT)||t.dataTransfer.types.includes("text/uri-list")||t.dataTransfer.setData(gT,"pdnd:android-fallback"),t.dataTransfer.setData("application/vnd.pdnd","");var b={element:c.element,dragHandle:null!=(o=c.dragHandle)?o:null,data:null!=(s=null==(a=c.getInitialData)?void 0:a.call(c,h))?s:{}};e.start({event:t,dragType:{type:"element",payload:b,startedFrom:"internal"}})}}}}}))},dispatchEventToSource:function(e){var t,n,r=e.eventName,i=e.payload;null==(t=g_.get(i.source.element))||null==(n=t[r])||n.call(t,i)},onPostDispatch:gI.getOnPostDispatch()}),gR=gD.dropTarget,gE=gD.monitor;let gP={type:"idle"};function gL(e){let t,n,r=(0,c.c)(6),{elements:i,accessKey:o,axis:s,onChange:a}=e,l=void 0===s?"vertical":s;return r[0]!==o||r[1]!==l||r[2]!==i||r[3]!==a?(t=()=>gE({onDrop(e){var t,n;let{location:r,source:s}=e,c=r.current.dropTargets[0];if(!c)return;let u=s.data,h=c.data,d=i.findIndex(e=>e[o]===u[o]),p=i.findIndex(e=>e[o]===h[o]);p<0||d<0||a(function(e){var t=e.list,n=e.startIndex,r=e.finishIndex;if(-1===n||-1===r)return Array.from(t);var i=Array.from(t),o=m1(i.splice(n,1),1)[0];return i.splice(r,0,o),i}({list:(t={list:i,startIndex:d,indexOfTarget:p,closestEdgeOfTarget:mZ(h),axis:l}).list,startIndex:n=t.startIndex,finishIndex:function(e){var t=e.startIndex,n=e.closestEdgeOfTarget,r=e.indexOfTarget,i=e.axis;if(-1===t||-1===r||t===r)return t;if(null==n)return r;var o="vertical"===i&&"bottom"===n||"horizontal"===i&&"right"===n;return t<r?o?r:r-1:o?r+1:r}({closestEdgeOfTarget:t.closestEdgeOfTarget,startIndex:n,indexOfTarget:t.indexOfTarget,axis:t.axis})}))}}),n=[o,l,i,a],r[0]=o,r[1]=l,r[2]=i,r[3]=a,r[4]=t,r[5]=n):(t=r[4],n=r[5]),(0,u.useEffect)(t,n)}function gN(e){let t,n,r,i,o,s,a=(0,c.c)(17),{children:h,data:d,dragHandleRef:p}=e,f=(0,u.useRef)(null),[m,g]=(0,u.useState)(gP);a[0]!==d||a[1]!==p?(t=()=>{let e=f.current;if(e){var t;return m2((t={element:e,dragHandle:p?.current??void 0,getInitialData:()=>d,onDragStart(){g({type:"is-dragging"})},onDrop(){g(gP)}},m8(m2(gD.registerUsage(),(g_.set(t.element,t),function(){g_.delete(t.element)}),gb(t.element,{attribute:"draggable",value:"true"})))),gR({element:e,canDrop(t){let{source:n}=t;return n.element!==e},getData(t){var n,r,i,o,s,a,l,c,u;let{input:h}=t;return o=(n={element:e,input:h,allowedEdges:["top","bottom"]}).element,s=n.input,a=n.allowedEdges,l={x:s.clientX,y:s.clientY},c=o.getBoundingClientRect(),u=null!=(r=null==(i=a.map(function(e){return{edge:e,value:mK[e](c,l)}}).sort(function(e,t){return e.value-t.value})[0])?void 0:i.edge)?r:null,mY(mY({},d),{},mq({},mQ,u))},getIsSticky:()=>!0,onDragEnter(e){let{self:t}=e;g({type:"is-dragging-over",closestEdge:mZ(t.data)})},onDrag(e){let{self:t}=e,n=mZ(t.data);g(e=>"is-dragging-over"===e.type&&e.closestEdge===n?e:{type:"is-dragging-over",closestEdge:n})},onDragLeave(){g(gP)},onDrop(){g(gP)}}))}},n=[d,p],a[0]=d,a[1]=p,a[2]=t,a[3]=n):(t=a[2],n=a[3]),(0,u.useEffect)(t,n);let v="is-dragging"===m.type?.5:"unset";return a[4]!==v?(r={opacity:v},a[4]=v,a[5]=r):r=a[5],a[6]!==m.closestEdge||a[7]!==m.type?(i="is-dragging-over"===m.type&&"top"===m.closestEdge?(0,l.jsx)(mV,{}):null,a[6]=m.closestEdge,a[7]=m.type,a[8]=i):i=a[8],a[9]!==m.closestEdge||a[10]!==m.type?(o="is-dragging-over"===m.type&&"bottom"===m.closestEdge?(0,l.jsx)(mV,{}):null,a[9]=m.closestEdge,a[10]=m.type,a[11]=o):o=a[11],a[12]!==h||a[13]!==r||a[14]!==i||a[15]!==o?(s=(0,l.jsxs)(eb,{ref:f,spacing:1,style:r,children:[i,h,o]}),a[12]=h,a[13]=r,a[14]=i,a[15]=o,a[16]=s):s=a[16],s}var gB=n("Vp");function gj(e,t){let n=t.indexOf(e);if(0===n)return t;let r=[...t];return r.splice(n,1),r.splice(n-1,0,e),r}function gz(e,t){let n=t.indexOf(e);if(n===t.length-1)return t;let r=[...t];return r.splice(n,1),r.splice(n+1,0,e),r}let g$=(0,u.forwardRef)(function(e,t){let n,r,i,o,s,a,h,d,p,f,m,g,v=(0,c.c)(25);v[0]!==e?({onMoveUp:s,onMoveDown:r,onMoveLeft:i,onMoveRight:o,menuSx:n,...a}=e,v[0]=e,v[1]=n,v[2]=r,v[3]=i,v[4]=o,v[5]=s,v[6]=a):(n=v[1],r=v[2],i=v[3],o=v[4],s=v[5],a=v[6]);let[y,b]=(0,u.useState)(null),x=!!y;v[7]===Symbol.for("react.memo_cache_sentinel")?(h=function(e){b(e.currentTarget)},v[7]=h):h=v[7];let w=h;v[8]===Symbol.for("react.memo_cache_sentinel")?(d=function(e){b(null),e?.()},v[8]=d):d=v[8];let S=d;return v[9]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(gB,{}),v[9]=p):p=v[9],v[10]!==x||v[11]!==a||v[12]!==t?(f=(0,l.jsx)(er,{...a,ref:t,"aria-label":"move","aria-haspopup":!0,"aria-expanded":x,size:"small",onClick:w,children:p}),v[10]=x,v[11]=a,v[12]=t,v[13]=f):f=v[13],v[14]!==y||v[15]!==n||v[16]!==r||v[17]!==i||v[18]!==o||v[19]!==s||v[20]!==x?(m=(s||r||i||o)&&(0,l.jsxs)(hk.A,{id:"drag-button-menu",MenuListProps:{"aria-labelledby":"drag-button-menu"},anchorEl:y,open:x,onClose:()=>S(void 0),sx:n,children:[s&&(0,l.jsx)(lA.A,{onClick:()=>S(s),children:"Move Up"}),r&&(0,l.jsx)(lA.A,{onClick:()=>S(r),children:"Move Down"}),i&&(0,l.jsx)(lA.A,{onClick:()=>S(i),children:"Move Left"}),o&&(0,l.jsx)(lA.A,{onClick:()=>S(o),children:"Move Right"}),o&&(0,l.jsx)(lA.A,{onClick:()=>S(o),children:"Move Right"})]}),v[14]=y,v[15]=n,v[16]=r,v[17]=i,v[18]=o,v[19]=s,v[20]=x,v[21]=m):m=v[21],v[22]!==f||v[23]!==m?(g=(0,l.jsxs)(l.Fragment,{children:[f,m]}),v[22]=f,v[23]=m,v[24]=g):g=v[24],g});var gF=n("l");let gV={...h}.useSyncExternalStore;function gH(e={}){let{themeId:t}=e;return function(e,n={}){let r=(0,gF.A)();r&&t&&(r=r[t]||r);let i="u">typeof window&&void 0!==window.matchMedia,{defaultMatches:o=!1,matchMedia:s=i?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:l=!1}=ea({name:"MuiUseMediaQuery",props:n,theme:r}),c="function"==typeof e?e(r):e;return(c=c.replace(/^@media( ?)/m,"")).includes("print")&&console.warn("MUI: You have provided a `print` query to the `useMediaQuery` hook.\nUsing the print media query to modify print styles can lead to unexpected results.\nConsider using the `displayPrint` field in the `sx` prop instead.\nMore information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."),(void 0!==gV?function(e,t,n,r,i){let o=u.useCallback(()=>t,[t]),s=u.useMemo(()=>{if(i&&n)return()=>n(e).matches;if(null!==r){let{matches:t}=r(e);return()=>t}return o},[o,e,r,i,n]),[a,l]=u.useMemo(()=>{if(null===n)return[o,()=>()=>{}];let t=n(e);return[()=>t.matches,e=>(t.addEventListener("change",e),()=>{t.removeEventListener("change",e)})]},[o,n,e]);return gV(l,a,s)}:function(e,t,n,r,i){let[o,s]=u.useState(()=>i&&n?n(e).matches:r?r(e).matches:t);return(0,uu.A)(()=>{if(!n)return;let t=n(e),r=()=>{s(t.matches)};return r(),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e,n]),o})(c,o,s,a,l)}}gH();var gW=n("Bi");let gU=gH({themeId:gW.A});var gG=n("nX"),gq=n("cH"),gX=n("qr"),gY=n("Rd");function gK(e,t,n){let r=function(e,t,n){let r,i=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=(0,gY.A)(t);if(t.fakeTransform)r=t.fakeTransform;else{let e=s.getComputedStyle(t);r=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("transform")}let a=0,l=0;if(r&&"none"!==r&&"string"==typeof r){let e=r.split("(")[1].split(")")[0].split(",");a=parseInt(e[4],10),l=parseInt(e[5],10)}return"left"===e?o?`translateX(${o.right+a-i.left}px)`:`translateX(${s.innerWidth+a-i.left}px)`:"right"===e?o?`translateX(-${i.right-o.left-a}px)`:`translateX(-${i.left+i.width-a}px)`:"up"===e?o?`translateY(${o.bottom+l-i.top}px)`:`translateY(${s.innerHeight+l-i.top}px)`:o?`translateY(-${i.top-o.top+i.height-l}px)`:`translateY(-${i.top+i.height-l}px)`}(e,t,"function"==typeof n?n():n);r&&(t.style.webkitTransform=r,t.style.transform=r)}let gQ=u.forwardRef(function(e,t){let n=(0,e8.A)(),r={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,container:c,direction:h="down",easing:d=r,in:p,onEnter:f,onEntered:m,onEntering:g,onExit:v,onExited:y,onExiting:b,style:x,timeout:w=i,TransitionComponent:S=gG.Ay,...A}=e,C=u.useRef(null),k=(0,ng.A)((0,ua.A)(a),C,t),M=e=>t=>{e&&(void 0===t?e(C.current):e(C.current,t))},O=M((e,t)=>{gK(h,e,c),(0,gX.q)(e),f&&f(e,t)}),T=M((e,t)=>{let r=(0,gX.c)({timeout:w,style:x,easing:d},{mode:"enter"});e.style.webkitTransition=n.transitions.create("-webkit-transform",{...r}),e.style.transition=n.transitions.create("transform",{...r}),e.style.webkitTransform="none",e.style.transform="none",g&&g(e,t)}),_=M(m),I=M(b),D=M(e=>{let t=(0,gX.c)({timeout:w,style:x,easing:d},{mode:"exit"});e.style.webkitTransition=n.transitions.create("-webkit-transform",t),e.style.transition=n.transitions.create("transform",t),gK(h,e,c),v&&v(e)}),R=M(e=>{e.style.webkitTransition="",e.style.transition="",y&&y(e)}),E=u.useCallback(()=>{C.current&&gK(h,C.current,c)},[h,c]);return u.useEffect(()=>{if(p||"down"===h||"right"===h)return;let e=(0,gq.A)(()=>{C.current&&gK(h,C.current,c)}),t=(0,gY.A)(C.current);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[h,p,c]),u.useEffect(()=>{p||E()},[p,E]),(0,l.jsx)(S,{nodeRef:C,onEnter:O,onEntered:_,onEntering:T,onExit:D,onExited:R,onExiting:I,addEndListener:e=>{o&&o(C.current,e)},appear:s,in:p,timeout:w,...A,children:(e,{ownerState:t,...n})=>u.cloneElement(a,{ref:k,style:{visibility:"exited"!==e||p?void 0:"hidden",...x,...a.props.style},...n})})});function gZ(e){return(0,M.Ay)("MuiDrawer",e)}(0,k.A)("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);let gJ=(e,t)=>{let{ownerState:n}=e;return[t.root,("permanent"===n.variant||"persistent"===n.variant)&&t.docked,t.modal]},g0=(0,y.A)(du.A,{name:"MuiDrawer",slot:"Root",overridesResolver:gJ})((0,b.A)(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),g1=(0,y.A)("div",{shouldForwardProp:v.A,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:gJ})({flex:"0 0 auto"}),g2=(0,y.A)(dd.A,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`paperAnchor${(0,A.A)(n.anchor)}`],"temporary"!==n.variant&&t[`paperAnchorDocked${(0,A.A)(n.anchor)}`]]}})((0,b.A)(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:e})=>"left"===e.anchor&&"temporary"!==e.variant,style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"top"===e.anchor&&"temporary"!==e.variant,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"right"===e.anchor&&"temporary"!==e.variant,style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>"bottom"===e.anchor&&"temporary"!==e.variant,style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),g5={left:"right",right:"left",top:"down",bottom:"up"},g3=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiDrawer"}),r=(0,e8.A)(),i=(0,lE.I)(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:a,children:c,className:h,elevation:p=16,hideBackdrop:m=!1,ModalProps:{BackdropProps:g,...v}={},onClose:y,open:b=!1,PaperProps:w={},SlideProps:S,TransitionComponent:C,transitionDuration:k=o,variant:M="temporary",slots:O={},slotProps:T={},..._}=n,I=u.useRef(!1);u.useEffect(()=>{I.current=!0},[]);let D=function({direction:e},t){return"rtl"===e&&["left","right"].includes(t)?g5[t]:t}({direction:i?"rtl":"ltr"},s),R={...n,anchor:s,elevation:p,open:b,variant:M,..._},E=(e=>{let{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${(0,A.A)(n)}`],docked:[("permanent"===r||"persistent"===r)&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${(0,A.A)(n)}`,"temporary"!==r&&`paperAnchorDocked${(0,A.A)(n)}`]};return(0,f.A)(i,gZ,t)})(R),P={slots:{transition:C,...O},slotProps:{paper:w,transition:S,...T,backdrop:(0,lu.A)(T.backdrop||{...a,...g},{transitionDuration:k})}},[L,N]=(0,nd.A)("root",{ref:t,elementType:g0,className:(0,d.A)(E.root,E.modal,h),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...P,..._,...v},additionalProps:{open:b,onClose:y,hideBackdrop:m,slots:{backdrop:P.slots.backdrop},slotProps:{backdrop:P.slotProps.backdrop}}}),[B,j]=(0,nd.A)("paper",{elementType:g2,shouldForwardComponentProp:!0,className:(0,d.A)(E.paper,w.className),ownerState:R,externalForwardedProps:P,additionalProps:{elevation:"temporary"===M?p:0,square:!0}}),[z,$]=(0,nd.A)("docked",{elementType:g1,ref:t,className:(0,d.A)(E.root,E.docked,h),ownerState:R,externalForwardedProps:P,additionalProps:_}),[F,V]=(0,nd.A)("transition",{elementType:gQ,ownerState:R,externalForwardedProps:P,additionalProps:{in:b,direction:g5[D],timeout:k,appear:I.current}}),H=(0,l.jsx)(B,{...j,children:c});if("permanent"===M)return(0,l.jsx)(z,{...$,children:H});let W=(0,l.jsx)(F,{...V,children:H});return"persistent"===M?(0,l.jsx)(z,{...$,children:W}):(0,l.jsx)(L,{...N,children:W})}),g4=e=>{let t,n,r,i,o,s,a,u,h,d=(0,c.c)(21);d[0]!==e?({anchor:s,isOpen:r,onClose:i,PaperProps:t,children:n,...o}=e,d[0]=e,d[1]=t,d[2]=n,d[3]=r,d[4]=i,d[5]=o,d[6]=s):(t=d[1],n=d[2],r=d[3],i=d[4],o=d[5],s=d[6]);let p=void 0===s?"right":s,f=gU("(max-width:1080px)")?"100%":"1080px";d[7]!==t?.sx||d[8]!==f?(a=nw({width:f,overflow:"hidden"},t?.sx),d[7]=t?.sx,d[8]=f,d[9]=a):a=d[9],d[10]!==t||d[11]!==a?(u={...t,sx:a},d[10]=t,d[11]=a,d[12]=u):u=d[12];let m=!r;return d[13]!==p||d[14]!==n||d[15]!==r||d[16]!==i||d[17]!==o||d[18]!==u||d[19]!==m?(h=(0,l.jsx)(g3,{...o,open:r,onClose:i,anchor:p,PaperProps:u,"aria-hidden":m,children:n}),d[13]=p,d[14]=n,d[15]=r,d[16]=i,d[17]=o,d[18]=u,d[19]=m,d[20]=h):h=d[20],h};var g6=n("iY"),g9=n("MB"),g8=n("pE"),g7=n("yM"),ve=n("YG"),vt=n("xN"),vn=n("x2R"),vr=n("sT"),vi=n("uP"),vo=n("sn"),vs=n("lN"),va=n("Fy4");function vl(e,t,n){var r,i=(0,g6.nt)(),o=n.serUids,s=n.liPosMinGap,a=t.axis,l=a.scale,c=l.needTransform(),u=l.getFilter?l.getFilter():null,h=(0,va.$6)(u);function d(n){(0,vo.B_)(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(a.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(d(function(e,t,n){i.set(t.uid,1),o&&o.hasKey(t.uid)||(r=!0),p+=n.count()}),o&&o.keys().length===i.keys().length||(r=!0),!r&&null!=s){t.liPosMinGap=s;return}(0,ve.Zi)(vc,p);var f=0;d(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var o=n.get(e,r);isFinite(o)&&(!u||(0,va.V7)(h,o))&&(c&&(o=l.transformIn(o,null)),vc.arr[f++]=o)}});var m=vc.typed?vc.arr.subarray(0,f):(vc.arr.length=f,vc.arr);vc.typed?m.sort():(0,g9.Y6)(m);for(var g=1/0,v=1;v<f;++v){var y=m[v]-m[v-1];y>0&&y<g&&(g=y)}n.liPosMinGap=t.liPosMinGap=(0,g9.YC)(g)?g:f>0?vo.e2:vo.Lc,n.serUids=i}var vc=(0,ve.Zi)({ctor:ve.MO},50);function vu(e){return(0,vo.wW)("liPosMinGap",vl),{liPosMinGap:!(0,vn.wl)(e.scale)}}var vh=n("UG"),vd=(0,vt.EV)(),vp="__ec_stack_";function vf(e){return e.get("stack")||vp+e.seriesIndex}function vm(e){var t,n,r,i=e.bandWidthResult.w,o=i,s=0,a=[],l={};(0,g6.__)(e.seriesInfo,function(e,r){r||(n=e.defaultBarGap||0);var i=e.stackId;!(0,g6.$3)(l,i)&&s++;var c=l[i];c||(c=l[i]={width:0,maxWidth:0},a.push(i));var u=e.barWidth;u&&!c.width&&(c.width=u,u=(0,g9.rp)(o,u),o-=u);var h=e.barMaxWidth;h&&(c.maxWidth=h);var d=e.barMinWidth;d&&(c.minWidth=d);var p=e.barGap;null!=p&&(n=p);var f=e.barCategoryGap;null!=f&&(t=f)}),null==t&&(t=(0,g9.JB)(35-4*a.length,15)+"%");var c=(0,g9.lo)(t,i),u=(0,g9.lo)(n,1),h=(o-c)/(s+(s-1)*u);h=(0,g9.JB)(h,0),(0,g6.__)(a,function(e){var t=l[e],n=t.maxWidth,r=t.minWidth;if(t.width){var i=t.width;n&&(i=(0,g9.rp)(i,n)),r&&(i=(0,g9.JB)(i,r)),t.width=i,o-=i+u*i,s--}else{var i=h;n&&n<i&&(i=(0,g9.rp)(n,o)),r&&r>i&&(i=r),i!==h&&(t.width=i,o-=i+u*i,s--)}}),h=(o-c)/(s+(s-1)*u),h=(0,g9.JB)(h,0);var d=0;(0,g6.__)(a,function(e){var t=l[e];t.width||(t.width=h),r=t,d+=t.width*(1+u)}),r&&(d-=r.width*u);var p={},f=-d/2;return(0,g6.__)(a,function(e){var t=l[e];p[e]=p[e]||{bandWidth:i,offset:f,width:t.width},f+=t.width*(1+u)}),p}function vg(e){return e.pipelineContext&&e.pipelineContext.large}var vv=n("LEV"),vy=n("i4"),vb=n("qL"),vx=n("hy"),vw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.getInitialData=function(e,t){return(0,vx.A)(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),o=r.dataToPoint(i);if(n)(0,g6.__)(r.getAxes(),function(e,n){if("category"===e.type&&null!=t){var r=e.getTicksCoords(),s=e.getTickModel().get("alignWithLabel"),a=i[n],l="x1"===t[n]||"y1"===t[n];if(l&&!s&&(a+=1),!(r.length<2)){if(2===r.length){o[n]=e.toGlobalCoord(e.getExtent()[+!!l]);return}for(var c=void 0,u=void 0,h=1,d=0;d<r.length;d++){var p=r[d].coord,f=d===r.length-1?r[d-1].tickValue+h:r[d].tickValue;if(f===a){u=p;break}if(f<a)c=p;else if(null!=c&&f>a){u=(p+c)/2;break}1===d&&(h=f-r[0].tickValue)}null==u&&(c?c&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=e.toGlobalCoord(u)}}});else{var s=this.getData(),a=s.getLayout("offset"),l=s.getLayout("size"),c=+!r.getBaseAxis().isHorizontal();o[c]+=a+l/2}return o}return[0/0,0/0]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(vb.A);vb.A.registerClass(vw);var vS=n("Af"),vA=n("g8"),vC=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.getInitialData=function(){return(0,vx.A)(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.__preparePipelineContext=function(e,t){var n=(0,vt.Zk)(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=(0,vS.G_)(vw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:vA.A.color.primary,borderWidth:2}},realtimeSort:!1}),t}(vw),vk=n("BC"),vM=n("jZ"),vO=n("w2"),vT=n("W5"),v_=n("Vb"),vI=n("Qz"),vD=n("FL"),vR=n("LP"),vE=n("F4"),vP=n("dd"),vL=n("hH"),vN=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},vB=function(e){function t(t){var n=e.call(this,t)||this;return n.type="sausage",n}return(0,vy.C6)(t,e),t.prototype.getDefaultShape=function(){return new vN},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),s=(o-i)*.5,a=i+s,l=t.startAngle,c=t.endAngle,u=t.clockwise,h=2*Math.PI,d=u?c-l<h:l-c<h;d||(l=c-(u?h:-h));var p=Math.cos(l),f=Math.sin(l),m=Math.cos(c),g=Math.sin(c);d?(e.moveTo(p*i+n,f*i+r),e.arc(p*a+n,f*a+r,s,-Math.PI+l,l,!u)):e.moveTo(p*o+n,f*o+r),e.arc(n,r,o,l,c,!u),e.arc(m*a+n,g*a+r,s,c-2*Math.PI,c-Math.PI,!u),0!==i&&e.arc(n,r,i,c,l,u)},t}(vk.Ay),vj=n("WN9"),vz=n("mR"),v$=n("g2"),vF=n("KO");function vV(e,t,n){return t*Math.sin(e)*(n?-1:1)}function vH(e,t,n){return t*Math.cos(e)*(n?1:-1)}function vW(e,t,n){var r=e.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;(0,g6.cy)(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:(0,g6.Tj)(r,function(e){return(0,vF.lo)(e,i)})}}var vU=Math.max,vG=Math.min,vq=function(e){function t(){var t=e.call(this)||this;return t.type="bar",t._isFirstFrame=!0,t}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");("cartesian2d"===i||"polar"===i)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){(0,vO.traverseElements)(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var i,o=this.group,s=e.getData(),a=this._data,l=e.coordinateSystem,c=l.getBaseAxis();"cartesian2d"===l.type?i=c.isHorizontal():"polar"===l.type&&(i="angle"===c.dim);var u=e.isAnimationEnabled()?e:null,h=function(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===t.type)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}(e,l);h&&this._enableRealtimeSort(h,s,n);var d=e.get("clip",!0)||h,p=l.getArea();o.removeClipPath();var f=e.get("roundCap",!0),m=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),v=g.get("borderRadius")||0,y=[],b=this._backgroundEls,x=r&&r.isInitSort,w=r&&"changeAxisOrder"===r.type;function S(e){var t,n,r,o=v1[l.type](s,e);if(!o)return null;var a=(t=l,n=i,r=o,new("polar"===t.type?vI.A:v_.A)({shape:v8(n,r,t),silent:!0,z2:0}));return a.useStyle(g.getItemStyle()),"cartesian2d"===l.type?a.setShape("r",v):a.setShape("cornerRadius",v),y[e]=a,a}s.diff(a).add(function(t){var n=s.getItemModel(t),r=v1[l.type](s,t,n);if(r&&(m&&S(t),s.hasValue(t)&&v0[l.type](r))){var a=!1;d&&(a=vX[l.type](p,r));var g=vY[l.type](e,s,t,r,i,u,c.model,!1,f);h&&(g.forceLabelAnimation=!0),v5(g,s,t,n,r,e,i,"polar"===l.type),x?g.attr({shape:r}):h?vK(h,u,g,r,t,i,!1,!1):(0,vT.LW)(g,{shape:r},e,t),s.setItemGraphicEl(t,g),o.add(g),g.ignore=a}}).update(function(t,n){var r=s.getItemModel(t),A=v1[l.type](s,t,r);if(A){if(m){var C=void 0;0===b.length?C=S(n):((C=b[n]).useStyle(g.getItemStyle()),"cartesian2d"===l.type?C.setShape("r",v):C.setShape("cornerRadius",v),y[t]=C);var k=v1[l.type](s,t),M=v8(i,k,l);(0,vT.oi)(C,{shape:M},u,t)}var O=a.getItemGraphicEl(n);if(!s.hasValue(t)||!v0[l.type](A))return void o.remove(O);var T=!1;if(d&&(T=vX[l.type](p,A))&&o.remove(O),O&&("sector"===O.type&&f||"sausage"===O.type&&!f)&&(O&&(0,vT.t5)(O,e,n),O=null),O?(0,vT.ap)(O):O=vY[l.type](e,s,t,A,i,u,c.model,!0,f),h&&(O.forceLabelAnimation=!0),w){var _=O.getTextContent();if(_){var I=(0,vE.Lu)(_);null!=I.prevValue&&(I.prevValue=I.value)}}else v5(O,s,t,r,A,e,i,"polar"===l.type);x?O.attr({shape:A}):h?vK(h,u,O,A,t,i,!0,w):(0,vT.oi)(O,{shape:A},e,t,null),s.setItemGraphicEl(t,O),O.ignore=T,o.add(O)}}).remove(function(t){var n=a.getItemGraphicEl(t);n&&(0,vT.t5)(n,e,t)}).execute();var A=this._backgroundGroup||(this._backgroundGroup=new vM.A);A.removeAll();for(var C=0;C<y.length;++C)A.add(y[C]);o.add(A),this._backgroundEls=y,this._data=s},t.prototype._renderLarge=function(e,t,n){this._clear(),v6(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),v6(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&(0,vL.Ip)(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var o=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,o,i,n)},n.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i=null==i?0/0:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:(0,g6.Tj)(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,s=0,a=r.getOrdinalMeta().categories.length;s<a;++s){var l=e.rawIndexOf(i,r.getRawOrdinalNumber(s)),c=l<0?5e-324:t(e.indexOfRawIndex(l));if(c>o)return!0;o=c}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){(0,vT.t5)(t,e,(0,vD.z)(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(vj.A),vX={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,o=e.y+e.height,s=vU(t.x,e.x),a=vG(t.x+t.width,i),l=vU(t.y,e.y),c=vG(t.y+t.height,o),u=a<s,h=c<l;return t.x=u&&s>i?a:s,t.y=h&&l>o?c:l,t.width=u?0:a-s,t.height=h?0:c-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||h},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=vG(t.r,e.r),o=vU(t.r0,e.r0);t.r=i,t.r0=o;var s=i-o<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return s}},vY={cartesian2d:function(e,t,n,r,i,o,s,a,l){var c=new v_.A({shape:(0,g6.X$)({},r),z2:1});return c.__dataIndex=n,c.name="item",o&&(c.shape[i?"height":"width"]=0),c},polar:function(e,t,n,r,i,o,s,a,l){var c,u,h=!i&&l?vB:vI.A,d=new h({shape:r,z2:1});if(d.name="item",c=v2(i),u=h===vB,d.calculateTextPosition=function(e,t,n){var r=t.position;if(!r||r instanceof Array)return(0,vF.X4)(e,t,n);var i=c(r),o=null!=t.distance?t.distance:5,s=this.shape,a=s.cx,l=s.cy,h=s.r,d=s.r0,p=(h+d)/2,f=s.startAngle,m=s.endAngle,g=(f+m)/2,v=u?Math.abs(h-d)/2:0,y=Math.cos,b=Math.sin,x=a+h*y(f),w=l+h*b(f),S="left",A="top";switch(i){case"startArc":x=a+(d-o)*y(g),w=l+(d-o)*b(g),S="center",A="top";break;case"insideStartArc":x=a+(d+o)*y(g),w=l+(d+o)*b(g),S="center",A="bottom";break;case"startAngle":x=a+p*y(f)+vV(f,o+v,!1),w=l+p*b(f)+vH(f,o+v,!1),S="right",A="middle";break;case"insideStartAngle":x=a+p*y(f)+vV(f,-o+v,!1),w=l+p*b(f)+vH(f,-o+v,!1),S="left",A="middle";break;case"middle":x=a+p*y(g),w=l+p*b(g),S="center",A="middle";break;case"endArc":x=a+(h+o)*y(g),w=l+(h+o)*b(g),S="center",A="bottom";break;case"insideEndArc":x=a+(h-o)*y(g),w=l+(h-o)*b(g),S="center",A="top";break;case"endAngle":x=a+p*y(m)+vV(m,o+v,!0),w=l+p*b(m)+vH(m,o+v,!0),S="left",A="middle";break;case"insideEndAngle":x=a+p*y(m)+vV(m,-o+v,!0),w=l+p*b(m)+vH(m,-o+v,!0),S="right",A="middle";break;default:return(0,vF.X4)(e,t,n)}return(e=e||{}).x=x,e.y=w,e.align=S,e.verticalAlign=A,e},o){var p=d.shape,f=i?"r":"endAngle",m={};p[f]=i?r.r0:r.startAngle,m[f]=r[f],(a?vT.oi:vT.LW)(d,{shape:m},o)}return d}};function vK(e,t,n,r,i,o,s,a){o?(c={x:r.x,width:r.width},l={y:r.y,height:r.height}):(c={y:r.y,height:r.height},l={x:r.x,width:r.width}),a||(s?vT.oi:vT.LW)(n,{shape:l},t,i,null);var l,c,u=t?e.baseAxis.model:null;(s?vT.oi:vT.LW)(n,{shape:c},u,i)}function vQ(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var vZ=["x","y","width","height"],vJ=["cx","cy","r","startAngle","endAngle"],v0={cartesian2d:function(e){return!vQ(e,vZ)},polar:function(e){return!vQ(e,vJ)}},v1={cartesian2d:function(e,t,n){var r,i,o,s=e.getItemLayout(t);if(!s)return null;var a=n?(r=n,i=s,(o=r.get(["itemStyle","borderColor"]))&&"none"!==o?Math.min(r.get(["itemStyle","borderWidth"])||0,isNaN(i.width)?Number.MAX_VALUE:Math.abs(i.width),isNaN(i.height)?Number.MAX_VALUE:Math.abs(i.height)):0):0,l=s.width>0?1:-1,c=s.height>0?1:-1;return{x:s.x+l*a/2,y:s.y+c*a/2,width:s.width-l*a,height:s.height-c*a}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function v2(e){var t;return t=e?"Arc":"Angle",function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}}}function v5(e,t,n,r,i,o,s,a){var l,c,u,h,d=t.getItemVisual(n,"style");if(a){if(!o.get("roundCap")){var p=e.shape,f=vW(r.getModel("itemStyle"),p,!0);(0,g6.X$)(p,f),e.setShape(p)}}else{var m=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",m)}e.useStyle(d);var g=r.getShallow("cursor");g&&e.attr("cursor",g);var v=a?s?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":s?(l=i,c=o.coordinateSystem,0===l.height?c.getOtherAxis(c.getBaseAxis()).inverse?"bottom":"top":l.height>0?"bottom":"top"):(u=i,h=o.coordinateSystem,0===u.width?h.getOtherAxis(h.getBaseAxis()).inverse?"left":"right":u.width>=0?"right":"left"),y=(0,vE.lx)(r);(0,vE.qM)(e,y,{labelFetcher:o,labelDataIndex:n,defaultText:(0,v$.i)(o.getData(),n),inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:v});var b=e.getTextContent();if(a&&b){var x=r.get(["label","position"]);e.textConfig.inside="middle"===x||null,function(e,t,n,r){if((0,g6.Et)(r))return e.setTextConfig({rotation:r});if((0,g6.cy)(t))return e.setTextConfig({rotation:0});var i,o=e.shape,s=o.clockwise?o.startAngle:o.endAngle,a=o.clockwise?o.endAngle:o.startAngle,l=n(t);switch(l){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=(s+a)/2;break;case"startAngle":case"insideStartAngle":i=s;break;case"endAngle":case"insideEndAngle":i=a;break;default:e.setTextConfig({rotation:0});return}var c=1.5*Math.PI-i;"middle"===l&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),e.setTextConfig({rotation:c})}(e,"outside"===x?v:x,v2(s),r.get(["label","rotate"]))}(0,vE.Oh)(b,y,o.getRawValue(n),function(e){return(0,v$.T)(t,e)});var w=r.getModel(["emphasis"]);(0,vR.Lm)(e,w.get("focus"),w.get("blurScope"),w.get("disabled")),(0,vR.Mx)(e,r),null!=i.startAngle&&null!=i.endAngle&&i.startAngle===i.endAngle&&(e.style.fill="none",e.style.stroke="none",(0,g6.__)(e.states,function(e){e.style&&(e.style.fill=e.style.stroke="none")}))}var v3=function(){},v4=function(e){function t(t){var n=e.call(this,t)||this;return n.type="largeBar",n}return(0,vy.C6)(t,e),t.prototype.getDefaultShape=function(){return new v3},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],s=[],a=this.barWidth,l=0;l<n.length;l+=3)s[r]=a,s[i]=n[l+2],o[r]=n[l+r],o[i]=n[l+i],e.rect(o[0],o[1],s[0],s[1])},t}(vk.Ay);function v6(e,t,n,r){var i=e.getData(),o=+!!i.getLayout("valueAxisHorizontal"),s=i.getLayout("largeDataIndices"),a=i.getLayout("size"),l=e.getModel("backgroundStyle"),c=i.getLayout("largeBackgroundPoints"),u=r?(0,vt.i2)(e):0;if(c){var h=new v4({shape:{points:c},incremental:u,silent:!0,z2:0});h.baseDimIdx=o,h.largeDataIndices=s,h.barWidth=a,h.useStyle(l.getItemStyle()),t.add(h),n&&n.push(h)}var d=new v4({shape:{points:i.getLayout("largePoints")},incremental:u,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=o,d.largeDataIndices=s,d.barWidth=a,t.add(d),d.useStyle(i.getVisual("style")),d.style.stroke=null,(0,vD.z)(d).seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",v9),d.on("mousemove",v9)),n&&n.push(d)}var v9=(0,vP.nF)(function(e){var t=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,s=e.largeDataIndices,a=[],l=[],c=e.barWidth,u=0,h=o.length/3;u<h;u++){var d=3*u;if(l[r]=c,l[i]=o[d+2],a[r]=o[d+r],a[i]=o[d+i],l[i]<0&&(a[i]+=l[i],l[i]=-l[i]),t>=a[0]&&t<=a[0]+l[0]&&n>=a[1]&&n<=a[1]+l[1])return s[u]}return -1}(this,e.offsetX,e.offsetY);(0,vD.z)(this).dataIndex=t>=0?t:null},30,!1);function v8(e,t,n){if((0,vz.g)(n,"cartesian2d")){var r=n.getArea();return{x:e?t.x:r.x,y:e?r.y:t.y,width:e?t.width:r.width,height:e?r.height:t.height}}var r=n.getArea();return{cx:r.cx,cy:r.cy,r0:e?r.r0:t.r0,r:e?r.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}}var v7=n("Rz"),ye=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},yt=function(e){function t(t){var n=e.call(this,t)||this;return n.type="pointer",n}return(0,vy.C6)(t,e),t.prototype.getDefaultShape=function(){return new ye},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,o=t.width,s=t.angle,a=t.x-n(s)*o*(o>=i/3?1:2),l=t.y-r(s)*o*(o>=i/3?1:2);s=t.angle-Math.PI/2,e.moveTo(a,l),e.lineTo(t.x+n(s)*o,t.y+r(s)*o),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(s)*o,t.y-r(s)*o),e.lineTo(a,l)},t}(vk.Ay),yn=n("xz"),yr=n("s2"),yi=n("up"),yo=n("s5"),ys=n("Sv");function ya(e,t){var n=null==e?"":e+"";return t&&((0,g6.Kg)(t)?n=t.replace("{value}",n):(0,g6.Tn)(t)&&(n=t(e))),n}var yl=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n){this.group.removeAll();var r,i,o=e.get(["axisLine","lineStyle","color"]),s=(r=e.get("center"),i=Math.min(n.getWidth(),n.getHeight()),{cx:(0,g9.lo)(r[0],n.getWidth()),cy:(0,g9.lo)(r[1],n.getHeight()),r:(0,g9.lo)(e.get("radius"),i/2)});this._renderMain(e,t,n,o,s),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var o=this.group,s=e.get("clockwise"),a=-e.get("startAngle")/180*Math.PI,l=-e.get("endAngle")/180*Math.PI,c=e.getModel("axisLine"),u=c.get("roundCap")?vB:vI.A,h=c.get("show"),d=c.getModel("lineStyle"),p=d.get("width"),f=[a,l];(0,ys.q)(f,!s),a=f[0];for(var m=(l=f[1])-a,g=a,v=[],y=0;h&&y<r.length;y++){var b=new u({shape:{startAngle:g,endAngle:l=a+m*Math.min(Math.max(r[y][0],0),1),cx:i.cx,cy:i.cy,clockwise:s,r0:i.r-p,r:i.r},silent:!0});b.setStyle({fill:r[y][1]}),b.setStyle(d.getLineStyle(["color","width"])),v.push(b),g=l}v.reverse(),(0,g6.__)(v,function(e){return o.add(e)});var x=function(e){var t;if(e<=0)return r[0][1];for(t=0;t<r.length;t++)if(r[t][0]>=e&&(0===t?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,i,a,l,s,p),this._renderTitleAndDetail(e,t,n,x,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,x,i,a,l,s,p)},t.prototype._renderTicks=function(e,t,n,r,i,o,s,a,l){for(var c,u,h=this.group,d=i.cx,p=i.cy,f=i.r,m=+e.get("min"),g=+e.get("max"),v=e.getModel("splitLine"),y=e.getModel("axisTick"),b=e.getModel("axisLabel"),x=e.get("splitNumber"),w=y.get("splitNumber"),S=(0,g9.lo)(v.get("length"),f),A=(0,g9.lo)(y.get("length"),f),C=o,k=(s-o)/x,M=k/w,O=v.getModel("lineStyle").getLineStyle(),T=y.getModel("lineStyle").getLineStyle(),_=v.get("distance"),I=0;I<=x;I++){if(c=Math.cos(C),u=Math.sin(C),v.get("show")){var D=_?_+l:l,R=new yn.A({shape:{x1:c*(f-D)+d,y1:u*(f-D)+p,x2:c*(f-S-D)+d,y2:u*(f-S-D)+p},style:O,silent:!0});"auto"===O.stroke&&R.setStyle({stroke:r(I/x)}),h.add(R)}if(b.get("show")){var D=b.get("distance")+_,E=ya((0,g9.LI)(I*(g-m)/x+m,g9.Rl),b.get("formatter")),P=r(I/x),L=c*(f-S-D)+d,N=u*(f-S-D)+p,B=b.get("rotate"),j=0;"radial"===B?(j=-C+2*Math.PI)>Math.PI/2&&(j+=Math.PI):"tangential"===B?j=-C-Math.PI/2:(0,g6.Et)(B)&&(j=B*Math.PI/180),0===j?h.add(new yr.Ay({style:(0,vE.VB)(b,{text:E,x:L,y:N,verticalAlign:u<-.8?"top":u>.8?"bottom":"middle",align:c<-.4?"left":c>.4?"right":"center"},{inheritColor:P}),silent:!0})):h.add(new yr.Ay({style:(0,vE.VB)(b,{text:E,x:L,y:N,verticalAlign:"middle",align:"center"},{inheritColor:P}),silent:!0,originX:L,originY:N,rotation:j}))}if(y.get("show")&&I!==x){var D=y.get("distance");D=D?D+l:l;for(var z=0;z<=w;z++){c=Math.cos(C),u=Math.sin(C);var $=new yn.A({shape:{x1:c*(f-D)+d,y1:u*(f-D)+p,x2:c*(f-A-D)+d,y2:u*(f-A-D)+p},silent:!0,style:T});"auto"===T.stroke&&$.setStyle({stroke:r((I+z/w)/x)}),h.add($),C+=M}C-=M}else C+=k}},t.prototype._renderPointer=function(e,t,n,r,i,o,s,a,l){var c=this.group,u=this._data,h=this._progressEls,d=[],p=e.get(["pointer","show"]),f=e.getModel("progress"),m=f.get("show"),g=e.getData(),v=g.mapDimension("value"),y=+e.get("min"),b=+e.get("max"),x=[y,b],w=[o,s];function S(t,n){var r,o=g.getItemModel(t).getModel("pointer"),s=(0,g9.lo)(o.get("width"),i.r),a=(0,g9.lo)(o.get("length"),i.r),l=e.get(["pointer","icon"]),c=o.get("offsetCenter"),u=(0,g9.lo)(c[0],i.r),h=(0,g9.lo)(c[1],i.r),d=o.get("keepAspect");return(r=l?(0,yi.v5)(l,u-s/2,h-a,s,a,null,d):new yt({shape:{angle:-Math.PI/2,width:s,r:a,x:u,y:h}})).rotation=-(n+Math.PI/2),r.x=i.cx,r.y=i.cy,r}function A(e,t){var n=f.get("roundCap")?vB:vI.A,r=f.get("overlap"),s=r?f.get("width"):l/g.count(),c=r?i.r-s:i.r-(e+1)*s,u=r?i.r:i.r-e*s,h=new n({shape:{startAngle:o,endAngle:t,cx:i.cx,cy:i.cy,clockwise:a,r0:c,r:u}});return r&&(h.z2=(0,g9.Cb)(g.get(v,e),[y,b],[100,0],!0)),h}(m||p)&&(g.diff(u).add(function(t){var n=g.get(v,t);if(p){var r=S(t,o);vT.LW(r,{rotation:-((isNaN(+n)?w[0]:(0,g9.Cb)(n,x,w,!0))+Math.PI/2)},e),c.add(r),g.setItemGraphicEl(t,r)}if(m){var i=A(t,o),s=f.get("clip");vT.LW(i,{shape:{endAngle:(0,g9.Cb)(n,x,w,s)}},e),c.add(i),(0,vD.a)(e.seriesIndex,g.dataType,t,i),d[t]=i}}).update(function(t,n){var r=g.get(v,t);if(p){var i=u.getItemGraphicEl(n),s=i?i.rotation:o,a=S(t,s);a.rotation=s,vT.oi(a,{rotation:-((isNaN(+r)?w[0]:(0,g9.Cb)(r,x,w,!0))+Math.PI/2)},e),c.add(a),g.setItemGraphicEl(t,a)}if(m){var l=h[n],y=A(t,l?l.shape.endAngle:o),b=f.get("clip");vT.oi(y,{shape:{endAngle:(0,g9.Cb)(r,x,w,b)}},e),c.add(y),(0,vD.a)(e.seriesIndex,g.dataType,t,y),d[t]=y}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel("emphasis"),i=n.get("focus"),o=n.get("blurScope"),s=n.get("disabled"),a=r((0,g9.Cb)(g.get(v,e),x,[0,1],!0));if(p){var l=g.getItemGraphicEl(e),c=g.getItemVisual(e,"style"),u=c.fill;if(l instanceof yo.Ay){var h=l.style;l.useStyle((0,g6.X$)({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},c))}else l.useStyle(c),"pointer"!==l.type&&l.setColor(u);l.setStyle(t.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===l.style.fill&&l.setStyle("fill",a),l.z2EmphasisLift=0,(0,vR.Mx)(l,t),(0,vR.Lm)(l,i,o,s)}if(m){var f=d[e];f.useStyle(g.getItemVisual(e,"style")),f.setStyle(t.getModel(["progress","itemStyle"]).getItemStyle()),"auto"===f.style.fill&&f.setStyle("fill",a),f.z2EmphasisLift=0,(0,vR.Mx)(f,t),(0,vR.Lm)(f,i,o,s)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,t){var n=e.getModel("anchor");if(n.get("show")){var r=n.get("size"),i=n.get("icon"),o=n.get("offsetCenter"),s=n.get("keepAspect"),a=(0,yi.v5)(i,t.cx-r/2+(0,g9.lo)(o[0],t.r),t.cy-r/2+(0,g9.lo)(o[1],t.r),r,r,null,s);a.z2=+!!n.get("showAbove"),a.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(a)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var o=this,s=e.getData(),a=s.mapDimension("value"),l=+e.get("min"),c=+e.get("max"),u=new vM.A,h=[],d=[],p=e.isAnimationEnabled(),f=e.get(["pointer","showAbove"]);s.diff(this._data).add(function(e){h[e]=new yr.Ay({silent:!0}),d[e]=new yr.Ay({silent:!0})}).update(function(e,t){h[e]=o._titleEls[t],d[e]=o._detailEls[t]}).execute(),s.each(function(t){var n=s.getItemModel(t),o=s.get(a,t),m=new vM.A,g=r((0,g9.Cb)(o,[l,c],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var y=v.get("offsetCenter"),b=i.cx+(0,g9.lo)(y[0],i.r),x=i.cy+(0,g9.lo)(y[1],i.r),w=h[t];w.attr({z2:2*!f,style:(0,vE.VB)(v,{x:b,y:x,text:s.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:g})}),m.add(w)}var S=n.getModel("detail");if(S.get("show")){var A=S.get("offsetCenter"),C=i.cx+(0,g9.lo)(A[0],i.r),k=i.cy+(0,g9.lo)(A[1],i.r),M=(0,g9.lo)(S.get("width"),i.r),O=(0,g9.lo)(S.get("height"),i.r),T=e.get(["progress","show"])?s.getItemVisual(t,"style").fill:g,w=d[t],_=S.get("formatter");w.attr({z2:2*!f,style:(0,vE.VB)(S,{x:C,y:k,text:ya(o,_),width:isNaN(M)?null:M,height:isNaN(O)?null:O,align:"center",verticalAlign:"middle"},{inheritColor:T})}),(0,vE.Oh)(w,{normal:S},o,function(e){return ya(e,_)}),p&&(0,vE.xb)(w,t,s,e,{getFormattedLabel:function(e,t,n,r,i,s){return ya(s?s.interpolatedValue:o,_)}}),m.add(w)}u.add(m)}),this.group.add(u),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(vj.A),yc=n("CG"),yu=n("oo");function yh(e,t,n){t=(0,g6.cy)(t)&&{coordDimensions:t}||(0,g6.X$)({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=(0,yc.A)(r,t).dimensions,o=new yu.A(i,e);return o.initData(r,n),o}var yd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return(0,vy.C6)(t,e),t.prototype.getInitialData=function(e,t){return yh(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,vA.A.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:vA.A.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:vA.A.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:vA.A.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:vA.A.color.neutral00,borderWidth:0,borderColor:vA.A.color.theme["0"]}},title:{show:!0,offsetCenter:[0,"20%"],color:vA.A.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:vA.A.color.transparent,borderWidth:0,borderColor:vA.A.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:vA.A.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(vb.A),yp=n("GN"),yf=n("Jx"),ym=n("rk"),yg=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),yv=n("Ww"),yy=vt.$r(),yb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new yg(g6.oI(this.getData,this),g6.oI(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return yh(this,{coordDimensions:["value"],encodeDefaulter:g6.cF(ym.ln,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=yy(n),i=r.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(e){o.push(e)}),i=r.seats=(0,g9.kM)(o,n.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){vt.M5(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(vb.A);(0,yv.kf)({fullType:yb.type,getCoord2:function(e){return e.getShallow("center")}});var yx=n("zM"),yw=n("Y8"),yS=n("xy");function yA(e,t,n,r,i,o,s,a){var l=n-e,c=r-t,u=Math.sqrt(l*l+c*c),h=((i-e)*(l/=u)+(o-t)*(c/=u))/u;a&&(h=Math.min(Math.max(h,0),1)),h*=u;var d=s[0]=e+h*l,p=s[1]=t+h*c;return Math.sqrt((d-i)*(d-i)+(p-o)*(p-o))}ys.A.CMD;var yC=new yx.A,yk=new yx.A,yM=new yx.A,yO=new yx.A,yT=new yx.A,y_=[],yI=new yx.A;function yD(e,t,n,r){var i="normal"===n,o=i?e:e.ensureState(n);o.ignore=t;var s=r.get("smooth");s=!0===s?.3:Math.max(+s,0)||0,o.shape=o.shape||{},o.shape.smooth=s;var a=r.getModel("lineStyle").getLineStyle();i?e.useStyle(a):o.style=a}function yR(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=yS.xg(r[0],r[1]),o=yS.xg(r[1],r[2]);if(!i||!o){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var s=Math.min(i,o)*n,a=yS.Cc([],r[1],r[0],s/i),l=yS.Cc([],r[1],r[2],s/o),c=yS.Cc([],a,l,.5);e.bezierCurveTo(a[0],a[1],a[0],a[1],c[0],c[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}var yE=n("EV"),yP=Math.PI/180;function yL(e,t,n,r,i,o,s,a,l,c){if(!(e.length<2)){for(var u=e.length,h=0;h<u;h++)if("outer"===e[h].position&&"labelLine"===e[h].labelAlignTo){var d=e[h].label.x-c;e[h].linePoints[1][0]+=d,e[h].label.x=c}(0,yE.Zv)(e,1,l,l+s)&&function(e){for(var o={list:[],maxY:0},s={list:[],maxY:0},a=0;a<e.length;a++)if("none"===e[a].labelAlignTo){var l=e[a],c=l.label.y>n?s:o,u=Math.abs(l.label.y-n);if(u>=c.maxY){var h=l.label.x-t-l.len2*i,d=r+l.len;c.rB=Math.abs(h)<d?Math.sqrt(u*u/(1-h*h/d/d)):d,c.maxY=u}c.list.push(l)}p(o),p(s)}(e)}function p(e){for(var o=e.rB,s=o*o,a=0;a<e.list.length;a++){var l=e.list[a],c=Math.abs(l.label.y-n),u=r+l.len,h=t+(Math.sqrt(Math.abs(u*u*(1-c*c/s)))+l.len2)*i,d=h-l.label.x,p=l.targetTextWidth-d*i;yN(l,p,!0),l.label.x=h}}}function yN(e,t,n){if(null==e.labelStyleWidth){var r=e.label,i=r.style,o=e.rect,s=i.backgroundColor,a=i.padding,l=a?a[1]+a[3]:0,c=i.overflow,u=o.width+(s?0:l);if(t<u||n){if(c&&c.match("break")){r.setStyle("backgroundColor",null),r.setStyle("width",t-l);var h=r.getBoundingRect();r.setStyle("width",Math.ceil(h.width)),r.setStyle("backgroundColor",s)}else{var d=t-l,p=t<u?d:n?d>e.unconstrainedWidth?null:d:null;r.setStyle("width",p)}yB(o,r)}}}function yB(e,t){yz.rect=e,(0,yE.Wy)(yz,t,yj)}var yj={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},yz={};function y$(e){return"center"===e.position}var yF=n("db"),yV=2*Math.PI,yH=Math.PI/180,yW=(0,vt.O9)("pie",function(e,t){e.eachSeriesByType("pie",function(e){var n=e.getData(),r=n.mapDimension("value"),i=(0,yF.zH)(e,t),o=i.cx,s=i.cy,a=i.r,l=i.r0,c=i.viewRect,u=-e.get("startAngle")*yH,h=e.get("endAngle"),d=e.get("padAngle")*yH;h="auto"===h?u-yV:-h*yH;var p=e.get("minAngle")*yH+d,f=0;n.each(r,function(e){!isNaN(e)&&f++});var m=n.getSum(r),g=Math.PI/(m||f)*2,v=e.get("clockwise"),y=e.get("roseType"),b=e.get("stillShowZeroSum"),x=n.getDataExtent(r);x[0]=0;var w=v?1:-1,S=[u,h],A=w*d/2;(0,ys.q)(S,!v),u=S[0],h=S[1];var C=yU(e);C.startAngle=u,C.endAngle=h,C.clockwise=v,C.cx=o,C.cy=s,C.r=a,C.r0=l;var k=Math.abs(h-u),M=k,O=0,T=u;if(n.setLayout({viewRect:c,r:a}),n.each(r,function(e,t){if(isNaN(e))return void n.setItemLayout(t,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:v,cx:o,cy:s,r0:l,r:y?0/0:a});(r="area"!==y?0===m&&b?g:e*g:k/f)<p?(r=p,M-=p):O+=e;var r,i=T+w*r,c=0,u=0;d>r?u=c=T+w*r/2:(c=T+A,u=i-A),n.setItemLayout(t,{angle:r,startAngle:c,endAngle:u,clockwise:v,cx:o,cy:s,r0:l,r:y?(0,g9.Cb)(e,x,[l,a]):a}),T=i}),M<yV&&f)if(M<=.001){var _=k/f;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=_;var i=0,o=0;_<d?o=i=u+w*(t+.5)*_:(i=u+w*t*_+A,o=u+w*(t+1)*_-A),r.startAngle=i,r.endAngle=o}})}else g=M/O,T=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,o=0,s=0;i<d?s=o=T+w*i/2:(o=T+A,s=T+w*i-A),r.startAngle=o,r.endAngle=s,T+=w*i}})})}),yU=(0,vt.$r)(),yG=function(e){function t(t,n,r){var i=e.call(this)||this;i.z2=2;var o=new yr.Ay;return i.setTextContent(o),i.updateData(t,n,r,!0),i}return(0,vy.C6)(t,e),t.prototype.updateData=function(e,t,n,r){var i=e.hostModel,o=e.getItemModel(t),s=o.getModel("emphasis"),a=e.getItemLayout(t),l=(0,g6.X$)(vW(o.getModel("itemStyle"),a,!0),a);if(isNaN(l.startAngle))return void this.setShape(l);if(r){this.setShape(l);var c=i.getShallow("animationType");i.ecModel.ssr?(vT.LW(this,{scaleX:0,scaleY:0},i,{dataIndex:t,isFrom:!0}),this.originX=l.cx,this.originY=l.cy):"scale"===c?(this.shape.r=a.r0,vT.LW(this,{shape:{r:a.r}},i,t)):null!=n?(this.setShape({startAngle:n,endAngle:n}),vT.LW(this,{shape:{startAngle:a.startAngle,endAngle:a.endAngle}},i,t)):(this.shape.endAngle=a.startAngle,vT.oi(this,{shape:{endAngle:a.endAngle}},i,t))}else(0,vT.ap)(this),vT.oi(this,{shape:l},i,t);this.useStyle(e.getItemVisual(t,"style")),(0,vR.Mx)(this,o);var u=(a.startAngle+a.endAngle)/2,h=i.get("selectedOffset"),d=Math.cos(u)*h,p=Math.sin(u)*h,f=o.getShallow("cursor");f&&this.attr("cursor",f),this._updateLabel(i,e,t),this.ensureState("emphasis").shape=(0,g6.X$)({r:a.r+(s.get("scale")&&s.get("scaleSize")||0)},vW(s.getModel("itemStyle"),a)),(0,g6.X$)(this.ensureState("select"),{x:d,y:p,shape:vW(o.getModel(["select","itemStyle"]),a)}),(0,g6.X$)(this.ensureState("blur"),{shape:vW(o.getModel(["blur","itemStyle"]),a)});var m=this.getTextGuideLine(),g=this.getTextContent();m&&(0,g6.X$)(m.ensureState("select"),{x:d,y:p}),(0,g6.X$)(g.ensureState("select"),{x:d,y:p}),(0,vR.Lm)(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},t.prototype._updateLabel=function(e,t,n){var r=t.getItemModel(n),i=r.getModel("labelLine"),o=t.getItemVisual(n,"style"),s=o&&o.fill,a=o&&o.opacity;(0,vE.qM)(this,(0,vE.lx)(r),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:a,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)});var l=this.getTextContent();this.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var c=r.get(["label","position"]);if("outside"!==c&&"outer"!==c)this.removeTextGuideLine();else{var u=this.getTextGuideLine();u||(u=new yf.A,this.setTextGuideLine(u)),function(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}for(var o=t.normal,s=o.get("show"),a=i.ignore,l=0;l<vR.wV.length;l++){var c=vR.wV[l],u=t[c],h="normal"===c;if(u){var d=u.get("show");if((h?a:(0,g6.bZ)(i.states[c]&&i.states[c].ignore,a))||!(0,g6.bZ)(d,s)){var p=h?r:r&&r.states[c];p&&(p.ignore=!0),r&&yD(r,!0,c,u);continue}!r&&(r=new yf.A,e.setTextGuideLine(r),h||!a&&s||yD(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),yD(r,!1,c,u)}}if(r){(0,g6.NT)(r.style,n),r.style.fill=null;var f=o.get("showAbove");(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=f||!1,r.buildPath=yR}}(this,function(e,t){t=t||"labelLine";for(var n={normal:e.getModel(t)},r=0;r<vR.BV.length;r++){var i=vR.BV[r];n[i]=e.getModel([i,t])}return n}(r),{stroke:s,opacity:(0,g6.WV)(i.get(["lineStyle","opacity"]),a,1)})}},t}(vI.A),yq=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="pie",t.ignoreLabelLineUpdate=!0,t}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n,r){var i,o=e.getData(),s=this._data,a=this.group;if(!s&&o.count()>0){for(var l=o.getItemLayout(0),c=1;isNaN(l&&l.startAngle)&&c<o.count();++c)l=o.getItemLayout(c);l&&(i=l.startAngle)}if(this._emptyCircleSector&&a.remove(this._emptyCircleSector),0===o.count()&&e.get("showEmptyCircle")){var u=yU(e),h=new vI.A({shape:(0,g6.o8)(u)});h.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,a.add(h)}o.diff(s).add(function(e){var t=new yG(o,e,i);o.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=s.getItemGraphicEl(t);n.updateData(o,e,i),n.off("click"),a.add(n),o.setItemGraphicEl(e,n)}).remove(function(t){var n=s.getItemGraphicEl(t);vT.t5(n,e,t)}).execute(),function(e){var t,n,r=e.getData(),i=[],o=!1,s=(e.get("minShowLabelAngle")||0)*yP,a=r.getLayout("viewRect"),l=r.getLayout("r"),c=a.width,u=a.x,h=a.y,d=a.height;function p(e){e.ignore=!0}r.each(function(e){var a,h,f,m,g=r.getItemGraphicEl(e),v=g.shape,y=g.getTextContent(),b=g.getTextGuideLine(),x=r.getItemModel(e),w=x.getModel("label"),S=w.get("position")||x.get(["emphasis","label","position"]),A=w.get("distanceToLabelLine"),C=w.get("alignTo"),k=(0,g9.lo)(w.get("edgeDistance"),c),M=w.get("bleedMargin");null==M&&(M=Math.min(c,d)>200?10:2);var O=x.getModel("labelLine"),T=O.get("length");T=(0,g9.lo)(T,c);var _=O.get("length2");if(_=(0,g9.lo)(_,c),Math.abs(v.endAngle-v.startAngle)<s){(0,g6.__)(y.states,p),y.ignore=!0,b&&((0,g6.__)(b.states,p),b.ignore=!0);return}if(function(e){if(!e.ignore)return!0;for(var t in e.states)if(!1===e.states[t].ignore)return!0;return!1}(y)){var I=(v.startAngle+v.endAngle)/2,D=Math.cos(I),R=Math.sin(I);t=v.cx,n=v.cy;var E="inside"===S||"inner"===S;if("center"===S)a=v.cx,h=v.cy,m="center";else{var P=(E?(v.r+v.r0)/2*D:v.r*D)+t,L=(E?(v.r+v.r0)/2*R:v.r*R)+n;if(a=P+3*D,h=L+3*R,!E){var N=P+D*(T+l-v.r),B=L+R*(T+l-v.r),j=N+(D<0?-1:1)*_;a="edge"===C?D<0?u+k:u+c-k:j+(D<0?-A:A),h=B,f=[[P,L],[N,B],[j,B]]}m=E?"center":"edge"===C?D>0?"right":"left":D>0?"left":"right"}var z=Math.PI,$=0,F=w.get("rotate");if((0,g6.Et)(F))$=z/180*F;else if("center"===S)$=0;else if("radial"===F||!0===F)$=D<0?-I+z:-I;else if("tangential"===F||"tangential-noflip"===F&&"outside"!==S&&"outer"!==S){var V=Math.atan2(D,R);V<0&&(V=2*z+V),R>0&&"tangential-noflip"!==F&&(V=z+V),$=V-z}if(o=!!$,y.x=a,y.y=h,y.rotation=$,y.setStyle({verticalAlign:"middle"}),E){y.setStyle({align:m});var H=y.states.select;H&&(H.x+=y.x,H.y+=y.y)}else{var W=new yw.Ay(0,0,0,0);yB(W,y),i.push({label:y,labelLine:b,position:S,len:T,len2:_,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new yx.A(D,R),linePoints:f,textAlign:m,labelDistance:A,labelAlignTo:C,edgeDistance:k,bleedMargin:M,rect:W,unconstrainedWidth:W.width,labelStyleWidth:y.style.width})}g.setTextConfig({inside:E})}}),!o&&e.get("avoidLabelOverlap")&&function(e,t,n,r,i,o,s,a){for(var l=[],c=[],u=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++){var p=e[d].label;y$(e[d])||(p.x<t?(u=Math.min(u,p.x),l.push(e[d])):(h=Math.max(h,p.x),c.push(e[d])))}for(var d=0;d<e.length;d++){var f=e[d];if(!y$(f)&&f.linePoints){if(null!=f.labelStyleWidth)continue;var p=f.label,m=f.linePoints,g=void 0;g="edge"===f.labelAlignTo?p.x<t?m[2][0]-f.labelDistance-s-f.edgeDistance:s+i-f.edgeDistance-m[2][0]-f.labelDistance:"labelLine"===f.labelAlignTo?p.x<t?u-s-f.bleedMargin:s+i-h-f.bleedMargin:p.x<t?p.x-s-f.bleedMargin:s+i-p.x-f.bleedMargin,f.targetTextWidth=g,yN(f,g,!1)}}yL(c,t,n,r,1,i,o,s,a,h),yL(l,t,n,r,-1,i,o,s,a,u);for(var d=0;d<e.length;d++){var f=e[d];if(!y$(f)&&f.linePoints){var p=f.label,m=f.linePoints,v="edge"===f.labelAlignTo,y=p.style.padding,b=y?y[1]+y[3]:0,x=p.style.backgroundColor?0:b,w=f.rect.width+x,S=m[1][0]-m[2][0];v?p.x<t?m[2][0]=s+f.edgeDistance+w+f.labelDistance:m[2][0]=s+i-f.edgeDistance-w-f.labelDistance:(p.x<t?m[2][0]=p.x+f.labelDistance:m[2][0]=p.x-f.labelDistance,m[1][0]=m[2][0]+S),m[1][1]=m[2][1]=p.y}}}(i,t,n,l,c,d,u,h);for(var f=0;f<i.length;f++){var m=i[f],g=m.label,v=m.labelLine,y=isNaN(g.x)||isNaN(g.y);if(g){g.setStyle({align:m.textAlign}),y&&((0,g6.__)(g.states,p),g.ignore=!0);var b=g.states.select;b&&(b.x+=g.x,b.y+=g.y)}if(v){var x=m.linePoints;y||!x?((0,g6.__)(v.states,p),v.ignore=!0):(!function(e,t){if(t<=180&&t>0){t=t/180*Math.PI,yC.fromArray(e[0]),yk.fromArray(e[1]),yM.fromArray(e[2]),yx.A.sub(yO,yC,yk),yx.A.sub(yT,yM,yk);var n=yO.len(),r=yT.len();if(!(n<.001)&&!(r<.001)&&(yO.scale(1/n),yT.scale(1/r),Math.cos(t)<yO.dot(yT))){var i=yA(yk.x,yk.y,yM.x,yM.y,yC.x,yC.y,y_,!1);yI.fromArray(y_),yI.scaleAndAdd(yT,i/Math.tan(Math.PI-t));var o=yM.x!==yk.x?(yI.x-yk.x)/(yM.x-yk.x):(yI.y-yk.y)/(yM.y-yk.y);if(isNaN(o))return;o<0?yx.A.copy(yI,yk):o>1&&yx.A.copy(yI,yM),yI.toArray(e[1])}}}(x,m.minTurnAngle),function(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,yC.fromArray(e[0]),yk.fromArray(e[1]),yM.fromArray(e[2]),yx.A.sub(yO,yk,yC),yx.A.sub(yT,yM,yk);var r=yO.len(),i=yT.len();if(!(r<.001)&&!(i<.001)&&(yO.scale(1/r),yT.scale(1/i),yO.dot(t)<Math.cos(n))){var o=yA(yk.x,yk.y,yM.x,yM.y,yC.x,yC.y,y_,!1);yI.fromArray(y_);var s=Math.PI/2,a=s+Math.acos(yT.dot(t))-n;if(a>=s)yx.A.copy(yI,yM);else{yI.scaleAndAdd(yT,o/Math.tan(Math.PI/2-a));var l=yM.x!==yk.x?(yI.x-yk.x)/(yM.x-yk.x):(yI.y-yk.y)/(yM.y-yk.y);if(isNaN(l))return;l<0?yx.A.copy(yI,yk):l>1&&yx.A.copy(yI,yM)}yI.toArray(e[1])}}}(x,m.surfaceNormal,m.maxSurfaceAngle),v.setShape({points:x}),g.__hostTarget.textGuideLineConfig={anchor:new yx.A(x[0][0],x[0][1])})}}}(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,o=Math.sqrt(r*r+i*i);return o<=n.r&&o>=n.r0}},t.type="pie",t}(vj.A),yX=n("xNS"),yY=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return(0,vy.C6)(t,e),t.prototype.getInitialData=function(e,t){return(0,vx.A)(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:vA.A.color.primary}},universalTransition:{divideShape:"clone"}},t}(vb.A),yK=n("Hp"),yQ=function(){},yZ=function(e){function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return(0,vy.C6)(t,e),t.prototype.getDefaultShape=function(){return new yQ},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n,r=t.points,i=t.size,o=this.symbolProxy,s=o.shape,a=e.getContext?e.getContext():e,l=a&&i[0]<4,c=this.softClipShape;if(l){this._ctx=a;return}for(this._ctx=null,n=this._off;n<r.length;){var u=r[n++],h=r[n++];!(isNaN(u)||isNaN(h))&&(!c||c.contain(u,h))&&(s.x=u-i[0]/2,s.y=h-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=n,this.notClear=!0)},t.prototype.afterBrush=function(){var e,t=this.shape,n=t.points,r=t.size,i=this._ctx,o=this.softClipShape;if(i){for(e=this._off;e<n.length;){var s=n[e++],a=n[e++];!(isNaN(s)||isNaN(a))&&(!o||o.contain(s,a))&&i.fillRect(s-r[0]/2,a-r[1]/2,r[0],r[1])}this.incremental&&(this._off=e,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,o=Math.max(i[0],4),s=Math.max(i[1],4),a=r.length/2-1;a>=0;a--){var l=2*a,c=r[l]-o/2,u=r[l+1]-s/2;if(e>=c&&t>=u&&e<=c+o&&t<=u+s)return a}return -1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return(e=n[0],t=n[1],r.contain(e,t))?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],o=r[1],s=1/0,a=1/0,l=-1/0,c=-1/0,u=0;u<n.length;){var h=n[u++],d=n[u++];s=Math.min(h,s),l=Math.max(h,l),a=Math.min(d,a),c=Math.max(d,c)}e=this._rect=new yw.Ay(s-i/2,a-o/2,l-s+i,c-a+o)}return e},t}(vk.Ay),yJ=function(){function e(){this.group=new vM.A}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout("points");this.group.eachChild(function(e){if(null!=e.startIndex){var t=(e.endIndex-e.startIndex)*2,r=4*e.startIndex*2;n=new Float32Array(n.buffer,r,t)}e.setShape("points",n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],o=t.getLayout("points"),s=i&&i.shape.points;if(s&&s.length<2e4){var a=s.length,l=new Float32Array(a+o.length);l.set(s),l.set(o,a),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var c=this._create();c.startIndex=e.start,c.endIndex=e.end,c.incremental=n,c.setShape({points:o}),this._setCommon(c,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new yZ({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n=n||{};var i=t.getVisual("symbolSize");e.setShape("size",i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=(0,yi.v5)(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),a=s&&s.fill;a&&e.setColor(a);var l=(0,vD.z)(e);l.seriesIndex=r.seriesIndex,e.on("mousemove",function(t){l.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(l.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),y0=n("NC"),y1=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,y2(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),(0,vt.i2)(t),y2(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),!this._finished)return{update:!0};var i=(0,y0.A)("").reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(y2(e))},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new yJ:new yK.A,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(vj.A);function y2(e){return{clipShape:(0,vL.YQ)(e)}}var y5=n("yU"),y3={color:"fill",borderColor:"stroke"},y4={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},y6=(0,vt.$r)(),y9=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,t){return(0,vx.A)(null,this)},t.prototype.getDataParams=function(t,n,r){var i=e.prototype.getDataParams.call(this,t,n);return r&&(i.info=y6(r).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(vb.A),y8=n("zY"),y7=n("YQ");function be(e,t){return t=t||[0,0],g6.Tj(["x","y"],function(n,r){var i=this.getAxis(n),o=t[r],s=e[r]/2;return"category"===i.type?(0,vs.D)(i).w:Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s))},this)}var bt=n("P7"),bn=n("AT"),br=bt.Ay;function bi(e,t,n){var r=br.call(this)||this;r.type="view",r.dimensions=["x","y"],r.invertY=e,r.lgCt=t,r.lgGeo=n;var i=r.trans=[];return i[0]=(0,bt.Rd)(),i[1]=(0,bt.Rd)(),i[2]=(0,bt.Rd)(),r.mtRaw=(0,bn.vt)(),r.mtRawInv=(0,bn.vt)(),r.mtOverall=(0,bn.vt)(),r.mtOverallInv=(0,bn.vt)(),r.zoom=1,r}(0,vy.C6)(bi,br),bi.prototype.getBoundingRect=function(){return bs(null,this)},bi.prototype.getViewRect=function(){var e;return e=this,(0,yw.iZ)((0,yw.r_)(),e.viewRect)},bi.prototype.getRoamTransform=function(){return(0,bt.Ed)(this.trans[1])},bi.prototype.dataToPoint=function(e,t,n){var r=t?this.mtRaw:this.mtOverall;return n=n||[],r?(0,yS.NW)(n,e,r):(0,yS.C)(n,e)},bi.prototype.pointToData=function(e,t,n){n=n||[];var r=this.mtOverallInv;return r?(0,yS.NW)(n,e,r):(0,yS.C)(n,e)},bi.prototype.convertToPixel=function(e,t,n){var r=ba(t);return r===this?r.dataToPoint(n):null},bi.prototype.convertFromPixel=function(e,t,n){var r=ba(t);return r===this?r.pointToData(n):null},bi.prototype.containPoint=function(e){return(0,yw.iZ)(bo,this.dataRect),(0,yw.zQ)(bo,bo,this.mtOverall),(0,yw.rd)(bo,e[0],e[1])},bi.dimensions=["x","y"];var bo=(0,yw.r_)();function bs(e,t){return(0,yw.iZ)(e||(0,yw.r_)(),t.dataRect)}function ba(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function bl(e,t){return t=t||[0,0],g6.Tj([0,1],function(n){var r=t[n],i=e[n]/2,o=[],s=[];return o[n]=r-i,s[n]=r+i,o[1-n]=s[1-n]=t[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(s)[n])},this)}function bc(e,t){var n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return"category"===n.type?(0,vs.D)(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function bu(e,t){return t=t||[0,0],g6.Tj(["Radius","Angle"],function(n,r){var i=this["get"+n+"Axis"](),o=t[r],s=e[r]/2,a="category"===i.type?(0,vs.D)(i).w:Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return"Angle"===n&&(a=a*Math.PI/180),a},this)}(0,yw.r_)(),(0,bt.Rd)(),(0,bt.Rd)();var bh=n("el");function bd(e,t){t&&(t.font=t.textFont||t.font,(0,g6.$3)(t,"textStrokeWidth")&&(e.lineWidth=t.textStrokeWidth),(0,g6.$3)(t,"textAlign")&&(e.align=t.textAlign),(0,g6.$3)(t,"textVerticalAlign")&&(e.verticalAlign=t.textVerticalAlign),(0,g6.$3)(t,"textLineHeight")&&(e.lineHeight=t.textLineHeight),(0,g6.$3)(t,"textWidth")&&(e.width=t.textWidth),(0,g6.$3)(t,"textHeight")&&(e.height=t.textHeight),(0,g6.$3)(t,"textBackgroundColor")&&(e.backgroundColor=t.textBackgroundColor),(0,g6.$3)(t,"textPadding")&&(e.padding=t.textPadding),(0,g6.$3)(t,"textBorderColor")&&(e.borderColor=t.textBorderColor),(0,g6.$3)(t,"textBorderWidth")&&(e.borderWidth=t.textBorderWidth),(0,g6.$3)(t,"textBorderRadius")&&(e.borderRadius=t.textBorderRadius),(0,g6.$3)(t,"textBoxShadowColor")&&(e.shadowColor=t.textBoxShadowColor),(0,g6.$3)(t,"textBoxShadowBlur")&&(e.shadowBlur=t.textBoxShadowBlur),(0,g6.$3)(t,"textBoxShadowOffsetX")&&(e.shadowOffsetX=t.textBoxShadowOffsetX),(0,g6.$3)(t,"textBoxShadowOffsetY")&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function bp(e,t,n){e.textPosition=e.textPosition||n.position||"inside",null!=n.offset&&(e.textOffset=n.offset),null!=n.rotation&&(e.textRotation=n.rotation),null!=n.distance&&(e.textDistance=n.distance);var r=e.textPosition.indexOf("inside")>=0,i=e.fill||vA.A.color.neutral99;bf(e,t);var o=null==e.textFill;return r?o&&(e.textFill=n.insideFill||vA.A.color.neutral00,!e.textStroke&&n.insideStroke&&(e.textStroke=n.insideStroke),e.textStroke||(e.textStroke=i),null==e.textStrokeWidth&&(e.textStrokeWidth=2)):(o&&(e.textFill=e.fill||n.outsideFill||vA.A.color.neutral00),!e.textStroke&&n.outsideStroke&&(e.textStroke=n.outsideStroke)),e.text=t.text,e.rich=t.rich,(0,g6.__)(t.rich,function(e){bf(e,e)}),e}function bf(e,t){t&&((0,g6.$3)(t,"fill")&&(e.textFill=t.fill),(0,g6.$3)(t,"stroke")&&(e.textStroke=t.fill),(0,g6.$3)(t,"lineWidth")&&(e.textStrokeWidth=t.lineWidth),(0,g6.$3)(t,"font")&&(e.font=t.font),(0,g6.$3)(t,"fontStyle")&&(e.fontStyle=t.fontStyle),(0,g6.$3)(t,"fontWeight")&&(e.fontWeight=t.fontWeight),(0,g6.$3)(t,"fontSize")&&(e.fontSize=t.fontSize),(0,g6.$3)(t,"fontFamily")&&(e.fontFamily=t.fontFamily),(0,g6.$3)(t,"align")&&(e.textAlign=t.align),(0,g6.$3)(t,"verticalAlign")&&(e.textVerticalAlign=t.verticalAlign),(0,g6.$3)(t,"lineHeight")&&(e.textLineHeight=t.lineHeight),(0,g6.$3)(t,"width")&&(e.textWidth=t.width),(0,g6.$3)(t,"height")&&(e.textHeight=t.height),(0,g6.$3)(t,"backgroundColor")&&(e.textBackgroundColor=t.backgroundColor),(0,g6.$3)(t,"padding")&&(e.textPadding=t.padding),(0,g6.$3)(t,"borderColor")&&(e.textBorderColor=t.borderColor),(0,g6.$3)(t,"borderWidth")&&(e.textBorderWidth=t.borderWidth),(0,g6.$3)(t,"borderRadius")&&(e.textBorderRadius=t.borderRadius),(0,g6.$3)(t,"shadowColor")&&(e.textBoxShadowColor=t.shadowColor),(0,g6.$3)(t,"shadowBlur")&&(e.textBoxShadowBlur=t.shadowBlur),(0,g6.$3)(t,"shadowOffsetX")&&(e.textBoxShadowOffsetX=t.shadowOffsetX),(0,g6.$3)(t,"shadowOffsetY")&&(e.textBoxShadowOffsetY=t.shadowOffsetY),(0,g6.$3)(t,"textShadowColor")&&(e.textShadowColor=t.textShadowColor),(0,g6.$3)(t,"textShadowBlur")&&(e.textShadowBlur=t.textShadowBlur),(0,g6.$3)(t,"textShadowOffsetX")&&(e.textShadowOffsetX=t.textShadowOffsetX),(0,g6.$3)(t,"textShadowOffsetY")&&(e.textShadowOffsetY=t.textShadowOffsetY))}var bm=n("nXY"),bg=n("Upd"),bv=n("FUz"),by={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},bb=(0,g6.HP)(by);(0,g6.TS)(bt.Wx,function(e,t){return e[t]=1,e},{}),bt.Wx.join(", ");var bx=["","style","shape","extra"],bw=(0,vt.$r)();function bS(e,t,n,r,i){var o=e+"Animation",s=(0,vT.Jw)(e,r,i)||{},a=bw(t).userDuring;return s.duration>0&&(s.during=a?(0,g6.oI)(bO,{el:t,userDuring:a}):null,s.setToFinal=!0,s.scope=e),(0,g6.X$)(s,n[o]),s}function bA(e,t,n,r){if(e){var i=e.parent,o=bw(e).leaveToProps;if(o){var s=bS("update",e,t,n,0);s.done=function(){i&&i.remove(e),r&&r()},e.animateTo(o,s)}else i&&i.remove(e),r&&r()}}function bC(e){return"all"===e}var bk={},bM={setTransform:function(e,t){return bk.el[e]=t,this},getTransform:function(e){return bk.el[e]},setShape:function(e,t){var n=bk.el;return(n.shape||(n.shape={}))[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=bk.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=bk.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=bk.el.style;if(t)return t[e]},setExtra:function(e,t){return(bk.el.extra||(bk.el.extra={}))[e]=t,this},getExtra:function(e){var t=bk.el.extra;if(t)return t[e]}};function bO(){var e=this.el;if(e){var t=bw(e).userDuring,n=this.userDuring;if(t!==n){this.el=this.userDuring=null;return}bk.el=e,n(bM)}}function bT(e,t,n,r){var i,o=n[e];if(o){var s=t[e];if(s){var a=n.transition,l=o.transition;if(l)if(i||(i=r[e]={}),bC(l))(0,g6.X$)(i,s);else for(var c=(0,vt.qB)(l),u=0;u<c.length;u++){var h=c[u],d=s[h];i[h]=d}else if(bC(a)||(0,g6.qh)(a,e)>=0){i||(i=r[e]={});for(var p=(0,g6.HP)(s),u=0;u<p.length;u++){var f,m,h=p[u],d=s[h];f=o[h],m=d,((0,g6.Xj)(f)?f!==m:null!=f&&isFinite(f))&&(i[h]=d)}}}}}function b_(e,t,n){var r=t[e];if(r)for(var i=n[e]={},o=(0,g6.HP)(r),s=0;s<o.length;s++){var a=o[s];i[a]=(0,bv.F)(r[a])}}var bI=(0,vt.$r)(),bD=["percent","easing","shape","style","extra"],bR=n("LV"),bE="emphasis",bP="normal",bL="blur",bN="select",bB=[bP,bE,bL,bN],bj={normal:["itemStyle"],emphasis:[bE,"itemStyle"],blur:[bL,"itemStyle"],select:[bN,"itemStyle"]},bz={normal:["label"],emphasis:[bE,"label"],blur:[bL,"label"],select:[bN,"label"]},b$=["x","y"],bF={normal:{},emphasis:{},blur:{},select:{}},bV={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:g6.oI(be,e)}}},geo:function(e){var t=e.view,n=t.getBoundingRect();return{coordSys:{type:"geo",x:n.x,y:n.y,width:n.width,height:n.height,zoom:t.zoom},api:{coord:function(t){return e.dataToPoint(t)},size:g6.oI(bl,e)}}},single:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:(0,g6.oI)(bc,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),o=n.dataToAngle(r[1]),s=e.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:g6.oI(bu,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}},matrix:function(e){var t=e.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}};function bH(e){return e instanceof vk.Ay}function bW(e){return e instanceof bh.Ay}var bU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n,r){this._progressiveEls=null;var i=this._data,o=e.getData(),s=this.group,a=bY(e,o,t,n);i||s.removeAll(),o.diff(i).add(function(t){bK(n,null,t,a(t,r),e,s,o)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&bA(n,y6(n).option,e)}).update(function(t,l){bK(n,i.getItemGraphicEl(l),t,a(t,r),e,s,o)}).execute();var l=e.get("clip",!0)?(0,vL.Ip)(e.coordinateSystem,!1,e):null;l?s.setClipPath(l):s.removeClipPath(),this._data=o},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll(),this._data=null},t.prototype.incrementalRender=function(e,t,n,r,i){var o=t.getData(),s=bY(t,o,n,r),a=this._progressiveEls=[];function l(e){e.isGroup||(e.incremental=(0,vt.i2)(t),e.ensureState("emphasis").hoverLayer=vO.HOVER_LAYER_FOR_INCREMENTAL)}for(var c=e.start;c<e.end;c++){var u=bK(null,null,c,s(c,i),t,this.group,o);u&&(u.traverse(l),a.push(u))}},t.prototype.eachRendered=function(e){vO.traverseElements(this._progressiveEls||this.group,e)},t.prototype.filterForExposedEvent=function(e,t,n,r){var i=t.element;if(null==i||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1},t.type="custom",t}(vj.A);function bG(e){var t,n=e.type;if("path"===n){var r=e.shape,i=null!=r.width&&null!=r.height?{x:r.x||0,y:r.y||0,width:r.width,height:r.height}:null,o=b4(r);y6(t=vO.makePath(o,null,i,r.layout||"center")).customPathData=o}else if("image"===n)y6(t=new yo.Ay({})).customImagePath=e.style.image;else if("text"===n)t=new yr.Ay({});else if("group"===n)t=new vM.A;else if("compoundPath"===n){var r=e.shape;if(!r||!r.paths){var s="";(0,bm.$8)(s)}var a=(0,g6.Tj)(r.paths,function(e){if("path"===e.type)return vO.makePath(e.shape.pathData,e,null);var t=vO.getShapeClass(e.type);return t||(0,bm.$8)(""),new t});t=new y8.A({shape:{paths:a}})}else{var l=vO.getShapeClass(n);if(!l){var s="";(0,bm.$8)(s)}t=new l}return y6(t).customGraphicType=n,t.name=e.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function bq(e,t,n,r,i,o,s){t.stopAnimation("keyframe"),t.attr(bI(t));var a=i&&i.normal.cfg;a&&t.setTextConfig(a),r&&null==r.transition&&(r.transition=b$);var l=r&&r.style;if(l){"text"===t.type&&((0,g6.$3)(l,"textFill")&&(l.fill=l.textFill),(0,g6.$3)(l,"textStroke")&&(l.stroke=l.textStroke));var c=void 0,u=bH(t)?l.decal:null;e&&u&&(u.dirty=!0,c=(0,bg.w)(u,e)),l.__decalPattern=c}if(bW(t)&&l){var c=l.__decalPattern;c&&(l.decal=c)}!function(e,t,n,r){var i,o,s=(r=r||{}).dataIndex,a=r.isInit,l=r.clearStyle,c=n.isAnimationEnabled(),u=bw(e),h=t.style;u.userDuring=t.during;var d={},p={};if(function(e,t){for(var n=0;n<bb.length;n++){var r=bb[n],i=by[r],o=e[r];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var n=0;n<bt.Wx.length;n++){var s=bt.Wx[n];null!=e[s]&&(t[s]=e[s])}}(t,p),"compound"===e.type)for(var f=e.shape.paths,m=t.shape.paths,g=0;g<m.length;g++)b_("shape",m[g],f[g]);else b_("shape",t,p),b_("extra",t,p);if(!a&&c&&(function(e,t,n){for(var r=t.transition,i=bC(r)?bt.Wx:(0,vt.qB)(r||[]),o=0;o<i.length;o++){var s=i[o];if("style"!==s&&"shape"!==s&&"extra"!==s){var a=e[s];n[s]=a}}}(e,t,d),bT("shape",e,t,d),bT("extra",e,t,d),function(e,t,n,r){if(n){var i,o=e.style;if(o){var s=n.transition,a=t.transition;if(s&&!bC(s)){var l=(0,vt.qB)(s);i||(i=r.style={});for(var c=0;c<l.length;c++){var u=l[c],h=o[u];i[u]=h}}else if(e.getAnimationStyleProps&&(bC(a)||bC(s)||(0,g6.qh)(a,"style")>=0)){var d=e.getAnimationStyleProps(),p=d?d.style:null;if(p){i||(i=r.style={});for(var f=(0,g6.HP)(n),c=0;c<f.length;c++){var u=f[c];if(p[u]){var h=o[u];i[u]=h}}}}}}}(e,t,h,d)),p.style=h,function(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,o=0;o<i.length;o++){var s=i[o];"style"===s.targetName&&s.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}(e,p,l),i=e,o=t,(0,g6.$3)(o,"silent")&&(i.silent=o.silent),(0,g6.$3)(o,"ignore")&&(i.ignore=o.ignore),i instanceof bh.Ay&&(0,g6.$3)(o,"invisible")&&(i.invisible=o.invisible),i instanceof vk.Ay&&(0,g6.$3)(o,"autoBatch")&&(i.autoBatch=o.autoBatch),c)if(a){var v={};(0,g6.__)(bx,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(v[e]=v[e]||{}),(0,g6.X$)(e?v[e]:v,n.enterFrom))});var y=bS("enter",e,t,n,s);y.duration>0&&e.animateFrom(v,y)}else{var b=e,x=t,w=s||0,S=n,A=d;if(A){var C=bS("update",b,x,S,w);C.duration>0&&b.animateFrom(A,C)}}(function(e,t){for(var n=bw(e).leaveToProps,r=0;r<bx.length;r++){var i=bx[r],o=i?t[i]:t;o&&o.leaveTo&&(n||(n=bw(e).leaveToProps={}),i&&(n[i]=n[i]||{}),(0,g6.X$)(i?n[i]:n,o.leaveTo))}})(e,t),h?e.dirty():e.markRedraw()}(t,r,o,{dataIndex:n,isInit:s,clearStyle:!0}),function e(t,n,r){if(r.isAnimationEnabled()&&n){if((0,g6.cy)(n))return void(0,g6.__)(n,function(n){e(t,n,r)});var i=n.keyframes,o=n.duration;if(r&&null==o){var s=(0,vT.Jw)("enter",r,0);o=s&&s.duration}if(i&&o){var a=bI(t);(0,g6.__)(bx,function(e){var r;e&&!t[e]||(i.sort(function(e,t){return e.percent-t.percent}),(0,g6.__)(i,function(i){var s=t.animators,l=e?i[e]:i;if(l){var c=(0,g6.HP)(l);if(e||(c=(0,g6.pb)(c,function(e){return 0>(0,g6.qh)(bD,e)})),c.length){r||((r=t.animate(e,n.loop,!0)).scope="keyframe");for(var u=0;u<s.length;u++)s[u]!==r&&s[u].targetName===r.targetName&&s[u].stopTracks(c);e&&(a[e]=a[e]||{});var h=e?a[e]:a;(0,g6.__)(c,function(n){h[n]=((e?t[e]:t)||{})[n]}),r.whenWithKeys(o*i.percent,l,c,i.easing)}}}),r&&r.delay(n.delay||0).duration(o).start(n.easing))})}}}(t,r.keyframeAnimation,o)}function bX(e,t,n,r,i){var o=t.isGroup?null:t,s=i&&i[e].cfg;if(o){var a=o.ensureState(e);if(!1===r){var l=o.getState(e);l&&(l.style=null)}else a.style=r||null;s&&(a.textConfig=s),(0,vR.DW)(o)}}function bY(e,t,n,r){var i,o,s,a,l=e.get("renderItem");if("string"==typeof l){var c=(0,bR.Z)(l);c&&(l=c)}var u=e.coordinateSystem,h={};u&&(h=u.prepareCustoms?u.prepareCustoms(u):bV[u.type](u));for(var d=(0,g6.NT)({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.getStore().get(t.getDimensionIndex(e||0),n)},style:function(n,r){null==r&&(r=s);var i=t.getItemVisual(r,"style"),o=i&&i.fill,a=i&&i.opacity,l=w(r,bP).getItemStyle();null!=o&&(l.fill=o),null!=a&&(l.opacity=a);var c={inheritColor:(0,g6.Kg)(o)?o:vA.A.color.neutral99},u=S(r,bP),h=vE.VB(u,null,c,!1,!0);h.text=u.getShallow("show")?(0,g6.bZ)(e.getFormattedLabel(r,bP),(0,v$.i)(t,r)):null;var d=vE.sD(u,c,!1);return C(n,l),l=bp(l,h,d),n&&A(l,n),l.legacy=!0,l},ordinalRawValue:function(e,n){null==n&&(n=s),e=e||0;var r=t.getDimensionInfo(e);if(!r){var i=t.getDimensionIndex(e);return i>=0?t.getStore().get(i,n):void 0}var o=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,r){null==r&&(r=s);var i=w(r,bE).getItemStyle(),o=S(r,bE),a=vE.VB(o,null,null,!0,!0);a.text=o.getShallow("show")?(0,g6.WV)(e.getFormattedLabel(r,bE),e.getFormattedLabel(r,bP),(0,v$.i)(t,r)):null;var l=vE.sD(o,null,!0);return C(n,i),i=bp(i,a,l),n&&A(i,n),i.legacy=!0,i},visual:function(e,n){if(null==n&&(n=s),(0,g6.$3)(y3,e)){var r=t.getItemVisual(n,"style");return r?r[y3[e]]:null}if((0,g6.$3)(y4,e))return t.getItemVisual(n,e)},barLayout:function(e){if("cartesian2d"===u.type){var t=u.getBaseAxis();return function(e){if((0,vn.wl)(e.axis.scale)){for(var t=(0,vs.D)(e.axis),n=[],r=0;r<e.count||0;r++)n.push((0,g6.NT)({stackId:vp+r},e));for(var i=vm({bandWidthResult:t,seriesInfo:n}),o=[],r=0;r<e.count;r++){var s=i[vp+r];s.offsetCenter=s.offset+s.width/2,o.push(s)}return o}}((0,g6.NT)({axis:t},e))}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return vE.c8(e,n)}},h.api||{}),p={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:h.coordSys,dataInsideLength:t.count(),encode:(i=e.getData(),o={},(0,g6.__)(i.dimensions,function(e){var t=i.getDimensionInfo(e);if(!t.isExtraCoord){var n=t.coordDim;(o[n]=o[n]||[])[t.coordDimIndex]=i.getDimensionIndex(e)}}),o),itemPayload:e.get("itemPayload")||{}},f={},m={},g={},v={},y=0;y<bB.length;y++){var b=bB[y];g[b]=e.getModel(bj[b]),v[b]=e.getModel(bz[b])}function x(e){return e===s?a||(a=t.getItemModel(e)):t.getItemModel(e)}function w(e,n){return t.hasItemOption?e===s?f[n]||(f[n]=x(e).getModel(bj[n])):x(e).getModel(bj[n]):g[n]}function S(e,n){return t.hasItemOption?e===s?m[n]||(m[n]=x(e).getModel(bz[n])):x(e).getModel(bz[n]):v[n]}return function(e,n){return s=e,a=null,f={},m={},l&&l((0,g6.NT)({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},p),d)};function A(e,t){for(var n in t)(0,g6.$3)(t,n)&&(e[n]=t[n])}function C(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}}function bK(e,t,n,r,i,o,s){if(!r)return void o.remove(t);var a=bQ(e,t,n,r,i,o);return a&&s.setItemGraphicEl(n,a),a&&(0,vR.Lm)(a,r.focus,r.blurScope,r.emphasisDisabled),a}function bQ(e,t,n,r,i,o){var s,a=-1,l=t;t&&bZ(t,r,i)&&(a=(0,g6.qh)(o.childrenRef(),t),t=null);var c=!t,u=t;u?u.clearStates():(u=bG(r),l&&((s=u).copyTransform(l),bW(s)&&bW(l)&&(s.setStyle(l.style),s.z=l.z,s.z2=l.z2,s.zlevel=l.zlevel,s.invisible=l.invisible,s.ignore=l.ignore,bH(s)&&bH(l)&&s.setShape(l.shape)))),!1===r.morph?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),r.tooltipDisabled&&(u.tooltipDisabled=!0),bF.normal.cfg=bF.normal.conOpt=bF.emphasis.cfg=bF.emphasis.conOpt=bF.blur.cfg=bF.blur.conOpt=bF.select.cfg=bF.select.conOpt=null,bF.isLegacy=!1,function(e,t,n,r,i,o){if(!e.isGroup&&"compoundPath"!==e.type){bJ(n,null,o),bJ(n,bE,o);var s=o.normal.conOpt,a=o.emphasis.conOpt,l=o.blur.conOpt,c=o.select.conOpt;if(null!=s||null!=a||null!=c||null!=l){var u=e.getTextContent();if(!1===s)u&&e.removeTextContent();else{s=o.normal.conOpt=s||{type:"text"},u?u.clearStates():(u=bG(s),e.setTextContent(u)),bq(null,u,t,s,null,r,i);for(var h=s&&s.style,d=0;d<bB.length;d++){var p=bB[d];if(p!==bP){var f=o[p].conOpt;bX(p,u,f,b1(s,f,p),null)}}h?u.dirty():u.markRedraw()}}}}(u,n,r,i,c,bF),function(e,t,n,r,i){var o=n.clipPath;if(!1===o)e&&e.getClipPath()&&e.removeClipPath();else if(o){var s=e.getClipPath();s&&bZ(s,o,r)&&(s=null),s||(s=bG(o),e.setClipPath(s)),bq(null,s,t,o,null,r,i)}}(u,n,r,i,c),bq(e,u,n,r,bF,i,c),(0,g6.$3)(r,"info")&&(y6(u).info=r.info);for(var h=0;h<bB.length;h++){var d=bB[h];if(d!==bP){var p=b0(r,d),f=b1(r,p,d);bX(d,u,p,f,bF)}}var m=u;if(!m.isGroup){var g=i.currentZ,v=i.currentZLevel;m.z=g,m.zlevel=v;var y=r.z2;null!=y&&(m.z2=y||0);for(var b=0;b<bB.length;b++)!function(e,t,n){var r=n===bP,i=r?t:b0(t,n),o=i?i.z2:null;null!=o&&((r?e:e.ensureState(n)).z2=o||0)}(m,r,bB[b])}return"group"===r.type&&function(e,t,n,r,i){var o=r.children,s=o?o.length:0,a=r.$mergeChildren,l="byName"===a||r.diffChildrenByName,c=!1===a;if(s||l||c){if(l){return f={api:e,oldChildren:t.children()||[],newChildren:o||[],dataIndex:n,seriesModel:i,group:t},new y7.A(f.oldChildren,f.newChildren,b2,b2,f).add(b5).update(b5).remove(b3).execute()}c&&t.removeAll();for(var u=0;u<s;u++){var h=o[u],d=t.childAt(u);h?(null==h.ignore&&(h.ignore=!1),bQ(e,d,n,h,i,t)):d.ignore=!0}for(var p=t.childCount()-1;p>=u;p--){var f,m,g,v,y=t.childAt(p);m=t,g=y,v=i,g&&bA(g,y6(m).option,v)}}}(e,u,n,r,i),a>=0?o.replaceAt(u,a):o.add(u),u}function bZ(e,t,n){var r,i=y6(e),o=t.type,s=t.shape,a=t.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&(r=s)&&((0,g6.$3)(r,"pathData")||(0,g6.$3)(r,"d"))&&b4(s)!==i.customPathData||"image"===o&&(0,g6.$3)(a,"image")&&a.image!==i.customImagePath}function bJ(e,t,n){var r,i,o=t?b0(e,t):e,s=t?b1(e,o,bE):e.style,a=e.type,l=o?o.textConfig:null,c=e.textContent,u=c?t?b0(c,t):c:null;if(s&&(n.isLegacy||(r=!!l,i=!!u,s&&(s.legacy||!1!==s.legacy&&!r&&!i&&"tspan"!==a&&("text"===a||(0,g6.$3)(s,"text")))))){n.isLegacy=!0;var h=function(e,t,n){var r,i,o;if("text"===t)o=e;else{o={},(0,g6.$3)(e,"text")&&(o.text=e.text),(0,g6.$3)(e,"rich")&&(o.rich=e.rich),(0,g6.$3)(e,"textFill")&&(o.fill=e.textFill),(0,g6.$3)(e,"textStroke")&&(o.stroke=e.textStroke),(0,g6.$3)(e,"fontFamily")&&(o.fontFamily=e.fontFamily),(0,g6.$3)(e,"fontSize")&&(o.fontSize=e.fontSize),(0,g6.$3)(e,"fontStyle")&&(o.fontStyle=e.fontStyle),(0,g6.$3)(e,"fontWeight")&&(o.fontWeight=e.fontWeight),i={type:"text",style:o,silent:!0},r={};var s=(0,g6.$3)(e,"textPosition");n?r.position=s?e.textPosition:"inside":s&&(r.position=e.textPosition),(0,g6.$3)(e,"textPosition")&&(r.position=e.textPosition),(0,g6.$3)(e,"textOffset")&&(r.offset=e.textOffset),(0,g6.$3)(e,"textRotation")&&(r.rotation=e.textRotation),(0,g6.$3)(e,"textDistance")&&(r.distance=e.textDistance)}return bd(o,e),(0,g6.__)(o.rich,function(e){bd(e,e)}),{textConfig:r,textContent:i}}(s,a,!t);!l&&h.textConfig&&(l=h.textConfig),!u&&h.textContent&&(u=h.textContent)}if(!t&&u){var d=u;d.type||(d.type="text")}var p=t?n[t]:n.normal;p.cfg=l,p.conOpt=u}function b0(e,t){return t?e?e[t]:null:e}function b1(e,t,n){var r=t&&t.style;return null==r&&n===bE&&e&&(r=e.styleEmphasis),r}function b2(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function b5(e,t){var n=this.context,r=null!=e?n.newChildren[e]:null,i=null!=t?n.oldChildren[t]:null;bQ(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function b3(e){var t=this.context,n=t.oldChildren[e];n&&bA(n,y6(n).option,t.seriesModel)}function b4(e){return e&&(e.pathData||e.d)}var b6=n("mZ"),b9=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b6.yh.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,o){var s=this._getBrush(),a=this._getGradient(i,"inRange"),l=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,u=this.canvas,h=u.getContext("2d"),d=e.length;u.width=t,u.height=n;for(var p=0;p<d;++p){var f=e[p],m=f[0],g=f[1],v=r(f[2]);h.globalAlpha=v,h.drawImage(s,m-c,g-c)}if(!u.width||!u.height)return u;for(var y=h.getImageData(0,0,u.width,u.height),b=y.data,x=0,w=b.length,S=this.minOpacity,A=this.maxOpacity-S;x<w;){var v=b[x+3]/256,C=4*Math.floor(255*v);if(v>0){var k=o(v)?a:l;v>0&&(v=v*A+S),b[x++]=k[C],b[x++]=k[C+1],b[x++]=k[C+2],b[x++]=k[C+3]*v*256}else x+=4}return h.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=b6.yh.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var r=e.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=vA.A.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),r[o++]=i[0],r[o++]=i[1],r[o++]=i[2],r[o++]=i[3];return r},e}(),b8=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n){t.eachComponent("visualMap",function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var r,i=e.coordinateSystem;"cartesian2d"===i.type||"calendar"===i.type||"matrix"===i.type?this._renderOnGridLike(e,n,0,e.getData().count()):(0,vz.L)(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&((0,vz.L)(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){vO.traverseElements(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var o,s,a,l,c=e.coordinateSystem,u=(0,vz.g)(c,"cartesian2d"),h=(0,vz.g)(c,"matrix");if(u){var d=c.getAxis("x"),p=c.getAxis("y");o=(0,vs.D)(d).w+.5,s=(0,vs.D)(p).w+.5,a=d.scale.getExtent(),l=p.scale.getExtent()}for(var f=this.group,m=e.getData(),g=e.getModel(["emphasis","itemStyle"]).getItemStyle(),v=e.getModel(["blur","itemStyle"]).getItemStyle(),y=e.getModel(["select","itemStyle"]).getItemStyle(),b=e.get(["itemStyle","borderRadius"]),x=(0,vE.lx)(e),w=e.getModel("emphasis"),S=w.get("focus"),A=w.get("blurScope"),C=w.get("disabled"),k=u||h?[m.mapDimension("x"),m.mapDimension("y"),m.mapDimension("value")]:[m.mapDimension("time"),m.mapDimension("value")],M=n;M<r;M++){var O=void 0,T=m.getItemVisual(M,"style");if(u){var _=m.get(k[0],M),I=m.get(k[1],M);if(isNaN(m.get(k[2],M))||isNaN(_)||isNaN(I)||_<a[0]||_>a[1]||I<l[0]||I>l[1])continue;var D=c.dataToPoint([_,I]);O=new v_.A({shape:{x:D[0]-o/2,y:D[1]-s/2,width:o,height:s},style:T})}else if(h){var R=c.dataToLayout([m.get(k[0],M),m.get(k[1],M)]).rect;if(g6.Yp(R.x))continue;O=new v_.A({z2:1,shape:R,style:T})}else{if(isNaN(m.get(k[1],M)))continue;var E=c.dataToLayout([m.get(k[0],M)]),R=E.contentRect||E.rect;if(g6.Yp(R.x)||g6.Yp(R.y))continue;O=new v_.A({z2:1,shape:R,style:T})}if(m.hasItemOption){var P=m.getItemModel(M),L=P.getModel("emphasis");g=L.getModel("itemStyle").getItemStyle(),v=P.getModel(["blur","itemStyle"]).getItemStyle(),y=P.getModel(["select","itemStyle"]).getItemStyle(),b=P.get(["itemStyle","borderRadius"]),S=L.get("focus"),A=L.get("blurScope"),C=L.get("disabled"),x=(0,vE.lx)(P)}O.shape.r=b;var N=e.getRawValue(M),B="-";N&&null!=N[2]&&(B=N[2]+""),(0,vE.qM)(O,x,{labelFetcher:e,labelDataIndex:M,defaultOpacity:T.opacity,defaultText:B}),O.ensureState("emphasis").style=g,O.ensureState("blur").style=v,O.ensureState("select").style=y,(0,vR.Lm)(O,S,A,C),O.incremental=(0,vt.i2)(e,i),i&&(O.states.emphasis.hoverLayer=vO.HOVER_LAYER_FOR_INCREMENTAL),f.add(O),m.setItemGraphicEl(M,O),this._progressiveEls&&this._progressiveEls.push(O)}},t.prototype._renderOnGeo=function(e,t,n,r){var i,o,s,a,l,c,u,h=n.targetVisuals.inRange,d=n.targetVisuals.outOfRange,p=t.getData(),f=this._hmLayer||this._hmLayer||new b9;f.blurSize=t.get("blurSize"),f.pointSize=t.get("pointSize"),f.minOpacity=t.get("minOpacity"),f.maxOpacity=t.get("maxOpacity");var m=e.getViewRect().clone(),g=e.getRoamTransform();m.applyTransform(g);var v=Math.max(m.x,0),y=Math.max(m.y,0),b=Math.min(m.width+m.x,r.getWidth()),x=Math.min(m.height+m.y,r.getHeight()),w=b-v,S=x-y,A=[p.mapDimension("lng"),p.mapDimension("lat"),p.mapDimension("value")],C=p.mapArray(A,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=v,i[1]-=y,i.push(r),i}),k=n.getExtent(),M="visualMap.continuous"===n.type?(i=n.option.range,o=k[1]-k[0],i=[(i[0]-k[0])/o,(i[1]-k[0])/o],function(e){return e>=i[0]&&e<=i[1]}):(s=n.getPieceList(),a=n.option.selected,l=k[1]-k[0],c=(s=g6.Tj(s,function(e){return{interval:[(e.interval[0]-k[0])/l,(e.interval[1]-k[0])/l]}})).length,u=0,function(e){var t;for(t=u;t<c;t++){var n=s[t].interval;if(n[0]<=e&&e<=n[1]){u=t;break}}if(t===c)for(t=u-1;t>=0;t--){var n=s[t].interval;if(n[0]<=e&&e<=n[1]){u=t;break}}return t>=0&&t<c&&a[t]});f.update(C,w,S,h.color.getNormalizer(),{inRange:h.color.getColorMapper(),outOfRange:d.color.getColorMapper()},M);var O=new yo.Ay({style:{width:w,height:S,x:v,y:y,image:f.canvas},silent:!0});this.group.add(O)},t.type="heatmap",t}(vj.A),b7=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.getInitialData=function(e,t){return(0,vx.A)(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=yv.Ay.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:vA.A.color.primary}}},t}(vb.A),xe=n("wv"),xt=n("BP"),xn=n("No"),xr=n("ox2"),xi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return(0,vy.C6)(t,e),t.prototype.init=function(t,n,r){e.prototype.init.call(this,t,n,r),this._sourceManager=new xr.R(this),(0,xr.A)(this)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),(0,xr.A)(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:xn.i_},t}(xe.A),xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataset",t}return(0,vy.C6)(t,e),t.type="dataset",t}(xt.A),xs=n("oh"),xa=["x","y","radius","angle","single"],xl=(0,vt.$r)(),xc=["cartesian2d","polar","singleAxis"];function xu(e){return e+"Axis"}function xh(e){var t=e.ecModel,n={infoList:[],infoMap:(0,g6.nt)()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(xu(e),r);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,a=n.infoMap.get(s);a||(a={model:o,axisModels:[]},n.infoList.push(a),n.infoMap.set(s,a)),a.axisModels.push(i)}}}),n}function xd(e){var t=xl((0,xs.jN)(e));return t.axisProxyMap||(t.axisProxyMap=(0,g6.nt)())}function xp(e){if(e)return xd(e.ecModel).get(e.uid)}function xf(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?xp(n.model):null}var xm=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),xg=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t,n){var r=xv(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=xv(e);(0,g6.h1)(this.option,e,!0),(0,g6.h1)(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;(0,g6.__)([["start","startValue"],["end","endValue"]],function(e,r){"value"===this._rangePropMode[r]&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),t=this._targetAxisInfoMap=(0,g6.nt)();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return(0,g6.__)(xa,function(n){var r=this.getReferringComponents(xu(n),vt.UW);if(r.specified){t=!0;var i=new xm;(0,g6.__)(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0,i="vertical"===t?"y":"x",o=n.findComponents({mainType:i+"Axis"});if(s(o,i),r){var o=n.findComponents({mainType:"singleAxis",filter:function(e){return e.get("orient",!0)===t}});s(o,"single")}function s(t,n){var i=t[0];if(i){var o=new xm;if(o.add(i.componentIndex),e.set(n,o),r=!1,"x"===n||"y"===n){var s=i.getReferringComponents("grid",vt.US).models[0];s&&(0,g6.__)(t,function(e){i.componentIndex!==e.componentIndex&&s===e.getReferringComponents("grid",vt.US).models[0]&&o.add(e.componentIndex)})}}}r&&(0,g6.__)(xa,function(t){if(r){var i=n.findComponents({mainType:xu(t),filter:function(e){return"category"===e.get("type",!0)}});if(i[0]){var o=new xm;o.add(i[0].componentIndex),e.set(t,o),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e||(e=t)},this),"y"===e?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get("rangeMode");(0,g6.__)([["start","startValue"],["end","endValue"]],function(r,i){var o=null!=e[r[0]],s=null!=e[r[1]];o&&!s?t[i]="percent":!o&&s?t[i]="value":n?t[i]=n[i]:o&&(t[i]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){null==e&&(e=this.ecModel.getComponent(xu(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){(0,g6.__)(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return xp(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(xu(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;(0,g6.__)([["start","startValue"],["end","endValue"]],function(r){(null!=e[r[0]]||null!=e[r[1]])&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;(0,g6.__)(["start","startValue","end","endValue"],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getWindow().value;var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return xp(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],o=this._targetAxisInfoMap.get(i),s=0;s<o.indexList.length;s++){var a=this.getAxisProxy(i,o.indexList[s]);if(a.hostedBy(this))return a;t||(t=a)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(xe.A);function xv(e){var t={};return(0,g6.__)(["start","end","startValue","endValue","throttle"],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var xy=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.type="dataZoom.inside",t.defaultOption=(0,vS.G_)(xg.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(xg),xb=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n},t.type="dataZoom",t}(xt.A);function xx(e,t,n,r,i,o){e=e||0;var s,a=(0,g9.Tr)(n[1],-n[0]);if(null!=i&&(i=xS(i,[0,a])),null!=o&&(o=Math.max(o,null!=i?i:0)),"all"===r){var l=Math.abs((0,g9.Tr)(t[1],-t[0]));l=xS(l,[0,a]),i=o=xS(l,[i,o]),r=0}t[0]=xS(t[0],n),t[1]=xS(t[1],n);var c=xw(t,r);t[r]+=e;var u=i||0,h=n.slice();return c.sign<0?h[0]=(0,g9.Tr)(h[0],u):h[1]=(0,g9.Tr)(h[1],-u),t[r]=xS(t[r],h),s=xw(t,r),null!=i&&(s.sign!==c.sign||s.span<i)&&(t[1-r]=(0,g9.Tr)(t[r],c.sign*i)),s=xw(t,r),null!=o&&s.span>o&&(t[1-r]=(0,g9.Tr)(t[r],s.sign*o)),t}function xw(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function xS(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var xA=n("jp"),xC=n("lX"),xk=n("Hr"),xM=(0,vt.$r)();xk.OH({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},g6.lQ);var xO={axisPointer:1,tooltip:1,brush:1};function xT(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||xO.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var o=(0,vO.retrieveZInfo)(r),s=(0,vO.retrieveZInfo)(n);return!(0>=(o.zlevel-s.zlevel||o.z-s.z))}var x_=function(e){function t(t){var n=e.call(this)||this;n._zr=t;var r=(0,g6.oI)(n._mousedownHandler,n),i=(0,g6.oI)(n._mousemoveHandler,n),o=(0,g6.oI)(n._mouseupHandler,n),s=(0,g6.oI)(n._mousewheelHandler,n),a=(0,g6.oI)(n._pinchHandler,n);return n.enable=function(e,n){var l=n.zInfo,c=(0,vO.retrieveZInfo)(l.component),u=c.z,h=c.zlevel,d={component:l.component,z:u,zlevel:h,z2:(0,g6.bZ)(l.z2,-1/0)},p=(0,g6.X$)({},n.triggerInfo);this._opt=(0,g6.NT)((0,g6.X$)({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:d,triggerInfo:p,cursorGrab:"grab",cursorGrabbing:"grabbing"}),null==e&&(e=!0),this._enabled&&this._controlType===e||(this.disable(),this._enabled=!0,(!0===e||"move"===e||"pan"===e)&&(xE(t,"mousedown",r,d),xE(t,"mousemove",i,d),xE(t,"mouseup",o,d)),(!0===e||"scale"===e||"zoom"===e)&&(xE(t,"mousewheel",s,d),xE(t,"pinch",a,d)))},n.disable=function(){this._enabled&&(this._enabled=!1,xP(t,"mousedown",r),xP(t,"mousemove",i),xP(t,"mouseup",o),xP(t,"mousewheel",s),xP(t,"pinch",a))},n}return(0,vy.C6)(t,e),t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(xT(e,r.api,i.component))return!1;var o=r.triggerInfo,s=o.roamTrigger,a=!1;return"global"===s&&(a=!0),a||(a=o.isInSelf(e,t,n)),a&&o.isInClip&&!o.isInClip(e,t,n)&&(a=!1),a},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;return!i&&this._checkPointer(e,t,n)?this._opt.cursorGrab:r?i&&i.cursor||"default":void 0},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(xC.W5(e)||xI(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!("pinch"===e.gestureEvent||xM(t).globalPan||xI(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!xN("moveOnMouseMove",e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var o=this._x,s=this._y,a=n-o,l=r-s;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&xC.ds(e.event),e.__ecRoamConsumed=!0,xL(this,"pan","moveOnMouseMove",e,{dx:a,dy:l,oldX:o,oldY:s,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!xI(e)){var t=this._zr;if(!xC.W5(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!xI(e)){var t=xN("zoomOnMouseWheel",e,this._opt),n=xN("moveOnMouseWheel",e,this._opt),r=e.wheelDelta,i=Math.abs(r),o=e.offsetX,s=e.offsetY;if(0!==r&&(t||n)){if(t){var a=i>3?1.4:i>1?1.2:1.1;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:r>0?a:1/a,originX:o,originY:s,isAvailableBehavior:null})}if(n){var l=Math.abs(r);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:s,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(xM(this._zr).globalPan||xI(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(xC.ds(r.event),r.__ecRoamConsumed=!0,xL(e,t,n,r,i))},t}(xA.A);function xI(e){return e.__ecRoamConsumed}var xD=(0,vt.$r)();function xR(e){var t=xD(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function xE(e,t,n,r){for(var i,o,s,a=xR(e).roam,l=a[t]=a[t]||[],c=0;c<l.length;c++){var u=l[c].zInfoParsed;if(0>=(u.zlevel-r.zlevel||u.z-r.z||u.z2-r.z2))break}l.splice(c,0,{listener:n,zInfoParsed:r}),i=e,o=t,(s=xR(i)).uniform[o]||i.on(o,s.uniform[o]=function(e){var t=s.roam[o];if(t)for(var n=0;n<t.length;n++)t[n].listener(e)})}function xP(e,t,n){for(var r=xR(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||function(e,t){var n=xR(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}(e,t);return}}function xL(e,t,n,r,i){i.isAvailableBehavior=(0,g6.oI)(xN,null,n,r),e.trigger(t,i)}function xN(e,t,n){var r=n[e];return!e||r&&(!(0,g6.Kg)(r)||t.event[r+"Key"])}var xB=(0,vt.$r)();function xj(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function xz(e,t){e.isDisposed()||e.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function x$(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}var xF=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return(0,vy.C6)(t,e),t.prototype.render=function(t,n,r){var i;(e.prototype.render.apply(this,arguments),t.noTarget())?this._clear():(this.range=t.getPercentRange(),i={pan:(0,g6.oI)(xV.pan,this),zoom:(0,g6.oI)(xV.zoom,this),scrollMove:(0,g6.oI)(xV.scrollMove,this)},xB(r).coordSysRecordMap.each(function(e){var n=e.dataZoomInfoMap.get(t.uid);n&&(n.getRange=i)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){!function(e,t){for(var n=xB(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var o=r[i],s=n.get(o),a=s.dataZoomInfoMap;if(a){var l=t.uid;a.get(l)&&(a.removeKey(l),a.keys().length||xj(n,s))}}}(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(xb),xV={zoom:function(e,t,n,r){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var a=xW[t](null,[r.originX,r.originY],s,n,e),l=(a.signal>0?a.pixelStart+a.pixelLength-a.pixel:a.pixel-a.pixelStart)/a.pixelLength*(o[1]-o[0])+o[0],c=Math.max(1/r.scale,0);o[0]=(o[0]-l)*c+l,o[1]=(o[1]-l)*c+l;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(xx(0,o,[0,100],0,u.minSpan,u.maxSpan),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}},pan:xH(function(e,t,n,r,i,o){var s=xW[r]([o.oldX,o.oldY],[o.newX,o.newY],t,i,n);return s.signal*(e[1]-e[0])*s.pixel/s.pixelLength}),scrollMove:xH(function(e,t,n,r,i,o){return xW[r]([0,0],[o.scrollDelta,o.scrollDelta],t,i,n).signal*(e[1]-e[0])*o.scrollDelta})};function xH(e){return function(t,n,r,i){var o=this.range,s=o.slice(),a=t.axisModels[0];if(a&&(xx(e(s,a,t,n,r,i),s,[0,100],"all"),this.range=s,o[0]!==s[0]||o[1]!==s[1]))return s}}var xW={grid:function(e,t,n,r,i){var o=n.axis,s={},a=i.model.coordinateSystem.getRect();return e=e||[0,0],"x"===o.dim?(s.pixel=t[0]-e[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s},polar:function(e,t,n,r,i){var o=n.axis,s={},a=i.model.coordinateSystem,l=a.getRadiusAxis().getExtent(),c=a.getAngleAxis().getExtent();return e=e?a.pointToCoord(e):[0,0],t=a.pointToCoord(t),"radiusAxis"===n.mainType?(s.pixel=t[0]-e[0],s.pixelLength=l[1]-l[0],s.pixelStart=l[0],s.signal=o.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=c[1]-c[0],s.pixelStart=c[0],s.signal=o.inverse?-1:1),s},singleAxis:function(e,t,n,r,i){var o=n.axis,s=i.model.coordinateSystem.getRect(),a={};return e=e||[0,0],"horizontal"===o.orient?(a.pixel=t[0]-e[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=t[1]-e[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a}},xU=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getWindow=function(){return(0,g6.o8)(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(n=t.get("coordinateSystem"),(0,g6.qh)(xc,n)>=0){var n,r=xu(this._dimName),i=t.getReferringComponents(r,vt.US).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},e.prototype.getMinMaxSpan=function(){return(0,g6.o8)(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t,n=this._extent,r=this.getAxisModel().axis,i=r.scale,o=this._dataZoomModel.getRangePropMode(),s=[0,100],a=[],l=[],c=[!1,!1];(0,g6.__)(["start","end"],function(r,u){var h=e[r],d=e[r+"Value"];"percent"===o[u]?(null==h&&(h=s[u]),d=(0,g9.Cb)(h,s,n),c[u]=!0):(t=!0,null==d?d=n[u]:(d=i.parse(d),i.sanitize&&(d=i.sanitize(d,n))),h=(0,g9.Cb)(d,n,s)),l[u]=null==d||isNaN(d)?n[u]:d,a[u]=null==h||isNaN(h)?s[u]:h}),(0,g9.Y6)(l),(0,g9.Y6)(a);var u=this._minMaxSpan;function h(e,t,n,r,i){var o=i?"Span":"ValueSpan";xx(0,e,n,"all",u["min"+o],u["max"+o]);for(var s=0;s<2;s++)t[s]=(0,g9.Cb)(e[s],n,r,!0),i&&(t[s]=t[s],c[s]=!0);(0,vt.U2)(t)}t?h(l,a,n,s,!1):h(a,l,s,n,!0);var d=(0,vn.wl)(i)||(0,vn.oY)(i),p=r.getExtent(),f=(0,g9.NY)(p[1]-p[0]),m=d?0:(0,g9.EO)(l,f,.5);(0,g6.__)([[0,g9.ih],[1,g9.Zr]],function(e){var t=e[0],r=e[1];c[t]&&isFinite(m)&&(l[t]=(0,g9.LI)(l[t],m),l[t]=(0,g9.rp)(n[1],(0,g9.JB)(n[0],l[t])),a[t]===s[t]&&(l[t]=n[t],d&&(l[t]=r(l[t]))))}),(0,vt.U2)(l);var g=[(0,g9.Cb)(l[0],n,s,!0),(0,g9.Cb)(l[1],n,s,!0)];return(0,vt.U2)(g),{value:l,percent:a,percentInverted:g,valuePrecision:m}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;(0,vi.DT)(n,vi.fK);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=(0,g6.NT)({start:t[0],end:t[1]},i));var o=this._window=this.calculateDataWindow(i),s=o.percent,a=o.value;0!==s[0]&&r.setZoomMM(0,a[0]),100!==s[1]&&r.setZoomMM(1,a[1])}},e.prototype.filterData=function(e,t){if(this.hostedBy(e)){var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get("filterMode"),o=this._window.value;"none"!==i&&(0,g6.__)(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if("weakFilter"===i){var s=t.getStore(),a=(0,g6.Tj)(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,l=0;l<r.length;l++){var c=s.get(a[l],e),u=!isNaN(c),h=c<o[0],d=c>o[1];if(u&&!h&&!d)return!0;u&&(i=!0),h&&(t=!0),d&&(n=!0)}return i&&t&&n})}else(0,g6.__)(r,function(n){if("empty"===i)e.setData(t=t.map(n,function(e){var t;return(t=e)>=o[0]&&t<=o[1]?e:0/0}));else{var r={};r[n]=o,t.selectRange(r)}});(0,g6.__)(r,function(e){t.setApproximateExtent(o,e)})}})}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;(0,g6.__)(["min","max"],function(r){var i=t.get(r+"Span"),o=t.get(r+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?i=(0,g9.Cb)(n[0]+o,n,[0,100],!0):null!=i&&(o=(0,g9.Cb)(i,[0,100],n,!0)-n[0]),e[r+"Span"]=i,e[r+"ValueSpan"]=o},this)},e}(),xG={dirtyOnOverallProgress:!0,getTargetSeries:function(e){var t,n=[];t=function(t,r,i,o){if(!xp(i)){var s=new xU(t,r,o,e);n.push(s),xd(i.ecModel).set(i.uid,s)}},e.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(r,i){var o=e.getComponent(xu(r),i);t(r,i,o,n)})});var r=(0,g6.nt)();return(0,g6.__)(n,function(e){(0,g6.__)(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent("dataZoom",function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),o=xf(e,i);o?n.push([i,o]):i.reset(e,null)}),(0,g6.__)(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent("dataZoom",function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}},xq=(0,vt.EV)();function xX(e){xq(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,xG),e.registerAction("dataZoom",function(e,t){var n=function(e,t){var n,r=(0,g6.nt)(),i=[],o=(0,g6.nt)();e.eachComponent({mainType:"dataZoom",query:t},function(e){o.get(e.uid)||a(e)});do n=!1,e.eachComponent("dataZoom",s);while(n)function s(e){var t;!o.get(e.uid)&&(t=!1,e.eachTargetAxis(function(e,n){var i=r.get(e);i&&i[n]&&(t=!0)}),t)&&(a(e),n=!0)}function a(e){o.set(e.uid,!0),i.push(e),e.eachTargetAxis(function(e,t){(r.get(e)||r.set(e,[]))[t]=!0})}return i}(t,e);(0,g6.__)(n,function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),e.registerSubTypeDefaulter("dataZoom",function(){return"slider"})})}function xY(e){xX(e),e.registerComponentModel(xy),e.registerComponentView(xF),e.registerUpdateLifecycle("coordsys:aftercreate",function(e,t){var n=xB(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=(0,g6.nt)());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(e){var n=xh(e);(0,g6.__)(n.infoList,function(n){var i,o,s,a=n.model.uid,l=r.get(a)||r.set(a,(s=(o={model:i=n.model,containsPoint:(0,g6.cF)(x$,i),dispatchAction:(0,g6.cF)(xz,t),dataZoomInfoMap:null,controller:null}).controller=new x_(t.getZr()),(0,g6.__)(["pan","zoom","scrollMove"],function(e){s.on(e,function(t){var n=[];o.dataZoomInfoMap.each(function(r){if(t.isAvailableBehavior(r.model.option)){var i=(r.getRange||{})[e],s=i&&i(r.dzReferCoordSysInfo,o.model.mainType,o.controller,t);!r.model.get("disabled",!0)&&s&&n.push({dataZoomId:r.model.id,start:s[0],end:s[1]})}}),n.length&&o.dispatchAction(n)})}),o));(l.dataZoomInfoMap||(l.dataZoomInfoMap=(0,g6.nt)())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n,i,o,s,a,l,c,u=e.controller,h=e.dataZoomInfoMap;if(h){var d=h.keys()[0];null!=d&&(c=h.get(d))}if(!c)return void xj(r,e);var p=(s="type_",a={type_true:2,type_move:1,type_false:0,type_undefined:-1},l=!0,h.each(function(e){var t=e.model,r=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");a[s+r]>a[s+n]&&(n=r),l=l&&t.get("preventDefaultMouseMove",!0),i=(0,g6.bZ)(t.get("cursorGrab",!0),i),o=(0,g6.bZ)(t.get("cursorGrabbing",!0),o)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!l,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint},cursorGrab:i,cursorGrabbing:o}});u.enable(p.controlType,p.opt),vP.N(e,"dispatchAction",c.model.get("throttle",!0),"fixRate")})})}var xK=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=(0,vS.G_)(xg.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:vA.A.color.accent10,borderRadius:0,backgroundColor:vA.A.color.transparent,dataBackground:{lineStyle:{color:vA.A.color.accent30,width:.5},areaStyle:{color:vA.A.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:vA.A.color.accent40,width:.5},areaStyle:{color:vA.A.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:vA.A.color.neutral00,borderColor:vA.A.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:vA.A.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:vA.A.color.tertiary},brushSelect:!0,brushStyle:{color:vA.A.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:vA.A.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(xg),xQ=n("hC"),xZ=v_.A,xJ="horizontal",x0="vertical",x1=["line","bar","candlestick","scatter"],x2={easing:"cubicOut",duration:100,delay:0},x5=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t){this.api=t,this._onBrush=(0,g6.oI)(this._onBrush,this),this._onBrushEnd=(0,g6.oI)(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),vP.N(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show"))return void this.group.removeAll();if(t.noTarget()){this._clear(),this.group.removeAll();return}i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){vP.IU(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new vM.A;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get("brushSelect"),r=yF.Lj(e,t).refContainer,i=this._findCoordRect(),o=e.get("defaultLocationEdgeGap",!0)||0,s=this._orient===xJ?{right:r.width-i.x-i.width,top:r.height-30-o-7*!!n,width:i.width,height:30}:{right:o,top:i.y,width:30,height:i.height},a=yF.vs(e.option);(0,g6.__)(["right","top","width","height"],function(e){"ph"===a[e]&&(a[e]=s[e])});var l=yF.dV(a,r);this._location={x:l.x,y:l.y},this._size=[l.width,l.height],this._orient===x0&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get("inverse"),o=this._displayables.sliderGroup,s=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==xJ||i?n===xJ&&i?{scaleY:s?1:-1,scaleX:-1}:n!==x0||i?{scaleY:s?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:s?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:s?1:-1,scaleX:1});var a=e.getBoundingRect([o]),l=isNaN(a.x)?0:a.x,c=isNaN(a.y)?0:a.y;e.x=t.x-l,e.y=t.y-c,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get("brushSelect");n.add(new xZ({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var i=new xZ({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:(0,g6.oI)(this._onClickPanel,this)}),o=this.api.getZr();r?(i.on("mousedown",this._onBrushStart,this),i.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],e){var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),s=o&&i.getDimensionInfo(o)?r.getShadowDim():e.otherDim;if(null!=s){var a=this._shadowPolygonPts,l=this._shadowPolylinePts;if(i!==this._shadowData||s!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var c,u=i.getDataExtent(e.thisDim),h=i.getDataExtent(s),d=(h[1]-h[0])*.3;h=[h[0]-d,h[1]+d];var p=[0,t[1]],f=[0,t[0]],m=[[t[0],0],[0,0]],g=[],v=f[1]/Math.max(1,i.count()-1),y=t[0]/(u[1]-u[0]),b="time"===e.thisAxis.type,x=-v,w=Math.round(i.count()/t[0]);i.each([e.thisDim,s],function(e,t,n){if(w>0&&n%w){b||(x+=v);return}x=b?(e-u[0])*y:x+v;var r=null==t||isNaN(t)||""===t,i=r?0:(0,g9.Cb)(t,h,p,!0);r&&!c&&n?(m.push([m[m.length-1][0],0]),g.push([g[g.length-1][0],0])):!r&&c&&(m.push([x,0]),g.push([x,0])),r||(m.push([x,i]),g.push([x,i])),c=r}),a=this._shadowPolygonPts=m,l=this._shadowPolylinePts=g}this._shadowData=i,this._shadowDim=s,this._shadowSize=[t[0],t[1]];for(var S=this.dataZoomModel,A=0;A<3;A++){var C=function(e){var t=S.getModel(e?"selectedDataBackground":"dataBackground"),n=new vM.A,r=new xQ.A({shape:{points:a},segmentIgnoreThreshold:1,style:t.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),i=new yf.A({shape:{points:l},segmentIgnoreThreshold:1,style:t.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}(1===A);this._displayables.sliderGroup.add(C),this._displayables.dataShadowSegs.push(C)}}}},t.prototype._prepareDataShadowInfo=function(){var e,t=this.dataZoomModel,n=t.get("showDataShadow");if(!1!==n){var r=this.ecModel;return t.eachTargetAxis(function(i,o){var s=t.getAxisProxy(i,o).getTargetSeriesModels();(0,g6.__)(s,function(t){if(!e&&!(!0!==n&&0>(0,g6.qh)(x1,t.get("type")))){var s,a=r.getComponent(xu(i),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[i],c=t.coordinateSystem;null!=l&&c.getOtherAxis&&(s=c.getOtherAxis(a).inverse),l=t.getData().mapDimension(l);var u=t.getData().mapDimension(i);e={thisAxis:a,series:t,thisDim:u,otherDim:l,otherAxisInverse:s}}},this)},this),e}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,o=this._size,s=this.dataZoomModel,a=this.api,l=s.get("borderRadius")||0,c=s.get("brushSelect"),u=t.filler=new xZ({silent:c,style:{fill:s.get("fillerColor")},textConfig:{position:"inside"}});i.add(u),i.add(new xZ({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:s.get("dataBackgroundColor")||s.get("borderColor"),lineWidth:1,fill:vA.A.color.transparent}})),(0,g6.__)([0,1],function(t){var o=s.get("handleIcon");!yi.$V[o]&&0>o.indexOf("path://")&&0>o.indexOf("image://")&&(o="path://"+o);var a=(0,yi.v5)(o,-1,0,2,2,null,!0);a.attr({cursor:"vertical"===this._orient?"ns-resize":"ew-resize",draggable:!0,drift:(0,g6.oI)(this._onDragMove,this,t),ondragend:(0,g6.oI)(this._onDragEnd,this),onmouseover:(0,g6.oI)(this._onOverDataInfoTriggerArea,this,!0),onmouseout:(0,g6.oI)(this._onOverDataInfoTriggerArea,this,!1),z2:5});var l=a.getBoundingRect(),c=s.get("handleSize");this._handleHeight=(0,g9.lo)(c,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,a.setStyle(s.getModel("handleStyle").getItemStyle()),a.style.strokeNoScale=!0,a.rectHover=!0,a.ensureState("emphasis").style=s.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,vR.iJ)(a);var u=s.get("handleColor");null!=u&&(a.style.fill=u),i.add(n[t]=a);var h=s.getModel("textStyle"),d=(s.get("handleLabel")||{}).show||!1;e.add(r[t]=new yr.Ay({silent:!0,invisible:!d,style:(0,vE.VB)(h,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:h.getTextColor(),font:h.getFont()}),z2:10}))},this);var h=u;if(c){var d=(0,g9.lo)(s.get("moveHandleSize"),o[1]),p=t.moveHandle=new v_.A({style:s.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:d}}),f=.8*d,m=t.moveHandleIcon=(0,yi.v5)(s.get("moveHandleIcon"),-f/2,-f/2,f,f,vA.A.color.neutral00,!0);m.silent=!0,m.y=o[1]+d/2-.5,p.ensureState("emphasis").style=s.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var g=Math.min(o[1]/2,Math.max(d,10));(h=t.moveZone=new v_.A({invisible:!0,shape:{y:o[1]-g,height:d+g}})).on("mouseover",function(){a.enterEmphasis(p)}).on("mouseout",function(){a.leaveEmphasis(p)}),i.add(p),i.add(m),i.add(h)}h.attr({draggable:!0,cursor:"grab",drift:(0,g6.oI)(this._onActualMoveZoneDrift,this),ondragstart:(0,g6.oI)(this._onActualMoveZoneDragStart,this),ondragend:(0,g6.oI)(this._onActualMoveZoneDragEnd,this),onmouseover:(0,g6.oI)(this._onOverDataInfoTriggerArea,this,!0),onmouseout:(0,g6.oI)(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[(0,g9.Cb)(e[0],[0,100],t,!0),(0,g9.Cb)(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),s=[0,100];xx(t,r,i,n.get("zoomLock")?"all":e,null!=o.minSpan?(0,g9.Cb)(o.minSpan,s,i,!0):null,null!=o.maxSpan?(0,g9.Cb)(o.maxSpan,s,i,!0):null);var a=this._range,l=this._range=(0,g9.Y6)([(0,g9.Cb)(r[0],i,s,!0),(0,g9.Cb)(r[1],i,s,!0)]);return!a||a[0]!==l[0]||a[1]!==l[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=(0,g9.Y6)(n.slice()),i=this._size;(0,g6.__)([0,1],function(e){var r=t.handles[e],o=this._handleHeight;r.attr({scaleX:o/2,scaleY:o/2,x:n[e]+(e?-1:1),y:i[1]/2-o/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var o={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(o),t.moveZone.setShape(o),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr("x",o.x+o.width/2));for(var s=t.dataShadowSegs,a=[0,r[0],r[1],i[0]],l=0;l<s.length;l++){var c=s[l],u=c.getClipPath();u||(u=new v_.A,c.setClipPath(u)),u.setShape({x:a[l],y:0,width:a[l+1]-a[l],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,o=["",""];if(t.get("showDetail")){var s=t.findRepresentativeAxisProxy(),a=s.getAxisModel().axis.scale;if(s){var l,c=this._range;if(e){var u={start:c[0],end:c[1]},h=xf(t,s);if(h){var d=h.calculateDataWindow(u).percentInverted;u={start:d[0],end:d[1]}}l=s.calculateDataWindow(u)}else l=s.getWindow();o=[x3(t,0,l,a),x3(t,1,l,a)]}}var p=(0,g9.Y6)(this._handleEnds.slice());function f(e){var t=vO.getTransform(n.handles[e].parent,this.group),s=vO.transformDirection(0===e?"right":"left",t),a=this._handleWidth/2+5,l=vO.applyTransform([p[e]+(0===e?-a:a),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===xJ?"middle":s,align:i===xJ?s:"center",text:o[e]})}f.call(this,0),f.call(this,1)},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get("handleLabel")||{}).show||!1,n=this.dataZoomModel.getModel(["emphasis","handleLabel"]).get("show")||!1,r=e||this._dragging?n:t,i=this._displayables,o=i.handleLabels;o[0].attr("invisible",!r),o[1].attr("invisible",!r),i.moveHandle&&this.api[r?"enterEmphasis":"leaveEmphasis"](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle("grabbing"),this._onDragMove("all",e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr("cursor","grabbing"),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr("cursor","grab"),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,xC.ds(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),o=vO.applyTransform([t,n],i,!0),s=this._updateInterval(e,o[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),s&&a&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0)&&!(n[0]>t[0])&&!(n[1]<0)&&!(n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,o=this._updateInterval("all",n[0]-i);this._updateView(),o&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new yx.A(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr("ignore",!0);var n=t.shape;if(!(new Date-this._brushStartTime<200&&5>Math.abs(n.width))){var r=this._getViewExtent(),i=[0,100],o=this._handleEnds=[n.x,n.x+n.width],s=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();xx(0,o,r,0,null!=s.minSpan?(0,g9.Cb)(s.minSpan,i,r,!0):null,null!=s.maxSpan?(0,g9.Cb)(s.maxSpan,i,r,!0):null),this._range=(0,g9.Y6)([(0,g9.Cb)(o[0],r,i,!0),(0,g9.Cb)(o[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(xC.ds(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new xZ({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(i)),i.attr("ignore",!1);var o=this._brushStart,s=this._displayables.sliderGroup,a=s.transformCoordToLocal(e,t),l=s.transformCoordToLocal(o.x,o.y),c=this._size;a[0]=Math.max(Math.min(c[0],a[0]),0),i.setShape({x:l[0],y:0,width:a[0]-l[0],height:c[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?x2:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=xh(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:.2*r,y:.2*i,width:.6*r,height:.6*i}}return e},t.type="dataZoom.slider",t}(xb);function x3(e,t,n,r){var i=e.get("labelFormatter"),o=e.get("labelPrecision");(null==o||"auto"===o)&&(o=n.valuePrecision);var s=n.value[t],a=null==s||isNaN(s)?"":(0,vn.wl)(r)||(0,vn.oY)(r)?r.getLabel({value:Math.round(s)}):isFinite(o)?(0,g9.LI)(s,o,!0):s+"";return(0,g6.Tn)(i)?i(s,a):(0,g6.Kg)(i)?i.replace("{value}",a):a}function x4(e){e.registerComponentModel(xK),e.registerComponentView(x5),xX(e)}var x6=n("Sk"),x9=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),g6.cy(t)&&g6.__(t,function(e,r){var i;g6.Kg(e)&&(e={type:e}),t[r]=g6.h1(e,"all"===(i=e.type)?{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])}:"inverse"===i?{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}:void 0)})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}t||this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i,o=r.name;if(n.push(o),r.legendVisualProvider){var s=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(s)),s.length?t=t.concat(s):i=!0}else i=!0;i&&(0,vt.O0)(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get("data")||t,i=g6.nt(),o=g6.Tj(r,function(e){return((g6.Kg(e)||g6.Et(e))&&(e={name:e}),i.get(e.name))?null:(i.set(e.name,!0),new x6.A(e,this,this.ecModel))},this);this._data=g6.pb(o,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;g6.__(n,function(e){t[e.get("name")]=!1})}t[e]=!0},t.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;g6.__(e,function(e){t[e.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;g6.__(e,function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&g6.qh(this._availableNames,e)>=0},t.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:vA.A.size.m,align:"auto",backgroundColor:vA.A.color.transparent,borderColor:vA.A.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:vA.A.color.disabled,inactiveBorderColor:vA.A.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:vA.A.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:vA.A.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:vA.A.color.tertiary,borderWidth:1,borderColor:vA.A.color.border},emphasis:{selectorLabel:{show:!0,color:vA.A.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(xe.A),x8=n("x4z"),x7=n("s7");function we(e,t){var n=x7.QX(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),new v_.A({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1})}var wt=g6.cF,wn=g6.__,wr=vM.A,wi=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return(0,vy.C6)(t,e),t.prototype.init=function(){this.group.add(this._contentGroup=new wr),this.group.add(this._selectorGroup=new wr),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var i=e.get("align"),o=e.get("orient");i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===o?"right":"left");var s=e.get("selector",!0),a=e.get("selectorPosition",!0);s&&(!a||"auto"===a)&&(a="horizontal"===o?"end":"start"),this.renderInner(i,e,t,n,s,o,a);var l=yF.Lj(e,n).refContainer,c=e.getBoxLayoutParams(),u=e.get("padding"),h=yF.dV(c,l,u),d=this.layoutInner(e,i,h,r,s,a),p=yF.dV(g6.NT({width:d.width,height:d.height},c),l,u);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=we(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,o,s){var a=this.getContentGroup(),l=g6.nt(),c=t.get("selectedMode"),u=t.get("triggerEvent"),h=[];n.eachRawSeries(function(e){e.get("legendHoverLink")||h.push(e.id)}),wn(t.getData(),function(i,o){var s=this,d=i.get("name");if(!this.newlineDisabled&&(""===d||"\n"===d)){var p=new wr;p.newline=!0,a.add(p);return}var f=n.getSeriesByName(d)[0];if(!l.get(d))if(f){var m=f.getData(),g=m.getVisual("legendLineStyle")||{},v=m.getVisual("legendIcon"),y=m.getVisual("style"),b=this._createItem(f,d,o,i,t,e,g,y,v,c,r);b.on("click",wt(wo,d,null,r,h)).on("mouseover",wt(ws,f.name,null,r,h)).on("mouseout",wt(wa,f.name,null,r,h)),n.ssr&&b.eachChild(function(e){var t=(0,vD.z)(e);t.seriesIndex=f.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),u&&b.eachChild(function(e){s.packEventData(e,t,f,o,d)}),l.set(d,!0)}else n.eachRawSeries(function(s){var a=this;if(!l.get(d)&&s.legendVisualProvider){var p=s.legendVisualProvider;if(!p.containName(d))return;var f=p.indexOfName(d),m=p.getItemVisual(f,"style"),g=p.getItemVisual(f,"legendIcon"),v=(0,x8.qg)(m.fill);v&&0===v[3]&&(v[3]=.2,m=g6.X$(g6.X$({},m),{fill:(0,x8.As)(v,"rgba")}));var y=this._createItem(s,d,o,i,t,e,{},m,g,c,r);y.on("click",wt(wo,null,d,r,h)).on("mouseover",wt(ws,null,d,r,h)).on("mouseout",wt(wa,null,d,r,h)),n.ssr&&y.eachChild(function(e){var t=(0,vD.z)(e);t.seriesIndex=s.seriesIndex,t.dataIndex=o,t.ssrType="legend"}),u&&y.eachChild(function(e){a.packEventData(e,t,s,o,d)}),l.set(d,!0)}},this)},this),i&&this._createSelector(i,t,r,o,s)},t.prototype.packEventData=function(e,t,n,r,i){var o={componentType:"legend",componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};(0,vD.z)(e).eventData=o},t.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();wn(e,function(e){var r=e.type,i=new yr.Ay({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect",legendId:t.id})}});o.add(i);var s=t.getModel("selectorLabel"),a=t.getModel(["emphasis","selectorLabel"]);(0,vE.qM)(i,{normal:s,emphasis:a},{defaultText:e.title}),(0,vR.iJ)(i)})},t.prototype._createItem=function(e,t,n,r,i,o,s,a,l,c,u){var h=e.visualDrawType,d=i.get("itemWidth"),p=i.get("itemHeight"),f=i.isSelected(t),m=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),v=r.get("icon"),y=function(e,t,n,r,i,o,s){function a(e,t){"auto"===e.lineWidth&&(e.lineWidth=2*(t.lineWidth>0)),wn(e,function(n,r){"inherit"===e[r]&&(e[r]=t[r])})}var l=t.getModel("itemStyle"),c=l.getItemStyle(),u=0===e.lastIndexOf("empty",0)?"fill":"stroke",h=l.getShallow("decal");c.decal=h&&"inherit"!==h?(0,bg.w)(h,s):r.decal,"inherit"===c.fill&&(c.fill=r[i]),"inherit"===c.stroke&&(c.stroke=r[u]),"inherit"===c.opacity&&(c.opacity=("fill"===i?r:n).opacity),a(c,r);var d=t.getModel("lineStyle"),p=d.getLineStyle();if(a(p,n),"auto"===c.fill&&(c.fill=r.fill),"auto"===c.stroke&&(c.stroke=r.fill),"auto"===p.stroke&&(p.stroke=r.fill),!o){var f=t.get("inactiveBorderWidth"),m=c[u];c.lineWidth="auto"===f?r.lineWidth>0&&m?2:0:c.lineWidth,c.fill=t.get("inactiveColor"),c.stroke=t.get("inactiveBorderColor"),p.stroke=d.get("inactiveColor"),p.lineWidth=d.get("inactiveWidth")}return{itemStyle:c,lineStyle:p}}(l=v||l||"roundRect",r,s,a,h,f,u),b=new wr,x=r.getModel("textStyle");if(g6.Tn(e.getLegendIcon)&&(!v||"inherit"===v))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:l,iconRotate:m,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}));else{var w,S,A,C="inherit"===v&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0;b.add((S=(w={itemWidth:d,itemHeight:p,icon:l,iconRotate:C,itemStyle:y.itemStyle,lineStyle:y.lineStyle,symbolKeepAspect:g}).icon||"roundRect",(A=(0,yi.v5)(S,0,0,w.itemWidth,w.itemHeight,w.itemStyle.fill,w.symbolKeepAspect)).setStyle(w.itemStyle),A.rotation=(w.iconRotate||0)*Math.PI/180,A.setOrigin([w.itemWidth/2,w.itemHeight/2]),S.indexOf("empty")>-1&&(A.style.stroke=A.style.fill,A.style.fill=vA.A.color.neutral00,A.style.lineWidth=2),A))}var k=i.get("formatter"),M=t;g6.Kg(k)&&k?M=k.replace("{name}",null!=t?t:""):g6.Tn(k)&&(M=k(t));var O=f?x.getTextColor():r.get("inactiveColor");b.add(new yr.Ay({style:(0,vE.VB)(x,{text:M,x:"left"===o?d+5:-5,y:p/2,fill:O,align:o,verticalAlign:"middle"},{inheritColor:O})}));var T=new v_.A({shape:b.getBoundingRect(),style:{fill:"transparent"}}),_=r.getModel("tooltip");return _.get("show")&&vO.setTooltipConfig({el:T,componentModel:i,itemName:t,itemTooltipOption:_.option}),b.add(T),b.eachChild(function(e){e.silent=!0}),T.silent=!c,this.getContentGroup().add(b),(0,vR.iJ)(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,t,n,r,i,o){var s=this.getContentGroup(),a=this.getSelectorGroup();yF.aP(e.get("orient"),s,e.get("itemGap"),n.width,n.height);var l=s.getBoundingRect(),c=[-l.x,-l.y];if(a.markRedraw(),s.markRedraw(),!i)return s.x=c[0],s.y=c[1],this.group.getBoundingRect();yF.aP("horizontal",a,e.get("selectorItemGap",!0));var u=a.getBoundingRect(),h=[-u.x,-u.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",m=0===p?"height":"width",g=0===p?"y":"x";"end"===o?h[p]+=l[f]+d:c[p]+=u[f]+d,h[1-p]+=l[m]/2-u[m]/2,a.x=h[0],a.y=h[1],s.x=c[0],s.y=c[1];var v={x:0,y:0};return v[f]=l[f]+d+u[f],v[m]=Math.max(l[m],u[m]),v[g]=Math.min(0,u[g]+h[1-p]),v},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(xt.A);function wo(e,t,n,r){wa(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),ws(e,t,n,r)}function ws(e,t,n,r){n.usingTHL()||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function wa(e,t,n,r){n.usingTHL()||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}function wl(e,t,n){var r="allSelect"===e||"inverseSelect"===e,i={},o=[];n.eachComponent({mainType:"legend",query:t},function(n){r?n[e]():n[e](t.name),wc(n,i),o.push(n.componentIndex)});var s={};return n.eachComponent("legend",function(e){(0,g6.__)(i,function(t,n){e[t?"select":"unSelect"](n)}),wc(e,s)}),r?{selected:s,legendIndex:o}:{name:t.name,selected:s}}function wc(e,t){var n=t||{};return(0,g6.__)(e.getData(),function(t){var r=t.get("name");if("\n"!==r&&""!==r){var i=e.isSelected(r);(0,g6.$3)(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}var wu=(0,vt.uQ)(function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})});function wh(e){e.registerComponentModel(x9),e.registerComponentView(wi),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,wu),e.registerSubTypeDefaulter("legend",function(){return"plain"}),e.registerAction("legendToggleSelect","legendselectchanged",(0,g6.cF)(wl,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",(0,g6.cF)(wl,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",(0,g6.cF)(wl,"inverseSelect")),e.registerAction("legendSelect","legendselected",(0,g6.cF)(wl,"select")),e.registerAction("legendUnSelect","legendunselected",(0,g6.cF)(wl,"unSelect"))}var wd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=(0,yF.vs)(t);e.prototype.init.call(this,t,n,r),wp(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),wp(this,this.option,t)},t.type="legend.scroll",t.defaultOption=(0,vS.G_)(x9.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:vA.A.color.accent50,pageIconInactiveColor:vA.A.color.accent10,pageIconSize:15,pageTextStyle:{color:vA.A.color.tertiary},animationDurationUpdate:800}),t}(x9);function wp(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,(0,yF.YA)(t,n,{type:"box",ignoreSize:!!i})}var wf=vM.A,wm=["width","height"],wg=["x","y"],wv=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return(0,vy.C6)(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new wf),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new wf)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,o,s,a){var l=this;e.prototype.renderInner.call(this,t,n,r,i,o,s,a);var c=this._controllerGroup,u=n.get("pageIconSize",!0),h=g6.cy(u)?u:[u,u];p("pagePrev",0);var d=n.getModel("pageTextStyle");function p(e,t){var r=vO.createIcon(n.get("pageIcons",!0)[n.getOrient().name][t],{onclick:g6.oI(l._pageGo,l,e+"DataIndex",n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});r.name=e,c.add(r)}c.add(new yr.Ay({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1)},t.prototype.layoutInner=function(e,t,n,r,i,o){var s=this.getSelectorGroup(),a=e.getOrient().index,l=wm[a],c=wg[a],u=wm[1-a],h=wg[1-a];i&&yF.aP("horizontal",s,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=s.getBoundingRect(),f=[-p.x,-p.y],m=g6.o8(n);i&&(m[l]=n[l]-p[l]-d);var g=this._layoutContentAndController(e,r,m,a,l,u,h,c);if(i){if("end"===o)f[a]+=g[l]+d;else{var v=p[l]+d;f[a]-=v,g[c]-=v}g[l]+=p[l]+d,f[1-a]+=g[h]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[h]=Math.min(g[h],p[h]+f[1-a]),s.x=f[0],s.y=f[1],s.markRedraw()}return g},t.prototype._layoutContentAndController=function(e,t,n,r,i,o,s,a){var l=this.getContentGroup(),c=this._containerGroup,u=this._controllerGroup;yF.aP(e.get("orient"),l,e.get("itemGap"),r?n.width:null,r?null:n.height),yF.aP("horizontal",u,e.get("pageButtonItemGap",!0));var h=l.getBoundingRect(),d=u.getBoundingRect(),p=this._showController=h[i]>n[i],f=[-h.x,-h.y];t||(f[r]=l[a]);var m=[0,0],g=[-d.x,-d.y],v=g6.bZ(e.get("pageButtonGap",!0),e.get("itemGap",!0));p&&("end"===e.get("pageButtonPosition",!0)?g[r]+=n[i]-d[i]:m[r]+=d[i]+v),g[1-r]+=h[o]/2-d[o]/2,l.setPosition(f),c.setPosition(m),u.setPosition(g);var y={x:0,y:0};if(y[i]=p?n[i]:h[i],y[o]=Math.max(h[o],d[o]),y[s]=Math.min(0,d[s]+g[1-r]),c.__rectSize=n[i],p){var b={x:0,y:0};b[i]=Math.max(n[i]-d[i]-v,0),b[o]=y[o],c.setClipPath(new v_.A({shape:b})),c.__rectSize=b[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return null!=x.pageIndex&&vT.oi(l,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),y},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;g6.__(["pagePrev","pageNext"],function(r){var i=null!=t[r+"DataIndex"],o=n.childOfName(r);o&&(o.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),o.cursor=i?"pointer":"default")});var r=n.childOfName("pageText"),i=e.get("pageFormatter"),o=t.pageIndex,s=null!=o?o+1:0,a=t.pageCount;r&&i&&r.setStyle("text",g6.Kg(i)?i.replace("{current}",null==s?"":s+"").replace("{total}",null==a?"":a+""):i({current:s,total:a}))},t.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,o=wm[i],s=wg[i],a=this._findTargetItemIndex(t),l=n.children(),c=l[a],u=l.length,h=+!!u,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=y(c);d.contentPosition[i]=-p.s;for(var f=a+1,m=p,g=p,v=null;f<=u;++f)(!(v=y(l[f]))&&g.e>m.s+r||v&&!b(v,m.s))&&(m=g.i>m.i?g:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=m.i),++d.pageCount),g=v;for(var f=a-1,m=p,g=p,v=null;f>=-1;--f)(!(v=y(l[f]))||!b(g,v.s))&&m.i<g.i&&(g=m,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=m.i),++d.pageCount,++d.pageIndex),m=v;return d;function y(e){if(e){var t=e.getBoundingRect(),n=t[s]+e[s];return{s:n,e:n+t[o],i:e.__legendDataIndex}}}function b(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){var t,n;return this._showController?(this.getContentGroup().eachChild(function(r,i){var o=r.__legendDataIndex;null==n&&null!=o&&(n=i),o===e&&(t=i)}),null!=t?t:n):0},t.type="legend.scroll",t}(wi);function wy(e){(0,yX.Y)(wh),e.registerComponentModel(wd),e.registerComponentView(wv),e.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(e){e.setScrollDataIndex(n)})})}var wb=n("t4"),wx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return(0,vy.C6)(t,e),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:vA.A.size.m,backgroundColor:vA.A.color.transparent,borderColor:vA.A.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:vA.A.color.primary},subtextStyle:{fontSize:12,color:vA.A.color.quaternary}},t}(xe.A),ww=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get("show")){var r=this.group,i=e.getModel("textStyle"),o=e.getModel("subtextStyle"),s=e.get("textAlign"),a=g6.bZ(e.get("textBaseline"),e.get("textVerticalAlign")),l=new yr.Ay({style:(0,vE.VB)(i,{text:e.get("text"),fill:i.getTextColor()},{disableBox:!0}),z2:10}),c=l.getBoundingRect(),u=e.get("subtext"),h=new yr.Ay({style:(0,vE.VB)(o,{text:u,fill:o.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!d&&!f,h.silent=!p&&!f,d&&l.on("click",function(){(0,x7.JW)(d,"_"+e.get("target"))}),p&&h.on("click",function(){(0,x7.JW)(p,"_"+e.get("subtarget"))}),(0,vD.z)(l).eventData=(0,vD.z)(h).eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(l),u&&r.add(h);var m=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=m.width,g.height=m.height;var v=(0,yF.Lj)(e,n),y=(0,yF.dV)(g,v.refContainer,e.get("padding"));s||("middle"===(s=e.get("left")||e.get("right"))&&(s="center"),"right"===s?y.x+=y.width:"center"===s&&(y.x+=y.width/2)),a||("center"===(a=e.get("top")||e.get("bottom"))&&(a="middle"),"bottom"===a?y.y+=y.height:"middle"===a&&(y.y+=y.height/2),a=a||"top"),r.x=y.x,r.y=y.y,r.markRedraw();var b={align:s,verticalAlign:a};l.setStyle(b),h.setStyle(b),m=r.getBoundingRect();var x=y.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var S=new v_.A({shape:{x:m.x-x[3],y:m.y-x[0],width:m.width+x[1]+x[3],height:m.height+x[0]+x[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});r.add(S)}},t.type="title",t}(xt.A),wS=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.type="dataZoom.select",t}(xg),wA=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.type="dataZoom.select",t}(xb);function wC(e){e.registerComponentModel(wS),e.registerComponentView(wA),xX(e)}var wk=function(){},wM={},wO=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.init=function(t,n,r){var i=r.getTheme().get("toolbox"),o=i?i.feature:null;o&&(this._themeFeatureOption=(0,g6.X$)({},o),i.feature={}),e.prototype.init.call(this,t,n,r),o&&(i.feature=o)},t.prototype.optionUpdated=function(){(0,g6.__)(this.option.feature,function(e,t){var n=this._themeFeatureOption,r=wM[t];r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(this.ecModel)),n&&n[t]&&((0,g6.h1)(e,n[t]),n[t]=null),(0,g6.h1)(e,r.defaultOption))},this)},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:vA.A.color.border,borderRadius:0,borderWidth:0,padding:vA.A.size.m,itemSize:15,itemGap:vA.A.size.s,showTitle:!0,iconStyle:{borderColor:vA.A.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:vA.A.color.accent70}},tooltip:{show:!1,position:"bottom"}},t}(xe.A),wT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),e.get("show")){var o=+e.get("itemSize"),s="vertical"===e.get("orient"),a=e.get("feature")||{},l=this._features||(this._features=(0,g6.nt)()),c=[];(0,g6.__)(a,function(e,t){c.push(t)}),new y7.A(this._featureNames||[],c).add(f).update(f).remove((0,g6.cF)(f,null)).execute(),this._featureNames=(0,g6.pb)(c,function(e){return l.hasKey(e)});var u=(0,yF.Lj)(e,n).refContainer,h=e.getBoxLayoutParams(),d=e.get("padding"),p=(0,yF.dV)(h,u,d);(0,yF.aP)(e.get("orient"),i,e.get("itemGap"),p.width,p.height),(0,yF.m$)(i,h,u,d),i.add(we(i.getBoundingRect(),e)),s||i.eachChild(function(e){var t=e.__title,r=e.ensureState("emphasis"),s=r.textConfig||(r.textConfig={}),a=e.getTextContent(),l=a&&a.ensureState("emphasis");if(l&&!(0,g6.Tn)(l)&&t){var c=l.style||(l.style={}),u=vF.NO(t,yr.Ay.makeFont(c)),h=e.x+i.x,d=e.y+i.y+o,p=!1;d+u.height>n.getHeight()&&(s.position="top",p=!0);var f=p?-5-u.height:o+10;h+u.width/2>n.getWidth()?(s.position=["100%",f],c.align="right"):h-u.width/2<0&&(s.position=[0,f],c.align="left")}})}function f(u,h){var d,p,f,m,g,v,y,b,x,w,S,A=null!=u&&null==h,C=null!=u&&null!=h,k=A||C?c[u]:c[h],M=a[k],O=A||C?new x6.A(M,e,t):null,T=O&&O.get("show");if(A){if(!T)return;if(0===k.indexOf("my"))S={onclick:O.option.onclick,featureName:k};else{var _=wM[k];if(!_)return;S=new _}l.set(k,S)}else S=l.get(k);if(null==u||!T){w_(S)&&S.dispose&&S.dispose(t,n),l.removeKey(k);return}r&&null!=r.newTitle&&r.featureName===k&&(M.title=r.newTitle),A&&(S.uid=(0,vS.$Q)("toolbox-feature")),S.model=O,S.ecModel=t,S.api=n,d=O,p=S,f=k,v=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),b=p instanceof wk&&p.getIcons?p.getIcons():d.get("icon"),x=d.get("title")||{},(0,g6.Kg)(b)?(m={})[f]=b:m=b,(0,g6.Kg)(x)?(g={})[f]=x:g=x,w=d.iconPaths={},(0,g6.__)(m,function(r,a){var l=vO.createIcon(r,{},{x:-o/2,y:-o/2,width:o,height:o});l.setStyle(v.getItemStyle()),l.ensureState("emphasis").style=y.getItemStyle();var c=new yr.Ay({style:{text:g[a],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:(0,vE.c8)({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},t)},ignore:!0});l.setTextContent(c),vO.setTooltipConfig({el:l,componentModel:e,itemName:a,formatterParamsExtra:{title:g[a]}}),l.__title=g[a],l.on("mouseover",function(){var t=y.getItemStyle(),r=s?null==e.get("right")&&"right"!==e.get("left")?"right":"left":null==e.get("bottom")&&"bottom"!==e.get("top")?"bottom":"top";c.setStyle({fill:y.get("textFill")||t.fill||t.stroke||vA.A.color.neutral99,backgroundColor:y.get("textBackgroundColor")}),l.setTextConfig({position:y.get("textPosition")||r}),c.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==d.get(["iconStatus",a])&&n.leaveEmphasis(this),c.hide()}),("emphasis"===d.get(["iconStatus",a])?vR.HY:vR.SD)(l),i.add(l),l.on("click",(0,g6.oI)(p.onclick,p,t,n,a)),w[a]=l}),O.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&("emphasis"===t?vR.HY:vR.SD)(r[e])},w_(S)&&S.render&&S.render(O,t,n,r)}},t.prototype.updateView=function(e,t,n,r){(0,g6.__)(this._features,function(e){e&&e instanceof wk&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.dispose=function(e,t){(0,g6.__)(this._features,function(n){n&&n instanceof wk&&n.dispose&&n.dispose(e,t)})},t.type="toolbox",t}(xt.A);function w_(e){return e instanceof wk}var wI=n("E3"),wD=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,vy.C6)(t,e),t.prototype.onclick=function(e,t){var n=this.model,r=n.get("name")||e.get("title.0.text")||"echarts",i="svg"===t.getZr().painter.getType(),o=i?"svg":n.get("type",!0)||"png",s=t.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||vA.A.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),a=wI.A.browser;if("function"!=typeof MouseEvent||!a.newEdge&&(a.ie||a.edge))if(window.navigator.msSaveOrOpenBlob||i){var l=s.split(","),c=l[0].indexOf("base64")>-1,u=i?decodeURIComponent(l[1]):l[1];c&&(u=window.atob(u));var h=r+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var d=u.length,p=new Uint8Array(d);d--;)p[d]=u.charCodeAt(d);var f=new Blob([p]);window.navigator.msSaveOrOpenBlob(f,h)}else{var m=document.createElement("iframe");document.body.appendChild(m);var g=m.contentWindow,v=g.document;v.open("image/svg+xml","replace"),v.write(u),v.close(),g.focus(),v.execCommand("SaveAs",!0,h),document.body.removeChild(m)}}else{var y=n.get("lang"),b='<body style="margin:0;"><img src="'+s+'" style="max-width:100%;" title="'+(y&&y[0]||"")+'" /></body>',x=window.open();x.document.write(b),x.document.title=r}else{var w=document.createElement("a");w.download=r+"."+o,w.target="_blank",w.href=s;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},t.getDefaultOption=function(e){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:vA.A.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(wk),wR="__ec_magicType_stack__",wE=[["line","bar"],["stack"]],wP=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,vy.C6)(t,e),t.prototype.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return g6.__(e.get("type"),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r,i=this.model,o=i.get(["seriesIndex",n]);if(wL[n]){var s={series:[]};g6.__(wE,function(e){g6.qh(e,n)>=0&&g6.__(e,function(e){i.setIconStatus(e,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var t=e.subType,r=e.id,o=wL[n](t,r,e,i);o&&(g6.NT(o,e.option),s.series.push(o));var a=e.coordinateSystem;if(a&&"cartesian2d"===a.type&&("line"===n||"bar"===n)){var l=a.getAxesByScale("ordinal")[0];if(l){var c=l.dim+"Axis",u=e.getReferringComponents(c,vt.US).models[0].componentIndex;s[c]=s[c]||[];for(var h=0;h<=u;h++)s[c][u]=s[c][u]||{};s[c][u].boundaryGap="bar"===n}}});var a=n;"stack"===n&&(r=g6.h1({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(a="tiled")),t.dispatchAction({type:"changeMagicType",currentType:a,newOption:s,newTitle:r,featureName:"magicType"})}},t}(wk),wL={line:function(e,t,n,r){if("bar"===e)return g6.h1({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(e,t,n,r){if("line"===e)return g6.h1({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(e,t,n,r){var i=n.get("stack")===wR;if("line"===e||"bar"===e)return r.setIconStatus("stack",i?"normal":"emphasis"),g6.h1({id:t,stack:i?"":wR},r.get(["option","stack"])||{},!0)}};xk.OH({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(e,t){t.mergeOption(e.newOption)});var wN=Array(60).join("-");function wB(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var wj=RegExp("[ ]+","g"),wz=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,vy.C6)(t,e),t.prototype.onclick=function(e,t){setTimeout(function(){t.dispatchAction({type:"hideTip"})});var n,r,i,o,s,a,l,c=t.getDom(),u=this.model;this._dom&&c.removeChild(this._dom);var h=document.createElement("div");h.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",h.style.backgroundColor=u.get("backgroundColor")||vA.A.color.neutral00;var d=document.createElement("h4"),p=u.get("lang")||[];d.innerHTML=p[0]||u.get("title"),d.style.cssText="margin:10px 20px",d.style.color=u.get("textColor");var f=document.createElement("div"),m=document.createElement("textarea");f.style.cssText="overflow:auto";var g=u.get("optionToContent"),v=u.get("contentToOption"),y=(l=(n={},r=[],i=[],e.eachRawSeries(function(e){var t=e.coordinateSystem;if(t&&("cartesian2d"===t.type||"polar"===t.type)){var o=t.getBaseAxis();if("category"===o.type){var s=(0,vr.bJ)(o);n[s]||(n[s]={categoryAxis:o,valueAxis:t.getOtherAxis(o),series:[]},i.push({axisDim:o.dim,axisIndex:o.index})),n[s].series.push(e)}else r.push(e)}else r.push(e)}),{seriesGroupByCategoryAxis:n,other:r,meta:i}),{value:g6.pb([(o=l.seriesGroupByCategoryAxis,s=[],g6.__(o,function(e,t){var n=e.categoryAxis,r=e.valueAxis.dim,i=[" "].concat(g6.Tj(e.series,function(e){return e.name})),o=[n.model.getCategories()];g6.__(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(r),function(e){return e}))});for(var a=[i.join(" ")],l=0;l<o[0].length;l++){for(var c=[],u=0;u<o.length;u++)c.push(o[u][l]);a.push(c.join(" "))}s.push(a.join("\n"))}),s.join("\n\n"+wN+"\n\n")),(a=l.other,g6.Tj(a,function(e){var t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){for(var e=arguments.length,i=arguments[e-1],o=t.getName(i),s=0;s<e-1;s++)r[s]=arguments[s];n.push((o?o+" ":"")+r.join(" "))}),n.join("\n")}).join("\n\n"+wN+"\n\n"))],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join("\n\n"+wN+"\n\n"),meta:l.meta});if(g6.Tn(g)){var b=g(t.getOption());g6.Kg(b)?f.innerHTML=b:g6.n_(b)&&f.appendChild(b)}else{m.readOnly=u.get("readOnly");var x=m.style;x.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",x.color=u.get("textColor"),x.borderColor=u.get("textareaBorderColor"),x.backgroundColor=u.get("textareaColor"),m.value=y.value,f.appendChild(m)}var w=y.meta,S=document.createElement("div");S.style.cssText="position:absolute;bottom:5px;left:0;right:0";var A="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",C=document.createElement("div"),k=document.createElement("div");A+=";background-color:"+u.get("buttonColor")+";color:"+u.get("buttonTextColor");var M=this;function O(){c.removeChild(h),M._dom=null}(0,xC.q2)(C,"click",O),(0,xC.q2)(k,"click",function(){var e,n,r,i;if(null==v&&null!=g||null!=v&&null==g)return void O();try{g6.Tn(v)?e=v(f,t.getOption()):(n=m.value,r=n.split(RegExp("\n*"+wN+"\n*","g")),i={series:[]},g6.__(r,function(e,t){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(" ")>=0)return!0}(e)){var n=function(e){for(var t=e.split(/\n+/g),n=wB(t.shift()).split(wj),r=[],i=g6.Tj(n,function(e){return{name:e,data:[]}}),o=0;o<t.length;o++){var s=wB(t[o]).split(wj);r.push(s.shift());for(var a=0;a<s.length;a++)i[a]&&(i[a].data[o]=s[a])}return{series:i,categories:r}}(e),r=w[t],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:n.categories},i.series=i.series.concat(n.series))}else{var n=function(e){for(var t=e.split(/\n+/g),n=wB(t.shift()),r=[],i=0;i<t.length;i++){var o=wB(t[i]);if(o){var s=o.split(wj),a="",l=void 0,c=!1;isNaN(s[0])?(c=!0,a=s[0],s=s.slice(1),r[i]={name:a,value:[]},l=r[i].value):l=r[i]=[];for(var u=0;u<s.length;u++)l.push(+s[u]);1===l.length&&(c?r[i].value=l[0]:r[i]=l[0])}}return{name:n,data:r}}(e);i.series.push(n)}}),e=i)}catch(e){throw O(),Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),O()}),C.innerHTML=p[1],k.innerHTML=p[2],k.style.cssText=C.style.cssText=A,u.get("readOnly")||S.appendChild(k),S.appendChild(C),h.appendChild(d),h.appendChild(f),h.appendChild(S),f.style.height=c.clientHeight-80+"px",c.appendChild(h),this._dom=h},t.prototype.dispose=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},t.getDefaultOption=function(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:vA.A.color.background,textColor:vA.A.color.primary,textareaColor:vA.A.color.background,textareaBorderColor:vA.A.color.border,buttonColor:vA.A.color.accent50,buttonTextColor:vA.A.color.neutral00}},t}(wk);xk.OH({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(e,t){var n=[];g6.__(e.newOption.series,function(e){var r=t.getSeriesByName(e.name)[0];if(r){var i,o=r.get("data");n.push({name:e.name,data:(i=e.data,g6.Tj(i,function(e,t){var n=o&&o[t];if(!g6.Gv(n)||g6.cy(n))return e;g6.Gv(e)&&!g6.cy(e)||(e={value:e});var r=null!=n.name&&null==e.name;return e=g6.NT(e,n),r&&delete e.name,e}))})}else n.push(g6.X$({type:"scatter"},e))}),t.mergeOption(g6.NT({series:n},e.newOption))});var w$=g6.__,wF=(0,vt.$r)();function wV(e){var t=wF(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var wH=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,vy.C6)(t,e),t.prototype.onclick=function(e,t){wF(e).snapshots=null,t.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])}},t}(wk);xk.OH({type:"restore",event:"restore",update:"prepareAndUpdate"},function(e,t){t.resetOption("recreate")});var wW=Math.min,wU=Math.max,wG=Math.pow,wq="globalPan",wX={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},wY={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},wK={brushStyle:{lineWidth:2,stroke:vA.A.color.backgroundTint,fill:vA.A.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},wQ=0,wZ=function(e){function t(t){var n=e.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new vM.A,n._uid="brushController_"+wQ++,(0,g6.__)(Sm,function(e,t){this._handlers[t]=(0,g6.oI)(e,this)},n),n}return(0,vy.C6)(t,e),t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var t,n=this._zr;this._enableGlobalPan||(t=this._uid,xM(n)[wq]=t),(0,g6.__)(this._handlers,function(e,t){n.on(t,e)}),this._brushType=e.brushType,this._brushOption=(0,g6.h1)((0,g6.o8)(wK),e,!0)},t.prototype._doDisableBrush=function(){var e,t,n=this._zr;e=this._uid,(t=xM(n))[wq]===e&&(t[wq]=null),(0,g6.__)(this._handlers,function(e,t){n.off(t,e)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var t=this._panels={};(0,g6.__)(e,function(e){t[e.panelId]=(0,g6.o8)(e)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=(0,g6.Tj)(e,function(e){return(0,g6.h1)((0,g6.o8)(wK),e,!0)});var t=this._covers,n=this._covers=[],r=this,i=this._creatingCover;return new y7.A(t,e,function(e,t){return o(e.__brushOption,t)},o).add(s).update(s).remove(function(e){t[e]!==i&&r.group.remove(t[e])}).execute(),this;function o(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function s(o,s){var a=e[o];if(null!=s&&t[s]===i)n[o]=t[s];else{var l=n[o]=null!=s?(t[s].__brushOption=a,t[s]):w0(r,wJ(r,a));w5(r,l)}}},t.prototype.unmount=function(){return this.enableBrush(!1),w9(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(xA.A);function wJ(e,t){var n=Sv[t.brushType].createCover(e,t);return n.__brushOption=t,w2(n,t),e.group.add(n),n}function w0(e,t){var n=w3(t);return n.endCreating&&(n.endCreating(e,t),w2(t,t.__brushOption)),t}function w1(e,t){var n=t.__brushOption;w3(t).updateCoverShape(e,t,n.range,n)}function w2(e,t){var n=t.z;null==n&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function w5(e,t){w3(t).updateCommon(e,t),w1(e,t)}function w3(e){return Sv[e.__brushOption.brushType]}function w4(e,t,n){var r,i=e._panels;if(!i)return!0;var o=e._transform;return(0,g6.__)(i,function(e){e.isTargetByCursor(t,n,o)&&(r=e)}),r}function w6(e,t){var n=e._panels;if(!n)return!0;var r=t.__brushOption.panelId;return null==r||n[r]}function w9(e){var t=e._covers,n=t.length;return(0,g6.__)(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function w8(e,t){var n=(0,g6.Tj)(e._covers,function(e){var t=e.__brushOption,n=(0,g6.o8)(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger("brush",{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function w7(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function Se(e,t,n,r){var i=new vM.A;return i.add(new v_.A({name:"main",style:Si(n),silent:!0,draggable:!0,cursor:"move",drift:(0,g6.cF)(Sa,e,t,i,["n","s","w","e"]),ondragend:(0,g6.cF)(w8,t,{isEnd:!0})})),(0,g6.__)(r,function(n){i.add(new v_.A({name:n.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:(0,g6.cF)(Sa,e,t,i,n),ondragend:(0,g6.cF)(w8,t,{isEnd:!0})}))}),i}function St(e,t,n,r){var i=r.brushStyle.lineWidth||0,o=wU(i,6),s=n[0][0],a=n[1][0],l=s-i/2,c=a-i/2,u=n[0][1],h=n[1][1],d=u-o+i/2,p=h-o+i/2,f=u-s,m=h-a,g=f+i,v=m+i;Sr(e,t,"main",s,a,f,m),r.transformable&&(Sr(e,t,"w",l,c,o,v),Sr(e,t,"e",d,c,o,v),Sr(e,t,"n",l,c,g,o),Sr(e,t,"s",l,p,g,o),Sr(e,t,"nw",l,c,o,o),Sr(e,t,"ne",d,c,o,o),Sr(e,t,"sw",l,p,o,o),Sr(e,t,"se",d,p,o,o))}function Sn(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(Si(n)),i.attr({silent:!r,cursor:r?"move":"default"}),(0,g6.__)([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(n){var i,o,s,a=t.childOfName(n.join("")),l=1===n.length?Ss(e,n[0]):(("e"===(s=[Ss(i=e,(o=n)[0]),Ss(i,o[1])])[0]||"w"===s[0])&&s.reverse(),s.join(""));a&&a.attr({silent:!r,invisible:!r,cursor:r?wY[l]+"-resize":null})})}function Sr(e,t,n,r,i,o,s){var a,l,c,u=t.childOfName(n);u&&u.setShape((l=wW((a=Su(e,t,[[r,i],[r+o,i+s]]))[0][0],a[1][0]),{x:l,y:c=wW(a[0][1],a[1][1]),width:wU(a[0][0],a[1][0])-l,height:wU(a[0][1],a[1][1])-c}))}function Si(e){return(0,g6.NT)({strokeNoScale:!0},e.brushStyle)}function So(e,t,n,r){var i=[wW(e,n),wW(t,r)],o=[wU(e,n),wU(t,r)];return[[i[0],o[0]],[i[1],o[1]]]}function Ss(e,t){return({left:"w",right:"e",top:"n",bottom:"s"})[vO.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[t],vO.getTransform(e.group))]}function Sa(e,t,n,r,i,o){var s=n.__brushOption,a=e.toRectRange(s.range),l=Sc(t,i,o);(0,g6.__)(r,function(e){var t=wX[e];a[t[0]][t[1]]+=l[t[0]]}),s.range=e.fromRectRange(So(a[0][0],a[1][0],a[0][1],a[1][1])),w5(t,n),w8(t,{isEnd:!1})}function Sl(e,t,n,r){var i=t.__brushOption.range,o=Sc(e,n,r);(0,g6.__)(i,function(e){e[0]+=o[0],e[1]+=o[1]}),w5(e,t),w8(e,{isEnd:!1})}function Sc(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),o=r.transformCoordToLocal(0,0);return[i[0]-o[0],i[1]-o[1]]}function Su(e,t,n){var r=w6(e,t);return r&&!0!==r?r.clipPath(n,e._transform):(0,g6.o8)(n)}function Sh(e){var t=e.event;t.preventDefault&&t.preventDefault()}function Sd(e,t,n){return e.childOfName("main").contain(t,n)}function Sp(e,t,n,r){var i,o=e._creatingCover,s=e._creatingPanel,a=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],r=t[0],i=n[0]-r[0],o=n[1]-r[1];return wG(i*i+o*o,.5)>6}(e)||o){if(s&&!o){"single"===a.brushMode&&w9(e);var l=(0,g6.o8)(a);l.brushType=Sf(l.brushType,s),l.panelId=!0===s?null:s.panelId,o=e._creatingCover=wJ(e,l),e._covers.push(o)}if(o){var c=Sv[Sf(e._brushType,s)];o.__brushOption.range=c.getCreatingRange(Su(e,o,e._track)),r&&(w0(e,o),c.updateCommon(e,o)),w1(e,o),i={isEnd:r}}}else r&&"single"===a.brushMode&&a.removeOnClick&&w4(e,t,n)&&w9(e)&&(i={isEnd:r,removeOnClick:!0});return i}function Sf(e,t){return"auto"===e?t.defaultBrushType:e}var Sm={mousedown:function(e){if(this._dragging)Sg(this,e);else if(!e.target||!e.target.draggable){Sh(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=w4(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(!function(e,t,n){if(!(!e._brushType||(r=e,i=t.offsetX,o=t.offsetY,s=r._zr,i<0||i>s.getWidth()||o<0||o>s.getHeight()))){var r,i,o,s,a=e._zr,l=e._covers,c=w4(e,t,n);if(!e._dragging)for(var u=0;u<l.length;u++){var h=l[u].__brushOption;if(c&&(!0===c||h.panelId===c.panelId)&&Sv[h.brushType].contain(l[u],n[0],n[1]))return}c&&a.setCursorStyle("crosshair")}}(this,e,r),this._dragging){Sh(e);var i=Sp(this,e,r,!1);i&&w8(this,i)}},mouseup:function(e){Sg(this,e)}};function Sg(e,t){if(e._dragging){Sh(t);var n=t.offsetX,r=t.offsetY,i=e.group.transformCoordToLocal(n,r),o=Sp(e,t,i,!0);e._dragging=!1,e._track=[],e._creatingCover=null,o&&w8(e,o)}}var Sv={lineX:Sy(0),lineY:Sy(1),rect:{createCover:function(e,t){function n(e){return e}return Se({toRectRange:n,fromRectRange:n},e,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(e){var t=w7(e);return So(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){St(e,t,n,r)},updateCommon:Sn,contain:Sd},polygon:{createCover:function(e,t){var n=new vM.A;return n.add(new yf.A({name:"main",style:Si(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new xQ.A({name:"main",draggable:!0,drift:(0,g6.cF)(Sl,e,t),ondragend:(0,g6.cF)(w8,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:Su(e,t,n)})},updateCommon:Sn,contain:Sd}};function Sy(e){return{createCover:function(t,n){return Se({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[["w"],["e"]],[["n"],["s"]]][e])},getCreatingRange:function(t){var n=w7(t);return[wW(n[0][e],n[1][e]),wU(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var o,s=w6(t,n);if(!0!==s&&s.getLinearBrushOtherExtent)o=s.getLinearBrushOtherExtent(e);else{var a=t._zr;o=[0,[a.getWidth(),a.getHeight()][1-e]]}var l=[r,o];e&&l.reverse(),St(t,n,l,i)},updateCommon:Sn,contain:Sd}}function Sb(e){return yw.Ay.create(e)}var Sx=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],Sw=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=SA(t,e);(0,g6.__)(SC,function(e,t){(!n||!n.include||(0,g6.qh)(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var r=SO[e.brushType](0,n,t);e.__rangeOffset={offset:S_[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){(0,g6.__)(e,function(e){var r=this.findTargetInfo(e,t);r&&!0!==r&&(0,g6.__)(r.coordSyses,function(r){var i=SO[e.brushType](1,r,e.range,!0);n(e,i.values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){(0,g6.__)(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var r,i,o,s,a,l=SO[e.brushType](0,n.coordSys,e.coordRange),c=e.__rangeOffset;e.range=c?S_[e.brushType](l.values,c.offset,(r=l.xyMinMax,i=c.xyMinMax,o=SD(r),s=SD(i),isNaN((a=[o[0]/s[0],o[1]/s[1]])[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}},this)},e.prototype.makePanelOpts=function(e,t){return(0,g6.Tj)(this._targetInfoList,function(n){var r,i,o,s,a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:(r=Sb(r=a),function(e){return vO.clipPointsByRect(e,r)}),isTargetByCursor:(i=n.coordSysModel,o=Sb(a),function(t,n){return o.contain(n[0],n[1])&&!xT(t,e,i)}),getLinearBrushOtherExtent:(s=Sb(s=a),function(e){var t=e?s.width:s.height,n=e?s.x:s.y;return[n,n+(t||0)]})}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return!0===r||r&&(0,g6.qh)(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=SA(t,e),i=0;i<n.length;i++){var o=n[i],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var a=0;a<Sk.length;a++)if(Sk[a](r,o))return o}return!0},e}();function SS(e){return e[0]>e[1]&&e.reverse(),e}function SA(e,t){return(0,vt._e)(e,t,{includeMainTypes:Sx})}var SC={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,o=(0,g6.nt)(),s={},a={};(n||r||i)&&((0,g6.__)(n,function(e){var t=e.axis.grid.model;o.set(t.id,t),s[t.id]=!0}),(0,g6.__)(r,function(e){var t=e.axis.grid.model;o.set(t.id,t),a[t.id]=!0}),(0,g6.__)(i,function(e){o.set(e.id,e),s[e.id]=!0,a[e.id]=!0}),o.each(function(e){var i=e.coordinateSystem,o=[];(0,g6.__)(i.getCartesians(),function(e,t){((0,g6.qh)(n,e.getAxis("x").model)>=0||(0,g6.qh)(r,e.getAxis("y").model)>=0)&&o.push(e)}),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:o[0],coordSyses:o,getPanelRect:SM.grid,xAxisDeclared:s[e.id],yAxisDeclared:a[e.id]})}))},geo:function(e,t){(0,g6.__)(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:SM.geo})})}},Sk=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],SM={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e,t=this.coordSys.view,n=bs(null,t);return(0,yw.zQ)(n,n,(e=t,(0,bn.C)([],e.mtOverall))),n}},SO={lineX:(0,g6.cF)(ST,0),lineY:(0,g6.cF)(ST,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),o=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),s=[SS([i[0],o[0]]),SS([i[1],o[1]])];return{values:s,xyMinMax:s}},polygon:function(e,t,n,r){var i=[(0,vt.X1)(),(0,vt.X1)()];return{values:(0,g6.Tj)(n,function(n){var o=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],o[0]),i[1][0]=Math.min(i[1][0],o[1]),i[0][1]=Math.max(i[0][1],o[0]),i[1][1]=Math.max(i[1][1],o[1]),o}),xyMinMax:i}}};function ST(e,t,n,r){var i=n.getAxis(["x","y"][e]),o=SS((0,g6.Tj)([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),s=[];return s[e]=o,s[1-e]=[0/0,0/0],{values:o,xyMinMax:s}}var S_={lineX:(0,g6.cF)(SI,0),lineY:(0,g6.cF)(SI,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return(0,g6.Tj)(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function SI(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function SD(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[0/0,0/0]}var SR=n("PG"),SE=g6.__,SP=(0,vt.S_)("toolbox-dataZoom_"),SL={x:"width",y:"height"},SN=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,vy.C6)(t,e),t.prototype.render=function(e,t,n,r){var i,o,s,a,l,c,u,h,d;this._brushController||(this._brushController=new wZ(n.getZr()),this._brushController.on("brush",g6.oI(this._onBrush,this)).mount()),i=e,o=t,s=this,a=r,l=n,c=s._isZoomActive,a&&"takeGlobalCursor"===a.type&&(c="dataZoomSelect"===a.key&&a.dataZoomSelectActive),s._isZoomActive=c,i.setIconStatus("zoom",c?"emphasis":"normal"),u=new Sw(Sj(i),o,{include:["grid"]}).makePanelOpts(l,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}),s._brushController.setPanels(u).enableBrush(!!c&&!!u.length&&{brushType:"auto",brushStyle:i.getModel("brushStyle").getItemStyle()}),h=e,d=t,h.setIconStatus("back",wV(d).length>1?"emphasis":"normal")},t.prototype.onclick=function(e,t,n){SB[n].call(this)},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(e.isEnd&&t.length){var n,r,i,o={},s=this.ecModel;this._brushController.updateCovers([]),new Sw(Sj(this.model),s,{include:["grid"]}).matchOutputRanges(t,s,function(e,t,n){if("cartesian2d"===n.type){var r=n.master.getRect().clone(),i=e.brushType;"rect"===i?(a("x",n,r,t[0]),a("y",n,r,t[1])):a({lineX:"x",lineY:"y"}[i],n,r,t)}}),n=s,r=o,i=wV(n),w$(r,function(e,t){for(var r=i.length-1;r>=0&&!i[r][t];r--);if(r<0){var o=n.queryComponents({mainType:"dataZoom",subType:"select",id:t})[0];if(o){var s=o.getPercentRange();i[0][t]={dataZoomId:t,start:s[0],end:s[1]}}}}),i.push(r),this._dispatchZoomAction(o)}function a(e,t,n,r){var i,a,l,c=t.getAxis(e),u=c.model,h=(i=e,a=u,s.eachComponent({mainType:"dataZoom",subType:"select"},function(e){e.getAxisModel(i,a.componentIndex)&&(l=e)}),l),d=h.findRepresentativeAxisProxy(u).getMinMaxSpan(),p=c.scale.getExtent();(null!=d.minValueSpan||null!=d.maxValueSpan)&&(r=xx(0,r.slice(),p,0,d.minValueSpan,d.maxValueSpan));var f=(0,g9.EO)(p,n[SL[e]],.5);h&&(o[h.id]={dataZoomId:h.id,startValue:isFinite(f)?(0,g9.LI)(r[0],f):r[0],endValue:isFinite(f)?(0,g9.LI)(r[1],f):r[1]})}},t.prototype._dispatchZoomAction=function(e){var t=[];SE(e,function(e,n){t.push(g6.o8(e))}),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:vA.A.color.backgroundTint}}},t}(wk),SB={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){var e,t,n;this._dispatchZoomAction((t=(e=wV(this.ecModel))[e.length-1],e.length>1&&e.pop(),n={},w$(t,function(t,r){for(var i=e.length-1;i>=0;i--)if(t=e[i][r]){n[r]=t;break}}),n))}};function Sj(e){var t={xAxisIndex:e.get("xAxisIndex",!0),yAxisIndex:e.get("yAxisIndex",!0),xAxisId:e.get("xAxisId",!0),yAxisId:e.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}(0,SR.S)("dataZoom",function(e){var t=e.getComponent("toolbox",0),n=["feature","dataZoom"];if(t&&null!=t.get(n)){var r=t.getModel(n),i=[],o=Sj(r),s=(0,vt._e)(e,o);return SE(s.xAxisModels,function(e){return a(e,"xAxis","xAxisIndex")}),SE(s.yAxisModels,function(e){return a(e,"yAxis","yAxisIndex")}),i}function a(e,t,n){var o=e.componentIndex,s={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:SP+t+o};s[n]=o,i.push(s)}});var Sz=n("hJ"),S$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:vA.A.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:vA.A.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:vA.A.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:vA.A.color.tertiary,fontSize:14}},t}(xe.A),SF=n("OR");function SV(e){var t=e.get("confine");return null!=t?!!t:"richText"===e.get("renderMode")}function SH(e){if(wI.A.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var SW=SH(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),SU=SH(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function SG(e,t){if(!e)return t;t=(0,x7.Cb)(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var Sq=n("zZ"),SX=SG(SU,"transition"),SY=SG(SW,"transform"),SK="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(wI.A.transform3dSupported?"will-change:transform;":"");function SQ(e,t,n){var r=e.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!wI.A.transformSupported)return n?"top:"+i+";left:"+r+";":[["top",i],["left",r]];var o=wI.A.transform3dSupported,s="translate"+(o?"3d":"")+"("+r+","+i+(o?",0":"")+")";return n?"top:0;left:0;"+SY+":"+s+";":[["top",0],["left",0],[SW,s]]}function SZ(e,t,n,r,i){var o=t&&t.painter;if(n){var s=o&&o.getViewportRoot();s&&(0,SF.lJ)(e,s,n,r,i)}else{e[0]=r,e[1]=i;var a=o&&o.getViewportRootOffset();a&&(e[0]+=a.offsetLeft,e[1]+=a.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var SJ=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,wI.A.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,o=i&&((0,g6.Kg)(i)?document.querySelector(i):(0,g6.n_)(i)?i:(0,g6.Tn)(i)&&i(e.getDom()));SZ(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!s._enterable){var t=r.handler,n=r.painter.getViewportRoot();(0,xC.e0)(n,e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t,n,r=this._api.getDom(),i=(t="position",(n=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r))?t?n[t]:n:null),o=r.style;"absolute"!==o.position&&"absolute"!==i&&(o.position="relative")}var s=e.get("alwaysShowContent");s&&this._moveIfResized(),this._alwaysShowContent=s,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n,r,i,o,s,a,l,c,u,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M=this.el,O=M.style,T=this._styleCoord;M.innerHTML?O.cssText=SK+(n=!this._firstShow,r=this._longHide,i=this._enableDisplayTransition,o=[],s=e.get("transitionDuration"),a=e.get("backgroundColor"),l=e.get("shadowBlur"),c=e.get("shadowColor"),u=e.get("shadowOffsetX"),h=e.get("shadowOffsetY"),d=e.getModel("textStyle"),p=(0,Sq.CO)(e,"html"),f=u+"px "+h+"px "+l+"px "+c,o.push("box-shadow:"+f),n&&s>0&&o.push((m="cubic-bezier(0.23,1,0.32,1)",g="",v="",i&&(v="opacity"+(g=" "+s/2+"s "+m)+",visibility"+g),r||(g=" "+s+"s "+m,v+=(v.length?",":"")+(wI.A.transformSupported?""+SY+g:",left"+g+",top"+g)),SX+":"+v)),a&&o.push("background-color:"+a),(0,g6.__)(["width","color","radius"],function(t){var n="border-"+t,r=(0,x7.Cb)(n),i=e.get(r);null!=i&&o.push(n+":"+i+("color"===t?"":"px"))}),o.push((y=[],b=d.get("fontSize"),(x=d.getTextColor())&&y.push("color:"+x),y.push("font:"+d.getFont()),w=(0,g6.bZ)(d.get("lineHeight"),Math.round(3*b/2)),b&&y.push("line-height:"+w+"px"),S=d.get("textShadowColor"),A=d.get("textShadowBlur")||0,C=d.get("textShadowOffsetX")||0,k=d.get("textShadowOffsetY")||0,S&&A&&y.push("text-shadow:"+C+"px "+k+"px "+A+"px "+S),(0,g6.__)(["decoration","align"],function(e){var t=d.get(e);t&&y.push("text-"+e+":"+t)}),y.join(";"))),null!=p&&o.push("padding:"+(0,x7.QX)(p).join("px ")+"px"),o.join(";")+";")+SQ(T[0],T[1],!0)+"border-color:"+(0,x7.he)(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):O.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null==e){o.innerHTML="";return}var s="";if((0,g6.Kg)(i)&&"item"===n.get("trigger")&&!SV(n)&&(s=function(e,t,n){if(!(0,g6.Kg)(n)||"inside"===n)return"";var r,i,o=e.get("backgroundColor"),s=e.get("borderWidth");t=(0,x7.he)(t);var a=r="left"===(r=n)?"right":"right"===r?"left":"top"===r?"bottom":"top",l=Math.max(1.5*Math.round(s),6),c="",u=SY+":";(0,g6.qh)(["left","right"],a)>-1?(c+="top:50%",u+="translateY(-50%) rotate("+(i="left"===a?-225:-45)+"deg)"):(c+="left:50%",u+="translateX(-50%) rotate("+(i="top"===a?225:45)+"deg)");var h=i*Math.PI/180,d=l+s,p=d*Math.abs(Math.cos(h))+d*Math.abs(Math.sin(h));c+=";"+a+":-"+Math.round(((p-Math.SQRT2*s)/2+Math.SQRT2*s-(p-d)/2)*100)/100+"px";var f=t+" solid "+s+"px;";return'<div style="'+["position:absolute;width:"+l+"px;height:"+l+"px;z-index:-1;",c+";"+u+";","border-bottom:"+f,"border-right:"+f,"background-color:"+o+";"].join("")+'"></div>'}(n,r,i)),(0,g6.Kg)(e))o.innerHTML=e+s;else if(e){o.innerHTML="",(0,g6.cy)(e)||(e=[e]);for(var a=0;a<e.length;a++)(0,g6.n_)(e[a])&&e[a].parentNode!==o&&o.appendChild(e[a]);if(s&&o.childNodes.length){var l=document.createElement("div");l.innerHTML=s,o.appendChild(l)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(SZ(n,this._zr,this._container,e,t),null!=n[0]&&null!=n[1]){var r=this.el.style,i=SQ(n[0],n[1]);(0,g6.__)(i,function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility="hidden",t.opacity="0"):t.display="none",wI.A.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout((0,g6.oI)(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;(0,SF.Yn)(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),S0=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),S5(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var o=this;g6.Gv(e)&&(0,bm.$8)(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new yr.Ay({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:(0,Sq.CO)(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),g6.__(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(e){o.el.style[e]=n.get(e)}),g6.__(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(e){o.el.style[e]=s.get(e)||0}),this._zr.add(this.el);var a=this;this.el.on("mouseover",function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0}),this.el.on("mouseout",function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=S2(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;S5(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,o=S1(i.borderWidth||0),s=S2(i);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(g6.oI(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function S1(e){return Math.max(0,e)}function S2(e){var t=S1(e.shadowBlur||0),n=S1(e.shadowOffsetX||0),r=S1(e.shadowOffsetY||0);return{left:S1(t-n),right:S1(t+n),top:S1(t-r),bottom:S1(t+r)}}function S5(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var S3=n("rR"),S4=n("vF3"),S6=n("k4"),S9=n("lD"),S8=n("MUM"),S7=n("lZ"),Ae=n("u1"),At=new v_.A({shape:{x:-1,y:-1,width:2,height:2}}),An=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t){if(!wI.A.node&&t.getDom()){var n=e.getComponent("tooltip"),r=this._renderMode=(0,vt.XJ)(n.get("renderMode"));this._tooltipContent="richText"===r?new S0(t):new SJ(t,{appendTo:n.get("appendToBody",!0)?"body":n.get("appendTo",!0)})}},t.prototype.render=function(e,t,n){if(!wI.A.node&&n.getDom()){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?(0,vP.N)(this,"_updatePosition",50,"fixRate"):(0,vP.IU)(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");S4.k("itemTooltip",this._api,(0,g6.oI)(function(t,n,r){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,r):"leave"===t&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get("triggerOn");if("axis"!==e.get("trigger")&&(this._lastDataByCoordSys=null,this._cbParamsList=null),null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.isDisposed()||i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!wI.A.node&&n.getDom()){var i=Ai(r,n);this._ticket="";var o=r.dataByCoordSys,s=function(e,t,n){var r,i=(0,vt.HB)(e).queryOptionMap,o=i.keys()[0];if(o&&"series"!==o){var s=(0,vt.JO)(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(s&&(n.getViewOfComponentModel(s).group.traverse(function(t){var n=(0,vD.z)(t).tooltipConfig;if(n&&n.name===e.name)return r=t,!0}),r))return{componentMainType:o,componentIndex:s.componentIndex,el:r}}}(r,t,n);if(s){var a=s.el.getBoundingRect().clone();a.applyTransform(s.el.transform),this._tryShow({offsetX:a.x+a.width/2,offsetY:a.y+a.height/2,target:s.el,position:r.position,positionDefault:"bottom"},i)}else if(r.tooltip&&null!=r.x&&null!=r.y)At.x=r.x,At.y=r.y,At.update(),(0,vD.z)(At).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:At},i);else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},i);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=(0,S3.A)(r,t),c=l.point[0],u=l.point[1];null!=c&&null!=u&&this._tryShow({offsetX:c,offsetY:u,target:l.el,position:r.position,positionDefault:"bottom"},i)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(Ai(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,s=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=s){var a=t.getSeriesByIndex(i);if(a&&"axis"===Ar([a.getData().getItemModel(o),a,(a.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r,i,o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){if("legend"===(0,vD.z)(n).ssrType)return;this._lastDataByCoordSys=null,this._cbParamsList=null,(0,Ae.R)(n,function(e){if(e.tooltipDisabled)return r=i=null,!0;r||i||(null!=(0,vD.z)(e).dataIndex?r=e:null!=(0,vD.z)(e).tooltipConfig&&(i=e))},!0),r?this._showSeriesItemTooltip(e,r,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get("showDelay");t=(0,g6.oI)(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=Ar([t.tooltipOption],r),s=this._renderMode,a=[],l=(0,Sq.Qx)("section",{blocks:[],noHeader:!0}),c=[],u=new Sq.lb;(0,g6.__)(e,function(e){(0,g6.__)(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,o=t.axis,h=o.scale.parse(i);if(t&&null!=i){var d=S9._F(i,o,n,e.seriesDataIndices,e.valueLabelOpt),p=(0,Sq.Qx)("section",{header:d,noHeader:!(0,g6.Bq)(d),sortBlocks:!0,blocks:[]});l.blocks.push(p),(0,g6.__)(e.seriesDataIndices,function(i){var o=n.getSeriesByIndex(i.seriesIndex),l=i.dataIndexInside,f=o.getDataParams(l);if(!(f.dataIndex<0)){f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=S6.Dt(t.axis,{value:h}),f.axisValueLabel=d,f.marker=u.makeTooltipMarker("item",(0,x7.he)(f.color),s);var m=(0,S7.L)(o.formatTooltip(l,!0,null)),g=m.frag;if(g){var v=Ar([o],r).get("valueFormatter");p.blocks.push(v?(0,g6.X$)({valueFormatter:v},g):g)}m.text&&c.push(m.text),a.push(f)}})}})}),l.blocks.reverse(),c.reverse();var h=t.position,d=o.get("order"),p=(0,Sq.Yu)(l,u,s,d,n.get("useUTC"),o.get("textStyle"));p&&c.unshift(p);var f="richText"===s?"\n\n":"<br/>",m=c.join(f);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(e,a)?this._updatePosition(o,h,i[0],i[1],this._tooltipContent,a):this._showTooltipContent(o,m,a,Math.random()+"",i[0],i[1],h,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=(0,vD.z)(t),o=i.seriesIndex,s=r.getSeriesByIndex(o),a=i.dataModel||s,l=i.dataIndex,c=i.dataType,u=a.getData(c),h=this._renderMode,d=e.positionDefault,p=Ar([u.getItemModel(l),a,s&&(s.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),f=p.get("trigger");if(null==f||"item"===f){var m=a.getDataParams(l,c),g=new Sq.lb;m.marker=g.makeTooltipMarker("item",(0,x7.he)(m.color),h);var v=(0,S7.L)(a.formatTooltip(l,!1,c)),y=p.get("order"),b=p.get("valueFormatter"),x=v.frag,w=x?(0,Sq.Yu)(b?(0,g6.X$)({valueFormatter:b},x):x,g,h,y,r.get("useUTC"),p.get("textStyle")):v.text,S="item_"+a.name+"_"+l;this._showOrMove(p,function(){this._showTooltipContent(p,w,m,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:o,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r="html"===this._renderMode,i=(0,vD.z)(t),o=i.tooltipConfig.option||{},s=o.encodeHTMLContent;if((0,g6.Kg)(o)){var a=o;o={content:a,formatter:a},s=!0}s&&r&&o.content&&((o=(0,g6.o8)(o)).content=(0,SF.Me)(o.content));var l=[o],c=this._ecModel.getComponent(i.componentMainType,i.componentIndex);c&&l.push(c),l.push({formatter:o.content});var u=e.positionDefault,h=Ar(l,this._tooltipModel,u?{position:u}:null),d=h.get("content"),p=Math.random()+"",f=new Sq.lb;this._showOrMove(h,function(){var n=(0,g6.o8)(h.get("formatterParams")||{});this._showTooltipContent(h,d,n,p,e.offsetX,e.offsetY,e.position,t,f)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,o,s,a,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var u=e.get("formatter");s=s||e.get("position");var h=t,d=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)).color;if(u)if((0,g6.Kg)(u)){var p=e.ecModel.get("useUTC"),f=(0,g6.cy)(n)?n[0]:n,m=f&&f.axisType&&f.axisType.indexOf("time")>=0;h=u,m&&(h=(0,S8.GP)(f.axisValue,h,p)),h=(0,x7.YK)(h,n,!0)}else if((0,g6.Tn)(u)){var g=(0,g6.oI)(function(t,r){t===this._ticket&&(c.setContent(r,l,e,d,s),this._updatePosition(e,s,i,o,c,n,a))},this);this._ticket=r,h=u(n,r,g)}else h=u;c.setContent(h,l,e,d,s),c.show(e,d),this._updatePosition(e,s,i,o,c,n,a)}},t.prototype._getNearestPoint=function(e,t,n,r,i){return"axis"===n||(0,g6.cy)(t)?{color:r||i}:(0,g6.cy)(t)?void 0:{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,o,s){var a=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var c=i.getSize(),u=e.get("align"),h=e.get("verticalAlign"),d=s&&s.getBoundingRect().clone();if(s&&d.applyTransform(s.transform),(0,g6.Tn)(t)&&(t=t([n,r],o,i.el,d,{viewSize:[a,l],contentSize:c.slice()})),(0,g6.cy)(t))n=(0,g9.lo)(t[0],a),r=(0,g9.lo)(t[1],l);else if((0,g6.Gv)(t)){var p=t;p.width=c[0],p.height=c[1];var f=(0,yF.dV)(p,{width:a,height:l});n=f.x,r=f.y,u=null,h=null}else if((0,g6.Kg)(t)&&s){var m=function(e,t,n,r){var i=n[0],o=n[1],s=Math.ceil(Math.SQRT2*r)+8,a=0,l=0,c=t.width,u=t.height;switch(e){case"inside":a=t.x+c/2-i/2,l=t.y+u/2-o/2;break;case"top":a=t.x+c/2-i/2,l=t.y-o-s;break;case"bottom":a=t.x+c/2-i/2,l=t.y+u+s;break;case"left":a=t.x-i-s,l=t.y+u/2-o/2;break;case"right":a=t.x+c+s,l=t.y+u/2-o/2}return[a,l]}(t,d,c,e.get("borderWidth"));n=m[0],r=m[1]}else{var g,v,y,b,x,w,S,A,C,k,m=(g=n,v=r,y=i,b=a,x=l,w=u?null:20,S=h?null:20,C=(A=y.getSize())[0],k=A[1],null!=w&&(g+C+w+2>b?g-=C+w:g+=w),null!=S&&(v+k+S>x?v-=k+S:v+=S),[g,v]);n=m[0],r=m[1]}if(u&&(n-=Ao(u)?c[0]/2:"right"===u?c[0]:0),h&&(r-=Ao(h)?c[1]/2:"bottom"===h?c[1]:0),SV(e)){var M,O,T,_,I,D,R,E,m=(M=n,O=r,T=i,_=a,I=l,R=(D=T.getSize())[0],E=D[1],M=Math.min(M+R,_)-R,O=Math.min(O+E,I)-E,[M=Math.max(M,0),O=Math.max(O,0)]);n=m[0],r=m[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&(0,g6.__)(n,function(n,o){var s=n.dataByAxis||[],a=(e[o]||{}).dataByAxis||[];(i=i&&s.length===a.length)&&(0,g6.__)(s,function(e,n){var o=a[n]||{},s=e.seriesDataIndices||[],l=o.seriesDataIndices||[];(i=i&&e.value===o.value&&e.axisType===o.axisType&&e.axisId===o.axisId&&s.length===l.length)&&(0,g6.__)(s,function(e,t){var n=l[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&(0,g6.__)(e.seriesDataIndices,function(e){var n=e.seriesIndex,o=t[n],s=r[n];o&&s&&s.data!==o.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,t){!wI.A.node&&t.getDom()&&((0,vP.IU)(this,"_updatePosition"),this._tooltipContent.dispose(),S4.h("itemTooltip",t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type="tooltip",t}(xt.A);function Ar(e,t,n){var r,i=t.ecModel;n?(r=new x6.A(n,i,i),r=new x6.A(t.option,r,i)):r=t;for(var o=e.length-1;o>=0;o--){var s=e[o];s&&(s instanceof x6.A&&(s=s.get("tooltip",!0)),(0,g6.Kg)(s)&&(s={formatter:s}),s&&(r=new x6.A(s,r,i)))}return r}function Ai(e,t){return e.dispatchAction||(0,g6.oI)(t.dispatchAction,t)}function Ao(e){return"center"===e||"middle"===e}var As={color:{active:["#006edd","#e0ffff"],inactive:[vA.A.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},Aa=function(e,t,n){var r=g6.o8((As[e]||{})[t]);return n&&g6.cy(r)?r[r.length-1]:r},Al=g6.__,Ac=g6.Gv,Au=function(){function e(t){var n,r,i=t.mappingMethod,o=t.type,s=this.option=g6.o8(t);this.type=o,this.mappingMethod=i,this._normalizeData=Ax[i];var a=e.visualHandlers[o];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[i],"piecewise"===i?(Ah(s),r=(n=s).pieceList,n.hasSpecialVisual=!1,g6.__(r,function(e,t){e.originIndex=t,null!=e.visual&&(n.hasSpecialVisual=!0)})):"category"===i?s.categories?function(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(Al(t,function(e,t){n[e]=t}),!g6.cy(r)){var i=[];g6.Gv(r)?Al(r,function(e,t){var r=n[t];i[null!=r?r:-1]=e}):i[-1]=r,r=Ab(e,i)}for(var o=t.length-1;o>=0;o--)null==r[o]&&(delete n[t[o]],t.pop())}(s):Ah(s,!0):(g6.vA("linear"!==i||s.dataExtent),Ah(s))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return g6.oI(this._normalizeData,this)},e.listVisualTypes=function(){return g6.HP(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){g6.Gv(e)?g6.__(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,o=g6.cy(t)?[]:g6.Gv(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var s=n.call(r,e,t);i?o=s:o[t]=s}),o},e.retrieveVisuals=function(t){var n,r={};return t&&Al(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(r[i]=t[i],n=!0)}),n?r:null},e.prepareVisualTypes=function(e){if(g6.cy(e))e=e.slice();else{if(!Ac(e))return[];var t=[];Al(e,function(e,n){t.push(n)}),e=t}return e.sort(function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1}),e},e.dependsOn=function(e,t){return"color"===t?!!(e&&0===e.indexOf(t)):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,o=0,s=t.length;o<s;o++){var a=t[o].value;if(null!=a){if(a===e||g6.Kg(a)&&a===e+"")return o;n&&A(a,o)}}for(var o=0,s=t.length;o<s;o++){var l,c,u,h,d,p,f,m,g,v,y,b,x=t[o],w=x.interval,S=x.close;if(w){if(-1/0===w[0]){if(l=S[1],c=e,u=w[1],l?c<=u:c<u)return o}else if(1/0===w[1]){if(h=S[0],d=w[0],p=e,h?d<=p:d<p)return o}else{if(f=S[0],m=w[0],g=e,(f?m<=g:m<g)&&(v=S[1],y=e,b=w[1],v?y<=b:y<b))return o}n&&A(w[0],o),n&&A(w[1],o)}}if(n)return 1/0===e?t.length-1:-1/0===e?0:r;function A(t,n){var o=Math.abs(t-e);o<i&&(i=o,r=n)}},e.visualHandlers={color:{applyVisual:Af("color"),getColorMapper:function(){var e=this.option;return g6.oI("category"===e.mappingMethod?function(e,t){return t||(e=this._normalizeData(e)),Am.call(this,e)}:function(t,n,r){var i=!!r;return n||(t=this._normalizeData(t)),r=x8.ad(t,e.parsedVisual,r),i?r:x8.As(r,"rgba")},this)},_normalizedToVisual:{linear:function(e){return x8.As(x8.ad(e,this.option.parsedVisual),"rgba")},category:Am,piecewise:function(e,t){var n=Ay.call(this,t);return null==n&&(n=x8.As(x8.ad(e,this.option.parsedVisual),"rgba")),n},fixed:Ag}},colorHue:Ad(function(e,t){return x8.Yu(e,t)}),colorSaturation:Ad(function(e,t){return x8.Yu(e,null,t)}),colorLightness:Ad(function(e,t){return x8.Yu(e,null,null,t)}),colorAlpha:Ad(function(e,t){return x8.hm(e,t)}),decal:{applyVisual:Af("decal"),_normalizedToVisual:{linear:null,category:Am,piecewise:null,fixed:null}},opacity:{applyVisual:Af("opacity"),_normalizedToVisual:Av([0,1])},liftZ:{applyVisual:Af("liftZ"),_normalizedToVisual:{linear:Ag,category:Ag,piecewise:Ag,fixed:Ag}},symbol:{applyVisual:function(e,t,n){n("symbol",this.mapValueToVisual(e))},_normalizedToVisual:{linear:Ap,category:Am,piecewise:function(e,t){var n=Ay.call(this,t);return null==n&&(n=Ap.call(this,e)),n},fixed:Ag}},symbolSize:{applyVisual:Af("symbolSize"),_normalizedToVisual:Av([0,1])}},e}();function Ah(e,t){var n=e.visual,r=[];g6.Gv(n)?Al(n,function(e){r.push(e)}):null!=n&&r.push(n),t||1!==r.length||({color:1,symbol:1}).hasOwnProperty(e.type)||(r[1]=r[0]),Ab(e,r)}function Ad(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r("color",e(n("color"),i))},_normalizedToVisual:Av([0,1])}}function Ap(e){var t=this.option.visual;return t[Math.round((0,g9.Cb)(e,[0,1],[0,t.length-1],!0))]||{}}function Af(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function Am(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function Ag(){return this.option.visual[0]}function Av(e){return{linear:function(t){return(0,g9.Cb)(t,e,this.option.visual,!0)},category:Am,piecewise:function(t,n){var r=Ay.call(this,n);return null==r&&(r=(0,g9.Cb)(t,e,this.option.visual,!0)),r},fixed:Ag}}function Ay(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=Au.findPieceIndex(e,n),i=n[r];if(i&&i.visual)return i.visual[this.type]}}function Ab(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=g6.Tj(t,function(e){return x8.qg(e)||[0,0,0,1]})),t}var Ax={linear:function(e){return(0,g9.Cb)(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=Au.findPieceIndex(e,t,!0);if(null!=n)return(0,g9.Cb)(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:g6.lQ},Aw=n("N1e"),AS=g6.__;function AA(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function AC(e,t,n){var r={};return AS(t,function(t){var i,o=r[t]=((i=function(){}).prototype.__hidden=i.prototype,new i);AS(e[t],function(e,r){if(Au.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),o[r]=new Au(i),"opacity"===r&&((i=g6.o8(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new Au(i))}})}),r}var Ak=Au.mapVisual,AM=Au.eachVisual,AO=g6.cy,AT=g6.__,A_=g9.Y6,AI=g9.Cb,AD=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n,r,i=this.option;t||(n=this.replacableOptionKeys,g6.__(n,function(t){e.hasOwnProperty(t)&&AA(e[t])&&(r=!0)}),r&&g6.__(n,function(t){e.hasOwnProperty(t)&&AA(e[t])?i[t]=g6.o8(e[t]):delete i[t]})),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=g6.oI(e,this),this.controllerVisuals=AC(this.option.controller,t,e),this.targetVisuals=AC(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return AT(t,function(t){if(null!=t.seriesIndex)n.push(t.seriesIndex);else if(null!=t.seriesId){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;null==i&&null==r&&(i="all");var o=vt.JO(this.ecModel,"series",{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return g6.Tj(o,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){g6.__(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r,i=this.option,o=i.precision,s=this.dataBound,a=i.formatter;n=n||["<",">"],g6.cy(e)&&(e=e.slice(),r=!0);var l=t?e:r?[c(e[0]),c(e[1])]:c(e);if(g6.Kg(a))return a.replace("{value}",r?l[0]:l).replace("{value2}",r?l[1]:l);if(g6.Tn(a))return r?a(e[0],e[1]):a(e);if(!r)return l;if(e[0]===s[0])return n[0]+" "+l[1];if(e[1]===s[1])return n[1]+" "+l[0];return l[0]+" - "+l[1];function c(e){return e===s[0]?"min":e===s[1]?"max":(+e).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,t=A_([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=g6.I6(n,function(n){return null!=n.seriesIndex&&n.seriesIndex===e||null!=n.seriesId&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(null!=n)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var o=r[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),i=t.controller||(t.controller={});g6.h1(r,n),g6.h1(i,n);var o=this.isCategory();function s(n){AO(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")}}s.call(this,r),s.call(this,i),(function(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},AT(r,function(e,t){if(Au.isValidType(t)){var n=Aa(t,"inactive",o);null!=n&&(i[t]=n,"color"!==t||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}}))}).call(this,r,"inRange","outOfRange"),(function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),i=this.getItemSymbol()||"roundRect";AT(this.stateList,function(s){var a=this.itemSize,l=e[s];l||(l=e[s]={color:o?r:[r]}),null==l.symbol&&(l.symbol=t&&g6.o8(t)||(o?i:[i])),null==l.symbolSize&&(l.symbolSize=n&&g6.o8(n)||(o?a[0]:[a[0],a[0]])),l.symbol=Ak(l.symbol,function(e){return"none"===e?i:e});var c=l.symbolSize;if(null!=c){var u=-1/0;AM(c,function(e){e>u&&(u=e)}),l.symbolSize=Ak(c,function(e){return AI(e,[0,u],[0,a[0]],!0)})}},this)}).call(this,i)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:vA.A.color.transparent,borderColor:vA.A.color.borderTint,contentColor:vA.A.color.theme["0"],inactiveColor:vA.A.color.disabled,borderWidth:0,padding:vA.A.size.m,textGap:10,precision:0,textStyle:{color:vA.A.color.secondary}},t}(xe.A),AR=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(null==t[0]||isNaN(t[0]))&&(t[0]=20),(null==t[1]||isNaN(t[1]))&&(t[1]=140)},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):g6.cy(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),g6.__(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=g9.Y6((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},t.prototype.getValueState=function(e){var t=this.option.range,n=this.getExtent(),r=g6.bZ(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=AE(this,"outOfRange",this.getExtent()),n=AE(this,"inRange",this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var o=0,s=0,a=n.length,l=t.length;s<l&&(!n.length||t[s]<=n[0]);s++)t[s]<n[o]&&i(t[s],"outOfRange");for(var c=1;o<a;o++,c=0)c&&r.length&&i(n[o],"outOfRange"),i(n[o],"inRange");for(var c=1;s<l;s++)(!n.length||n[n.length-1]<t[s])&&(c&&(r.length&&i(r[r.length-1].value,"outOfRange"),c=0),i(t[s],"outOfRange"));var u=r.length;return{stops:r,outerColors:[u?r[0].color:"transparent",u?r[u-1].color:"transparent"]}},t.type="visualMap.continuous",t.defaultOption=(0,vS.G_)(AD.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:vA.A.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:vA.A.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:vA.A.color.shadow}}),t}(AD);function AE(e,t,n){if(n[0]===n[1])return n.slice();for(var r=(n[1]-n[0])/200,i=n[0],o=[],s=0;s<=200&&i<n[1];s++)o.push(i),i+=r;return o.push(n[1]),o}var AP=n("Up"),AL=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){(this.visualMapModel=e,!1===e.get("show"))?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=x7.QX(t.get("padding")||0),r=e.getBoundingRect();e.add(new v_.A({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},t.prototype.getControllerVisual=function(e,t,n){var r=(n=n||{}).forceState,i=this.visualMapModel,o={};function s(e){return o[e]}function a(e,t){o[e]=t}"color"===t&&(o.color=i.get("contentColor"));var l=i.controllerVisuals[r||i.getValueState(e)],c=Au.prepareVisualTypes(l);return g6.__(c,function(r){var i=l[r];n.convertOpacityToAlpha&&"opacity"===r&&(r="colorAlpha",i=l.__alphaForOpacity),Au.dependsOn(r,t)&&i&&i.applyVisual(e,s,a)}),o[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=yF.Lj(t,n).refContainer;yF.m$(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type="visualMap",t}(xt.A),AN=[["left","right","width"],["top","bottom","height"]];function AB(e,t,n){var r=e.option,i=r.align;if(null!=i&&"auto"!==i)return i;for(var o={width:t.getWidth(),height:t.getHeight()},s=+("horizontal"===r.orient),a=AN[s],l=[0,null,10],c={},u=0;u<3;u++)c[AN[1-s][u]]=l[u],c[a[u]]=2===u?n[0]:r[a[u]];var h=[["x","width",3],["y","height",0]][s],d=(0,yF.dV)(c,o,r.padding);return a[(d.margin[h[2]]||0)+d[h[0]]+.5*d[h[1]]<.5*o[h[1]]?0:1]}function Aj(e,t){return g6.__(e||[],function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")}),e}var Az=g9.Cb,A$=g6.__,AF=Math.min,AV=Math.max,AH=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._shapes={},n._dataInterval=[],n._handleEnds=[],n._hoverLinkDataIndices=[],n}return(0,vy.C6)(t,e),t.prototype.init=function(t,n){e.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=g6.oI(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=g6.oI(this._hideIndicator,this)},t.prototype.doRender=function(e,t,n,r){r&&"selectDataRange"===r.type&&r.from===this.uid||this._buildView()},t.prototype._buildView=function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},t.prototype._renderEndsText=function(e,t,n){if(t){var r=t[1-n];r=null!=r?r+"":"";var i=this.visualMapModel,o=i.get("textGap"),s=i.itemSize,a=this._shapes.mainGroup,l=this._applyTransform([s[0]/2,0===n?-o:s[1]+o],a),c=this._applyTransform(0===n?"bottom":"top",a),u=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new yr.Ay({style:(0,vE.VB)(h,{x:l[0],y:l[1],verticalAlign:h.get("verticalAlign")||("horizontal"===u?"middle":c),align:h.get("align")||("horizontal"===u?c:"center"),text:r})}))}},t.prototype._renderBar=function(e){var t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,o=this._useHandle,s=AB(t,this.api,r),a=n.mainGroup=this._createBarGroup(s),l=new vM.A;a.add(l),l.add(n.outOfRange=AW()),l.add(n.inRange=AW(null,o?AG(this._orient):null,g6.oI(this._dragHandle,this,"all",!1),g6.oI(this._dragHandle,this,"all",!0))),l.setClipPath(new v_.A({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));var c=t.textStyleModel.getTextRect("国"),u=AV(c.width,c.height);o&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,a,0,r,u,i),this._createHandle(t,a,1,r,u,i)),this._createIndicator(t,a,r,u,i),e.add(a)},t.prototype._createHandle=function(e,t,n,r,i,o){var s=g6.oI(this._dragHandle,this,n,!1),a=g6.oI(this._dragHandle,this,n,!0),l=(0,vF.lo)(e.get("handleSize"),r[0]),c=(0,yi.v5)(e.get("handleIcon"),-l/2,-l/2,l,l,null,!0),u=AG(this._orient);c.attr({cursor:u,draggable:!0,drift:s,ondragend:a,onmousemove:function(e){xC.ds(e.event)}}),c.x=r[0]/2,c.useStyle(e.getModel("handleStyle").getItemStyle()),c.setStyle({strokeNoScale:!0,strokeFirst:!0}),c.style.lineWidth*=2,c.ensureState("emphasis").style=e.getModel(["emphasis","handleStyle"]).getItemStyle(),(0,vR.ix)(c,!0),t.add(c);var h=this.visualMapModel.textStyleModel,d=new yr.Ay({cursor:u,draggable:!0,drift:s,onmousemove:function(e){xC.ds(e.event)},ondragend:a,style:(0,vE.VB)(h,{x:0,y:0,text:""})});d.ensureState("blur").style={opacity:.1},d.stateTransition={duration:200},this.group.add(d);var p=[l,0],f=this._shapes;f.handleThumbs[n]=c,f.handleLabelPoints[n]=p,f.handleLabels[n]=d},t.prototype._createIndicator=function(e,t,n,r,i){var o=(0,vF.lo)(e.get("indicatorSize"),n[0]),s=(0,yi.v5)(e.get("indicatorIcon"),-o/2,-o/2,o,o,null,!0);s.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});var a=e.getModel("indicatorStyle").getItemStyle();if(s instanceof yo.Ay){var l=s.style;s.useStyle(g6.X$({image:l.image,x:l.x,y:l.y,width:l.width,height:l.height},a))}else s.useStyle(a);t.add(s);var c=this.visualMapModel.textStyleModel,u=new yr.Ay({silent:!0,invisible:!0,style:(0,vE.VB)(c,{x:0,y:0,text:""})});this.group.add(u);var h=[("horizontal"===i?r/2:6)+n[0]/2,0],d=this._shapes;d.indicator=s,d.indicatorLabel=u,d.indicatorLabelPoint=h,this._firstShowIndicator=!0},t.prototype._dragHandle=function(e,t,n,r){if(this._useHandle){if(this._dragging=!t,!t){var i=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(e,i[1]),this._hideIndicator(),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?this._hovering||this._clearHoverLinkToSeries():AU(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},t.prototype._resetInterval=function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[Az(t[0],n,r,!0),Az(t[1],n,r,!0)]},t.prototype._updateInterval=function(e,t){t=t||0;var n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];xx(t,r,i,e,0);var o=n.getExtent();this._dataInterval=[Az(r[0],i,o,!0),Az(r[1],i,o,!0)]},t.prototype._updateView=function(e){var t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],o=e?i:this._handleEnds,s=this._createBarVisual(this._dataInterval,n,o,"inRange"),a=this._createBarVisual(n,n,i,"outOfRange");r.inRange.setStyle({fill:s.barColor}).setShape("points",s.barPoints),r.outOfRange.setStyle({fill:a.barColor}).setShape("points",a.barPoints),this._updateHandle(o,s)},t.prototype._createBarVisual=function(e,t,n,r){var i={forceState:r,convertOpacityToAlpha:!0},o=this._makeColorGradient(e,i),s=[this.getControllerVisual(e[0],"symbolSize",i),this.getControllerVisual(e[1],"symbolSize",i)],a=this._createBarPoints(n,s);return{barColor:new AP.A(0,0,0,1,o),barPoints:a,handlesColor:[o[0].color,o[o.length-1].color]}},t.prototype._makeColorGradient=function(e,t){var n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var i=1;i<100;i++){var o=e[0]+r*i;if(o>e[1])break;n.push({color:this.getControllerVisual(o,"color",t),offset:i/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new vM.A("horizontal"===t&&!n?{scaleX:"bottom"===e?1:-1,rotation:Math.PI/2}:"horizontal"===t&&n?{scaleX:"bottom"===e?-1:1,rotation:-Math.PI/2}:"vertical"===t&&!n?{scaleX:"left"===e?1:-1,scaleY:-1}:{scaleX:"left"===e?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,o=n.handleLabels,s=r.itemSize,a=r.getExtent(),l=this._applyTransform("left",n.mainGroup);A$([0,1],function(c){var u=i[c];u.setStyle("fill",t.handlesColor[c]),u.y=e[c];var h=Az(e[c],[0,s[1]],a,!0),d=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=d/s[0],u.x=s[0]-d/2;var p=vO.applyTransform(n.handleLabelPoints[c],vO.getTransform(u,this.group));if("horizontal"===this._orient){var f="left"===l||"top"===l?(s[0]-d)/2:-((s[0]-d)/2);p[1]+=f}o[c].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,o=i.getExtent(),s=i.itemSize,a=[0,s[1]],l=this._shapes,c=l.indicator;if(c){c.attr("invisible",!1);var u=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),h=this.getControllerVisual(e,"symbolSize"),d=Az(e,o,a,!0),p=s[0]-h/2,f={x:c.x,y:c.y};c.y=d,c.x=p;var m=vO.applyTransform(l.indicatorLabelPoint,vO.getTransform(c,this.group)),g=l.indicatorLabel;g.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),y="horizontal"===this._orient;g.setStyle({text:(n||"")+i.formatValueText(t),verticalAlign:y?v:"middle",align:y?"center":v});var b={x:p,y:d,style:{fill:u}},x={style:{x:m[0],y:m[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var w={duration:100,easing:"cubicInOut",additive:!0};c.x=f.x,c.y=f.y,c.animateTo(b,w),g.animateTo(x,w)}else c.attr(b),g.attr(x);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var A=0;A<S.length;A++)this.api.enterBlur(S[A])}},t.prototype._enableHoverLinkToSeries=function(){var e=this;this._shapes.mainGroup.on("mousemove",function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=AF(AV(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on("mouseout",function(){e._hovering=!1,e._dragging||e._clearHoverLinkToSeries()})},t.prototype._enableHoverLinkFromSeries=function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},t.prototype._doHoverLinkToSeries=function(e,t){var n=this.visualMapModel,r=n.itemSize;if(n.option.hoverLink){var i,o,s,a,l,c=[0,r[1]],u=n.getExtent();e=AF(AV(c[0],e),c[1]);var h=(i=n,o=u,s=c,a=6,(l=i.get("hoverLinkDataSize"))&&(a=Az(l,o,s,!0)/2),a),d=[e-h,e+h],p=Az(e,c,u,!0),f=[Az(d[0],c,u,!0),Az(d[1],c,u,!0)];d[0]<c[0]&&(f[0]=-1/0),d[1]>c[1]&&(f[1]=1/0),t&&(-1/0===f[0]?this._showIndicator(p,f[1],"< ",h):1/0===f[1]?this._showIndicator(p,f[0],"> ",h):this._showIndicator(p,p,"≈ ",h));var m=this._hoverLinkDataIndices,g=[];(t||AU(n))&&(g=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var v=vt.D6(m,g);this._dispatchHighDown("downplay",Aj(v[0],n)),this._dispatchHighDown("highlight",Aj(v[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){if((0,Ae.R)(e.target,function(e){var n=(0,vD.z)(e);if(null!=n.dataIndex)return t=n,!0},!0),t){var t,n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),o=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(o)||this._showIndicator(o,o)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n<t.length;n++)this.api.leaveBlur(t[n])},t.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Aj(e,this.visualMapModel)),e.length=0},t.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},t.prototype._applyTransform=function(e,t,n,r){var i=vO.getTransform(t,r?null:this.group);return g6.cy(e)?vO.applyTransform(e,i,n):vO.transformDirection(e,i,n)},t.prototype._dispatchHighDown=function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},t.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},t.type="visualMap.continuous",t}(AL);function AW(e,t,n,r){return new xQ.A({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){xC.ds(e.event)},ondragend:r})}function AU(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function AG(e){return"vertical"===e?"ns-resize":"ew-resize"}var Aq={type:"selectDataRange",event:"dataRangeSelected",update:"update"},AX=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},AY=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",function(t){var r,i,o,s,a,l=e.pipelineContext;!t.isTargetSeries(e)||l&&l.large||n.push((r=t.stateList,i=t.targetVisuals,o=g6.oI(t.getValueState,t),s=t.getDataDimensionIndex(e.getData()),a={},g6.__(r,function(e){var t=Au.prepareVisualTypes(i[e]);a[e]=t}),{progress:function(e,t){function n(e){return(0,Aw.Ez)(t,c,e)}function r(e,n){(0,Aw.oZ)(t,c,e,n)}null!=s&&(l=t.getDimensionIndex(s));for(var l,c,u=t.getStore();null!=(c=e.next());){var h=t.getRawDataItem(c);if(!h||!1!==h.visualMap)for(var d=null!=s?u.get(l,c):c,p=o(d),f=i[p],m=a[p],g=0,v=m.length;g<v;g++){var y=m[g];f[y]&&f[y].applyVisual(d,n,r)}}}}))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(g6.oI(AK,null,e,t))||{stops:[],outerColors:[]},o=t.getDataDimensionIndex(n);o>=0&&(i.dimension=o,r.push(i))}}),e.getData().setVisual("visualMeta",r)}}];function AK(e,t,n,r){for(var i=t.targetVisuals[r],o=Au.prepareVisualTypes(i),s={color:(0,Aw.rI)(e.getData(),"color")},a=0,l=o.length;a<l;a++){var c=o[a],u=i["opacity"===c?"__alphaForOpacity":c];u&&u.applyVisual(n,h,d)}return s.color;function h(e){return s[e]}function d(e,t){s[e]=t}}var AQ=g6.__;function AZ(e){var t=e&&e.visualMap;g6.cy(t)||(t=t?[t]:[]),AQ(t,function(e){if(e){AJ(e,"splitList")&&!AJ(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&g6.cy(t)&&AQ(t,function(e){g6.Gv(e)&&(AJ(e,"start")&&!AJ(e,"min")&&(e.min=e.start),AJ(e,"end")&&!AJ(e,"max")&&(e.max=e.end))})}})}function AJ(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var A0=!1;function A1(e){A0||(A0=!0,e.registerSubTypeDefaulter("visualMap",function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}),e.registerAction(Aq,AX),(0,g6.__)(AY,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(AZ))}function A2(e){e.registerComponentModel(AR),e.registerComponentView(AH),A1(e)}var A5=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return(0,vy.C6)(t,e),t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],A3[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){"categories"===r?(e.mappingMethod="category",e.categories=g6.o8(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=g6.Tj(this._pieceList,function(e){return e=g6.o8(e),"inRange"!==t&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=Au.listVisualTypes(),i=this.isCategory();function o(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}g6.__(t.pieces,function(e){g6.__(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),g6.__(n,function(e,n){var r=!1;g6.__(this.stateList,function(e){r=r||o(t,e,n)||o(t.target,e,n)},this),r||g6.__(this.stateList,function(e){(t[e]||(t[e]={}))[n]=Aa(n,"inRange"===e?"active":"inactive",i)})},this),e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,g6.__(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),"single"===n.selectedMode){var o=!1;g6.__(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(o?i[n]=!1:o=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return"categories"===this._mode?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=g6.o8(e)},t.prototype.getValueState=function(e){var t=Au.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],o=r.getData();o.each(this.getDataDimensionIndex(o),function(t,r){Au.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=-1/0===n[0]&&1/0===n[1]?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var t=[],n=["",""],r=this,i=this._pieceList.slice();if(i.length){var o=i[0].interval[0];-1/0!==o&&i.unshift({interval:[-1/0,o]}),1/0!==(o=i[i.length-1].interval[1])&&i.push({interval:[o,1/0]})}else i.push({interval:[-1/0,1/0]});var s=-1/0;return g6.__(i,function(e){var t=e.interval;t&&(t[0]>s&&a([s,t[0]],"outOfRange"),a(t.slice()),s=t[1])},this),{stops:t,outerColors:n}}function a(i,o){var s=r.getRepresentValue({interval:i});o||(o=r.getValueState(s));var a=e(s,o);-1/0===i[0]?n[0]=a:1/0===i[1]?n[1]=a:t.push({value:i[0],color:a},{value:i[1],color:a})}},t.type="visualMap.piecewise",t.defaultOption=(0,vS.G_)(AD.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),t}(AD),A3={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;t.splitNumber=i=Math.max(parseInt(i,10),1);for(var o=(r[1]-r[0])/i;+o.toFixed(n)!==o&&n<5;)n++;t.precision=n,o=+o.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var s=0,a=r[0];s<i;a+=o,s++){var l=s===i-1?r[1]:a+o;e.push({interval:[a,l],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),(0,g9.sL)(e),g6.__(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;g6.__(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),A4(t,e)},pieces:function(e){var t=this.option;g6.__(t.pieces,function(t,n){g6.Gv(t)||(t={value:t});var r={text:"",index:n};if(null!=t.label&&(r.text=t.label),t.hasOwnProperty("value")){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var o=r.interval=[],s=r.close=[0,0],a=[1,0,1],l=[-1/0,1/0],c=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==o[u];d++)o[u]=t[h[d]],s[u]=a[d],c[u]=2===d;null==o[u]&&(o[u]=l[u])}c[0]&&1/0===o[1]&&(s[0]=0),c[1]&&-1/0===o[0]&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(r.value=o[0])}r.visual=Au.retrieveVisuals(t),e.push(r)},this),A4(t,e),(0,g9.sL)(e),g6.__(e,function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)},this)}};function A4(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var A6=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),r=t.textStyleModel,i=this._getItemAlign(),o=t.itemSize,s=this._getViewData(),a=s.endsText,l=g6.Je(t.get("showLabel",!0),!a),c=!t.get("selectedMode");a&&this._renderEndsText(e,a[0],o,l,i),g6.__(s.viewPieceList,function(s){var a=s.piece,u=new vM.A;u.onclick=g6.oI(this._onItemClick,this,a),this._enableHoverLink(u,s.indexInModelPieceList);var h=t.getRepresentValue(a);if(this._createItemSymbol(u,h,[0,0,o[0],o[1]],c),l){var d=this.visualMapModel.getValueState(h),p=r.get("align")||i;u.add(new yr.Ay({style:(0,vE.VB)(r,{x:"right"===p?-n:o[0]+n,y:o[1]/2,text:a.text,verticalAlign:r.get("verticalAlign")||"middle",align:p,opacity:g6.bZ(r.get("opacity"),"outOfRange"===d?.5:1)}),silent:c}))}e.add(u)},this),a&&this._renderEndsText(e,a[1],o,l,i),yF.aP(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on("mouseover",function(){return r("highlight")}).on("mouseout",function(){return r("downplay")});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:Aj(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return AB(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var o=new vM.A,s=this.visualMapModel.textStyleModel;o.add(new yr.Ay({style:(0,vE.VB)(s,{x:r?"right"===i?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:r?i:"center",text:t})})),e.add(o)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=g6.Tj(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get("text"),r=e.get("orient"),i=e.get("inverse");return("horizontal"===r?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=(0,yi.v5)(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color"));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=g6.o8(n.selected),o=t.getSelectedMapKey(e);"single"===r||!0===r?(i[o]=!0,g6.__(i,function(e,t){i[t]=t===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type="visualMap.piecewise",t}(AL);function A9(e){e.registerComponentModel(A5),e.registerComponentView(A6),A1(e)}function A8(e,t){if(!e)return!1;for(var n=(0,g6.cy)(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function A7(e){(0,vt.M5)(e,"label",["show"])}var Ce=(0,vt.$r)(),Ct=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return(0,vy.C6)(t,e),t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(wI.A.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),o=Ce(e)[i];if(!n||!n.data){Ce(e)[i]=null;return}o?o._mergeOption(n,t,!0):(r&&A7(n),g6.__(n.data,function(e){e instanceof Array?(A7(e[0]),A7(e[1])):A7(e)}),o=this.createMarkerModelFromSeries(n,this,t),g6.X$(o,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),Ce(e)[i]=o},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),o=r.getName(e);return(0,Sq.Qx)("section",{header:this.name,blocks:[(0,Sq.Qx)("nameValue",{name:o,value:i,noName:!o,noValue:null==i})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=S7.J.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return Ce(e)[t]},t.type="marker",t.dependencies=["series","grid","polar","geo"],t}(xe.A);g6.co(Ct,S7.J.prototype);var Cn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Ct);function Cr(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function Ci(e,t,n,r,i,o,s){var a=[],l=(0,g8.sJ)(t,i)?t.getCalculationInfo("stackResultDimension"):i,c=Cu(t,l,e),u=t.hostModel.indicesOfNearest(n,l,c)[0];a[o]=t.get(r,u),a[s]=t.get(l,u);var h=t.get(i,u),d=g9.XV(t.get(i,u));return(d=Math.min(d,20))>=0&&(a[s]=+a[s].toFixed(d)),[a,h]}var Co={min:(0,g6.cF)(Ci,"min"),max:(0,g6.cF)(Ci,"max"),average:(0,g6.cF)(Ci,"average"),median:(0,g6.cF)(Ci,"median")};function Cs(e,t){if(t){var n,r=e.getData(),i=e.coordinateSystem,o=i&&i.dimensions;if(!(!isNaN(parseFloat((n=t).x))&&!isNaN(parseFloat(n.y)))&&!(0,g6.cy)(t.coord)&&(0,g6.cy)(o)){var s=Ca(t,r,i,e);if((t=(0,g6.o8)(t)).type&&Co[t.type]&&s.baseAxis&&s.valueAxis){var a=(0,g6.qh)(o,s.baseAxis.dim),l=(0,g6.qh)(o,s.valueAxis.dim),c=Co[t.type](r,s.valueAxis.dim,s.baseDataDim,s.valueDataDim,a,l);t.coord=c[0],t.value=c[1]}else t.coord=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis]}if(null!=t.coord&&(0,g6.cy)(o))for(var u=t.coord,h=0;h<2;h++)Co[u[h]]&&(u[h]=Cu(r,r.mapDimension(o[h]),u[h]));else{t.coord=[];var d=e.getBaseAxis();if(d&&t.type&&Co[t.type]){var p=i.getOtherAxis(d);p&&(t.value=Cu(r,r.mapDimension(p.dim),t.type))}}return t}}function Ca(e,t,n,r){var i,o,s,a={};return null!=e.valueIndex||null!=e.valueDim?(a.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=n.getAxis((i=r,o=a.valueDataDim,(s=i.getData().getDimensionInfo(o))&&s.coordDim)),a.baseAxis=n.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=r.getBaseAxis(),a.valueAxis=n.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function Cl(e,t){return!e||!e.containData||!t.coord||!!Cr(t)||e.containData(t.coord)}function Cc(e,t){return e?function(e,n,r,i){var o=i<2?e.coord&&e.coord[i]:e.value;return(0,va.Pn)(o,t[i])}:function(e,n,r,i){return(0,va.Pn)(e.value,t[i])}}function Cu(e,t,n){if("average"===n){var r=0,i=0;return e.each(t,function(e,t){!isNaN(e)&&(r+=e,i++)}),r/i}return"median"===n?e.getMedian(t):e.getDataExtent(t)[+("max"===n)]}var Ch=(0,vt.$r)(),Cd=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.init=function(){this.markerGroupMap=(0,g6.nt)()},t.prototype.render=function(e,t,n){var r,i,o,s=this,a=this.markerGroupMap;a.each(function(e){Ch(e).keep=!1}),t.eachSeries(function(e){var r=Ct.getMarkerModelFromSeries(e,s.type);r&&s.renderSeries(e,r,t,n)}),a.each(function(e){Ch(e).keep||s.group.remove(e.group)}),r=t,i=a,o=this.type,r.eachSeries(function(e){var t=Ct.getMarkerModelFromSeries(e,o),n=i.get(e.id);if(t&&n&&n.group){var r=(0,vO.retrieveZInfo)(t),s=r.z,a=r.zlevel;(0,vO.traverseUpdateZ)(n.group,s,a)}})},t.prototype.markKeep=function(e){Ch(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;(0,g6.__)(e,function(e){var r=Ct.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?(0,vR.QX)(e):(0,vR.JC)(e))})})},t.type="marker",t}(xt.A),Cp=(0,vt.$r)(),Cf=function(e,t,n,r){var i=r[0],o=r[1];if(i&&o){var s=Cs(e,i),a=Cs(e,o),l=s.coord,c=a.coord;l[0]=(0,g6.Je)(l[0],-1/0),l[1]=(0,g6.Je)(l[1],-1/0),c[0]=(0,g6.Je)(c[0],1/0),c[1]=(0,g6.Je)(c[1],1/0);var u=(0,g6.Um)([{},s,a]);return u.coord=[s.coord,a.coord],u.x0=s.x,u.y0=s.y,u.x1=a.x,u.y1=a.y,u}};function Cm(e){return!isNaN(e)&&!isFinite(e)}function Cg(e,t,n,r){var i=1-e;return Cm(t[i])&&Cm(n[i])}function Cv(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},o={coord:r,x:t.x1,y:t.y1};if((0,vz.g)(e,"cartesian2d"))return!!(n&&r&&(Cg(1,n,r,e)||Cg(0,n,r,e)))||!e||!e.containZone||!i.coord||!o.coord||!!Cr(i)||!!Cr(o)||e.containZone(i.coord,o.coord);return Cl(e,i)||Cl(e,o)}function Cy(e,t,n,r,i){var o,s=r.coordinateSystem,a=e.getItemModel(t),l=g9.lo(a.get(n[0]),i.getWidth()),c=g9.lo(a.get(n[1]),i.getHeight());if(isNaN(l)||isNaN(c)){if(r.getMarkerPosition){var u=e.getValues(["x0","y0"],t),h=e.getValues(["x1","y1"],t),d=s.clampData(u),p=s.clampData(h),f=[];"x0"===n[0]?f[0]=d[0]>p[0]?h[0]:u[0]:f[0]=d[0]>p[0]?u[0]:h[0],"y0"===n[1]?f[1]=d[1]>p[1]?h[1]:u[1]:f[1]=d[1]>p[1]?u[1]:h[1],o=r.getMarkerPosition(f,n,!0)}else{var m=e.get(n[0],t),g=e.get(n[1],t),v=[m,g];s.clampData&&s.clampData(v,v),o=s.dataToPoint(v,!0)}if((0,vz.g)(s,"cartesian2d")){var y=s.getAxis("x"),b=s.getAxis("y"),m=e.get(n[0],t),g=e.get(n[1],t);Cm(m)?o[0]=y.toGlobalCoord(y.getExtent()[+("x0"!==n[0])]):Cm(g)&&(o[1]=b.toGlobalCoord(b.getExtent()[+("y0"!==n[1])]))}isNaN(l)||(o[0]=l),isNaN(c)||(o[1]=c)}else o=[l,c];return o}var Cb=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Cx=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Ct.getMarkerModelFromSeries(e,"markArea");if(t){var r=t.getData();r.each(function(t){var i=(0,g6.Tj)(Cb,function(i){return Cy(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape("points",i)})}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,o=e.id,s=e.getData(),a=this.markerGroupMap,l=a.get(o)||a.set(o,{group:new vM.A});this.group.add(l.group),this.markKeep(l);var c=function(e,t,n){if(e){var r,i,o=(0,g6.Tj)(e&&e.dimensions,function(e){var n=t.getData(),r=n.getDimensionInfo(n.mapDimension(e))||{};return(0,g6.X$)((0,g6.X$)({},r),{name:e,ordinalMeta:null})});i=(0,g6.Tj)(["x0","y0","x1","y1"],function(e,t){return{name:e,type:o[t%2].type}}),r=new yu.A(i,n)}else i=[{name:"value",type:"float"}],r=new yu.A(i,n);var s=(0,g6.Tj)(n.get("data"),(0,g6.cF)(Cf,t,e,n));e&&(s=(0,g6.pb)(s,(0,g6.cF)(Cv,e)));var a=e?function(e,t,n,r){var o=e.coord[Math.floor(r/2)][r%2];return(0,va.Pn)(o,i[r])}:function(e,t,n,r){return(0,va.Pn)(e.value,i[r])};return r.initData(s,null,a),r.hasItemOption=!0,r}(i,e,t);t.setData(c),c.each(function(t){var n=(0,g6.Tj)(Cb,function(n){return Cy(c,t,n,e,r)}),o=i.getAxis("x").scale,a=i.getAxis("y").scale,l=o.getExtent(),u=a.getExtent(),h=[o.parse(c.get("x0",t)),o.parse(c.get("x1",t))],d=[a.parse(c.get("y0",t)),a.parse(c.get("y1",t))];g9.Y6(h),g9.Y6(d);var p=!(l[0]>h[1]||l[1]<h[0]||u[0]>d[1]||u[1]<d[0]);c.setItemLayout(t,{points:n,allClipped:!p});var f=c.getItemModel(t),m=f.getModel("itemStyle").getItemStyle(),g=f.get("z2"),v=(0,Aw.rI)(s,"color");!m.fill&&(m.fill=v,(0,g6.Kg)(m.fill)&&(m.fill=x8.hm(m.fill,.4))),m.stroke||(m.stroke=v),c.setItemVisual(t,"style",m),c.setItemVisual(t,"z2",(0,g6.bZ)(g,0))}),c.diff(Cp(l).data).add(function(e){var t=c.getItemLayout(e),n=c.getItemVisual(e,"z2");if(!t.allClipped){var r=new xQ.A({z2:(0,g6.bZ)(n,0),shape:{points:t.points}});c.setItemGraphicEl(e,r),l.group.add(r)}}).update(function(e,n){var r=Cp(l).data.getItemGraphicEl(n),i=c.getItemLayout(e),o=c.getItemVisual(e,"z2");i.allClipped?r&&l.group.remove(r):(r?vT.oi(r,{z2:(0,g6.bZ)(o,0),shape:{points:i.points}},t,e):r=new xQ.A({shape:{points:i.points}}),c.setItemGraphicEl(e,r),l.group.add(r))}).remove(function(e){var t=Cp(l).data.getItemGraphicEl(e);l.group.remove(t)}).execute(),c.eachItemGraphicEl(function(e,n){var r=c.getItemModel(n),i=c.getItemVisual(n,"style");e.useStyle(c.getItemVisual(n,"style")),(0,vE.qM)(e,(0,vE.lx)(r),{labelFetcher:t,labelDataIndex:n,defaultText:c.getName(n)||"",inheritColor:(0,g6.Kg)(i.fill)?x8.hm(i.fill,1):vA.A.color.neutral99}),(0,vR.Mx)(e,r),(0,vR.Lm)(e,null,null,r.get(["emphasis","disabled"])),(0,vD.z)(e).dataModel=t}),Cp(l).data=c,l.group.silent=t.get("silent")||e.get("silent")},t.type="markArea",t}(Cd),Cw=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Ct),CS=n("QO"),CA=yn.A.prototype,CC=CS.A.prototype,Ck=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function CM(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}(0,vy.C6)(function(){return null!==Ck&&Ck.apply(this,arguments)||this},Ck);var CO=function(e){function t(t){var n=e.call(this,t)||this;return n.type="ec-line",n}return(0,vy.C6)(t,e),t.prototype.getDefaultStyle=function(){return{stroke:vA.A.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Ck},t.prototype.buildPath=function(e,t){CM(t)?CA.buildPath.call(this,e,t):CC.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return CM(this.shape)?CA.pointAt.call(this,e):CC.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=CM(t)?[t.x2-t.x1,t.y2-t.y1]:CC.tangentAt.call(this,e);return yS.S8(n,n)},t}(vk.Ay),CT=["fromSymbol","toSymbol"];function C_(e){return"_"+e+"Type"}function CI(e,t,n){var r=t.getItemVisual(n,e);if(!r||"none"===r)return r;var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),s=t.getItemVisual(n,e+"Offset"),a=t.getItemVisual(n,e+"KeepAspect"),l=yi.xU(i),c=yi.hV(s||0,l);return r+l+c+(o||"")+(a||"")}function CD(e,t,n){var r=t.getItemVisual(n,e);if(r&&"none"!==r){var i=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate"),s=t.getItemVisual(n,e+"Offset"),a=t.getItemVisual(n,e+"KeepAspect"),l=yi.xU(i),c=yi.hV(s||0,l),u=yi.v5(r,-l[0]/2+c[0],-l[1]/2+c[1],l[0],l[1],null,a);return u.__specifiedRotation=null==o||isNaN(o)?void 0:o*Math.PI/180||0,u.name=e,u}}function CR(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=0/0,e.cpy1=0/0)}var CE=function(e){function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return(0,vy.C6)(t,e),t.prototype._createLine=function(e,t,n){var r,i=e.hostModel,o=e.getItemLayout(t),s=e.getItemVisual(t,"z2"),a=(CR((r=new CO({name:"line",subPixelOptimize:!0})).shape,o),r);a.shape.percent=0,vT.LW(a,{z2:(0,g6.bZ)(s,0),shape:{percent:1}},i,t),this.add(a),(0,g6.__)(CT,function(n){var r=CD(n,e,t);this.add(r),this[C_(n)]=CI(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=e.getItemLayout(t),s={shape:{}};CR(s.shape,o),vT.oi(i,s,r,t),(0,g6.__)(CT,function(n){var r=CI(n,e,t),i=C_(n);if(this[i]!==r){this.remove(this.childOfName(n));var o=CD(n,e,t);this.add(o)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName("line"),o=n&&n.emphasisLineStyle,s=n&&n.blurLineStyle,a=n&&n.selectLineStyle,l=n&&n.labelStatesModels,c=n&&n.emphasisDisabled,u=n&&n.focus,h=n&&n.blurScope;if(!n||e.hasItemOption){var d=e.getItemModel(t),p=d.getModel("emphasis");o=p.getModel("lineStyle").getLineStyle(),s=d.getModel(["blur","lineStyle"]).getLineStyle(),a=d.getModel(["select","lineStyle"]).getLineStyle(),c=p.get("disabled"),u=p.get("focus"),h=p.get("blurScope"),l=(0,vE.lx)(d)}var f=e.getItemVisual(t,"style"),m=f.stroke;i.useStyle(f),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=o,i.ensureState("blur").style=s,i.ensureState("select").style=a,(0,g6.__)(CT,function(e){var t=this.childOfName(e);if(t){t.setColor(m),t.style.opacity=f.opacity;for(var n=0;n<vR.BV.length;n++){var r=vR.BV[n],o=i.getState(r);if(o){var s=o.style||{},a=t.ensureState(r),l=a.style||(a.style={});null!=s.stroke&&(l[t.__isEmptyBrush?"stroke":"fill"]=s.stroke),null!=s.opacity&&(l.opacity=s.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);(0,vE.qM)(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:m||vA.A.color.neutral99,defaultOpacity:f.opacity,defaultText:(null==g?e.getName(t):isFinite(g)?(0,g9.LI)(g,10):g)+""});var v=this.getTextContent();if(v){var y=l.normal;v.__align=v.style.align,v.__verticalAlign=v.style.verticalAlign,v.__position=y.get("position")||"middle";var b=y.get("distance");(0,g6.cy)(b)||(b=[b,b]),v.__labelDistance=b}this.setTextConfig({position:null,local:!0,inside:!1}),(0,vR.Lm)(this,u,h,c)},t.prototype.highlight=function(){(0,vR.HY)(this)},t.prototype.downplay=function(){(0,vR.SD)(this)},t.prototype.updateLayout=function(e,t){this.childOfName("line").stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName("line");CR(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),n=this.getTextContent();if(e||t||n&&!n.ignore){for(var r=1,i=this.parent;i;)i.scaleX&&(r/=i.scaleX),i=i.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,a=o.pointAt(0),l=o.pointAt(s),c=yS.jb([],l,a);if(yS.S8(c,c),e&&(e.setPosition(a),S(e,0),e.scaleX=e.scaleY=r*s,e.markRedraw()),t&&(t.setPosition(l),S(t,1),t.scaleX=t.scaleY=r*s,t.markRedraw()),n&&!n.ignore){n.x=n.y=0,n.originX=n.originY=0;var u=void 0,h=void 0,d=n.__labelDistance,p=d[0]*r,f=d[1]*r,m=s/2,g=o.tangentAt(m),v=[g[1],-g[0]],y=o.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]);var b=g[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var x=-Math.atan2(g[1],g[0]);l[0]<a[0]&&(x=Math.PI+x),n.rotation=x}var w=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-f,h="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=f,h="top";break;default:w=0,h="middle"}switch(n.__position){case"end":n.x=c[0]*p+l[0],n.y=c[1]*f+l[1],u=c[0]>.8?"left":c[0]<-.8?"right":"center",h=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":n.x=-c[0]*p+a[0],n.y=-c[1]*f+a[1],u=c[0]>.8?"right":c[0]<-.8?"left":"center",h=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*b+a[0],n.y=a[1]+w,u=g[0]<0?"right":"left",n.originX=-p*b,n.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=y[0],n.y=y[1]+w,u="center",n.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*b+l[0],n.y=l[1]+w,u=g[0]>=0?"right":"left",n.originX=p*b,n.originY=-w}n.scaleX=n.scaleY=r,n.setStyle({verticalAlign:n.__verticalAlign||h,align:n.__align||u})}}}function S(e,t){var n=e.__specifiedRotation;if(null==n){var r=o.tangentAt(t);e.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr("rotation",n)}},t}(vM.A),CP=function(){function e(e){this.group=new vM.A,this._LineCtor=e||CE}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this.group,r=this._lineData;this._lineData=e,r||n.removeAll();var i=CL(e);e.diff(r).add(function(n){t._doAdd(e,n,i)}).update(function(n,o){t._doUpdate(r,e,o,n,i)}).remove(function(e){n.remove(r.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=CL(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){function r(e){var t;e.isGroup||(t=e).animators&&t.animators.length>0||(e.incremental=n,e.ensureState("emphasis").hoverLayer=vO.HOVER_LAYER_FOR_INCREMENTAL)}this._progressiveEls=[];for(var i=e.start;i<e.end;i++)if(CB(t.getItemLayout(i))){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(r),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){vO.traverseElements(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(CB(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var o=e.getItemGraphicEl(n);CB(t.getItemLayout(r))?(o?o.updateData(t,r,i):o=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,o),this.group.add(o)):this.group.remove(o)},e}();function CL(e){var t=e.hostModel,n=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:(0,vE.lx)(t)}}function CN(e){return isNaN(e[0])||isNaN(e[1])}function CB(e){return e&&!CN(e[0])&&!CN(e[1])}var Cj=(0,vt.$r)(),Cz=function(e,t,n,r){var i,o=e.getData();if((0,g6.cy)(r))i=r;else{var s=r.type;if("min"===s||"max"===s||"average"===s||"median"===s||null!=r.xAxis||null!=r.yAxis){var a=void 0,l=void 0;if(null!=r.yAxis||null!=r.xAxis)a=t.getAxis(null!=r.yAxis?"y":"x"),l=(0,g6.Je)(r.yAxis,r.xAxis);else{var c=Ca(r,o,t,e);a=c.valueAxis;var u=(0,g8.me)(o,c.valueDataDim);l=Cu(o,u,s)}var h=+("x"!==a.dim),d=1-h,p=(0,g6.o8)(r),f={coord:[]};p.type=null,p.coord=[],p.coord[d]=-1/0,f.coord[d]=1/0;var m=n.get("precision");m>=0&&(0,g6.Et)(l)&&(l=+l.toFixed(Math.min(m,20))),p.coord[h]=f.coord[h]=l,i=[p,f,{type:s,valueIndex:r.valueIndex,value:l}]}else i=[]}var g=[Cs(e,i[0]),Cs(e,i[1]),(0,g6.X$)({},i[2])];return g[2].type=g[2].type||null,(0,g6.h1)(g[2],g[0]),(0,g6.h1)(g[2],g[1]),g};function C$(e){return!isNaN(e)&&!isFinite(e)}function CF(e,t,n,r){var i=1-e,o=r.dimensions[e];return C$(t[i])&&C$(n[i])&&t[e]===n[e]&&r.getAxis(o).containData(t[e])}function CV(e,t){if("cartesian2d"===e.type){var n=t[0].coord,r=t[1].coord;if(n&&r&&(CF(1,n,r,e)||CF(0,n,r,e)))return!0}return Cl(e,t[0])&&Cl(e,t[1])}function CH(e,t,n,r,i){var o,s=r.coordinateSystem,a=e.getItemModel(t),l=g9.lo(a.get("x"),i.getWidth()),c=g9.lo(a.get("y"),i.getHeight());if(isNaN(l)||isNaN(c)){if(r.getMarkerPosition)o=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=s.dimensions,h=e.get(u[0],t),d=e.get(u[1],t);o=s.dataToPoint([h,d])}if((0,vz.g)(s,"cartesian2d")){var p=s.getAxis("x"),f=s.getAxis("y"),u=s.dimensions;C$(e.get(u[0],t))?o[0]=p.toGlobalCoord(p.getExtent()[+!n]):C$(e.get(u[1],t))&&(o[1]=f.toGlobalCoord(f.getExtent()[+!n]))}isNaN(l)||(o[0]=l),isNaN(c)||(o[1]=c)}else o=[l,c];e.setItemLayout(t,o)}var CW=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Ct.getMarkerModelFromSeries(e,"markLine");if(t){var r=t.getData(),i=Cj(t).from,o=Cj(t).to;i.each(function(t){CH(i,t,!0,e,n),CH(o,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),o.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i,o,s,a,l,c,u,h,d,p=e.coordinateSystem,f=e.id,m=e.getData(),g=this.markerGroupMap,v=g.get(f)||g.set(f,new CP);this.group.add(v.group);var y=(i=p,o=e,s=t,a=i?(0,g6.Tj)(i&&i.dimensions,function(e){var t=o.getData(),n=t.getDimensionInfo(t.mapDimension(e))||{};return(0,g6.X$)((0,g6.X$)({},n),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],l=new yu.A(a,s),c=new yu.A(a,s),u=new yu.A([],s),h=(0,g6.Tj)(s.get("data"),(0,g6.cF)(Cz,o,i,s)),i&&(h=(0,g6.pb)(h,(0,g6.cF)(CV,i))),d=Cc(!!i,a),l.initData((0,g6.Tj)(h,function(e){return e[0]}),null,d),c.initData((0,g6.Tj)(h,function(e){return e[1]}),null,d),u.initData((0,g6.Tj)(h,function(e){return e[2]})),u.hasItemOption=!0,{from:l,to:c,line:u}),b=y.from,x=y.to,w=y.line;Cj(t).from=b,Cj(t).to=x,t.setData(w);var S=t.get("symbol"),A=t.get("symbolSize"),C=t.get("symbolRotate"),k=t.get("symbolOffset");function M(t,n,i){var o=t.getItemModel(n);CH(t,n,i,e,r);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=(0,Aw.rI)(m,"color")),t.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:(0,g6.bZ)(o.get("symbolOffset",!0),k[+!i]),symbolRotate:(0,g6.bZ)(o.get("symbolRotate",!0),C[+!i]),symbolSize:(0,g6.bZ)(o.get("symbolSize"),A[+!i]),symbol:(0,g6.bZ)(o.get("symbol",!0),S[+!i]),style:s})}(0,g6.cy)(S)||(S=[S,S]),(0,g6.cy)(A)||(A=[A,A]),(0,g6.cy)(C)||(C=[C,C]),(0,g6.cy)(k)||(k=[k,k]),y.from.each(function(e){M(b,e,!0),M(x,e,!1)}),w.each(function(e){var t=w.getItemModel(e),n=t.getModel("lineStyle").getLineStyle();w.setItemLayout(e,[b.getItemLayout(e),x.getItemLayout(e)]);var r=t.get("z2");null==n.stroke&&(n.stroke=b.getItemVisual(e,"style").fill),w.setItemVisual(e,{z2:(0,g6.bZ)(r,0),fromSymbolKeepAspect:b.getItemVisual(e,"symbolKeepAspect"),fromSymbolOffset:b.getItemVisual(e,"symbolOffset"),fromSymbolRotate:b.getItemVisual(e,"symbolRotate"),fromSymbolSize:b.getItemVisual(e,"symbolSize"),fromSymbol:b.getItemVisual(e,"symbol"),toSymbolKeepAspect:x.getItemVisual(e,"symbolKeepAspect"),toSymbolOffset:x.getItemVisual(e,"symbolOffset"),toSymbolRotate:x.getItemVisual(e,"symbolRotate"),toSymbolSize:x.getItemVisual(e,"symbolSize"),toSymbol:x.getItemVisual(e,"symbol"),style:n})}),v.updateData(w),y.line.eachItemGraphicEl(function(e){(0,vD.z)(e).dataModel=t,e.traverse(function(e){(0,vD.z)(e).dataModel=t})}),this.markKeep(v),v.group.silent=t.get("silent")||e.get("silent")},t.type="markLine",t}(Cd),CU=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type="markPoint",t.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},t}(Ct);function CG(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),o=n.getHeight(),s=r&&r.getArea&&r.getArea();e.each(function(n){var a,l=e.getItemModel(n),c="coordinate"===l.get("relativeTo"),u=c?s?s.width:0:i,h=c?s?s.height:0:o,d=c&&s?s.x:0,p=c&&s?s.y:0,f=g9.lo(l.get("x"),u)+d,m=g9.lo(l.get("y"),h)+p;if(isNaN(f)||isNaN(m)){if(t.getMarkerPosition)a=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),v=e.get(r.dimensions[1],n);a=r.dataToPoint([g,v])}}else a=[f,m];isNaN(f)||(a[0]=f),isNaN(m)||(a[1]=m),e.setItemLayout(n,a)})}var Cq=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.type=t.type,n}return(0,vy.C6)(t,e),t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=Ct.getMarkerModelFromSeries(e,"markPoint");t&&(CG(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)},t.prototype.renderSeries=function(e,t,n,r){var i,o,s,a,l,c,u,h=e.coordinateSystem,d=e.id,p=e.getData(),f=this.markerGroupMap,m=f.get(d)||f.set(d,new yK.A),g=(i=h,o=e,s=t,a=i?(0,g6.Tj)(i&&i.dimensions,function(e){var t=o.getData(),n=t.getDimensionInfo(t.mapDimension(e))||{};return(0,g6.X$)((0,g6.X$)({},n),{name:e,ordinalMeta:null})}):[{name:"value",type:"float"}],l=new yu.A(a,s),c=(0,g6.Tj)(s.get("data"),(0,g6.cF)(Cs,o)),i&&(c=(0,g6.pb)(c,(0,g6.cF)(Cl,i))),u=Cc(!!i,a),l.initData(c,null,u),l);t.setData(g),CG(t.getData(),e,r),g.each(function(e){var n=g.getItemModel(e),r=n.getShallow("symbol"),i=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),a=n.getShallow("symbolKeepAspect");if((0,g6.Tn)(r)||(0,g6.Tn)(i)||(0,g6.Tn)(o)||(0,g6.Tn)(s)){var l=t.getRawValue(e),c=t.getDataParams(e);(0,g6.Tn)(r)&&(r=r(l,c)),(0,g6.Tn)(i)&&(i=i(l,c)),(0,g6.Tn)(o)&&(o=o(l,c)),(0,g6.Tn)(s)&&(s=s(l,c))}var u=n.getModel("itemStyle").getItemStyle(),h=n.get("z2"),d=(0,Aw.rI)(p,"color");u.fill||(u.fill=d),g.setItemVisual(e,{z2:(0,g6.bZ)(h,0),symbol:r,symbolSize:i,symbolRotate:o,symbolOffset:s,symbolKeepAspect:a,style:u})}),m.updateData(g),this.group.add(m.group),g.eachItemGraphicEl(function(e){e.traverse(function(e){(0,vD.z)(e).dataModel=t})}),this.markKeep(m),m.group.silent=t.get("silent")||e.get("silent")},t.type="markPoint",t}(Cd),CX=n("YO"),CY=n("JI");(0,yX.Y)([function(e){e.registerComponentModel(xi),e.registerComponentView(xo)},function(e){(0,yX.Y)(xY),(0,yX.Y)(x4)},function(e){(0,yX.Y)(wh),(0,yX.Y)(wy)},function(e){e.registerChartView(vq),e.registerSeriesModel(vC),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,{seriesType:"bar",overallReset:function(e){var t,n=(t=vh.Tw,"bar"+vo.V0+t);(0,vo.DQ)(e,n,function(e){var t,r=((t=function(e){var t,n=(t=vh.Tw,"bar"+vo.V0+t),r=[],i=(0,vs.D)(e,{fromStat:{key:n},min:1});return(0,vo.pd)(e,n,function(e){r.push({barWidth:(0,g9.lo)(e.get("barWidth"),i.w),barMaxWidth:(0,g9.lo)(e.get("barMaxWidth"),i.w),barMinWidth:(0,g9.lo)(e.get("barMinWidth")||(vg(e)?.5:1),i.w),barGap:e.get("barGap"),barCategoryGap:e.get("barCategoryGap"),defaultBarGap:e.get("defaultBarGap"),stackId:vf(e)})}),{bandWidthResult:i,seriesInfo:r}}(e)).columnMap=vm(t),t);(0,vo.pd)(e,n,function(e){var t=r.columnMap[vf(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,{seriesType:"bar",plan:(0,g7.A)(),reset:function(e){if((0,vr.ty)(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(r.dim)),a=e.get("showBackground",!0),l=t.mapDimension(i.dim),c=t.getCalculationInfo("stackResultDimension"),u=(0,g8.sJ)(t,l)&&!!t.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),d=i.toGlobalCoord(i.dataToCoord(i.scale.rawExtentInfo.makeRenderInfo().startValue)),p=vg(e),f=e.get("barMinHeight")||0,m=c&&t.getDimensionIndex(c),g=t.getLayout("size"),v=t.getLayout("offset");return{progress:function(e,t){for(var r,i=e.count,l=p&&(0,ve.Jk)(3*i),c=p&&a&&(0,ve.Jk)(3*i),y=p&&(0,ve.Jk)(i),b=n.master.getRect(),x=h?b.width:b.height,w=t.getStore(),S=0;null!=(r=e.next());){var A=w.get(u?m:o,r),C=w.get(s,r),k=d,M=void 0;u&&(M=A-w.get(o,r));var O=void 0,T=void 0,_=void 0,I=void 0;if(h){var D=n.dataToPoint([A,C]);u&&(k=n.dataToPoint([M,C])[0]),O=k,T=D[1]+v,_=D[0]-k,I=g,(0,g9.NY)(_)<f&&(_=(_<0?-1:1)*f)}else{var D=n.dataToPoint([C,A]);u&&(k=n.dataToPoint([C,M])[1]),O=D[0]+v,T=k,_=g,I=D[1]-k,(0,g9.NY)(I)<f&&(I=(I<=0?-1:1)*f)}p?(l[S]=O,l[S+1]=T,l[S+2]=h?_:I,c&&(c[S]=h?b.x:O,c[S+1]=h?T:b.y,c[S+2]=x),y[r]=r):t.setItemLayout(r,{x:O,y:T,width:_,height:I}),S+=3}p&&t.setLayout({largePoints:l,largeDataIndices:y,largeBackgroundPoints:c,valueAxisHorizontal:h})}}}}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(0,vv.A)("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),vd(e,function(){function t(t){var n,r,i,o,s=(n=vh.Tw,t+vo.V0+n);r=vh.Tw,(0,vo.ss)(e,{key:s,seriesType:t,coordSysType:r,getMetrics:vu}),(0,vi.Cy)(s,(i=vh.Tw,o=t+vo.V0+i,function(e,t){var n=(0,vs.D)(e,{fromStat:{key:o}});if((0,g9.YC)(n.w2))return[-n.w2/2,n.w2/2]}))}t("bar"),t("pictorialBar")})},v7.a,function(e){e.registerChartView(yl),e.registerSeriesModel(yd)},function(e){e.registerChartView(yq),e.registerSeriesModel(yb),(0,yp.I)("pie",e.registerAction),e.registerLayout(yW),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension("value"),r=n.get(t,e);return!(0,g6.Et)(r)||!!isNaN(r)||!(r<0)})}})},function(e){(0,yX.Y)(y5.a),e.registerSeriesModel(yY),e.registerChartView(y1),e.registerLayout((0,y0.A)("scatter"))},function(e){e.registerChartView(bU),e.registerSeriesModel(y9)},function(e){e.registerChartView(b8),e.registerSeriesModel(b7)},wb.a,function(e){e.registerComponentModel(wx),e.registerComponentView(ww)},function(e){e.registerComponentModel(wO),e.registerComponentView(wT),wM.saveAsImage=wD,wM.magicType=wP,wM.dataView=wz,wM.dataZoom=SN,wM.restore=wH,(0,yX.Y)(wC)},function(e){(0,yX.Y)(Sz.a),e.registerComponentModel(S$),e.registerComponentView(An),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},g6.lQ),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},g6.lQ)},CX.a,function(e){(0,yX.Y)(A2),(0,yX.Y)(A9)},function(e){e.registerComponentModel(Cn),e.registerComponentView(Cx),e.registerPreprocessor(function(e){A8(e.series,"markArea")&&(e.markArea=e.markArea||{})})},function(e){e.registerComponentModel(Cw),e.registerComponentView(CW),e.registerPreprocessor(function(e){A8(e.series,"markLine")&&(e.markLine=e.markLine||{})})},function(e){e.registerComponentModel(CU),e.registerComponentView(Cq),e.registerPreprocessor(function(e){A8(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}]);let CK=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"],CQ=["datazoom","downplay","highlight"],CZ=(0,u.memo)(function(e){let t,n,r,i,o,s,a,h,d,p,f,m=(0,c.c)(20),{option:g,theme:v,renderer:y,sx:b,style:x,onEvents:w,_instance:S,syncGroup:A,onChartInitialized:C}=e,k=(0,u.useRef)(g),M=(0,u.useRef)(g),O=(0,u.useRef)(null),T=(0,u.useRef)(null);return m[0]!==S||m[1]!==C||m[2]!==y||m[3]!==v?(t=()=>{if(null!==O.current&&null===T.current&&(T.current=(0,xk.Ts)(O.current,v,{renderer:y??"canvas"}),void 0!==T.current))return T.current.setOption(k.current,!0),C?.(T.current),void 0!==S&&(S.current=T.current),()=>{null!==T.current&&(T.current.dispose(),T.current=null)}},n=[S,C,v,y],m[0]=S,m[1]=C,m[2]=y,m[3]=v,m[4]=t,m[5]=n):(t=m[4],n=m[5]),(0,u.useLayoutEffect)(t,n),m[6]!==A?(r=()=>{T.current&&A&&(T.current.group=A,(0,xk.Ng)([T.current]))},i=[A,T],m[6]=A,m[7]=r,m[8]=i):(r=m[7],i=m[8]),(0,u.useEffect)(r,i),m[9]!==g?(o=()=>{void 0===M.current||CY(M.current,g)||T.current&&(T.current.setOption(g,!0),M.current=g)},s=[g],m[9]=g,m[10]=o,m[11]=s):(o=m[10],s=m[11]),(0,u.useEffect)(o,s),m[12]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{let e=O.current;if(!e)return;let t=hD(()=>{T.current?.resize()},200),n=new ResizeObserver(t);return n.observe(e),window.addEventListener("resize",t),t(),()=>{n.disconnect(),window.removeEventListener("resize",t),t.cancel()}},h=[],m[12]=a,m[13]=h):(a=m[12],h=m[13]),(0,u.useLayoutEffect)(a,h),m[14]!==w?(p=()=>{let e=T.current;if(e&&void 0!==w)return function(e,t){if(void 0!==t){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n]??null;r&&function(t,n){var r,i;"function"==typeof n&&((r=t,CK.includes(r))?e.on(t,t=>n(t,e)):(i=t,CQ.includes(i))?e.on(t,e=>n(e)):e.on(t,()=>n(null,e)))}(n,r)}}}(e,w),()=>{if(void 0!==e&&!0!==e.isDisposed())for(let t in w)e.off(t)}},d=[w],m[14]=w,m[15]=d,m[16]=p):(d=m[15],p=m[16]),(0,u.useEffect)(p,d),m[17]!==x||m[18]!==b?(f=(0,l.jsx)(e7.A,{ref:O,sx:b,style:x}),m[17]=x,m[18]=b,m[19]=f):f=m[19],f});var CJ=n("tZ");function C0(e,t){return function(n){let r=new Date(Number(n));return e>15768e7?(0,CJ.formatWithTimeZone)(r,"yyyy",t):e>15552e6?(0,CJ.formatWithTimeZone)(r,"MMM yyyy",t):e>864e6?(0,CJ.formatWithTimeZone)(r,"dd.MM",t):e>1728e5?(0,CJ.formatWithTimeZone)(r,"dd.MM HH:mm",t):(0,CJ.formatWithTimeZone)(r,"HH:mm",t)}}function C1(e){return(0,M.Ay)("MuiAlert",e)}let C2=(0,k.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var C5=(0,li.A)((0,l.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),C3=(0,li.A)((0,l.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),C4=(0,li.A)((0,l.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),C6=(0,li.A)((0,l.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined");let C9=(0,y.A)(dd.A,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,A.A)(n.color||n.severity)}`]]}})((0,b.A)(({theme:e})=>{let t="light"===e.palette.mode?m.e$:m.a,n="light"===e.palette.mode?m.a:m.e$;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,C.A)(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${C2.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter((0,C.A)(["light"])).map(([n])=>({props:{colorSeverity:n,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${n}Color`]:t(e.palette[n].light,.6),border:`1px solid ${(e.vars||e).palette[n].light}`,[`& .${C2.icon}`]:e.vars?{color:e.vars.palette.Alert[`${n}IconColor`]}:{color:e.palette[n].main}}})),...Object.entries(e.palette).filter((0,C.A)(["dark"])).map(([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}}))]}})),C8=(0,y.A)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),C7=(0,y.A)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),ke=(0,y.A)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),kt={success:(0,l.jsx)(C5,{fontSize:"inherit"}),warning:(0,l.jsx)(C3,{fontSize:"inherit"}),error:(0,l.jsx)(C4,{fontSize:"inherit"}),info:(0,l.jsx)(C6,{fontSize:"inherit"})},kn=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiAlert"}),{action:r,children:i,className:o,closeText:s="Close",color:a,components:c={},componentsProps:u={},icon:h,iconMapping:p=kt,onClose:m,role:g="alert",severity:v="success",slotProps:y={},slots:b={},variant:w="standard",...S}=n,C={...n,color:a,severity:v,variant:w,colorSeverity:a||v},k=(e=>{let{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`color${(0,A.A)(n||r)}`,`${t}${(0,A.A)(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,f.A)(o,C1,i)})(C),M={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...b},slotProps:{...u,...y}},[O,T]=(0,nd.A)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,d.A)(k.root,o),elementType:C9,externalForwardedProps:{...M,...S},ownerState:C,additionalProps:{role:g,elevation:0}}),[_,I]=(0,nd.A)("icon",{className:k.icon,elementType:C8,externalForwardedProps:M,ownerState:C}),[D,R]=(0,nd.A)("message",{className:k.message,elementType:C7,externalForwardedProps:M,ownerState:C}),[E,P]=(0,nd.A)("action",{className:k.action,elementType:ke,externalForwardedProps:M,ownerState:C}),[L,N]=(0,nd.A)("closeButton",{elementType:er,externalForwardedProps:M,ownerState:C}),[B,j]=(0,nd.A)("closeIcon",{elementType:mv,externalForwardedProps:M,ownerState:C});return(0,l.jsxs)(O,{...T,children:[!1!==h?(0,l.jsx)(_,{...I,children:h||p[v]||kt[v]}):null,(0,l.jsx)(D,{...R,children:i}),null!=r?(0,l.jsx)(E,{...P,children:r}):null,null==r&&m?(0,l.jsx)(E,{...P,children:(0,l.jsx)(L,{size:"small","aria-label":s,title:s,color:"inherit",onClick:m,...N,children:(0,l.jsx)(B,{fontSize:"small",...j})})}):null]})});function kr(e){let t,n=(0,c.c)(2),{error:r}=e;return n[0]!==r.message?(t=(0,l.jsx)(kn,{severity:"error",children:r.message}),n[0]=r.message,n[1]=t):t=n[1],t}var ki=n("qM");let ko=[{id:"default",label:"Default",value:void 0},{id:"12",label:"12",value:12},{id:"14",label:"14",value:14},{id:"16",label:"16",value:16},{id:"20",label:"20",value:20},{id:"24",label:"24",value:24},{id:"28",label:"28",value:28},{id:"32",label:"32",value:32},{id:"36",label:"36",value:36},{id:"40",label:"40",value:40},{id:"48",label:"48",value:48},{id:"56",label:"56",value:56},{id:"64",label:"64",value:64},{id:"72",label:"72",value:72},{id:"96",label:"96",value:96},{id:"128",label:"128",value:128},{id:"160",label:"160",value:160},{id:"192",label:"192",value:192}];function ks(e){let t,n,r,i=(0,c.c)(7),{value:o,onChange:s}=e;i[0]!==s?(t=(e,t)=>{let{value:n}=t;s(n)},i[0]=s,i[1]=t):t=i[1];let a=t;return i[2]!==o?(n=ko.find(e=>e.value===o),i[2]=o,i[3]=n):n=i[3],i[4]!==a||i[5]!==n?(r=(0,l.jsx)(f0,{label:"Font Size",control:(0,l.jsx)(mP,{value:n,options:ko,getOptionLabel:ka,onChange:a,disableClearable:!0})}),i[4]=a,i[5]=n,i[6]=r):r=i[6],r}function ka(e){return e.label}function kl(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g=(0,c.c)(25);g[0]!==e?({action:t,submitText:h,cancelText:d,isReadonly:n,isValid:r,onActionChange:i,onSubmit:a,onDelete:s,onCancel:o,...u}=e,g[0]=e,g[1]=t,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=s,g[7]=a,g[8]=u,g[9]=h,g[10]=d):(t=g[1],n=g[2],r=g[3],i=g[4],o=g[5],s=g[6],a=g[7],u=g[8],h=g[9],d=g[10]);let v=void 0===h?"Save":h,y=void 0===d?"Cancel":d;return g[11]===Symbol.for("react.memo_cache_sentinel")?(p={marginLeft:"auto"},g[11]=p):p=g[11],g[12]!==t||g[13]!==y||g[14]!==n||g[15]!==r||g[16]!==i||g[17]!==o||g[18]!==s||g[19]!==a||g[20]!==v?(f="read"===t?(0,l.jsxs)(l.Fragment,{children:[i&&(0,l.jsx)(G,{disabled:n,variant:"contained",onClick:()=>i("update"),children:"Edit"}),s&&(0,l.jsx)(G,{color:"error",disabled:n,variant:"outlined",onClick:s,children:"Delete"}),o&&(a||s)&&(0,l.jsx)(c4,{orientation:"vertical",flexItem:!0,sx:{borderColor:kc,"&.MuiDivider-root":{marginLeft:2,marginRight:1}}}),o&&(0,l.jsx)(G,{color:"secondary",variant:"outlined",onClick:o,children:y})]}):(0,l.jsxs)(l.Fragment,{children:[a&&(0,l.jsx)(G,{variant:"contained",disabled:!r,onClick:a,children:v}),o&&(0,l.jsx)(G,{color:"secondary",variant:"outlined",onClick:o,children:y})]}),g[12]=t,g[13]=y,g[14]=n,g[15]=r,g[16]=i,g[17]=o,g[18]=s,g[19]=a,g[20]=v,g[21]=f):f=g[21],g[22]!==u||g[23]!==f?(m=(0,l.jsx)(eb,{direction:"row",gap:1,sx:p,...u,children:f}),g[22]=u,g[23]=f,g[24]=m):m=g[24],m}function kc(e){return e.palette.grey["500"]}let ku=0;class kh{constructor(e,t){this.from=e,this.to=t}}class kd{constructor(e={}){this.id=ku++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=km.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}kd.closedBy=new kd({deserialize:e=>e.split(" ")}),kd.openedBy=new kd({deserialize:e=>e.split(" ")}),kd.group=new kd({deserialize:e=>e.split(" ")}),kd.isolate=new kd({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),kd.contextHash=new kd({perNode:!0}),kd.lookAhead=new kd({perNode:!0}),kd.mounted=new kd({perNode:!0});class kp{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[kd.mounted.id]}}let kf=Object.create(null);class km{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):kf,n=!!e.top|2*!!e.skipped|4*!!e.error|8*(null==e.name),r=new km(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(kd.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(kd.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}km.none=new km("",Object.create(null),0,8);class kg{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let t of e){let e=t(n);if(e){r||(r=Object.assign({},n.props));let t=e[1],i=e[0];i.combine&&i.id in r&&(t=i.combine(r[i.id],t)),r[i.id]=t}}t.push(r?new km(n.name,r,n.id,n.flags):n)}return new kg(t)}}let kv=new WeakMap,ky=new WeakMap;(XD=XK||(XK={}))[XD.ExcludeBuffers=1]="ExcludeBuffers",XD[XD.IncludeAnonymous=2]="IncludeAnonymous",XD[XD.IgnoreMounts=4]="IgnoreMounts",XD[XD.IgnoreOverlays=8]="IgnoreOverlays",XD[XD.EnterBracketed=16]="EnterBracketed";class kb{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length)for(let[e,t]of(this.props=Object.create(null),i))this.props["number"==typeof e?e:e.id]=t}toString(){let e=kp.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new kR(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new kR(kv.get(this)||this.topNode);return r.moveTo(e,t),kv.set(this,r._tree),r}get topNode(){return new kk(this,0,0,null)}resolve(e,t=0){let n=kA(kv.get(this)||this.topNode,e,t,!1);return kv.set(this,n),n}resolveInner(e,t=0){let n=kA(ky.get(this)||this.topNode,e,t,!0);return ky.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof kk?r:r.context.parent;e;e=e.parent)if(e.index<0){let o=e.parent;(i||(i=[r])).push(o.resolve(t,n)),e=o}else{let o=kp.get(e.tree);if(o&&o.overlay&&o.overlay[0].from<=t&&o.overlay[o.overlay.length-1].to>=t){let s=new kk(o.tree,o.overlay[0].from+e.from,-1,e);(i||(i=[r])).push(kA(s,t,n,!1))}}return i?kI(i):r}(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,o=e.mode||0,s=(o&XK.IncludeAnonymous)>0;for(let e=this.cursor(o|XK.IncludeAnonymous);;){let o=!1;if(e.from<=i&&e.to>=r&&(!s&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;o=!0}for(;o&&n&&(s||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;o=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:kN(km.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new kb(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new kb(km.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:i=1024,reused:o=[],minRepeatType:s=r.types.length}=e,a=Array.isArray(n)?new kx(n,n.length):n,l=r.types,c=0,u=0;function h(e,t,n,i,o,s,a,l,c){let u=[],h=[];for(;e.length>i;)u.push(e.pop()),h.push(t.pop()+n-o);e.push(d(r.types[a],u,h,s-o,l-s,c)),t.push(o-n)}function d(e,t,n,r,i,o,s){if(o){let e=[kd.contextHash,o];s=s?[e].concat(s):[e]}if(i>25){let e=[kd.lookAhead,i];s=s?[e].concat(s):[e]}return new kb(e,t,n,r,s)}let p=[],f=[];for(;a.pos>0;)!function e(t,n,p,f,m,g){let{id:v,start:y,end:b,size:x}=a,w=u,S=c;if(x<0){if(a.next(),-1==x){let e=o[v];p.push(e),f.push(y-t);return}if(-3==x){c=v;return}if(-4==x){u=v;return}else throw RangeError(`Unrecognized record size: ${x}`)}let A=l[v],C,k,M=y-t;if(b-y<=i&&(k=function(e,t){let n=a.fork(),r=0,o=0,l=0,c=n.end-i,u={size:0,start:0,skip:0};r:for(let i=n.pos-e;n.pos>i;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=o,u.skip=l,l+=4,r+=4,n.next();continue}let a=n.pos-e;if(e<0||a<i||n.start<c)break;let h=4*(n.id>=s),d=n.start;for(n.next();n.pos>a;){if(n.size<0)if(-3==n.size||-4==n.size)h+=4;else break r;else n.id>=s&&(h+=4);n.next()}o=d,r+=e,l+=h}return(t<0||r==e)&&(u.size=r,u.start=o,u.skip=l),u.size>4?u:void 0}(a.pos-n,m))){let e=new Uint16Array(k.size-k.skip),n=a.pos-k.size,i=e.length;for(;a.pos>n;)i=function e(t,n,r){let{id:i,start:o,end:l,size:h}=a;if(a.next(),h>=0&&i<s){let s=r;if(h>4){let i=a.pos-(h-4);for(;a.pos>i;)r=e(t,n,r)}n[--r]=s,n[--r]=l-t,n[--r]=o-t,n[--r]=i}else -3==h?c=i:-4==h&&(u=i);return r}(k.start,e,i);C=new kw(e,b-k.start,r),M=k.start-t}else{let t=a.pos-x;a.next();let n=[],l=[],c=v>=s?v:-1,p=0,f=b,m=w;for(;a.pos>t;)c>=0&&a.id==c&&a.size>=0?(a.end<=f-i&&(h(n,l,y,p,a.end,f,c,m,S),p=n.length,f=a.end,m=u),a.next()):g>2500?function(e,t,n,o){let s=[],l=0,c=-1;for(;a.pos>t;){let{id:e,start:t,end:n,size:r}=a;if(r>4)a.next();else if(c>-1&&t<c)break;else c<0&&(c=n-i),s.push(e,t,n),l++,a.next()}if(l){let t=new Uint16Array(4*l),i=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-i,t[n++]=s[e+2]-i,t[n++]=n;n.push(new kw(t,s[2]-i,r)),o.push(i-e)}}(y,t,n,l):(c>=0&&-1==a.size&&o[a.id].type==r.types[c]&&(p<n.length&&h(n,l,y,p,a.end,f,c,m,S),p=n.length+1,f=a.start,m=u),e(y,t,n,l,c,g+1));if(c>=0&&p>0&&p<n.length&&h(n,l,y,p,y,f,c,m,S),n.reverse(),l.reverse(),c>-1&&p>0){let e=function(e,t){return(n,r,i)=>{let o=0,s=n.length-1,a,l;if(s>=0&&(a=n[s])instanceof kb){if(!s&&a.type==e&&a.length==i)return a;(l=a.prop(kd.lookAhead))&&(o=r[s]+a.length+l-i)}return d(e,n,r,i,o,t)}}(A,S);C=kN(A,n,l,0,n.length,0,b-y,e,e)}else C=d(A,n,l,b-y,w-b,S)}p.push(C),f.push(M)}(e.start||0,e.bufferStart||0,p,f,-1,0);let m=null!=(t=e.length)?t:p.length?f[0]+p[0].length:0;return new kb(l[e.topID],p.reverse(),f.reverse(),m)}(e)}}kb.empty=new kb(km.none,[],[],0);class kx{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new kx(this.buffer,this.index)}}class kw{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return km.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),n==(e+=4))return i;let o=[];for(;e<n;)o.push(this.childString(e)),e=this.buffer[e+3];return i+"("+o.join(",")+")"}findChild(e,t,n,r,i){let{buffer:o}=this,s=-1;for(let a=e;a!=t&&(!kS(i,r,o[a+1],o[a+2])||(s=a,!(n>0)));a=o[a+3]);return s}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let s=e,a=0;s<t;){i[a++]=r[s++],i[a++]=r[s++]-n;let t=i[a++]=r[s++]-n;i[a++]=r[s++]-e,o=Math.max(o,t)}return new kw(i,o,this.set)}}function kS(e,t,n,r){switch(e){case -2:return n<t;case -1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function kA(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof kk&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=r?0:XK.IgnoreOverlays;if(r)for(let r=e,s=r.parent;s;s=(r=s).parent)r instanceof kk&&r.index<0&&(null==(i=s.enter(t,n,o))?void 0:i.from)!=r.from&&(e=s);for(;;){let r=e.enter(t,n,o);if(!r)return e;e=r}}class kC{cursor(e=0){return new kR(this,e)}getChild(e,t=null,n=null){let r=kM(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return kM(this,e,t,n)}resolve(e,t=0){return kA(this,e,t,!1)}resolveInner(e,t=0){return kA(this,e,t,!0)}matchContext(e){return kO(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class kk extends kC{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r,i=0){for(let o=this;;){for(let{children:s,positions:a}=o._tree,l=t>0?s.length:-1;e!=l;e+=t){let l=s[e],c=a[e]+o.from,u;if(i&XK.EnterBracketed&&l instanceof kb&&(u=kp.get(l))&&!u.overlay&&u.bracketed&&n>=c&&n<=c+l.length||kS(r,n,c,c+l.length)){if(l instanceof kw){if(i&XK.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,t,n-c,r);if(s>-1)return new k_(new kT(o,l,e,c),null,s)}else if(i&XK.IncludeAnonymous||!l.type.isAnonymous||kE(l)){let s;if(!(i&XK.IgnoreMounts)&&(s=kp.get(l))&&!s.overlay)return new kk(s.tree,c,e,o);let a=new kk(l,c,e,o);return i&XK.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(t<0?l.children.length-1:0,t,n,r,i)}}}if(i&XK.IncludeAnonymous||!o.type.isAnonymous||(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,!(o=o._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let r;if(!(n&XK.IgnoreOverlays)&&(r=kp.get(this._tree))&&r.overlay){let i=e-this.from,o=n&XK.EnterBracketed&&r.bracketed;for(let{from:e,to:n}of r.overlay)if((t>0||o?e<=i:e<i)&&(t<0||o?n>=i:n>i))return new kk(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function kM(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return o}for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function kO(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class kT{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class k_ extends kC{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new k_(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&XK.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new k_(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new k_(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new k_(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new kb(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function kI(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof kk&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new kD(i,n)}class kD{constructor(e,t){this.heads=e,this.node=t}get next(){return kI(this.heads)}}class kR{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~XK.EnterBracketed,e instanceof kk)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof kk?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&XK.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&XK.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&XK.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&XK.IncludeAnonymous||e instanceof kw||!e.type.isAnonymous||kE(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)r:for(let r=this.index,i=this.stack.length;i>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break r}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new k_(this.buffer,t,this.stack[e]);return this.bufferNode=new k_(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return kO(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return kO(this._tree,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function kE(e){return e.children.some(e=>e instanceof kw||!e.type.isAnonymous||kE(e))}let kP=new WeakMap;function kL(e,t){if(!e.isAnonymous||t instanceof kw||t.type!=e)return 1;let n=kP.get(t);if(null==n){for(let r of(n=1,t.children)){if(r.type!=e||!(r instanceof kb)){n=1;break}n+=kL(e,r)}kP.set(t,n)}return n}function kN(e,t,n,r,i,o,s,a,l){let c=0;for(let n=r;n<i;n++)c+=kL(e,t[n]);let u=Math.ceil(1.5*c/8),h=[],d=[];return!function t(n,r,i,s,a){for(let c=i;c<s;){let i=c,p=r[c],f=kL(e,n[c]);for(c++;c<s;c++){let t=kL(e,n[c]);if(f+t>=u)break;f+=t}if(c==i+1){if(f>u){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}h.push(n[i])}else{let t=r[c-1]+n[c-1].length-p;h.push(kN(e,n,r,i,c,p,t,null,l))}d.push(p+a-o)}}(t,n,r,i,0),(a||l)(h,d,s)}class kB{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|2*!!o}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new kB(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,u=c?c.fromA:1e9;if(u-a>=n)for(;o&&o.from<u;){let t=o;if(a>=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new kB(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&r.push(t),o.to>u)break;o=i<e.length?e[i++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return r}}class kj{startParse(e,t,n){return"string"==typeof e&&(e=new kz(e)),n=n?n.length?n.map(e=>new kh(e.from,e.to)):[new kh(0,0)]:[new kh(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class kz{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new kd({perNode:!0});class k${constructor(e,t,n,r,i,o,s,a,l,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new k$(e,[],t,n,n,0,[],0,r?new kF(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),s=i.dynamicPrecedence(r);if(s&&(this.score+=s),0==n){r<i.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r<i.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,this.reducePos);return}let a=this.stack.length-(n-1)*3-(262144&e?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from;r<i.minRepeatTerm&&l==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-l;c>=2e3&&!(null==(t=this.p.parser.nodeSet.types[r])?void 0:t.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c));let u=a?this.stack[a-1]:0,h=this.bufferBase+this.buffer.length-u;if(r<i.minRepeatTerm||131072&e){let e=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,e,h+4,!0)}if(262144&e)this.state=this.stack[a];else{let e=this.stack[a-3];this.state=i.getGoto(e,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&0==this.buffer[e-4]&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&(0!=this.buffer[i-4]||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n,r){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:i}=this.p;this.pos=r;let o=i.stateFlag(e,1);!o&&(r>n||t<=i.maxNode)&&(this.reducePos=r),this.pushState(e,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=i.maxNode&&this.buffer.push(t,n,r,4)}else this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4)}apply(e,t,n,r){65536&e?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(r,n,i,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&0==e.buffer[t-4]&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new k$(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new kV(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if((65536&n)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=65535&t,i=this.stack.length-3*n;if(i<0||0>e.getGoto(this.stack[i],r,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(393216&t);else if(65536&t){let n=(t>>19)-i;if(n>1){let r=65535&t,i=this.stack.length-3*n;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new kF(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return!(e<=this.lookAhead)&&(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class kF{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class kV{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=n}}class kH{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new kH(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new kH(this.stack,this.pos,this.index)}}function kW(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r<e.length;){let o=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(126==t){o=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class kU{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let kG=new kU;class kq{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=kG,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((n=t)>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=kG,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class kX{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;kK(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}kX.prototype.contextual=kX.prototype.fallback=kX.prototype.extend=!1,(class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?kW(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(kK(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&r++,null==i)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}).prototype.contextual=kX.prototype.fallback=kX.prototype.extend=!1;class kY{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function kK(e,t,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;r:for(;(a&e[s])!=0;){let n=e[s+1];for(let r=s+3;r<n;r+=2)if((e[r+1]&a)>0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||function(e,t,n,r){let i=kQ(n,r,t);return i<0||kQ(n,r,e)<i}(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,c=0,u=e[s+2];if(t.next<0&&u>c&&65535==e[n+3*u-3]){s=e[n+3*u-1];continue}for(;c<u;){let i=c+u>>1,o=n+i+(i<<1),a=e[o],l=e[o+1]||65536;if(r<a)u=i;else if(r>=l)c=i+1;else{s=e[o+2],t.advance();continue r}}break}}function kQ(e,t,n){for(let r=t,i;65535!=(i=e[r]);r++)if(i==n)return r-t;return -1}let kZ="u">typeof process&&process.env&&/\bparse\b/.test(process.env.LOG),kJ=null;function k0(e,t,n){let r=e.cursor(XK.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class k1{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?k0(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?k0(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],o=this.start[t]+n.positions[r];if(o>e)return this.nextStart=o,null;if(i instanceof kb){let n=o>this.lastRepeatPos&&i.type.id>=this.minRepeat;if(o==e||n){let t=o+i.length,r;if(o>=this.safeFrom&&t<=this.safeTo&&(!(r=i.prop(kd.lookAhead))||t+r<this.fragment.to)&&(n&&(this.lastRepeat=i,this.lastRepeatPos=o),o==e))return i}this.index[t]++,o+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+i.length}}}class k2{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new kU)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let r=0;r<i.length;r++){if((1<<r&o)==0)continue;let l=i[r],c=this.tokens[r];if((!n||l.fallback)&&((l.contextual||c.start!=e.pos||c.mask!=o||c.context!=s)&&(this.updateCachedToken(c,l,e),c.mask=o,c.context=s),c.lookAhead>c.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||((n=new kU).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new kU,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){(1&i)==0?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:o}=e.p,{data:s}=o;for(let e=0;e<2;e++)for(let a=o.stateSlot(i,e?2:1);;a+=3){if(65535==s[a])if(1==s[a+1])a=k8(s,a+2);else{0==r&&2==s[a+1]&&(r=this.putAction(k8(s,a+2),t,n,r));break}s[a]==t&&(r=this.putAction(k8(s,a+1),t,n,r))}return r}}class k5{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new kq(t,r),this.tokens=new k2(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[k$.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>4*e.bufferLength?new k1(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<n.length;o++){let s=n[o];for(;;){if(this.tokens.mainToken=null,s.pos>r)i.push(s);else{if(this.advanceStack(s,i,n))continue;e||(e=[],t=[]),e.push(s);let r=this.tokens.getMainToken(s);t.push(r.value,r.end)}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return kZ&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw kZ&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return kZ&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){i:for(let e=0;e<i.length-1;e++){let t=i[e];for(let n=e+1;n<i.length;n++){let r=i[n];if(t.sameState(r)||t.buffer.length>500&&r.buffer.length>500)if((t.score-r.score||t.buffer.length-r.buffer.length)>0)i.splice(n--,1);else{i.splice(e--,1);continue i}}}i.length>12&&(i.sort((e,t)=>t.score-e.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let e=1;e<i.length;e++)i[e].pos<this.minStackPos&&(this.minStackPos=i[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}tryReuse(e,t,n,r){if(!n)return null;let i=e.curContext&&e.curContext.tracker.strict,o=i?e.curContext.hash:0;for(;n;){let s=this.parser.nodeSet.types[n.type.id]!=n.type?-1:this.parser.getGoto(e.state,n.type.id);if(s>-1&&n.length&&(!i||(n.prop(kd.contextHash)||0)==o))return e.useNode(n,s,t),n;if(0==n.children.length||n.positions[0]>0)break;let a=n.children[0];if(a instanceof kb&&(!r||a.type.id>=this.parser.minRepeatTerm))n=a;else break}return null}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,o=kZ?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(t)return kZ&&console.log(o+this.stackID(e)+` (via reuse of ${i.getName(t.type.id)})`),!0}let s=i.stateSlot(e.state,4);if(s>0)return e.reduce(s),kZ&&console.log(o+this.stackID(e)+` (via always-reduce ${i.getName(65535&s)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let s=0;s<a.length;){let l=a[s++],c=a[s++],u=a[s++],h=s==a.length||!n,d=h?e:e.split(),p=this.tokens.mainToken;if(d.apply(l,c,p?p.start:d.pos,u),kZ&&console.log(o+this.stackID(d)+` (via ${(65536&l)==0?"shift":`reduce of ${i.getName(65535&l)}`} for ${i.getName(c)} @ ${r}${d==e?"":", split"})`),h)return!0;d.pos>r?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return k3(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=t[o<<1],l=t[(o<<1)+1],c=kZ?this.stackID(s)+" -> ":"";if(s.deadEnd&&(i||(i=!0,s.restart(),kZ&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let u=s.split(),h=c;for(let e=0;e<10&&u.forceReduce()&&(kZ&&console.log(h+this.stackID(u)+" (via force-reduce)"),!this.advanceFully(u,n));e++)kZ&&(h=this.stackID(u)+" -> ");for(let e of s.recoverByInsert(a))kZ&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),kZ&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),k3(s,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),kb.build({buffer:kH.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(kJ||(kJ=new WeakMap)).get(e);return t||kJ.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function k3(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class k4{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}let k6=e=>e;class k9 extends kj{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=kd[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let o=t[n+-r];for(let s=-r;s>0;s--)i(t[n++],e,o);n++}}}this.nodeSet=new kg(t.map((t,i)=>km.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:0==i,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let o=kW(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(k7),this.states=kW(e.states,Uint32Array),this.data=kW(e.stateData),this.goto=kW(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new kX(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new k5(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return -1;for(let i=r[t+1];;){let t=r[i++],o=1&t,s=r[i++];if(o&&n)return s;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return s;if(o)return -1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),o;;i+=3){if(65535==(o=n[i]))if(1==n[i+1])o=n[i=k8(n,i+2)];else if(2==n[i+1])return k8(n,i+2);else break;if(o==t||0==o)return k8(n,i+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==r;n+=3){if(65535==this.data[n])if(1==this.data[n+1])n=k8(this.data,n+2);else break;r=t(k8(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n])if(1==this.data[n+1])n=k8(this.data,n+2);else break;if((1&this.data[n+2])==0){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(k9.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=k7(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;65535!=(i=this.data[n++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new k4(e,n,r)}static deserialize(e){return new k9(e)}}function k8(e,t){return e[t]|e[t+1]<<16}function k7(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}let Me=0;class Mt{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Me++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof Mt&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new Mt("string"==typeof e?e:"?",[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new Mr(e);return e=>e.modified.indexOf(t)>-1?e:Mr.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let Mn=0;class Mr{constructor(e){this.name=e,this.instances=[],this.id=Mn++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{var r,i;return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every((e,t)=>e==i[t]))});if(n)return n;let r=[],i=new Mt(e.name,r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(Mr.get(t,e));return i}}function Mi(e){let t=Object.create(null);for(let n in e){let r=e[n];for(let e of(Array.isArray(r)||(r=[r]),n.split(" ")))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),(t+=r[0].length)==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){i=0;break}if("/"!=s)throw RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw RangeError("Invalid path: "+e);let l=new Ms(r,i,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return Mo.add(t)}let Mo=new kd({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let o=new Ms(i.tags,i.mode,i.context);n?n.next=o:r=o,n=o}return r}});class Ms{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function Ma(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}Ms.empty=new Ms([],2,null);class Ml{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(o)));let l=r,c=function(e){let t=e.type.prop(Mo);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||Ms.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(Math.max(t,s),l),c.opaque)return;let h=e.tree&&e.tree.prop(kd.mounted);if(h&&h.overlay){let o=e.node.enter(h.overlay[0].from+s,1),c=this.highlighters.filter(e=>!e.scope||e.scope(h.tree.type)),u=e.firstChild();for(let d=0,p=s;;d++){let f=d<h.overlay.length?h.overlay[d]:null,m=f?f.from+s:a,g=Math.max(t,p),v=Math.min(n,m);if(g<v&&u)for(;e.from<v&&(this.highlightRange(e,g,v,r,i),this.startSpan(Math.min(v,e.to),l),!(e.to>=m)&&e.nextSibling()););if(!f||m>n)break;(p=f.to+s)>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(n,p),"",c),this.startSpan(Math.min(n,p),l))}u&&e.parent()}else if(e.firstChild()){h&&(r="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}while(e.nextSibling())e.parent()}}}let Mc=Mt.define,Mu=Mc(),Mh=Mc(),Md=Mc(Mh),Mp=Mc(Mh),Mf=Mc(),Mm=Mc(Mf),Mg=Mc(Mf),Mv=Mc(),My=Mc(Mv),Mb=Mc(),Mx=Mc(),Mw=Mc(),MS=Mc(Mw),MA=Mc(),MC={comment:Mu,lineComment:Mc(Mu),blockComment:Mc(Mu),docComment:Mc(Mu),name:Mh,variableName:Mc(Mh),typeName:Md,tagName:Mc(Md),propertyName:Mp,attributeName:Mc(Mp),className:Mc(Mh),labelName:Mc(Mh),namespace:Mc(Mh),macroName:Mc(Mh),literal:Mf,string:Mm,docString:Mc(Mm),character:Mc(Mm),attributeValue:Mc(Mm),number:Mg,integer:Mc(Mg),float:Mc(Mg),bool:Mc(Mf),regexp:Mc(Mf),escape:Mc(Mf),color:Mc(Mf),url:Mc(Mf),keyword:Mb,self:Mc(Mb),null:Mc(Mb),atom:Mc(Mb),unit:Mc(Mb),modifier:Mc(Mb),operatorKeyword:Mc(Mb),controlKeyword:Mc(Mb),definitionKeyword:Mc(Mb),moduleKeyword:Mc(Mb),operator:Mx,derefOperator:Mc(Mx),arithmeticOperator:Mc(Mx),logicOperator:Mc(Mx),bitwiseOperator:Mc(Mx),compareOperator:Mc(Mx),updateOperator:Mc(Mx),definitionOperator:Mc(Mx),typeOperator:Mc(Mx),controlOperator:Mc(Mx),punctuation:Mw,separator:Mc(Mw),bracket:MS,angleBracket:Mc(MS),squareBracket:Mc(MS),paren:Mc(MS),brace:Mc(MS),content:Mv,heading:My,heading1:Mc(My),heading2:Mc(My),heading3:Mc(My),heading4:Mc(My),heading5:Mc(My),heading6:Mc(My),contentSeparator:Mc(Mv),list:Mc(Mv),quote:Mc(Mv),emphasis:Mc(Mv),strong:Mc(Mv),link:Mc(Mv),monospace:Mc(Mv),strikethrough:Mc(Mv),inserted:Mc(),deleted:Mc(),changed:Mc(),invalid:Mc(),meta:MA,documentMeta:Mc(MA),annotation:Mc(MA),processingInstruction:Mc(MA),definition:Mt.defineModifier("definition"),constant:Mt.defineModifier("constant"),function:Mt.defineModifier("function"),standard:Mt.defineModifier("standard"),local:Mt.defineModifier("local"),special:Mt.defineModifier("special")};for(let e in MC){let t=MC[e];t instanceof Mt&&(t.name=e)}Ma([{tag:MC.link,class:"tok-link"},{tag:MC.heading,class:"tok-heading"},{tag:MC.emphasis,class:"tok-emphasis"},{tag:MC.strong,class:"tok-strong"},{tag:MC.keyword,class:"tok-keyword"},{tag:MC.atom,class:"tok-atom"},{tag:MC.bool,class:"tok-bool"},{tag:MC.url,class:"tok-url"},{tag:MC.labelName,class:"tok-labelName"},{tag:MC.inserted,class:"tok-inserted"},{tag:MC.deleted,class:"tok-deleted"},{tag:MC.literal,class:"tok-literal"},{tag:MC.string,class:"tok-string"},{tag:MC.number,class:"tok-number"},{tag:[MC.regexp,MC.escape,MC.special(MC.string)],class:"tok-string2"},{tag:MC.variableName,class:"tok-variableName"},{tag:MC.local(MC.variableName),class:"tok-variableName tok-local"},{tag:MC.definition(MC.variableName),class:"tok-variableName tok-definition"},{tag:MC.special(MC.variableName),class:"tok-variableName2"},{tag:MC.definition(MC.propertyName),class:"tok-propertyName tok-definition"},{tag:MC.typeName,class:"tok-typeName"},{tag:MC.namespace,class:"tok-namespace"},{tag:MC.className,class:"tok-className"},{tag:MC.macroName,class:"tok-macroName"},{tag:MC.propertyName,class:"tok-propertyName"},{tag:MC.operator,class:"tok-operator"},{tag:MC.comment,class:"tok-comment"},{tag:MC.meta,class:"tok-meta"},{tag:MC.invalid,class:"tok-invalid"},{tag:MC.punctuation,class:"tok-punctuation"}]);let Mk=Mi({String:MC.string,Number:MC.number,"True False":MC.bool,PropertyName:MC.propertyName,Null:MC.null,", :":MC.separator,"[ ]":MC.squareBracket,"{ }":MC.brace}),MM=k9.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Mk],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),MO=[],MT=[],M_="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<M_.length;e++)(e%2?MT:MO).push(t+=M_[e]);function MI(e){return e>=127462&&e<=127487}function MD(e,t,n){if(t==e.length)return t;t&&ME(e.charCodeAt(t))&&MP(e.charCodeAt(t-1))&&t--;let r=MR(e,t);for(t+=ML(r);t<e.length;){let i=MR(e,t);if(8205==r||8205==i||n&&function(e){if(e<768)return!1;for(let t=0,n=MO.length;;){let r=t+n>>1;if(e<MO[r])n=r;else{if(!(e>=MT[r]))return!0;t=r+1}if(t==n)return!1}}(i))t+=ML(i),r=i;else if(MI(i)){let n=0,r=t-2;for(;r>=0&&MI(MR(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function MR(e,t){let n=e.charCodeAt(t);if(!MP(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ME(r)?(n-55296<<10)+(r-56320)+65536:n}function ME(e){return e>=56320&&e<57344}function MP(e){return e>=55296&&e<56320}function ML(e){return e<65536?1:2}class MN{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=MW(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Mj.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=MW(this,e,t);let n=[];return this.decompose(e,t,n,0),Mj.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new M$(this),i=new M$(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new M$(this,e)}iterRange(e,t=this.length){return new MF(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new MV(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new MB(e):Mj.from(MB.split(e,[])):MN.empty}}class MB extends MN{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((t?n:s)>=e)return new MH(r,s,n,o);r=s+1,n++}}decompose(e,t,n,r){var i;let o=e<=0&&t>=this.length?this:new MB((i=this.text,Mz(i,[""],e,t)),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=Mz(o.text,e.text.slice(),0,o.length);if(t.length<=32)n.push(new MB(t,e.length+o.length));else{let e=t.length>>1;n.push(new MB(t.slice(0,e)),new MB(t.slice(e)))}}else n.push(o)}replace(e,t,n){var r;if(!(n instanceof MB))return super.replace(e,t,n);[e,t]=MW(this,e,t);let i=Mz(this.text,Mz(n.text,(r=this.text,Mz(r,[""],0,e))),t),o=this.length+n.length-(t-e);return i.length<=32?new MB(i,o):Mj.from(MB.split(i,[]),o)}sliceString(e,t=this.length,n="\n"){[e,t]=MW(this,e,t);let r="";for(let i=0,o=0;i<=t&&o<this.text.length;o++){let s=this.text[o],a=i+s.length;i>e&&o&&(r+=n),e<a&&t>i&&(r+=s.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new MB(n,r)),n=[],r=-1);return r>-1&&t.push(new MB(n,r)),t}}class Mj extends MN{constructor(e,t){for(let n of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=n.lines}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i<this.children.length;i++){let s=this.children[i],a=o+s.length;if(e<=a&&t>=o){let i=r&(o<=e|2*(a>=t));o>=e&&a<=t&&!i?n.push(s):s.decompose(e-o,t-o,n,i)}o=a+1}}replace(e,t,n){if([e,t]=MW(this,e,t),n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let o=this.children[r],s=i+o.length;if(e>=i&&t<=s){let a=o.replace(e-i,t-i,n),l=this.lines-o.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new Mj(i,this.length-(t-e)+n.length)}return super.replace(i,s,a)}i=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=MW(this,e,t);let r="";for(let i=0,o=0;i<this.children.length&&o<=t;i++){let s=this.children[i],a=o+s.length;o>e&&i&&(r+=n),e<a&&t>o&&(r+=s.sliceString(e-o,t-o,n)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Mj))return 0;let n=0,[r,i,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==o||i==s)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new MB(n,t)}let r=Math.max(32,n>>5),i=r<<1,o=r>>1,s=[],a=0,l=-1,c=[];function u(){0!=a&&(s.push(1==c.length?c[0]:Mj.from(c,l)),l=-1,a=c.length=0)}for(let t of e)!function e(t){let n;if(t.lines>i&&t instanceof Mj)for(let n of t.children)e(n);else t.lines>o&&(a>o||!a)?(u(),s.push(t)):t instanceof MB&&a&&(n=c[c.length-1])instanceof MB&&t.lines+n.lines<=32?(a+=t.lines,l+=t.length+1,c[c.length-1]=new MB(n.text.concat(t.text),n.length+1+t.length)):(a+t.lines>r&&u(),a+=t.lines,l+=t.length+1,c.push(t))}(t);return u(),1==s.length?s[0]:new Mj(s,t)}}function Mz(e,t,n=0,r=1e9){for(let i=0,o=0,s=!0;o<e.length&&i<=r;o++){let a=e[o],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),s?(t[t.length-1]+=a,s=!1):t.push(a)),i=l+1}return t}MN.empty=new MB([""],0);class M${constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof MB?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,s=r instanceof MB?r.text.length:r.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof MB){let i=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof MB?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class MF{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new M$(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class MV{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"u">typeof Symbol&&(MN.prototype[Symbol.iterator]=function(){return this.iter()},M$.prototype[Symbol.iterator]=MF.prototype[Symbol.iterator]=MV.prototype[Symbol.iterator]=function(){return this});class MH{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function MW(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function MU(e,t,n=!0,r=!0){return function(e,t,n=!0,r=!0){return(n?MD:function(e,t,n){for(;t>1;){let r=MD(e,t-2,n);if(r<t)return r;t--}return 0})(e,t,r)}(e,t,n,r)}function MG(e,t){let n=e.charCodeAt(t);if(!(n>=55296&&n<56320)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return r>=56320&&r<57344?(n-55296<<10)+(r-56320)+65536:n}function Mq(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function MX(e){return e<65536?1:2}let MY=/\r\n?|\n/;var MK=((XR=MK||(MK={}))[XR.Simple=0]="Simple",XR[XR.TrackDel=1]="TrackDel",XR[XR.TrackBefore=2]="TrackBefore",XR[XR.TrackAfter=3]="TrackAfter",XR);class MQ{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],o=this.sections[t++];o<0?(e(n,r,i),r+=i):r+=o,n+=i}}iterChangedRanges(e,t=!1){M1(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];r<0?e.push(n,r):e.push(r,n)}return new MQ(e)}composeDesc(e){return this.empty?e:e.empty?this:M5(this,e)}mapDesc(e,t=!1){return e.empty?this:M2(this,e,t)}mapPos(e,t=-1,n=MK.Simple){let r=0,i=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=r+s;if(a<0){if(l>e)return i+(e-r);i+=s}else{if(n!=MK.Simple&&l>=e&&(n==MK.TrackDel&&r<e&&l>e||n==MK.TrackBefore&&r<e||n==MK.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],o=this.sections[n++],s=r+i;if(o>=0&&r<=t&&s>=e)return!(r<e)||!(s>t)||"cover";r=s}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new MQ(e)}static create(e){return new MQ(e)}}class MZ extends MQ{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return M1(this,(t,n,r,i,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return M2(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s>=0){t[r]=s,t[r+1]=o;let a=r>>1;for(;n.length<a;)n.push(MN.empty);n.push(o?e.slice(i,i+o):MN.empty)}i+=o}return new MZ(t,n)}compose(e){return this.empty?e:e.empty?this:M5(this,e,!0)}map(e,t=!1){return e.empty?this:M2(this,e,t,!0)}iterChanges(e,t=!1){M1(this,e,t)}get desc(){return MQ.create(this.sections)}filter(e){let t=[],n=[],r=[],i=new M3(this);o:for(let o=0,s=0;;){let a=o==e.length?1e9:e[o++];for(;s<a||s==a&&0==i.len;){if(i.done)break o;let e=Math.min(i.len,a-s);MJ(r,e,-1);let o=-1==i.ins?-1:0==i.off?i.ins:0;MJ(t,e,o),o>0&&M0(n,t,i.text),i.forward(e),s+=e}let l=e[o++];for(;s<l;){if(i.done)break o;let e=Math.min(i.len,l-s);MJ(t,e,-1),MJ(r,e,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(e),s+=e}}return{changes:new MZ(t,n),filtered:MQ.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):0==r?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],o=0,s=null;function a(e=!1){if(!e&&!r.length)return;o<t&&MJ(r,t-o,-1);let n=new MZ(r,i);s=s?s.compose(n.map(s)):n,r=[],i=[],o=0}return!function e(l){if(Array.isArray(l))for(let t of l)e(t);else if(l instanceof MZ){if(l.length!=t)throw RangeError(`Mismatched change set length (got ${l.length}, expected ${t})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:e,to:s=e,insert:c}=l;if(e>s||e<0||s>t)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let u=c?"string"==typeof c?MN.of(c.split(n||MY)):c:MN.empty,h=u.length;if(e==s&&0==h)return;e<o&&a(),e>o&&MJ(r,e-o,-1),MJ(r,s-e,h),M0(i,r,u),o=s}}(e),a(!s),s}static empty(e){return new MZ(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let i=e[r];if("number"==typeof i)t.push(i,-1);else if(!Array.isArray(i)||"number"!=typeof i[0]||i.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==i.length)t.push(i[0],0);else{for(;n.length<r;)n.push(MN.empty);n[r]=MN.of(i.slice(1)),t.push(i[0],n[r].length)}}return new MZ(t,n)}static createSet(e,t){return new MZ(e,t)}}function MJ(e,t,n,r=!1){if(0==t&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function M0(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(MN.empty);e.push(n)}}function M1(e,t,n){let r=e.inserted;for(let i=0,o=0,s=0;s<e.sections.length;){let a=e.sections[s++],l=e.sections[s++];if(l<0)i+=a,o+=a;else{let c=i,u=o,h=MN.empty;for(;c+=a,u+=l,l&&r&&(h=h.append(r[s-2>>1])),!n&&s!=e.sections.length&&!(e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(i,c,o,u,h),i=c,o=u}}}function M2(e,t,n,r=!1){let i=[],o=r?[]:null,s=new M3(e),a=new M3(t);for(let e=-1;;)if(s.done&&a.len||a.done&&s.len)throw Error("Mismatched change set lengths");else if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);MJ(i,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!n))){let t=a.len;for(MJ(i,a.ins,-1);t;){let n=Math.min(s.len,t);s.ins>=0&&e<s.i&&s.len<=n&&(MJ(i,0,s.ins),o&&M0(o,i,s.text),e=s.i),s.forward(n),t-=n}a.next()}else if(s.ins>=0){let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else if(0==a.ins&&a.len<n)n-=a.len,a.next();else break;MJ(i,t,e<s.i?s.ins:0),o&&e<s.i&&M0(o,i,s.text),e=s.i,s.forward(s.len-n)}else if(s.done&&a.done)return o?MZ.createSet(i,o):MQ.create(i);else throw Error("Mismatched change set lengths")}function M5(e,t,n=!1){let r=[],i=n?[]:null,o=new M3(e),s=new M3(t);for(let e=!1;;)if(o.done&&s.done)return i?MZ.createSet(r,i):MQ.create(r);else if(0==o.ins)MJ(r,o.len,0,e),o.next();else if(0!=s.len||s.done)if(o.done||s.done)throw Error("Mismatched change set lengths");else{let t=Math.min(o.len2,s.len),n=r.length;if(-1==o.ins){let n=-1==s.ins?-1:s.off?0:s.ins;MJ(r,t,n,e),i&&n&&M0(i,r,s.text)}else -1==s.ins?(MJ(r,o.off?0:o.len,t,e),i&&M0(i,r,o.textBit(t))):(MJ(r,o.off?0:o.len,s.off?0:s.ins,e),i&&!s.off&&M0(i,r,s.text));e=(o.ins>t||s.ins>=0&&s.len>t)&&(e||r.length>n),o.forward2(t),s.forward(t)}else MJ(r,0,s.ins,e),i&&M0(i,r,s.text),s.next()}class M3{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?MN.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?MN.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class M4{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get undirectional(){return(64&this.flags)>0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new M4(n,r,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return M6.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return M6.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return M6.range(e.anchor,e.head)}static create(e,t,n,r){return new M4(e,t,n,r)}}class M6{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:M6.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new M6([this.main],0)}addRange(e,t=!0){return M6.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,M6.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new M6(e.ranges.map(e=>M4.fromJSON(e)),e.main)}static single(e,t=e){return new M6([M6.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let i=e[r];if(i.empty?i.from<=n:i.from<n)return M6.normalized(e.slice(),t);n=i.to}return new M6(e,t)}static cursor(e,t=0,n,r){return M4.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let o=null==r?7:Math.min(6,r);return i||e==t||(i=t<e?1:-1),i&&(o|=i<0?8:16),t<e?M4.create(t,e,32|o,n):M4.create(e,t,o,n)}static undirectionalRange(e,t){return M4.create(e,t,64,void 0)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let r=e[n],i=e[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let o=i.from,s=Math.max(r.to,i.to);n<=t&&t--,e.splice(--n,2,r.anchor>r.head?M6.range(s,o):M6.range(o,s))}}return new M6(e,t)}}function M9(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let M8=0;class M7{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=M8++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(e={}){return new M7(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(!e.combine?Oe:(e,t)=>e===t),!!e.static,e.enables)}of(e){return new Ot([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new Ot(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new Ot(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function Oe(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class Ot{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=M8++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:((null!=(t=e[n.id])?t:1)&1)==0&&c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||Or(e,c)){let t=n(e);if(s?!On(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=Op(t,l);if(this.dependencies.every(n=>n instanceof M7?t.facet(n)===e.facet(n):!(n instanceof Oo)||t.field(n,!1)==e.field(n,!1))||(s?On(a=n(e),i,r):r(a=n(e),i)))return e.values[o]=i,0}else a=n(e);return e.values[o]=a,1}}}get extension(){return this}}function On(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Or(e,t){let n=!1;for(let r of t)1&Od(e,r)&&(n=!0);return n}let Oi=M7.define({static:!0});class Oo{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(e){let t=new Oo(M8++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Oi).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Oi),i=n.facet(Oi),o;return(o=r.find(e=>e.field==this))&&o!=i.find(e=>e.field==this)?(e.values[t]=o.create(e),1):null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}}init(e){return[this,Oi.of({field:this,create:e})]}get extension(){return this}}function Os(e){return t=>new Ol(t,e)}let Oa={highest:Os(0),high:Os(1),default:Os(2),low:Os(3),lowest:Os(4)};class Ol{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class Oc{of(e){return new Ou(this,e)}reconfigure(e){return Oc.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Ou{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class Oh{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){var r,i,o;let s,a,l=[],c=Object.create(null),u=new Map;for(let n of(r=e,i=t,o=u,s=[[],[],[],[],[]],a=new Map,!function e(t,n){let r=a.get(t);if(null!=r){if(r<=n)return;let e=s[r].indexOf(t);e>-1&&s[r].splice(e,1),t instanceof Ou&&o.delete(t.compartment)}if(a.set(t,n),Array.isArray(t))for(let r of t)e(r,n);else if(t instanceof Ou){if(o.has(t.compartment))throw RangeError("Duplicate use of compartment in extensions");let r=i.get(t.compartment)||t.inner;o.set(t.compartment,r),e(r,n)}else if(t instanceof Ol)e(t.inner,t.prec);else if(t instanceof Oo)s[n].push(t),t.provides&&e(t.provides,n);else if(t instanceof Ot)s[n].push(t),t.facet.extensions&&e(t.facet.extensions,2);else{let r=t.extension;if(!r)throw Error(`Unrecognized extension value in extension set (${t}).`);if(r==t)throw Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(r,n)}}(r,2),s.reduce((e,t)=>e.concat(t))))n instanceof Oo?l.push(n):(c[n.facet.id]||(c[n.facet.id]=[])).push(n);let h=Object.create(null),d=[],p=[];for(let e of l)h[e.id]=p.length<<1,p.push(t=>e.slot(t));let f=null==n?void 0:n.config.facets;for(let e in c){let t=c[e],r=t[0].facet,i=f&&f[e]||[];if(t.every(e=>0==e.type))if(h[r.id]=d.length<<1|1,Oe(i,t))d.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));d.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(h[e.id]=d.length<<1|1,d.push(e.value)):(h[e.id]=p.length<<1,p.push(t=>e.dynamicSlot(t)));h[r.id]=p.length<<1,p.push(e=>(function(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),o=r.filter(e=>!(1&e)),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;t<r.length;t++){let o=Op(e,r[t]);if(2==i[t])for(let e of o)n.push(e);else n.push(o)}return t.combine(n)}return{create(e){for(let t of r)Od(e,t);return e.values[s]=a(e),1},update(e,n){if(!Or(e,o))return 0;let r=a(e);return t.compare(r,e.values[s])?0:(e.values[s]=r,1)},reconfigure(e,i){let o=Or(e,r),l=i.config.facets[t.id],c=i.facet(t);if(l&&!o&&Oe(n,l))return e.values[s]=c,0;let u=a(e);return t.compare(u,c)?(e.values[s]=c,0):(e.values[s]=u,1)}}})(e,r,t))}}return new Oh(e,u,p.map(e=>e(h)),h,d,c)}}function Od(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Op(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let Of=M7.define(),Om=M7.define({combine:e=>e.some(e=>e),static:!0}),Og=M7.define({combine:e=>e.length?e[0]:void 0,static:!0}),Ov=M7.define(),Oy=M7.define(),Ob=M7.define(),Ox=M7.define({combine:e=>!!e.length&&e[0]});class Ow{constructor(e,t){this.type=e,this.value=t}static define(){return new OS}}class OS{of(e){return new Ow(this,e)}}class OA{constructor(e){this.map=e}of(e){return new OC(this,e)}}class OC{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new OC(this.type,t)}is(e){return this.type==e}static define(e={}){return new OA(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}OC.reconfigure=OC.define(),OC.appendConfig=OC.define();class Ok{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&M9(n,t.newLength),i.some(e=>e.type==Ok.time)||(this.annotations=i.concat(Ok.time.of(Date.now())))}static create(e,t,n,r,i,o){return new Ok(e,t,n,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Ok.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function OM(e,t,n){var r;let i,o,s;return n?(i=t.changes,o=MZ.empty(t.changes.length),s=e.changes.compose(t.changes)):(i=t.changes.map(e.changes),o=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(i)),{changes:s,selection:t.selection?t.selection.map(o):null==(r=e.selection)?void 0:r.map(i),effects:OC.mapEffects(e.effects,i).concat(OC.mapEffects(t.effects,o)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function OO(e,t,n){let r=t.selection,i=O_(t.annotations);return t.userEvent&&(i=i.concat(Ok.userEvent.of(t.userEvent))),{changes:t.changes instanceof MZ?t.changes:MZ.of(t.changes||[],n,e.facet(Og)),selection:r&&(r instanceof M6?r:M6.single(r.anchor,r.head)),effects:O_(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}Ok.time=Ow.define(),Ok.userEvent=Ow.define(),Ok.addToHistory=Ow.define(),Ok.remote=Ow.define();let OT=[];function O_(e){return null==e?OT:Array.isArray(e)?e:[e]}var OI=((XE=OI||(OI={}))[XE.Word=0]="Word",XE[XE.Space=1]="Space",XE[XE.Other=2]="Other",XE);let OD=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{i=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class OR{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Od(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null==n){if(t)throw RangeError("Field is not present in this state");return}return Od(this,n),Op(this,n)}update(...e){return function e(t,n,r){let i=OO(t,n.length?n[0]:{},t.doc.length);n.length&&!1===n[0].filter&&(r=!1);for(let e=1;e<n.length;e++){!1===n[e].filter&&(r=!1);let o=!!n[e].sequential;i=OM(i,OO(t,n[e],o?i.changes.newLength:t.doc.length),o)}let o=Ok.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(e){let t=e.startState,n=t.facet(Ob),r=e;for(let i=n.length-1;i>=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=OM(r,OO(t,o,e.changes.newLength),!0))}return r==e?e:Ok.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(r?function(t){let n=t.startState,r=!0;for(let e of n.facet(Ov)){let n=e(t);if(!1===n){r=!1;break}Array.isArray(n)&&(r=!0===r?n:function(e,t){let n=[];for(let r=0,i=0;;){let o,s;if(r<e.length&&(i==t.length||t[i]>=e[r]))o=e[r++],s=e[r++];else{if(!(i<t.length))return n;o=t[i++],s=t[i++]}!n.length||n[n.length-1]<o?n.push(o,s):n[n.length-1]<s&&(n[n.length-1]=s)}}(r,n))}if(!0!==r){let e,i;if(!1===r)i=t.changes.invertedDesc,e=MZ.empty(n.doc.length);else{let n=t.changes.filter(r);e=n.changes,i=n.filtered.mapDesc(n.changes).invertedDesc}t=Ok.create(n,e,t.selection&&t.selection.map(i),OC.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let i=n.facet(Oy);for(let r=i.length-1;r>=0;r--){let o=i[r](t);t=o instanceof Ok?o:Array.isArray(o)&&1==o.length&&o[0]instanceof Ok?o[0]:e(n,O_(o),!1)}return t}(o):o)}(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:r,compartments:i}=n;for(let t of e.effects)t.is(Oc.reconfigure)?(n&&(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(OC.reconfigure)?(n=null,r=t.value):t.is(OC.appendConfig)&&(n=null,r=O_(r).concat(t.value));t=n?e.startState.values.slice():new OR(n=Oh.resolve(r,i,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let o=e.startState.facet(Om)?e.newSelection:e.newSelection.asSingle();new OR(n,e.newDoc,o,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:M6.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=O_(n.effects);for(let n=1;n<t.ranges.length;n++){let s=e(t.ranges[n]),a=this.changes(s.changes),l=a.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(l);let c=r.mapDesc(a,!0);i.push(s.range.map(c)),r=r.compose(l),o=OC.mapEffects(o,l).concat(OC.mapEffects(O_(s.effects),c))}return{changes:r,selection:M6.create(i,t.mainIndex),effects:o}}changes(e=[]){return e instanceof MZ?e:MZ.of(e,this.doc.length,this.facet(OR.lineSeparator))}toText(e){return MN.of(e.split(this.facet(OR.lineSeparator)||MY))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(Od(this,t),Op(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof Oo&&null!=this.config.address[r.id]&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let r=[];if(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let i=n[t],o=e[t];r.push(i.init(e=>i.spec.fromJSON(o,e)))}}return OR.create({doc:e.doc,selection:M6.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Oh.resolve(e.extensions||[],new Map),n=e.doc instanceof MN?e.doc:MN.of((e.doc||"").split(t.staticFacet(OR.lineSeparator)||MY)),r=e.selection?e.selection instanceof M6?e.selection:M6.single(e.selection.anchor,e.selection.head):M6.single(0);return M9(r,n.length),t.staticFacet(Om)||(r=r.asSingle()),new OR(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(OR.tabSize)}get lineBreak(){return this.facet(OR.lineSeparator)||"\n"}get readOnly(){return this.facet(Ox)}phrase(e,...t){for(let t of this.facet(OR.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Of))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){var t;let n=this.languageDataAt("wordChars",e);return t=n.length?n[0]:"",e=>{if(!/\S/.test(e))return OI.Space;if(function(e){if(i)return i.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||OD.test(n)))return!0}return!1}(e))return OI.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return OI.Word;return OI.Other}}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=MU(t,o,!1);if(i(t.slice(e,o))!=OI.Word)break;o=e}for(;s<r;){let e=MU(t,s);if(i(t.slice(s,e))!=OI.Word)break;s=e}return o==s?null:M6.range(o+n,s+n)}}function OE(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],o=r[e];if(void 0===o)r[e]=i;else if(o===i||void 0===i);else if(Object.hasOwnProperty.call(n,e))r[e]=n[e](o,i);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===r[e]&&(r[e]=t[e]);return r}OR.allowMultipleSelections=Om,OR.tabSize=M7.define({combine:e=>e.length?e[0]:4}),OR.lineSeparator=Og,OR.readOnly=Ox,OR.phrases=M7.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),OR.languageData=Of,OR.changeFilter=Ov,OR.transactionFilter=Oy,OR.transactionExtender=Ob,Oc.reconfigure=OC.define();class OP{eq(e){return this==e}range(e,t=e){return ON.create(e,t,this)}}function OL(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}OP.prototype.startSide=OP.prototype.endSide=0,OP.prototype.point=!1,OP.prototype.mapMode=MK.TrackDel;class ON{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new ON(e,t,n)}}function OB(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class Oj{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return O$(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let r=o+s>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);i<o;i++)if(!1===r(this.from[i]+e,this.to[i]+e,this.value[i]))return!1}map(e,t,n,r,i){let o=[],s=[],a=[],l=-1,c=-1;s:for(let u=0;u<this.value.length;u++){let h=this.value[u],d=this.from[u]+e,p=this.to[u]+e,f,m;if(d==p){let e=t.mapPos(d,h.startSide,h.mapMode);if(null==e||(f=m=e,h.startSide!=h.endSide&&(m=t.mapPos(d,h.endSide))<f))continue}else if((f=t.mapPos(d,h.startSide))>(m=t.mapPos(p,h.endSide))||f==m&&h.startSide>0&&h.endSide<=0)continue;if(!(0>(m-f||h.endSide-h.startSide)))if(l<0&&(l=f),h.point&&(c=Math.max(c,m-f)),(f-n||h.startSide-r)>=0)o.push(h),s.push(f-l),a.push(m-l),n=m,r=h.endSide;else{if(f==m)for(let e=o.length;e>0;e--){if((f-(a[e-1]+l)||h.startSide-o[e-1].endSide)>=0){o.splice(e,0,h),s.splice(e,0,f-l),a.splice(e,0,m-l);continue s}if((f-(s[e-1]+l)||h.endSide-o[e-1].startSide)>0)break}i(f,m,h)}}return{mapped:o.length?new Oj(s,a,o,c):null,pos:l}}}class Oz{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new Oz(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(OB)),this.isEmpty)return t.length?Oz.of(t):this;let s=new OH(this,null,-1).goto(0),a=0,l=[],c=new OF;for(;s.value||a<t.length;)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let e=t[a++];c.addInner(e.from,e.to,e.value,!1)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!o||r>this.chunkEnd(s.chunkIndex)||i<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||r>s.to||i<s.from||o(s.from,s.to,s.value))&&!c.addInner(s.from,s.to,s.value,!1)&&l.push(ON.create(s.from,s.to,s.value)),s.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?Oz.empty:this.nextLayer.update({add:l,filter:o,filterFrom:r,filterTo:i}))}map(e){let t;if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1,o=(e,n,r)=>{t||(t=new OF),t.addRange(e,n,r,!1)};for(let t=0;t<this.chunk.length;t++){let s=this.chunkPos[t],a=this.chunk[t],l=e.touchesRange(s,s+a.length);if(!1===l)i=Math.max(i,a.maxPoint),n.push(a),r.push(e.mapPos(s));else if(!0===l){let[t,l]=n.length?[O$(r)+O$(n).length,O$(O$(n).value).endSide]:[-1,-1],{mapped:c,pos:u}=a.map(s,e,t,l,o);c&&(i=Math.max(i,c.maxPoint),n.push(c),r.push(u))}}let s=this.nextLayer.map(e);return t&&(s=t.finishInner(s)),0==n.length?s:new Oz(r,n,s||Oz.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],o=this.chunk[r];if(t>=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return OW.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return OW.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),a=OV(o,s,n),l=new OG(o,a,i),c=new OG(s,a,i);n.iterGaps((e,t,n)=>Oq(l,e,c,t,n,r)),n.empty&&0==n.length&&Oq(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=1e9-1);let i=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),o=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(i.length!=o.length)return!1;if(!i.length)return!0;let s=OV(i,o),a=new OG(i,s,0).goto(n),l=new OG(o,s,0).goto(n);for(;;){if(a.to!=l.to||!OX(a.active,l.active)||a.point&&(!l.point||!OL(a.point,l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new OG(e,null,i).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFrom<t?n.length+1:o.point.startSide<0?n.length:Math.min(n.length,a);r.point(s,e,o.point,n,i,o.pointRank),a=Math.min(o.openEnd(e),n.length)}else e>s&&(r.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new OF;for(let r of e instanceof ON?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(OB(t,r)>0)return e.slice().sort(OB);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return Oz.empty;let t=O$(e);for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=Oz.empty;r=r.nextLayer)t=new Oz(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}function O$(e){return e[e.length-1]}Oz.empty=new Oz([],[],null,-1),Oz.empty.nextLayer=Oz.empty;class OF{finishChunk(e){this.chunks.push(new Oj(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(e,t,n,r){this.addInner(e,t,n,r)||(this.nextLayer||(this.nextLayer=new OF)).addRange(e,t,n,r)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Oz.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=Oz.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function OV(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let o=r.get(e.chunk[t]);null==o||(n?n.mapPos(o):o)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(o,o+e.chunk[t].length))||i.add(e.chunk[t])}return i}class OH{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class OW{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let i=0;i<e.length;i++)for(let o=e[i];!o.isEmpty;o=o.nextLayer)o.maxPoint>=n&&r.push(new OH(o,t,n,i));return 1==r.length?r[0]:new OW(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)OU(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)OU(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),OU(this.heap,0)}}}function OU(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),0>n.compare(i))break;e[r]=n,e[t]=i,t=r}}class OG{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=OW.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){OY(this.active,e),OY(this.activeTo,e),OY(this.activeRank,e),this.minActive=OQ(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;OK(this.active,t,n),OK(this.activeTo,t,r),OK(this.activeRank,t,i),e&&OK(e,t,this.cursor.from),this.minActive=OQ(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&0>(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&OY(n,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(e.point)if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}else this.addActive(n),this.cursor.next()}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function Oq(e,t,n,r,i,o){e.goto(t),n.goto(r);let s=r+i,a=r,l=r-t,c=!!o.boundChange;for(let t=!1;;){let r=e.to+l-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+l:n.to,h=Math.min(u,s);if(e.point||n.point?(e.point&&n.point&&OL(e.point,n.point)&&OX(e.activeForPoint(e.to),n.activeForPoint(n.to))||o.comparePoint(a,h,e.point,n.point),t=!1):(t&&(o.boundChange(a),t=!1),h>a&&!OX(e.active,n.active)&&o.compareRange(a,h,e.active,n.active),c&&h<s&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>s)break;a=u,i<=0&&e.next(),i>=0&&n.next()}}function OX(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!OL(e[n],t[n]))return!1;return!0}function OY(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function OK(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function OQ(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)0>(t[i]-r||e[i].endSide-e[n].endSide)&&(n=i,r=t[i]);return n}function OZ(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)9==e.charCodeAt(i)?(r+=t-r%t,i++):(r++,i=MU(e,i));return r}function OJ(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=MU(e,r)}return!0===r?-1:e.length}let O0="u"<typeof Symbol?"__ͼ":Symbol.for("ͼ"),O1="u"<typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),O2="u">typeof globalThis?globalThis:"u">typeof window?window:{};class O5{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,i,o,s){let a=[],l=/^@(\w+)\b/.exec(t[0]),c=l&&"keyframes"==l[1];if(l&&null==i)return o.push(t[0]+";");for(let n in i){let s=i[n];if(/&/.test(n))e(n.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw RangeError("The value of a property ("+n+") should be a primitive value.");e(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((n&&!l&&!s?t.map(n):t).join(", ")+" {"+a.join(" ")+"}")}(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=O2[O0]||1;return O2[O0]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[O1],i=n&&n.nonce;r?i&&r.setNonce(i):r=new O4(e,i),r.mount(Array.isArray(t)?t:[t],e)}}let O3=new Map;class O4{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=O3.get(n);if(t)return e[O1]=t;this.sheet=new r.CSSStyleSheet,O3.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[O1]=this}mount(e,t){let n=this.sheet,r=0,i=0,o=!1;for(let t=0;t<e.length;t++){let s=e[t],a=this.modules.indexOf(s);if(a<i&&a>-1&&(this.modules.splice(a,1),o=!0,i--,a=-1),-1==a){if(this.modules.splice(i++,0,s),o=!0,n)for(let e=0;e<s.rules.length;e++)n.insertRule(s.rules[e],r++)}else{for(;i<a;)r+=this.modules[i++].rules.length;r+=s.rules.length,i++}}if(n)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(o){let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}for(var O6={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},O9={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},O8="u">typeof navigator&&/Mac/.test(navigator.platform),O7="u">typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Te=0;Te<10;Te++)O6[48+Te]=O6[96+Te]=String(Te);for(var Te=1;Te<=24;Te++)O6[Te+111]="F"+Te;for(var Te=65;Te<=90;Te++)O6[Te]=String.fromCharCode(Te+32),O9[Te]=String.fromCharCode(Te);for(var Tt in O6)O9.hasOwnProperty(Tt)||(O9[Tt]=O6[Tt]);function Tn(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;t<arguments.length;t++)!function e(t,n){if("string"==typeof n)t.appendChild(document.createTextNode(n));else if(null==n);else if(null!=n.nodeType)t.appendChild(n);else if(Array.isArray(n))for(var r=0;r<n.length;r++)e(t,n[r]);else throw RangeError("Unsupported child node: "+n)}(e,arguments[t]);return e}let Tr="u">typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Ti="u">typeof document?document:{documentElement:{style:{}}},To=/Edge\/(\d+)/.exec(Tr.userAgent),Ts=/MSIE \d/.test(Tr.userAgent),Ta=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tr.userAgent),Tl=!!(Ts||Ta||To),Tc=!Tl&&/gecko\/(\d+)/i.test(Tr.userAgent),Tu=!Tl&&/Chrome\/(\d+)/.exec(Tr.userAgent),Th="webkitFontSmoothing"in Ti.documentElement.style,Td=!Tl&&/Apple Computer/.test(Tr.vendor),Tp=Td&&(/Mobile\/\w+/.test(Tr.userAgent)||Tr.maxTouchPoints>2);var Tf={mac:Tp||/Mac/.test(Tr.platform),windows:/Win/.test(Tr.platform),linux:/Linux|X11/.test(Tr.platform),ie:Tl,ie_version:Ts?Ti.documentMode||6:Ta?+Ta[1]:To?+To[1]:0,gecko:Tc,gecko_version:Tc?+(/Firefox\/(\d+)/.exec(Tr.userAgent)||[0,0])[1]:0,chrome:!!Tu,chrome_version:Tu?+Tu[1]:0,ios:Tp,android:/Android\b/.test(Tr.userAgent),webkit:Th,webkit_version:Th?+(/\bAppleWebKit\/(\d+)/.exec(Tr.userAgent)||[0,0])[1]:0,safari:Td,safari_version:Td?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Tr.userAgent)||[0,0])[1]:0,tabSize:null!=Ti.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};function Tm(e,t){for(let n in e)"class"==n&&t.class?t.class+=" "+e.class:"style"==n&&t.style?t.style+=";"+e.style:t[n]=e[n];return t}let Tg=Object.create(null);function Tv(e,t,n){if(e==t)return!0;e||(e=Tg),t||(t=Tg);let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function Ty(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}class Tb{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return -1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Tx=((XP=Tx||(Tx={}))[XP.Text=0]="Text",XP[XP.WidgetBefore=1]="WidgetBefore",XP[XP.WidgetAfter=2]="WidgetAfter",XP[XP.WidgetRange=3]="WidgetRange",XP);class Tw extends OP{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new TS(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new TC(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:o}=Tk(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(o?t?2e8:1:-6e8)+1}return new TC(e,n,r,t,e.widget||null,!0)}static line(e){return new TA(e)}static set(e,t=!1){return Oz.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Tw.none=Oz.empty;class TS extends Tw{constructor(e){let{start:t,end:n}=Tk(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?Tm(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Tg}eq(e){return this==e||e instanceof TS&&this.tagName==e.tagName&&Tv(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw RangeError("Mark decorations may not be empty");return super.range(e,t)}}TS.prototype.point=!1;class TA extends Tw{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof TA&&this.spec.class==e.spec.class&&Tv(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}TA.prototype.mapMode=MK.TrackBefore,TA.prototype.point=!0;class TC extends Tw{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?MK.TrackBefore:MK.TrackAfter:MK.TrackDel}get type(){return this.startSide!=this.endSide?Tx.WidgetRange:this.startSide<=0?Tx.WidgetBefore:Tx.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){var t,n;return e instanceof TC&&(t=this.widget,t==(n=e.widget)||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function Tk(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function TM(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}TC.prototype.point=!0;class TO extends OP{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(e){return e==this||e instanceof TO&&this.tagName==e.tagName&&Tv(this.attributes,e.attributes)}static create(e){return new TO(e.tagName,e.attributes||Tg,null==e.rank?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return Oz.of(e,t)}}TO.prototype.startSide=TO.prototype.endSide=-1;let TT=e=>1==e.nodeType,T_=e=>3==e.nodeType;function TI(e){return(11==e.nodeType?e.getSelection?e:e.ownerDocument:e).getSelection()}function TD(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function TR(e,t){if(!t.anchorNode)return!1;try{return TD(e,t.anchorNode)}catch(e){return!1}}function TE(e){return T_(e)?Tq(e,0,e.nodeValue.length).getClientRects():TT(e)?e.getClientRects():[]}function TP(e,t,n,r){return!!n&&(TB(e,t,n,r,-1)||TB(e,t,n,r,1))}function TL(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function TN(e){return TT(e)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function TB(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Tj(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||!TT(n))return!1;t=TL(e)+(i<0?0:1),e=n}else{if(!TT(e)||TT(e=e.childNodes[t+(i<0?-1:0)])&&("IMG"==e.nodeName||"BR"==e.nodeName||"false"==e.contentEditable))return!1;t=i<0?Tj(e):0}}}function Tj(e){return T_(e)?e.nodeValue.length:e.childNodes.length}function Tz(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function T$(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||1>Math.abs(t.width-e.offsetWidth))&&(n=1),(r>.995&&r<1.005||!isFinite(r)||1>Math.abs(t.height-e.offsetHeight))&&(r=1),{scaleX:n,scaleY:r}}function TF(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let o=e.parentNode;o;)if(o==n.body||(!t||r)&&i)break;else if(TT(o))!i&&o.scrollHeight>o.clientHeight&&/scroll|auto/.test(getComputedStyle(o).overflowY)&&(i=o),t&&!r&&o.scrollWidth>o.clientWidth&&/scroll|auto/.test(getComputedStyle(o).overflowX)&&(r=o),o=o.assignedSlot||o.parentNode;else if(11==o.nodeType)o=o.host;else break;return{x:r,y:i}}class TV{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Tj(t):0),n,Math.min(e.focusOffset,n?Tj(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}function TH(e){let t=[];for(let n=e;n;n=11==n.nodeType?n.host:n.parentNode)TT(n)&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function TW(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}let TU=null;function TG(e){if(e.setActive)return e.setActive();if(TU)return e.focus(TU);let t=TH(e);e.focus(null==TU?{get preventScroll(){return TU={preventScroll:!0},!0}}:void 0),TU||(TU=!1,TW(t))}function Tq(e,t,n=t){let r=o||(o=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function TX(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let o=new KeyboardEvent("keydown",i);o.synthetic=!0,e.dispatchEvent(o);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,e.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function TY(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function TK(e,t){for(let n=e,r=t;;)if(T_(n)&&r>0)return{node:n,offset:r};else if(TT(n)&&r>0){if("false"==n.contentEditable)return null;r=Tj(n=n.childNodes[r-1])}else{if(!n.parentNode||TN(n))return null;r=TL(n),n=n.parentNode}}function TQ(e,t){for(let n=e,r=t;;)if(T_(n)&&r<n.nodeValue.length)return{node:n,offset:r};else if(TT(n)&&r<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[r],r=0}else{if(!n.parentNode||TN(n))return null;r=TL(n)+1,n=n.parentNode}}Tf.safari&&Tf.safari_version>=26&&(TU=!1);class TZ{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new TZ(e.parentNode,TL(e),t)}static after(e,t){return new TZ(e.parentNode,TL(e)+1,t)}}var TJ=((XL=TJ||(TJ={}))[XL.LTR=0]="LTR",XL[XL.RTL=1]="RTL",XL);let T0=TJ.LTR,T1=TJ.RTL;function T2(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}let T5=T2("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),T3=T2("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),T4=Object.create(null),T6=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);T4[t]=n,T4[n]=-t}function T9(e){return e<=247?T5[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?T3[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}let T8=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class T7{get dir(){return this.level%2?T1:T0}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let o=0;o<e.length;o++){let s=e[o];if(s.from<=t&&s.to>=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.from<t:s.to>t:e[i].level>s.level))&&(i=o)}}if(i<0)throw RangeError("Index out of range");return i}}let _e=[];function _t(e){return[new T7(0,e,0)]}let _n="",_r=M7.define(),_i=M7.define(),_o=M7.define(),_s=M7.define(),_a=M7.define(),_l=M7.define(),_c=M7.define(),_u=M7.define(),_h=M7.define(),_d=M7.define({combine:e=>e.some(e=>e)}),_p=M7.define({combine:e=>e.some(e=>e)}),_f=M7.define();class _m{constructor(e,t,n,r,i,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new _m(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new _m(M6.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}let _g=OC.define({map:(e,t)=>e.map(t)}),_v=OC.define();function _y(e,t,n){let r=e.facet(_s);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+":",t):console.error(t))}let _b=M7.define({combine:e=>!e.length||e[0]}),_x=0,_w=M7.define({combine:e=>e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})});class _S{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(_w.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(_w.of({plugin:this,arg:e}))}static define(e,t){let{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new _S(_x++,e,n,r,e=>{let t=[];return o&&t.push(_M.of(t=>{let n=t.plugin(e);return n?o(n):Tw.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return _S.define((t,n)=>new e(t,n),t)}}class _A{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(_y(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){_y(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null==(t=this.value)?void 0:t.destroy)try{this.value.destroy()}catch(t){_y(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}let _C=M7.define(),_k=M7.define(),_M=M7.define(),_O=M7.define(),_T=M7.define(),__=M7.define(),_I=M7.define();function _D(e,t){let n=e.state.facet(_I);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return Oz.spans(r,t.from,t.to,{point(){},span(e,n,r,o){let s=e-t.from,a=n-t.from,l=i;for(let e=r.length-1;e>=0;e--,o--){let t=r[e].spec.bidiIsolate,n;if(o>0&&l.length&&(n=l[l.length-1]).to==s&&n.direction==t)n.to=a,l=n.inner;else{let e={from:s,to:a,direction:t,inner:[]};l.push(e),l=e.inner}}}}),function e(t,n){for(let r of n){if(null==r.direction){for(let e=r.from,n=0;e<r.to;n++){let i=n<r.inner.length?r.inner[n]:null,o=function(e,t,n){for(let r=t;r<n;r++){let t=T9(e.charCodeAt(r));if(1==t)return T0;if(2==t||4==t)return T1}}(t,e,i?i.from:r.to);if(o){r.direction=o;break}if(!i)break;e=i.to}null==r.direction&&(r.direction=TJ.LTR)}e(t,r.inner)}return n}(t.text,i)}let _R=M7.define();function _E(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(_R)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}let _P=M7.define();class _L{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new _L(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(0==t.length)return e;let n=[];for(let r=0,i=0,o=0;;){let s=Math.min(r<e.length?e[r].fromB:1e9,i<t.length?t[i]:1e9);if(1e9==s)break;let a=s+o,l=s,c=a;for(;;)if(i<t.length&&t[i]<=l){let n=t[i+1];i+=2,l=Math.max(l,n);for(let t=r;t<e.length&&e[t].fromB<=l;t++)o=e[t].toA-e[t].toB;c=Math.max(c,n+o)}else if(r<e.length&&e[r].fromB<=l){let t=e[r++];l=Math.max(l,t.toB),c=Math.max(c,t.toA),o=t.toA-t.toB}else break;n.push(new _L(a,c,s,l))}return n}}class _N{constructor(e,t,n){for(let r of(this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=MZ.empty(this.startState.doc.length),n))this.changes=this.changes.compose(r.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new _L(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new _N(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}let _B=[];class _j{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return 1&this.flags}get children(){return _B}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,4&this.flags){this.flags&=-5;let e=this.domAttrs;e&&function(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;null==t[r]&&e.removeAttribute(r)}for(let n in t){let r=t[n];"style"==n?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=TL(this.dom),r=this.length?e>0:t>0;return new TZ(this.parent.dom,n+ +!!r,0==e||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&2&this.parent.flags&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof _F)return e;return null}static get(e){return e.cmTile}}class _z extends _j{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(2&this.flags)return;super.sync(e);let t=this.dom,n=null,r,i=(null==e?void 0:e.node)==t?e:null,o=0;for(let s of this.children){if(s.sync(e),o+=s.length+s.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=s.dom&&(i.written=!0),s.dom.parentNode==t)for(;r&&r!=s.dom;)r=_$(r);else t.insertBefore(s.dom,r);n=s.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=_$(r);this.length=o}}function _$(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class _F extends _z{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=_j.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;(n=n.parent).breakAfter&&i++,r=t.pop()}else{let o=n.children[r++];if(o instanceof _V)t.push(r),n=o,r=0;else{let t=i+o.length,n=e(o,i);if(void 0!==n)return n;i=t+o.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,o=-1;if(this.blockTiles((s,a)=>{let l=a+s.length;if(e>=a&&e<=l){if(s.isWidget()&&t>=-1&&t<=1){if(32&s.flags)return!0;16&s.flags&&(n=void 0)}(a<e||e==l&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget())&&(n=s,r=e-a),(l>e||e==a&&(t>1?s.length:s.covers(-1)))&&(!i||!s.isWidget()&&i.isWidget())&&(i=s,o=e-a)}}),!n&&!i)throw Error("No tile at position "+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:o}}}class _V extends _z{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return!!this.children.length&&(e<0?this.children[0].covers(-1):this.lastChild.covers(1))}get domAttrs(){return this.wrapper.attributes}static of(e,t){let n=new _V(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class _H extends _z{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,n){let r=new _H(t||document.createElement("div"),e);return t&&n||(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,t,n=!1){let r=null,i=-1,o=null,s=-1;!function e(a,l){for(let c=0,u=0;c<a.children.length&&u<=l;c++){let h=a.children[c],d=u+h.length;d>=l&&(h.isComposite()?e(h,l-u):(!o||n&&o.isHidden&&(t>0&&!(32&o.flags)||n&&function(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}(o,h)))&&(d>l||32&h.flags&&t<=1)?(o=h,s=l-u):(u<l||16&h.flags&&!(n&&h.isHidden)&&t>=-1)&&(r=h,i=l-u)),u=d}}(this,e);let a=(t<0?r:o)||r||o;return a?{tile:a,offset:a==r?i:s}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):function(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=TE(t);return n[n.length-1]||null}(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new TZ(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,16&e.flags?1:32&e.flags?-1:t);let i=n.tile.parent,o=!1;for(let e of i.children){if(o)return new TZ(e.dom,0);e==n.tile&&(o=!0)}}return new TZ(this.dom,0)}}class _W extends _z{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let n=new _W(t||document.createElement(e.tagName),e);return t||(n.flags|=4),n}}class _U extends _j{constructor(e,t){super(e,t.length),this.text=t}sync(e){2&this.flags||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,o=e,s=0;0==e&&t<0||e==r&&t>=0?!(Tf.chrome||Tf.gecko)&&(e?(i--,s=1):o<r&&(o++,s=-1)):t<0?i--:o<r&&o++;let a=Tq(this.dom,i,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:t>=0)?0:a.length-1];return Tf.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l),null==n?l:Tz(l,(s?s>0:t<0)==n)}static of(e,t){let n=new _U(t||document.createTextNode(e),e);return t||(n.flags|=2),n}}class _G extends _j{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return!(48&this.flags)&&(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return Tz(this.dom.getBoundingClientRect(),this.length?0==e:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=!!(16&this.flags)||!(32&this.flags)&&e>0;for(let i=r?t.length-1:0;n=t[i],e>0?0!=i:i!=t.length-1&&!(n.top<n.bottom);i+=r?-1:1);return Tz(n,!r)}}get overrideDOMText(){if(!this.length)return MN.empty;let{root:e}=this;if(!e)return MN.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,n,r,i){return!i&&(i=e.toDOM(t),e.editable||(i.contentEditable="false")),new _G(i,n,e,r)}}class _q extends _j{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return MN.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return null==n?r:Tz(r,t>0==n)}}class _X{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:o,parents:s}=this;for(;e||t>0;)if(r.isComposite())if(o){if(!e)break;n&&n.break(),e--,o=!1}else if(i==r.children.length){if(!e&&!s.length)break;n&&n.leave(r),o=!!r.breakAfter,({tile:r,index:i}=s.pop()),i++}else{let a=r.children[i],l=a.breakAfter;(t>0?a.length<=e:a.length<e)&&(!n||!1!==n.skip(a,0,a.length)||!a.isComposite)?(o=!!l,i++,e-=a.length):(s.push({tile:r,index:i}),r=a,i=0,n&&a.isComposite()&&n.enter(a))}else{let t=r.length;if(i<t&&e){let o=Math.min(e,t-i);n&&n.skip(r,i,i+o),e-=o,i+=o}if(i==t)o=!!r.breakAfter,({tile:r,index:i}=s.pop()),i++;else if(!e)break}return this.tile=r,this.index=i,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class _Y{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}}class _K{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var i;this.flushBuffer();let o=this.ensureMarks(t,n),s=o.lastChild;s&&s.isText()&&!(8&s.flags)&&s.length+e.length<512?(this.cache.reused.set(s,2),(o.children[o.children.length-1]=new _U(s.dom,s.text+e)).parent=o):o.append(r||_U.of(e,null==(i=this.cache.find(_U))?void 0:i.dom)),this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?_5(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof _W&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(_5(n.dom)),r=i;else{let{dom:e}=n;this.cache.reused.get(n)&&_j.get(n.dom)&&(e=_5(n.dom));let t=_W.of(n.mark,e);r.append(t),r=t}this.cache.reused.set(n,2)}let i=_j.get(e.text);i&&this.cache.reused.set(i,2);let o=new _U(e.text,e.text.nodeValue);o.flags|=8,this.pos=e.range.toB,r.append(o)}addInlineWidget(e,t,n){let r=this.afterWidget&&48&e.flags&&(48&this.afterWidget.flags)==(48&e.flags);r||this.flushBuffer();let i=this.ensureMarks(t,n);r||16&e.flags||i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;e||(e=_2);let r=_H.start(e,t||(null==(n=this.cache.find(_H))?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let i=e.length-1;i>=0;i--){let o=e[i],s;if(t>0&&(s=r.lastChild)&&s instanceof _W&&s.mark.eq(o))r=s,t--;else{let e=_W.of(o,null==(n=this.cache.find(_W,e=>e.mark.eq(o)))?void 0:n.dom);r.append(e),r=e,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!_1(this.curLine,!1)||"BR"!=e.dom.nodeName&&e.isWidget()&&!(Tf.ios&&_1(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(_4,0,32)||new _G(_4.toDOM(),0,_4,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=102*e.rank+e.value.rank,n=new _Y(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&0>(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to);)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof _V&&r.wrapper.eq(n.wrapper))t=r;else{let r=_V.of(n.wrapper,null==(e=this.cache.find(_V,e=>e.wrapper.eq(n.wrapper)))?void 0:e.dom);t.append(r),t=r}}return t}blockPosCovered(){let e=this.lastBlock;return null!=e&&!e.breakAfter&&(!e.isWidget()||(160&e.flags)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(_q,void 0,1);return n&&(n.flags=t),n||new _q(t)}flushBuffer(){this.afterWidget&&!(32&this.afterWidget.flags)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class _Q{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error("Ran out of text content when drawing inline views");this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}}let _Z=[_G,_H,_U,_W,_q,_V,_F];for(let e=0;e<_Z.length;e++)_Z[e].bucket=e;class _J{constructor(e){this.view=e,this.buckets=_Z.map(()=>[]),this.index=_Z.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],o=this.index[r];for(let e=0;e<i.length;e++){let s=(e+o)%i.length,a=i[s];if((!t||t(a))&&!this.reused.has(a))return i.splice(s,1),s<o&&this.index[r]--,this.reused.set(a,n),a}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,o=0;;i++){if(i==r.length){if(o)return null;o=1,i=0}let s=r[i];if(!this.reused.has(s)&&(0==o?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget))){if(r.splice(i,1),i<this.index[0]&&this.index[0]--,s.widget==e&&s.length==t&&(497&s.flags)==n)return this.reused.set(s,1),s;return this.reused.set(s,2),new _G(s.dom,t,e,-498&s.flags|n)}}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class _0{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new _J(e),this.text=new _Q(e.state.doc),this.builder=new _K(this.cache,new _F(e,e.contentDOM),Oz.iter(n)),this.cache.reused.set(t,2),this.old=new _X(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,o=0;;){let s=o<e.length?e[o++]:null,a=s?s.fromA:this.old.root.length;if(a>r){let e=a-r;this.preserve(e,!o,!s),r=a,i+=e}if(!s)break;t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA?(this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB)):(this.forward(s.fromA,s.toA),this.emit(i,s.toB)),i=s.toB,r=s.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=function(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof _W&&t.push(r.mark)}return t}(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let o=n>0||t<e.length?_G.of(e.widget,this.view,n-t,496&e.flags,this.cache.maybeReuse(e)):this.cache.reuse(e);256&o.flags?(o.flags&=-2,this.builder.addBlockWidget(o)):(this.builder.ensureLine(null),this.builder.addInlineWidget(o,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),t||n!=e.length||this.cache.reused.has(e)?(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)):this.builder.addText(e.text,r,i,this.cache.reuse(e)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof _q)this.cache.add(e);else{if(!(e instanceof _W))return!1;this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length}this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof _W&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&(r.length=i=0):e instanceof _W&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,o=Oz.spans(this.decorations,e,t,{point:(e,t,o,s,a,l)=>{var c,u,h;if(o instanceof TC){if(this.disallowBlockEffectsFor[l]){if(o.block)throw RangeError("Block decorations may not be specified via plugins");if(t>this.view.state.doc.lineAt(e).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(i=s.length,a>s.length)r.continueWidget(t-e);else{let i,l=o.widget||(o.block?_3.block:_3.inline),u=(i=(c=o).isReplace?64*(c.startSide<0)|128*(c.endSide>0):c.startSide>0?32:16,c.block&&(i|=256),i),h=this.cache.findWidget(l,t-e,u)||_G.of(l,this.view,t-e,u);o.block?(o.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(h)):(r.ensureLine(n),r.addInlineWidget(h,s,a))}n=null}else{let e,t;u=n,e=(h=o).spec.attributes,t=h.spec.class,(e||t)&&(u||(u={class:"cm-line"}),e&&Tm(e,u),t&&(u.class+=" "+t)),n=u}t>e&&this.text.skip(t-e)},span:(e,t,o,s)=>{for(let i=e;i<t;){let a=this.text.next(Math.min(512,t-i));null==a?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(a,o,i==e?s:o.length),i+=a.length),n=null}i=o.length}});i>-1&&(this.openWidget=o>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=o}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=_j.get(r);if(r==this.view.contentDOM)break;e instanceof _W?t.push(e):(null==e?void 0:e.isLine())?n=e:e instanceof _V||("DIV"!=r.nodeName||n?n||t.push(_W.of(new TS({tagName:r.nodeName.toLowerCase(),attributes:function(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}(r)}),r)):n=new _H(r,_2))}return n?{line:n,marks:t}:null}}function _1(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}let _2={class:"cm-line"};function _5(e){let t=_j.get(e);return t&&t.setDOM(e.cloneNode()),e}class _3 extends Tb{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}_3.inline=new _3("span"),_3.block=new _3("div");let _4=new class extends Tb{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class _6{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Tw.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new _F(e,e.contentDOM),this.updateInner([new _L(0,0,0,e.state.doc.length)],null)}update(e){var t,n,r,i,o,s,a,l,c;let u,h,d,p=e.changedRanges;this.minWidth>0&&p.length&&(p.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let f=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null==(t=this.domChanged)?void 0:t.newSel)?f=this.domChanged.newSel.head:(n=e.changes,r=this.hasComposition,u=!1,r&&n.iterChangedRanges((e,t)=>{e<r.to&&t>r.from&&(u=!0)}),u||e.selectionSet||(f=e.state.selection.main.head)));let m=f>-1?function(e,t,n){let r=_8(e,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a)||e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc;return{range:new _L(l.mapPos(o),l.mapPos(s),o,s),text:i}}(this.view,e.changes,f):null;if(this.domChanged=null,this.hasComposition){let{from:t,to:n}=this.hasComposition;p=new _L(t,n,e.changes.mapPos(t,-1),e.changes.mapPos(n,1)).addToSet(p.slice())}this.hasComposition=m?{from:m.range.fromB,to:m.range.toB}:null,(Tf.ie||Tf.chrome)&&!m&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let g=this.decorations,v=this.blockWrappers;this.updateDeco();let y=(i=g,o=this.decorations,s=e.changes,h=new _7,Oz.compare(i,o,s,h),h.changes);y.length&&(p=_L.extendWithRanges(p,y));let b=(a=v,l=this.blockWrappers,c=e.changes,d=new Ie,Oz.compare(a,l,c,d),d.changes);return b.length&&(p=_L.extendWithRanges(p,b)),m&&!p.some(e=>e.fromA<=m.range.fromA&&e.toA>=m.range.toA)&&(p=m.range.addToSet(p.slice())),(!(2&this.tile.flags)||0!=p.length)&&(this.updateInner(p,m),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new _0(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&_j.get(t.text)&&r.cache.reused.set(_j.get(t.text),2),this.tile=r.run(e,t),_9(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let r=Tf.chrome||Tf.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof It&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){for(let t of(this.editContextFormatting=this.editContextFormatting.map(e.changes),e.transactions))for(let e of t.effects)e.is(_v)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){var n;(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,o=i==r,s=!o&&!(this.view.state.facet(_b)||r.tabIndex>-1)&&TR(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(o||t||s))return;let a=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c,u;if(l.empty?u=c=this.inlineDOMNearPos(l.anchor,l.assoc||1):(u=this.inlineDOMNearPos(l.head,l.head==l.from?1:-1),c=this.inlineDOMNearPos(l.anchor,l.anchor==l.from?1:-1)),Tf.gecko&&l.empty&&!this.hasComposition&&TT((n=c).node)&&n.node.firstChild&&(0==n.offset||"false"==n.node.childNodes[n.offset-1].contentEditable)&&(n.offset==n.node.childNodes.length||"false"==n.node.childNodes[n.offset].contentEditable)){let e=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=u=new TZ(e,0),a=!0}let h=this.view.observer.selectionRange;!a&&h.focusNode&&(TP(c.node,c.offset,h.anchorNode,h.anchorOffset)&&TP(u.node,u.offset,h.focusNode,h.focusOffset)||this.suppressWidgetCursorChange(h,l))||(this.view.observer.ignore(()=>{Tf.android&&Tf.chrome&&r.contains(h.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(TT(n)&&"false"==n.contentEditable)return!0;return!1}(h.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let e=TI(this.view.root);if(e)if(l.empty){if(Tf.gecko){var t,n;let e=(t=c.node,n=c.offset,TT(t)?(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|2*(n<t.childNodes.length&&"false"==t.childNodes[n].contentEditable):0);if(e&&3!=e){let t=(1==e?TK:TQ)(c.node,c.offset);t&&(c=new TZ(t.node,t.offset))}}e.collapse(c.node,c.offset),null!=l.bidiLevel&&void 0!==e.caretBidiLevel&&(e.caretBidiLevel=l.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(u.node,u.offset)}catch(e){}}else{let t=document.createRange();l.anchor>l.head&&([c,u]=[u,c]),t.setEnd(u.node,u.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}s&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,u)),this.impreciseAnchor=c.precise?null:new TZ(h.anchorNode,h.anchorOffset),this.impreciseHead=u.precise?null:new TZ(h.focusNode,h.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&TP(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=TI(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return 2&this.tile.dom.compareDocumentPosition(e)?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=0==Tj(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!_j.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,o,s=-1,a=!1;return(this.tile.blockTiles((t,l)=>{if(t.isWidget()){if(32&t.flags&&l>=e)return!0;16&t.flags&&(i=!0)}else{let c=l+t.length;if(l<=e&&(n=t,r=e-l,i=c<e),c>=e&&!o&&(o=t,s=e-l,a=l>e),l>e&&o)return!0}}),n||o)?(i&&o?n=null:a&&n&&(o=null),n&&t<0||!o?n.domIn(r,t):o.domIn(s,t)):this.domAtPos(e,t)}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof It?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);return t.isLine()?function e(t,n){if(t.isComposite())for(let r of t.children){if(r.length>=n){let t=e(r,n);if(t)return t}if((n-=r.length)<0)break}else if(t.isText()&&n<t.length){let e=MU(t.text,n);if(e==n)return null;let r=Tq(t.dom,n,e).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}(t,n):null}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==TJ.LTR,l=0,c=(e,u,h)=>{for(let d=0;d<e.children.length&&!(u>r);d++){let r=e.children[d],p=u+r.length,f=r.dom.getBoundingClientRect(),{height:m}=f;if(h&&!d&&(l+=f.top-h.top),r instanceof _V)p>n&&c(r,u,f);else if(u>=n&&(l>0&&t.push(-l),t.push(m+l),l=0,o)){let e=r.dom.lastChild,t=e?TE(e):[];if(t.length){let e=t[t.length-1],n=a?e.right-f.left:f.right-e.left;n>s&&(s=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}h&&d==e.children.length-1&&(l+=h.bottom-f.bottom),u=p+r.breakAfter}};return c(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return"rtl"==getComputedStyle(t.dom).direction?TJ.RTL:TJ.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=TE(r.dom);if(1!=e.length)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement("div"),n,r,i;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=TE(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.view.state.doc.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Tw.replace({widget:new It(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return Tw.set(e)}updateDeco(){let e=1,t=this.view.state.facet(_M).map(t=>(this.dynamicDecorationMap[e++]="function"==typeof t)?t(this.view):t),n=!1,r=this.view.state.facet(_T).map((e,t)=>{let r="function"==typeof e;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(Oz.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(_O).map(e=>"function"==typeof e?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(_f))try{if(t(this.view,e.range,e))return!0}catch(e){_y(this.view.state,e,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=_E(this.view),o={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;if(!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,h=!1;u&&!h;)if(TT(u)){let e,d=u==l.body,p=1,f=1,m=!0,g=!0;if(d)e=function(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}(c);else{let t=getComputedStyle(u);if(/^(fixed|sticky)$/.test(t.position)&&(h=!0),(u.scrollHeight<=u.clientHeight||!/auto|scroll/.test(t.overflowY))&&(g=!1),(u.scrollWidth<=u.clientWidth||!/auto|scroll/.test(t.overflowX))&&(m=!1),!m&&!g){u=u.assignedSlot||u.parentNode;continue}let n=u.getBoundingClientRect();({scaleX:p,scaleY:f}=T$(u,n)),e={left:n.left,right:n.left+u.clientWidth*p,top:n.top,bottom:n.top+u.clientHeight*f}}let v=0,y=0;if(g)if("nearest"==i)t.top<e.top+s?(y=t.top-(e.top+s),n>0&&t.bottom>e.bottom+y&&(y=t.bottom-e.bottom+s)):t.bottom>e.bottom-s&&(y=t.bottom-e.bottom+s,n<0&&t.top-y<e.top&&(y=t.top-(e.top+s)));else{let r=t.bottom-t.top,o=e.bottom-e.top;y=("center"==i&&r<=o?t.top+r/2-o/2:"start"==i||"center"==i&&n<0?t.top-s:t.bottom-o+s)-e.top}if(m&&("nearest"==r?t.left<e.left+o?(v=t.left-(e.left+o),n>0&&t.right>e.right+v&&(v=t.right-e.right+o)):t.right>e.right-o&&(v=t.right-e.right+o,n<0&&t.left<e.left+v&&(v=t.left-(e.left+o))):v=("center"==r?t.left+(t.right-t.left)/2-(e.right-e.left)/2:"start"==r==a?t.left-o:t.right-(e.right-e.left)+o)-e.left),v||y)if(d)c.scrollBy(v,y);else{let e=0,n=0;if(y){let e=u.scrollTop;u.scrollTop+=y/f,n=(u.scrollTop-e)*f}if(v){let t=u.scrollLeft;u.scrollLeft+=v/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&1>Math.abs(e-v)&&(r="nearest"),n&&1>Math.abs(n-y)&&(i="nearest")}if(d)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(11==u.nodeType)u=u.host;else break}(this.view.scrollDOM,o,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==TJ.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=TH(e.dom);e.dom.scrollIntoView({block:"nearest"}),TW(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){_9(this.tile)}}function _9(e,t){let n=null==t?void 0:t.get(e);if(1!=n)for(let r of(null==n&&e.destroy(),e.children))_9(r,t)}function _8(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=TK(n.focusNode,n.focusOffset),i=TQ(n.focusNode,n.focusOffset),o=r||i;if(i&&r&&i.node!=r.node){let t=_j.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)o=i;else if(e.docView.lastCompositionAfterCursor){let e=_j.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(o=i)}}if(e.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=t-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}let _7=class{constructor(){this.changes=[]}compareRange(e,t){TM(e,t,this.changes)}comparePoint(e,t){TM(e,t,this.changes)}boundChange(e){TM(e,e,this.changes)}};class Ie{constructor(){this.changes=[]}compareRange(e,t){TM(e,t,this.changes)}comparePoint(){}boundChange(e){TM(e,e,this.changes)}}class It extends Tb{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function In(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==Tx.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function Ir(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=function(e,t,n,r,i){var o;if(!e.length)return null;let s=r.head-e.from,a;if(r.head==e.from&&r.assoc<0){if(!i)return null;s=t[a=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(i)return null;s=t[a=t.length-1].side(!0,n)}else a=T7.find(t,s,null!=(o=r.bidiLevel)?o:-1,r.assoc);let l=t[a],c=l.side(i,n);if(s==c){let e=a+=i?1:-1;if(e<0||e>=t.length)return null;s=(l=t[a=e]).side(!i,n),c=l.side(i,n)}let u=MU(e.text,s,l.forward(i,n));(u<l.from||u>l.to)&&(u=c),_n=e.text.slice(Math.min(s,u),Math.max(s,u));let h=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];if(u==c){if(!h)return i?M6.cursor(e.to,1):M6.cursor(e.from,-1);if(h.level+ +!i<l.level)return M6.cursor(h.side(!i,n)+e.from,h.forward(i,n)?1:-1,h.level)}return M6.cursor(u+e.from,l.forward(i,n)?-1:1,l.level)}(i,o,s,a,n),c=_n;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=n?M6.cursor(i.from,-1):M6.cursor(i.to,1)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function Ii(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&t<i){let o=r||n||(t-e<i-t?-1:1);t=o<0?e:i,r=o}});if(!r)return t}}function Io(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],o=null;if(i.empty){let t=Ii(e,i.from,0);t!=i.from&&(o=M6.cursor(t,-1))}else{let t=Ii(e,i.from,-1),n=Ii(e,i.to,1);(t!=i.from||n!=i.to)&&(o=i.undirectional?M6.undirectionalRange(i.from,i.to):M6.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}o&&(n||(n=t.ranges.slice()),n[r]=o)}return n?M6.create(n,t.mainIndex):t}function Is(e,t,n){let r=Ii(e.state.facet(__).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:M6.cursor(r,r<n.from?1:-1)}class Ia{constructor(e,t){this.pos=e,this.assoc=t}}function Il(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),o=i.top+e.viewState.paddingTop,{x:s,y:a}=t,l=a-o,c;for(;;){if(l<0)return new Ia(0,1);if(l>e.viewState.docHeight)return new Ia(e.state.doc.length,-1);if(c=e.elementAtHeight(l),null==r)break;if(c.type==Tx.Text){if(r<0?c.to<e.viewport.from:c.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(t&&(r<0?t.top<=l+o:t.bottom>=l+o))break}let t=e.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+t:c.top-t}if(e.viewport.from>=c.to||e.viewport.to<=c.from){if(n)return null;if(c.type==Tx.Text){let t=function(e,t,n,r,i){let o=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+OJ(s,o,e.state.tabSize)}(e,i,c,s,a);return new Ia(t,t==c.from?1:-1)}}if(c.type!=Tx.Text)return l<(c.top+c.bottom)/2?new Ia(c.from,1):new Ia(c.to,-1);let u=e.docView.lineAt(c.from,2);return u&&u.length==c.length||(u=e.docView.lineAt(c.from,-2)),new Ic(e,s,a,e.textDirectionAt(c.from)).scanTile(u,c.from)}class Ic{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[T7.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[T7.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r,i,o=0,s=e.length-1,a=new Set,l=this.bidiIn(e[0],e[s]),c=-1,u=1e9,h;for(;o<s;){let n=s-o,d=o+s>>1;a:if(a.has(d)){for(let e=1;e<n;e++){let t=d+e;if(t>=s&&(t-=n),!a.has(t)){d=t;break a}}break}a.add(d);let p=t(d),f=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(0!=t.width||!(p.length>1))if(t.bottom<this.y)(!r||r.bottom<t.bottom)&&(r=t),f=1;else if(t.top>this.y)(!i||i.top>t.top)&&(i=t),f=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(c=d,u=n,h=t),e&&(f=e<0==(this.baseDir==TJ.LTR)?-1:1)}}-1==f&&(!l||this.baseDirAt(e[d],1))?s=d:1==f&&(!l||this.baseDirAt(e[d+1],-1))&&(o=d+1)}if(!h){if(!i&&!r)return{i:0,after:!1};let n=r&&(!i||this.y-r.bottom<i.top-this.y)?r:i;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:o}=h;if(r&&r.bottom>(n+n+o)/3)return this.y=r.bottom-1,this.scan(e,t,!0);if(i&&i.top<(n+o+o)/3)return this.y=i.top+1,this.scan(e,t,!0)}let d=(l?this.dirAt(e[c],1):this.baseDir)==TJ.LTR;return{i:c,after:this.x>(h.left+h.right)/2==d}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=MU(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,o=n[r+1]-t;return Tq(e.dom,i,o).getClientRects()});return r.after?new Ia(n[r.i+1],-1):new Ia(n[r.i],1)}scanTile(e,t){if(!e.length)return new Ia(t,1);if(1==e.children.length){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return 48&n.flags?null:(TT(n.dom)?n.dom:Tq(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],o=n[r.i];return i.isText()?this.scanText(i,o):i.isComposite()?this.scanTile(i,o):r.after?new Ia(n[r.i+1],-1):new Ia(o,1)}}class Iu{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(OR.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=""}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=_j.get(r),o=r.nextSibling;if(o==t){(null==i?void 0:i.breakAfter)&&!o&&n!=this.view.contentDOM&&this.lineBreak();break}let s=_j.get(o);(i&&s?i.breakAfter:(i?i.breakAfter:TN(r))||TN(o)&&("BR"!=r.nodeName||(null==i?void 0:i.isWidget()))&&this.text.length>e)&&!function(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=_j.get(e);if(!(null==t?void 0:t.isWidget()))return!1;t&&(n||(n=[])).push(t)}if(n)for(let e of n){let t=e.overrideDOMText;if(null==t?void 0:t.length)return!1}return!0}(o,t)&&this.lineBreak(),r=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,o=1,s;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(s=r.exec(t))&&(i=s.index,o=s[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),o>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=o-1);n=i+o}}readNode(e){let t=_j.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else T_(e)?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():TT(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(T_(e)?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(!function(e,t,n){for(;;){if(!t||n<Tj(t))return!1;if(t==e)return!0;n=TL(t)+1,t=t.parentNode}}(e,n.node,n.offset)?0:t))}}class Ih{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class Id{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:o}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=function e(t,n,r,i){if(t.isComposite()){let o=-1,s=-1,a=-1,l=-1;for(let c=0,u=i,h=i;c<t.children.length;c++){let i=t.children[c],d=u+i.length;if(u<n&&d>r)return e(i,n,r,u);if(d>=n&&-1==o&&(o=c,s=u),u>r&&i.dom.parentNode==t.dom){a=c,l=h;break}h=d,u=d+i.breakAfter}return{from:s,to:l<0?i+t.length:l,startDOM:(o?t.children[o-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:a<t.children.length&&a>=0?t.children[a].dom:null}}return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}(e.docView.tile,t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;return n&&(t.push(new Ih(n,r)),(i!=n||o!=r)&&t.push(new Ih(i,o))),t}(e),n=new Iu(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n<0||r<0?null:n==r?M6.create([M6.cursor(r+t,-1)]):M6.single(n+t,r+t)}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!TD(e.contentDOM,t.focusNode)?s.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!TD(e.contentDOM,t.anchorNode)?s.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),a=e.viewport;if((Tf.ios||Tf.chrome)&&n!=r&&Math.min(n,r)<=s.main.from&&Math.max(n,r)>=s.main.to&&(a.from>0||a.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),o=a.from-t,s=a.to-i;(0==o||1==o||0==t)&&(0==s||-1==s||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(M6.range(r,n));else if(e.lineWrapping&&r==n&&!(s.main.empty&&s.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=M6.create([M6.cursor(n,r)])}else this.newSel=M6.single(r,n)}}}function Ip(e,t){let n,{newSel:r}=t,{state:i}=e,o=i.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,a=o.from,l=null;(8===s||Tf.android&&t.text.length<r-e)&&(a=o.to,l="end");let c=i.doc.sliceString(e,r,""),u,h;!o.empty&&o.from>=e&&o.to<=r&&(t.typeOver||c!=t.text)&&c.slice(0,o.from-e)==t.text.slice(0,o.from-e)&&c.slice(o.to-e)==t.text.slice(u=t.text.length-(c.length-(o.to-e)))?n={from:o.from,to:o.to,insert:MN.of(t.text.slice(o.from-e,u).split(""))}:(h=Im(c,t.text,a-e,l))&&(Tf.chrome&&13==s&&h.toB==h.from+2&&""==t.text.slice(h.from,h.toB)&&h.toB--,n={from:e+h.from,to:e+h.toA,insert:MN.of(t.text.slice(h.from,h.toB).split(""))})}else r&&(!e.hasFocus&&i.facet(_b)||Ig(r,o))&&(r=null);if(!n&&!r)return!1;if((Tf.mac||Tf.android)&&n&&n.from==n.to&&n.from==o.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=M6.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:MN.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(o.from).to<o.to&&e.docView.lineHasWidget(o.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:o.from,to:o.to,insert:i.toText(e.inputState.insertingText)}:Tf.chrome&&n&&n.from==n.to&&n.from==o.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=M6.single(r.main.anchor-1,r.main.head-1)),n={from:o.from,to:o.to,insert:MN.of([" "])}),n)return If(e,n,r,s);if(!r||Ig(r,o))return!1;{let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),"select.pointer"==(n=e.inputState.lastSelectionOrigin)&&(r=Io(i.facet(__).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}}function If(e,t,n,r=-1){let i;if(Tf.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(Tf.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&" "==e.state.sliceDoc(t.from,o.from))&&1==t.insert.length&&2==t.insert.lines&&TX(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&0==t.insert.length||8==r&&t.insert.length<t.to-t.from&&t.to>o.head)&&TX(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&0==t.insert.length&&TX(e.contentDOM,"Delete",46)))return!0;let s=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>i||(i=function(e,t,n){let r,i=e.state,o=i.selection.main,s=-1;if(t.from==t.to&&t.from<o.from||t.from>o.to){let n=t.from<o.from?-1:1,r=n<0?o.from:o.to,a=Ii(i.facet(__).map(t=>t(e)),r,n);t.from==a&&(s=a)}if(s>-1)r={changes:t,selection:M6.cursor(t.from+t.insert.length,-1)};else if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.from<t.from?i.sliceDoc(o.from,t.from):"",s=o.to>t.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=i.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=o.to+10&&t.to>=o.to-10){let l=e.state.sliceDoc(t.from,t.to),c,u=n&&_8(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);c={from:u.from,to:u.to-e}}else c=e.state.doc.lineAt(o.head);let h=o.to-t.to;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let r=n.to-h,u=r-l.length;if(e.state.sliceDoc(u,r)!=l||r>=c.from&&u<=c.to)return{range:n};let d=i.changes({from:u,to:r,insert:t.insert}),p=n.to-o.to;return{changes:d,range:a?M6.range(Math.max(0,a.anchor+p),Math.max(0,a.head+p)):n.map(d)}})}else r={changes:s,selection:a&&i.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}(e,t,n));return e.state.facet(_l).some(n=>n(e,t.from,t.to,s,a))||e.dispatch(a()),!0}function Im(e,t,n,r){let i=Math.min(e.length,t.length),o=0;for(;o<i&&e.charCodeAt(o)==t.charCodeAt(o);)o++;if(o==i&&e.length==t.length)return null;let s=e.length,a=t.length;for(;s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s<o&&e.length<t.length){let e=n<=o&&n>=s?o-n:0;o-=e,a=o+(a-s),s=o}else if(a<o){let e=n<=o&&n>=a?o-n:0;o-=e,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}function Ig(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class Iv{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){var t;this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Tf.safari&&e.contentDOM.addEventListener("input",()=>null),Tf.gecko&&(t=e.contentDOM.ownerDocument,I$.has(t)||(I$.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){!function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(r=_j.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}(this.view,e)||this.ignoreDuringComposition(e)||"keydown"==e.type&&this.keydown(e)||(0!=this.view.updateState?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(Iy(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(Iy(t.value,r))}}for(let e in IC)n(e).handlers.push(IC[e]);for(let e in Ik)n(e).observers.push(Ik[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&i!=!o.handlers.length&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=e.keyCode&&0>Iw.indexOf(e.keyCode)&&(this.tabFocusMode=-1),Tf.android&&Tf.chrome&&!e.synthetic&&(13==e.keyCode||8==e.keyCode))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(Tf.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(Ib.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||Ix.indexOf(e.key)>-1&&e.ctrlKey)){var t;let n={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};n.shiftKey&&Tf.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&(t=this.view.win).visualViewport&&t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85&&(n.shiftKey=!1);let r=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:n};return setTimeout(()=>{this.pendingIOSKey==r&&this.flushIOSKey()},50),!0}return 229!=e.keyCode&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!(!t||this.view.observer.pendingRecords().length||"Enter"==t.key&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))&&(this.pendingIOSKey=void 0,TX(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&!e.synthetic&&(this.composing>0||!!(Tf.safari&&!Tf.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Iy(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){_y(n.state,e)}}}let Ib=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Ix="dthko",Iw=[16,17,18,20,91,92,224,225];function IS(e){return .7*Math.max(0,e)+8}class IA{constructor(e,t,n,r){var i,o;let s;this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=TF(e.contentDOM),this.atoms=e.state.facet(__).map(t=>t(e));let a=e.contentDOM.ownerDocument;a.addEventListener("mousemove",this.move=this.move.bind(this)),a.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(OR.allowMultipleSelections)&&(i=e,o=t,(s=i.state.facet(_r)).length?s[0](o):Tf.mac?o.metaKey:o.ctrlKey),this.dragging=!!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=TI(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)&&1==IP(t)&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&10>(t=this.startEvent,Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))))return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,s=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:s}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:a}=this.scrollParents.y.getBoundingClientRect());let l=_E(this.view);e.clientX-l.left<=i+6?n=-IS(i-e.clientX):e.clientX+l.right>=s-6&&(n=IS(e.clientX-s)),e.clientY-l.top<=o+6?r=-IS(o-e.clientY):e.clientY+l.bottom>=a-6&&(r=IS(e.clientY-a)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),!1===this.dragging&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Io(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,!1===this.dragging))&&this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}let IC=Object.create(null),Ik=Object.create(null),IM=Tf.ie&&Tf.ie_version<15||Tf.ios&&Tf.webkit_version<604;function IO(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function IT(e,t){t=IO(e.state,_u,t);let{state:n}=e,r,i=1,o=n.toText(t),s=o.lines==n.selection.ranges.length;if(null!=IN&&n.selection.ranges.every(e=>e.empty)&&IN==o.toString()){let e=-1;r=n.changeByRange(r=>{let a=n.doc.lineAt(r.from);if(a.from==e)return{range:r};e=a.from;let l=n.toText((s?o.line(i++).text:t)+n.lineBreak);return{changes:{from:a.from,insert:l},range:M6.cursor(r.from+l.length,-1)}})}else r=s?n.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:M6.cursor(e.from+t.length,-1)}}):n.replaceSelection(o);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}function I_(e,t,n,r){if(1==r)return M6.cursor(t,n);{if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return M6.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=MU(i.text,o,!1):a=MU(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=MU(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a<i.length;){let e=MU(i.text,a);if(r(i.text.slice(a,e))!=l)break;a=e}return M6.undirectionalRange(s+i.from,a+i.from)}(e.state,t,n);let i=e.docView.lineAt(t,n),o=e.state.doc.lineAt(i?i.posAtEnd:t),s=i?i.posAtStart:o.from,a=i?i.posAtEnd:o.to;return a<e.state.doc.length&&a==o.to&&a++,M6.undirectionalRange(s,a)}}Ik.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,Tf.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},Ik.wheel=Ik.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},IC.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&0!=e.inputState.tabFocusMode&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),Ik.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")},Ik.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},Ik.touchend=(e,t)=>{e.inputState.touchActive=!1},IC.mousedown=(e,t)=>{var n,r;let i,o,s;if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let a=null;for(let n of e.state.facet(_o))if(a=n(e,t))break;if(a||0!=t.button||(n=e,r=t,i=n.posAndSideAtCoords({x:r.clientX,y:r.clientY},!1),o=IP(r),s=n.state.selection,a={update(e){e.docChanged&&(i.pos=e.changes.mapPos(i.pos),s=s.map(e.changes))},get(e,t,r){let a=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),l,c=I_(n,a.pos,a.assoc,o);if(i.pos!=a.pos&&!t){let e=I_(n,i.pos,i.assoc,o),t=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=t<c.from?M6.range(t,r,c.assoc):M6.range(r,t,c.assoc)}return t?s.replaceRange(s.main.extend(c.from,c.to,c.assoc)):r&&1==o&&s.ranges.length>1&&(l=function(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return M6.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n))}return null}(s,a.pos))?l:r?s.addRange(c):M6.create([c])}}),a){let n=!e.hasFocus;e.inputState.startMouseSelection(new IA(e,t,a,n)),n&&e.observer.ignore(()=>{TG(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let r=e.inputState.mouseSelection;if(r)return r.start(t),!1===r.dragging}else e.inputState.setSelectionOrigin("select.pointer");return!1};let II=Tf.ie&&Tf.ie_version<=11,ID=null,IR=0,IE=0;function IP(e){if(!II)return e.detail;let t=ID,n=IE;return ID=e,IE=Date.now(),IR=!t||n>Date.now()-400&&2>Math.abs(t.clientX-e.clientX)&&2>Math.abs(t.clientY-e.clientY)?(IR+1)%3:1}function IL(e,t,n,r){let i;if(!(n=IO(e.state,_u,n)))return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:s}=e.inputState,a=r&&s&&((i=e.state.facet(_i)).length?i[0](t):Tf.mac?!t.altKey:!t.ctrlKey)?{from:s.from,to:s.to}:null,l={from:o,insert:n},c=e.state.changes(a?[a,l]:l);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(o,-1),head:c.mapPos(o,1)},userEvent:a?"move.drop":"input.drop"}),e.inputState.draggedContent=null}IC.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=M6.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",IO(e.state,_h,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove"),!1},IC.dragend=e=>(e.inputState.draggedContent=null,!1),IC.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&IL(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=o,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return IL(e,t,n,!0),!0}return!1},IC.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=IM?null:t.clipboardData;return n?(IT(e,n.getData("text/plain")||n.getData("text/uri-list")),!0):(!function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),IT(e,n.value)},50)}(e),!1)};let IN=null;IC.copy=IC.cut=(e,t)=>{if(!TR(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:IO(e,_h,t.join(e.lineBreak)),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;IN=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=IM?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(!function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};let IB=Ow.define();function Ij(e,t){let n=[];for(let r of e.facet(_c)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:IB.of(!0)}):null}function Iz(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Ij(e.state,t);n?e.dispatch(n):e.update([])}},10)}Ik.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Iz(e)},Ik.blur=e=>{e.observer.clearSelectionRange(),Iz(e)},Ik.compositionstart=Ik.compositionupdate=(e,t)=>{if(!e.observer.editContext&&(null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0)){let{main:t}=e.state.selection;t.empty||e.lineBlockAt(t.from).from==e.lineBlockAt(t.to).from||e.state.readOnly||e.dispatch({changes:e.state.selection.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to})),userEvent:"input"}),e.inputState.composing=0}},Ik.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,Tf.chrome&&Tf.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},Ik.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},IC.beforeinput=(e,t)=>{var n,r;let i;if(("insertText"==t.inputType||"insertCompositionText"==t.inputType)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),"insertReplacementText"==t.inputType&&e.observer.editContext){let r=null==(n=t.dataTransfer)?void 0:n.getData("text/plain"),i=t.getTargetRanges();if(r&&i.length){let t=i[0],n=e.posAtDOM(t.startContainer,t.startOffset),o=e.posAtDOM(t.endContainer,t.endOffset);return If(e,{from:n,to:o,insert:e.state.toText(r)},null),!0}}if(Tf.chrome&&Tf.android&&(i=Ib.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let t=(null==(r=window.visualViewport)?void 0:r.height)||0;setTimeout(()=>{var n;((null==(n=window.visualViewport)?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return Tf.ios&&"deleteContentForward"==t.inputType&&e.observer.flushSoon(),Tf.safari&&"insertText"==t.inputType&&e.inputState.composing>=0&&setTimeout(()=>Ik.compositionend(e,t),20),!1};let I$=new Set,IF=["pre-wrap","normal","pre-line","break-spaces"],IV=!1;class IH{constructor(e){this.lineWrapping=e,this.doc=MN.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return IF.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(t=!0,this.heightSamples[Math.floor(10*r)]=!0)}return t}refresh(e,t,n,r,i,o){let s=IF.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e<o.length;e++){let t=o[e];t<0?e++:this.heightSamples[Math.floor(10*t)]=!0}}return a}}class IW{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class IU{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?Tx.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof TC?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new IU(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var IG=((XN=IG||(IG={}))[XN.ByPos=0]="ByPos",XN[XN.ByHeight=1]="ByHeight",XN[XN.ByPosNoHeight=2]="ByPosNoHeight",XN);class Iq{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(e){this.flags=2*!!e|-3&this.flags}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>.001&&(IV=!0),this.height=e)}replace(e,t,n){return Iq.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],h=i.lineAt(a,IG.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=l?h:i.lineAt(l,IG.ByPosNoHeight,n,0,0);for(u+=d.to-l,l=d.to;s>0&&h.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a<h.from&&(h=i.lineAt(a,IG.ByPosNoHeight,n,0,0));c+=h.from-a,a=h.from;let p=I1.build(n.setDoc(o),e,c,u);i=IX(i,i.replace(a,l,p))}return i.updateHeight(n,0)}static empty(){return new IQ(0,0,0)}static of(e){if(1==e.length)return e[0];let t=0,n=e.length,r=0,i=0;for(;;)if(t==n)if(r>2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else if(i>2*r){let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}else break;else if(r<i){let n=e[t++];n&&(r+=n.size)}else{let t=e[--n];t&&(i+=t.size)}let o=!1;return null==e[t-1]?(o=!0,t--):null==e[t]&&(o=!0,n++),new IJ(Iq.of(e.slice(0,t)),o,Iq.of(e.slice(n)))}}function IX(e,t){return e==t?e:(e.constructor!=t.constructor&&(IV=!0),t)}Iq.prototype.size=1;let IY=Tw.replace({});class IK extends Iq{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new IU(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new IU(r,0,n,this.spaceAbove,IY):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let o=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(o):o}forEachLine(e,t,n,r,i,o){e<=i+this.length&&t>=i&&o(this.lineAt(0,IG.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class IQ extends IK{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new IU(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof IQ||r instanceof IZ&&4&r.flags)&&10>Math.abs(this.length-r.length)?(r instanceof IZ?r=new IQ(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):Iq.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class IZ extends Iq{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,o,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);o=t/i,this.length>i+1&&(s=(this.height-t)/(this.length-i-1))}else o=this.height/i;return{firstLine:n,lastLine:r,perLine:o,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new IU(o.from,o.length,c,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new IU(a,l,n+s*r,s,0)}}lineAt(e,t,n,r,i){if(t==IG.ByHeight)return this.blockAt(e,n,r,i);if(t==IG.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new IU(t,r-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,h=r+s*u+a*(l.from-i-u);return new IU(l.from,l.length,Math.max(r,Math.min(h,r+this.height-c)),c,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new IU(t.from,t.length,u,r,0)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof IZ?n[n.length-1]=new IZ(e.length+r):n.push(null,new IZ(r-1))}if(e>0){let t=n[0];t instanceof IZ?n[0]=new IZ(e+t.length):n.unshift(new IZ(e-1),null)}return Iq.of(n)}decomposeLeft(e,t){t.push(new IZ(e-1),null)}decomposeRight(e,t){t.push(null,new IZ(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new IZ(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++],a=0;i<0&&(a=-i,i=r.heights[r.index++]),-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let l=new IQ(t,i,a);l.outdated=!1,n.push(l),o+=t+1}o<=i&&n.push(null,new IZ(i-o).updateHeight(e,o));let a=Iq.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(IV=!0),IX(this,a)}return(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class IJ extends Iq{constructor(e,t,n){super(e.length+ +!!t+n.length,e.height+n.height,!!t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let o=r+this.left.height,s=i+this.left.length+this.break,a=t==IG.ByHeight?e<o:e<s,l=a?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==IG.ByPosNoHeight?IG.ByPosNoHeight:IG.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,n,r,i,o),t>=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,IG.ByPos,n,r,i);e<l.from&&this.left.forEachLine(e,Math.min(t,l.from-1),n,r,i,o),l.to>=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(Math.max(e,l.to+1),t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&I0(i,o-1),t<this.length){let e=i.length;this.decomposeRight(t,i),I0(i,e)}return Iq.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&e>=++n&&t.push(null),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?Iq.of(this.break?[e,null,t]:[e,t]):(this.left=IX(this.left,e),this.right=IX(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return(r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a)?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function I0(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof IZ&&(r=e[t+1])instanceof IZ&&e.splice(t-1,3,new IZ(n.length+1+r.length))}class I1{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof IQ?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new IQ(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=t-e;n.block?this.addBlock(new IK(o,r,n)):(o||i||r>=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new IQ(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new IZ(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof IQ)return e;let t=new IQ(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof IQ||this.isCovered?(this.writtenTo<this.pos||null==t)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new IQ(0,-1,0));let n=e;for(let e of this.nodes)e instanceof IQ&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(e,t,n,r){let i=new I1(n,e);return Oz.spans(t,n,r,i,0),i.finish(n)}}class I2{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&TM(e,t,this.changes,5)}}class I5{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Tw.replace({widget:new I3(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class I3 extends Tb{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class I4{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=I7,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=TJ.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(_k).some(e=>"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new IH(n),this.stateDeco=De(t),this.heightMap=Iq.empty().applyChanges(this.stateDeco,MN.empty,this.heightOracle.setDoc(t.doc),[new _L(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Tw.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new I6(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?I7:Dt.get(this.heightOracle,this.heightMap,this.viewports),2*!e.eq(this.scaler)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Dn(e,this.scaler))})}update(e,t=null){var n,r;let i;this.state=e.state;let o=this.stateDeco;this.stateDeco=De(this.state);let s=e.changedRanges,a=_L.extendWithRanges(s,(n=this.stateDeco,r=e?e.changes:MZ.empty(this.state.doc.length),i=new I2,Oz.compare(o,n,r,i,0),i.changes)),l=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);IV=!1,this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=l||IV)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=l);let u=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<u.from||t.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,t));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(h||!e.changes.empty||2&e.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(_p)&&(this.mustEnforceCursorAssoc=!0)}measure(){var e;let t,n,{view:r}=this,i=r.contentDOM,o=window.getComputedStyle(i),s=this.heightOracle,a=o.whiteSpace;this.defaultTextDirection="rtl"==o.direction?TJ.RTL:TJ.LTR;let l=this.heightOracle.mustRefreshForWrapping(a)||"refresh"===this.mustMeasureContent,c=i.getBoundingClientRect(),u=l||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let h=0,d=0;if(c.width&&c.height){let{scaleX:e,scaleY:t}=T$(i,c);(e>.005&&Math.abs(this.scaleX-e)>.005||t>.005&&Math.abs(this.scaleY-t)>.005)&&(this.scaleX=e,this.scaleY=t,h|=16,l=u=!0)}let p=(parseInt(o.paddingTop)||0)*this.scaleY,f=(parseInt(o.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=f)&&(this.paddingTop=p,this.paddingBottom=f,h|=18),this.editorWidth!=r.scrollDOM.clientWidth&&(s.lineWrapping&&(u=!0),this.editorWidth=r.scrollDOM.clientWidth,h|=16);let m=TF(this.view.contentDOM,!1).y;m!=this.scrollParent&&(this.scrollParent=m,this.scrollAnchorHeight=-1,this.scrollOffset=0);let g=this.getScrollOffset();this.scrollOffset!=g&&(this.scrollAnchorHeight=-1,this.scrollOffset=g),this.scrolledToBottom=TY(this.scrollParent||r.win);let v=(this.printing?function(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}:function(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,o=Math.max(0,n.left),s=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(TT(t)){let n=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&"visible"!=n.overflow){let n=t.getBoundingClientRect();o=Math.max(o,n.left),s=Math.min(s,n.right),a=Math.max(a,n.top),l=Math.min(t==e.parentNode?i.innerHeight:l,n.bottom)}t="absolute"==n.position||"fixed"==n.position?t.offsetParent:t.parentNode}else if(11==t.nodeType)t=t.host;else break;return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}})(i,this.paddingTop),y=v.top-this.pixelViewport.top,b=v.bottom-this.pixelViewport.bottom;this.pixelViewport=v;let x=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(x!=this.inView&&(this.inView=x,x&&(u=!0)),!this.inView&&!this.scrollTarget&&(t=(e=r.dom).getBoundingClientRect(),n=e.ownerDocument.defaultView||window,!(t.left<n.innerWidth)||!(t.right>0)||!(t.top<n.innerHeight)||!(t.bottom>0)))return 0;let w=c.width;if((this.contentDOMWidth!=w||this.editorHeight!=r.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=r.scrollDOM.clientHeight,h|=16),u){let e=r.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(e)&&(l=!0),l||s.lineWrapping&&Math.abs(w-this.contentDOMWidth)>s.charWidth){let{lineHeight:t,charWidth:n,textHeight:i}=r.docView.measureTextSize();(l=t>0&&s.refresh(a,t,n,i,Math.max(5,w/n),e))&&(r.docView.minWidth=0,h|=16)}for(let t of(y>0&&b>0?d=Math.max(y,b):y<0&&b<0&&(d=Math.min(y,b)),IV=!1,this.viewports)){let n=t.from==this.viewport.from?e:r.docView.measureVisibleLineHeights(t);this.heightMap=(l?Iq.empty().applyChanges(this.stateDeco,MN.empty,this.heightOracle,[new _L(0,0,0,r.state.doc.length)]):this.heightMap).updateHeight(s,0,l,new IW(t.from,n))}IV&&(h|=2)}let S=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return S&&(2&h&&(h|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),h|=this.updateForViewport()),(2&h||S)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(l?[]:this.lineGaps,r)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,r.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new I6(r.lineAt(o-1e3*n,IG.ByHeight,i,0,0).from,r.lineAt(s+(1-n)*1e3,IG.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<a.from||e>a.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=r.lineAt(e,IG.ByPos,i,0,0),s;s="center"==t.y?(o.top+o.bottom)/2-n/2:"start"==t.y||"nearest"==t.y&&e<a.from?o.top:o.bottom-n,a=new I6(r.lineAt(s-500,IG.ByHeight,i,0,0).from,r.lineAt(s+n+500,IG.ByHeight,i,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new I6(this.heightMap.lineAt(n,IG.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,IG.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,IG.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,IG.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==e||r<=o-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i<s+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new I5(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,o=r<<1;if(this.defaultTextDirection!=TJ.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-r<i)return;let u=this.state.selection.main,h=[u.from];for(let e of(u.empty||h.push(u.to),h))if(e>r&&e<o){a(r,e-10,l,c),a(e+10,o,l,c);return}let d=function(e,t){for(let n of e)if(t(n))return n}(e,e=>e.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-o)<i&&!h.some(t=>e.from<t&&e.to>t));if(!d){if(o<l.to&&t&&n&&t.visibleRanges.some(e=>e.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(M6.cursor(o),!1,!0).head;e>r&&(o=e)}let e=this.gapSize(l,r,o,c),i=n||e<2e6?e:2e6;d=new I5(r,o,e,i)}s.push(d)},l=t=>{var i,s,l;let c,u,h,d,p;if(t.length<o||t.type!=Tx.Text)return;let f=(i=t.from,s=t.to,l=this.stateDeco,h=[],d=i,p=0,Oz.spans(l,i,s,{span(){},point(e,t){e>d&&(h.push({from:d,to:e}),p+=e-d),d=t}},20),d<s&&(h.push({from:d,to:s}),p+=s-d),{total:p,ranges:h});if(f.total<o)return;let m=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let e,n,i=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=m){let r=I8(f,m),o=((this.visibleBottom-this.visibleTop)/2+i)/t.height;e=r-o,n=r+o}else e=(this.visibleTop-t.top-i)/t.height,n=(this.visibleBottom-t.top+i)/t.height;c=I9(f,e),u=I9(f,n)}else{let n,i,o=f.total*this.heightOracle.charWidth,s=r*this.heightOracle.charWidth,a=0;if(o>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=n.size-n.displaySize);let l=this.pixelViewport.left+a,h=this.pixelViewport.right+a;if(null!=m){let e=I8(f,m),t=((h-l)/2+s)/o;n=e-t,i=e+t}else n=(l-s)/o,i=(h+s)/o;c=I9(f,n),u=I9(f,i)}c>t.from&&a(t.from,c,t,f),u<t.to&&a(u,t.to,t,f)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(l):l(e);return s}gapSize(e,t,n,r){let i=I8(r,n)-I8(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){I5.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Tw.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Oz.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(8&r);t++){let i=this.visibleRanges[t],o=n[t];(i.from!=o.from||i.to!=o.to)&&(r|=4,e&&e.mapPos(i.from,-1)==o.from&&e.mapPos(i.to,1)==o.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Dn(this.heightMap.lineAt(e,IG.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Dn(this.heightMap.lineAt(this.scaler.fromDOM(e),IG.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+12-this.paddingTop);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Dn(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class I6{constructor(e,t){this.from=e,this.to=t}}function I9({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function I8(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}let I7={toDOM:e=>e,fromDOM:e=>e,scale:1,eq(e){return e==this}};function De(e){let t=e.facet(_M).filter(e=>"function"!=typeof e),n=e.facet(_T).filter(e=>"function"!=typeof e);return n.length&&t.push(Oz.join(n)),t}class Dt{constructor(e,t){this.scale=e,this.viewports=t}static get(e,t,n){let r=0,i=0,o=0,s=n.map(({from:n,to:i})=>{let o=t.lineAt(n,IG.ByPos,e,0,0).top,s=t.lineAt(i,IG.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}});if(t.height-r<10)return I7;let a=(7e6-r)/(t.height-r);for(let e of s)e.domTop=o+(e.top-i)*a,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom;return new Dt(a,s)}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(e){return e instanceof Dt&&this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function Dn(e,t){if(1==t.scale)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new IU(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>Dn(e,t)):e._content)}let Dr=M7.define({combine:e=>e.join(" ")}),Di=M7.define({combine:e=>e.indexOf(!0)>-1}),Do=O5.newName(),Ds=O5.newName(),Da=O5.newName(),Dl={"&light":"."+Ds,"&dark":"."+Da};function Dc(e,t,n){return new O5(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+" "+t})}let Du=Dc("."+Do,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"baseline",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Dl),Dh={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Dd=Tf.ie&&Tf.ie_version<=11;class Dp{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new TV,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(Tf.ie&&Tf.ie_version<=11||Tf.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Tf.android&&!1!==e.constructor.EDIT_CONTEXT&&!(Tf.chrome&&Tf.chrome_version<126)&&(this.editContext=new Dg(e),e.state.facet(_b)&&(e.contentDOM.editContext=this.editContext.editContext)),Dd&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null==(e=this.view.docView)?void 0:e.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(this.pendingRecords().length>0),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){("change"!=e.type&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){for(let t of(this.gapIntersection.disconnect(),e))this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(_b)?n.root.activeElement!=this.dom:!TR(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Tf.ie&&Tf.ie_version<=11||Tf.android&&Tf.chrome)&&!n.state.selection.main.empty&&r.focusNode&&TP(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=TI(e.root);if(!t)return!1;let n=Tf.safari&&11==e.root.nodeType&&e.root.activeElement==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Dm(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?Dm(e,n):null}(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=TR(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&function(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Tj(n));;)if(r){if(!TT(n))return!1;let e=n.childNodes[r-1];"false"==e.contentEditable?r--:r=Tj(n=e)}else{if(n==e)return!0;r=TL(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(TT(n))!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(11==n.nodeType)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Dh),Dd&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Dd&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&TX(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(null==(n=this.delayedAndroidKey)?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&TR(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Id(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.selectionChanged,n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=Ip(this.view,n);return this.view.state==r&&(n.domChanged||t)&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty("attributes"==e.type),"childList"==e.type){let n=Df(t,e.previousSibling||e.target.previousSibling,-1),r=Df(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(_b)!=e.state.facet(_b)&&(e.view.contentDOM.editContext=e.state.facet(_b)?this.editContext.editContext:null))}destroy(){var e,t,n;for(let r of(this.stop(),null==(e=this.intersection)||e.disconnect(),null==(t=this.gapIntersection)||t.disconnect(),null==(n=this.resizeScroll)||n.disconnect(),this.scrollTargets))r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Df(e,t,n){for(;t;){let r=_j.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}function Dm(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.docView.domAtPos(e.state.selection.main.anchor,1);return TP(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}class Dg{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});for(let n in this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:o}=r,s=this.toEditorPos(n.updateRangeStart),a=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1});let l=a-s>n.text.length;s==this.from&&i<this.from?s=i:a==this.to&&i>this.to&&(a=i);let c=Im(e.state.sliceDoc(s,a),n.text,(l?r.from:r.to)-s,l?"end":null);if(!c){let t=M6.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));Ig(t,r)||e.dispatch({selection:t,userEvent:"select"});return}let u={from:c.from+s,to:c.toA+s,insert:MN.of(n.text.slice(c.from,c.toB).split("\n"))};if((Tf.mac||Tf.android)&&u.from==o-1&&/^\. ?$/.test(n.text)&&"off"==e.contentDOM.getAttribute("autocorrect")&&(u={from:s,to:a,insert:MN.of([n.text.replace("."," ")])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);If(e,u,M6.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),o=this.toEditorPos(n.rangeEnd);t<o;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),o=this.toEditorPos(e.rangeEnd);if(i<o){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+" ":"Dashed"==t?"dashed ":"Squiggle"==t?"wavy ":""}${/thin/i.test(r)?1:2}px`;n.push(Tw.mark({attributes:{style:e}}).range(i,o))}}}e.dispatch({effects:_v.of(Tw.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}},this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:e=>{let t=TI(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,o,s,a,l)=>{if(n)return;let c=l.length-(o-i);if(r&&o>=r.to)if(r.from==i&&r.to==o&&r.insert.eq(l)){r=this.pendingContextChange=null,t+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(i+=t,(o+=t)<=this.from)this.from+=c,this.to+=c;else if(i<this.to){if(i<this.from||o>this.to||this.to-this.from+l.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(o),l.toString()),this.to+=c}t+=c}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent("input.type")&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):this.applyEdits(e)&&this.rangeIsValid(e.state)?(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state):(this.pendingContextChange=null,this.reset(e.state)),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Dv{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;for(let t of(this.dispatchTransactions=e.dispatchTransactions||n&&(e=>e.forEach(e=>n(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new I4(this,e.state||OR.create(e)),e.scrollTo&&e.scrollTo.is(_g)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(_w).map(e=>new _A(e)),this.plugins))t.update(this);this.observer=new Dp(this),this.inputState=new Iv(this),this.inputState.ensureHandlers(this.plugins),this.docView=new _6(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null==(t=document.fonts)?void 0:t.ready)&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=1==e.length&&e[0]instanceof Ok?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,r,i=this.state;for(let t of e){if(t.startState!=i)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed){this.viewState.state=i;return}let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(IB))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,(a=Ij(i,o))||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),((c=this.observer.readChange())&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(OR.phrases)!=this.state.facet(OR.phrases))return this.setState(i);r=_N.create(this,i,e),r.flags|=s;let u=this.viewState.scrollTarget;try{for(let t of(this.updateState=2,e)){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection,{x:n,y:r}=this.state.facet(Dv.cursorScrollMargin);u=new _m(e.empty?e:M6.cursor(e.head,e.head>e.anchor?-1:1),"nearest","nearest",r,n)}for(let e of t.effects)e.is(_g)&&(u=e.value.clip(this.state))}this.viewState.update(r,u),this.bidiCache=Dx.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(_P)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Dr)!=r.state.facet(Dr)&&(this.viewState.mustMeasureContent=!0),(t||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let e of this.state.facet(_a))try{e(r)}catch(e){_y(this.state,e,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Ip(this,c)&&l.force&&TX(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);for(let t of(this.viewState=new I4(this,e),this.plugins=e.facet(_w).map(e=>new _A(e)),this.pluginMap.clear(),this.plugins))t.update(this);this.docView.destroy(),this.docView=new _6(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(_w),n=e.state.facet(_w);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new _A(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){_y(this.state,e,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:o,scaleY:s}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0){if(TY(n||this.win))i=-1,o=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,o=e.top}s=this.viewState.scaleY}this.updateState=1;let a=this.viewState.measure();if(!a&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&a||([this.measureRequests,l]=[l,this.measureRequests]);let c=l.map(e=>{try{return e.read(this)}catch(e){return _y(this.state,e),Db}}),u=_N.create(this,this.state,[]),h=!1;u.flags|=a,t?t.flags|=a:t=u,this.updateState=2,!u.empty&&(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),(h=this.docView.update(u))&&this.docViewUpdate());for(let e=0;e<l.length;e++)if(c[e]!=Db)try{let t=l[e];t.write&&t.write(c[e],this)}catch(e){_y(this.state,e)}if(h&&this.docView.updateSelection(!0),!u.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-o/s;if((e>1||e<-1)&&!(Tf.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(_a))e(t)}get themeClasses(){return Do+" "+(this.state.facet(Di)?Da:Ds)+" "+this.state.facet(Dr)}updateAttrs(){let e=Dw(this,_C,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(_b)?"true":"false",class:"cm-content",style:`${Tf.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),Dw(this,_k,t);let n=this.observer.ignore(()=>{let n=Ty(this.contentDOM,this.contentAttrs,t),r=Ty(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)e.is(Dv.announce)&&(t&&(this.announceDOM.textContent="",this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=" "},200),t=!1),this.announceDOM.appendChild(document.createElement("div")).textContent=e.value)}mountStyles(){this.styleModules=this.state.facet(_P);let e=this.state.facet(Dv.cspNonce);O5.mount(this.root,this.styleModules.concat(Du).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if((this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e)&&!(this.measureRequests.indexOf(e)>-1)){if(null!=e.key){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(void 0===t||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Is(this,e,Ir(this,e,t,n))}moveByGroup(e,t){return Is(this,e,Ir(this,e,t,t=>{var n;let r,i;return n=e.head,i=(r=this.state.charCategorizer(n))(t),e=>{let t=r(e);return i==OI.Space&&(i=t),i==t}}))}visualLineSide(e,t){return t?M6.cursor(e.to,1):M6.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=In(e,t.head,t.assoc||-1),o=r&&i.type==Tx.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAndSideAtCoords({x:n==(r==TJ.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(s)return M6.cursor(s.pos,s.assoc)}return M6.cursor(n?i.to:i.from,n?1:-1)}(this,e,t,n)}moveVertically(e,t,n){return Is(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return M6.cursor(i,t.assoc);let s=t.goalColumn,a,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(c)null==s&&(s=c.left-l.left),a=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==s&&(s=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),a=(o<0?t.top:t.bottom)+u}let h=l.left+s,d=e.viewState.heightOracle.textHeight>>1,p=null!=r?r:d;for(let t=0;;t+=d){let r=a+(p+t)*o,i=Il(e,{x:h,y:r},!1,o);if(n?r>l.bottom:r<l.top)return M6.cursor(i.pos,i.assoc);let c=e.coordsAtPos(i.pos,i.assoc),u=c?(c.top+c.bottom)/2:0;if(!c||(n?u>a:u<a))return M6.cursor(i.pos,i.assoc,void 0,s)}}(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Il(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Il(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[T7.find(r,e-n.from,-1,t)];return n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&i.dir!=this.textDirectionAt(n.from)&&(e==n.to?(e=n.from+i.from,t=1):(e=n.from+i.to,t=-1)),this.docView.coordsAt(e,t,i.dir==TJ.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(_d)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Dy)return _t(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||function e(t,n){if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++){let i=t[r],o=n[r];if(i.from!=o.from||i.to!=o.to||i.direction!=o.direction||!e(i.inner,o.inner))return!1}return!0}(r.isolates,n=_D(this,e))))return r.order;n||(n=_D(this,e));let r=function(e,t,n){if(!e)return[new T7(0,0,+(t==T1))];if(t==T0&&!n.length&&!T8.test(e))return _t(e.length);if(n.length)for(;e.length>_e.length;)_e[_e.length]=256;let r=[],i=+(t!=T0);return function e(t,n,r,i,o,s,a){let l=n%2?2:1;!function(e,t,n,r,i){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:t,a=o<r.length?r[o].from:n,l=o?256:i;for(let t=s,n=l,r=l;t<a;t++){let i=T9(e.charCodeAt(t));512==i?i=n:8==i&&4==r&&(i=16),_e[t]=4==i?2:i,7&i&&(r=i),n=i}for(let e=s,t=l,r=l;e<a;e++){let i=_e[e];if(128==i)e<a-1&&t==_e[e+1]&&24&t?i=_e[e]=t:_e[e]=256;else if(64==i){let i=e+1;for(;i<a&&64==_e[i];)i++;let o=e&&8==t||i<n&&8==_e[i]?1==r?1:8:256;for(let t=e;t<i;t++)_e[t]=o;e=i-1}else 8==i&&1==r&&(_e[e]=1);t=i,7&i&&(r=i)}}}(t,o,s,i,l),function(e,t,n,r,i){let o=1==i?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:t,u=s<r.length?r[s].from:n;for(let t=c,n,r,s;t<u;t++)if(r=T4[n=e.charCodeAt(t)])if(r<0){for(let e=a-3;e>=0;e-=3)if(T6[e+1]==-r){let n=T6[e+2],r=2&n?i:4&n?1&n?o:i:0;r&&(_e[t]=_e[T6[e]]=r),a=e;break}}else if(189==T6.length)break;else T6[a++]=t,T6[a++]=n,T6[a++]=l;else if(2==(s=_e[t])||1==s){let e=s==i;l=+!e;for(let t=a-3;t>=0;t-=3){let n=T6[t+2];if(2&n)break;if(e)T6[t+2]|=2;else{if(4&n)break;T6[t+2]|=4}}}}}(t,o,s,i,l),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:e,a=i<n.length?n[i].from:t;for(let l=s;l<a;){let s=_e[l];if(256==s){let s=l+1;for(;;)if(s==a){if(i==n.length)break;s=n[i++].to,a=i<n.length?n[i].from:t}else if(256==_e[s])s++;else break;let c=1==o,u=c==((s<t?_e[s]:r)==1)?c?1:2:r;for(let t=s,r=i,o=r?n[r-1].to:e;t>l;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),_e[--t]=u;l=s}else o=s,l++}}}(o,s,i,l),function t(n,r,i,o,s,a,l){let c=o%2?2:1;if(o%2==s%2)for(let u=r,h=0;u<i;){let r=!0,d=!1;if(h==a.length||u<a[h].from){let e=_e[u];e!=c&&(r=!1,d=16==e)}let p=r||1!=c?null:[],f=r?o:o+1,m=u;l:for(;;)if(h<a.length&&m==a[h].from){if(d)break;let t=a[h];if(!r)for(let e=t.to,n=h+1;;){if(e==i)break l;if(n<a.length&&a[n].from==e)e=a[n++].to;else if(_e[e]==c)break l;else break}h++,p?p.push(t):(t.from>u&&l.push(new T7(u,t.from,f)),e(n,t.direction==T0!=!(f%2)?o+1:o,s,t.inner,t.from,t.to,l),u=t.to),m=t.to}else if(m==i||(r?_e[m]!=c:_e[m]==c))break;else m++;p?t(n,u,m,o+1,s,p,l):u<m&&l.push(new T7(u,m,f)),u=m}else for(let u=i,h=a.length;u>r;){let i=!0,d=!1;if(!h||u>a[h-1].to){let e=_e[u-1];e!=c&&(i=!1,d=16==e)}let p=i||1!=c?null:[],f=i?o:o+1,m=u;l:for(;;)if(h&&m==a[h-1].to){if(d)break;let t=a[--h];if(!i)for(let e=t.from,n=h;;){if(e==r)break l;if(n&&a[n-1].to==e)e=a[--n].from;else if(_e[e-1]==c)break l;else break}p?p.push(t):(t.to<u&&l.push(new T7(t.to,u,f)),e(n,t.direction==T0!=!(f%2)?o+1:o,s,t.inner,t.from,t.to,l),u=t.from),m=t.from}else if(m==r||(i?_e[m-1]!=c:_e[m-1]==c))break;else m--;p?t(n,m,u,o+1,s,p,l):m<u&&l.push(new T7(m,u,f)),u=m}}(t,o,s,n,r,i,a)}(e,i,i,n,0,e.length,r),r}(e.text,t,n);return this.bidiCache.push(new Dx(e.from,e.to,t,n,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Tf.safari&&(null==(e=this.inputState)?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{TG(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of(this.root.activeElement==this.contentDOM&&this.contentDOM.blur(),this.plugins))e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){var n,r,i,o;return _g.of(new _m("number"==typeof e?M6.cursor(e):e,null!=(n=t.y)?n:"nearest",null!=(r=t.x)?r:"nearest",null!=(i=t.yMargin)?i:5,null!=(o=t.xMargin)?o:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return _g.of(new _m(M6.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){null==e?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof e?this.inputState.tabFocusMode=e?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return _S.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return _S.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=O5.newName(),r=[Dr.of(n),_P.of(Dc(`.${n}`,e))];return t&&t.dark&&r.push(Di.of(!0)),r}static baseTheme(e){return Oa.lowest(_P.of(Dc("."+Do,e,Dl)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&_j.get(n)||_j.get(e);return(null==(t=null==r?void 0:r.root)?void 0:t.view)||null}}Dv.styleModule=_P,Dv.inputHandler=_l,Dv.clipboardInputFilter=_u,Dv.clipboardOutputFilter=_h,Dv.scrollHandler=_f,Dv.focusChangeEffect=_c,Dv.perLineTextDirection=_d,Dv.exceptionSink=_s,Dv.updateListener=_a,Dv.editable=_b,Dv.mouseSelectionStyle=_o,Dv.dragMovesSelection=_i,Dv.clickAddsSelectionRange=_r,Dv.decorations=_M,Dv.blockWrappers=_O,Dv.outerDecorations=_T,Dv.atomicRanges=__,Dv.bidiIsolatedRanges=_I,Dv.cursorScrollMargin=M7.define({combine:e=>{let t=5,n=5;for(let r of e)"number"==typeof r?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),Dv.scrollMargins=_R,Dv.darkTheme=Di,Dv.cspNonce=M7.define({combine:e=>e.length?e[0]:""}),Dv.contentAttributes=_k,Dv.editorAttributes=_C,Dv.lineWrapping=Dv.contentAttributes.of({class:"cm-lineWrapping"}),Dv.announce=OC.define();let Dy=4096,Db={};class Dx{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:TJ.LTR;for(let i=Math.max(0,e.length-10);i<e.length;i++){let o=e[i];o.dir!=r||t.touchesRange(o.from,o.to)||n.push(new Dx(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return n}}function Dw(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&Tm(o,n)}return n}let DS=Tf.mac?"mac":Tf.windows?"win":Tf.linux?"linux":"key";function DA(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}let DC=Oa.default(Dv.domEventHandlers({keydown:(e,t)=>DI(DO(t.state),e,t,"editor")})),Dk=M7.define({enables:DC}),DM=new WeakMap;function DO(e){let t=e.facet(Dk),n=DM.get(t);return n||DM.set(t,n=function(e,t=DS){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),h=r.split(/ (?!$)/).map(e=>(function(e,t){let n,r,i,o,s=e.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(let e=0;e<s.length-1;++e){let a=s[e];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))"mac"==t?o=!0:r=!0;else throw Error("Unrecognized modifier name: "+a)}return n&&(a="Alt-"+a),r&&(a="Ctrl-"+a),o&&(a="Meta-"+a),i&&(a="Shift-"+a),a})(e,t));for(let t=1;t<h.length;t++){let n=h.slice(0,t).join(" ");i(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=DT={view:t,prefix:n,scope:e};return setTimeout(()=>{DT==r&&(DT=null)},4e3),!0}]})}let d=h.join(" ");i(d,!1);let p=u[d]||(u[d]={preventDefault:!1,stopPropagation:!1,run:(null==(c=null==(l=u._any)?void 0:l.run)?void 0:c.slice())||[]});o&&p.run.push(o),s&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,D_))}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let DT=null,D_=null;function DI(e,t,n,r){var i;D_=t;let o=("Esc"==(i=!(O8&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||O7&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?O9:O6)[t.keyCode]||t.key||"Unidentified")&&(i="Escape"),"Del"==i&&(i="Delete"),"Left"==i&&(i="ArrowLeft"),"Up"==i&&(i="ArrowUp"),"Right"==i&&(i="ArrowRight"),"Down"==i&&(i="ArrowDown"),i),s=MX(MG(o,0))==o.length&&" "!=o,a="",l=!1,c=!1,u=!1;DT&&DT.view==n&&DT.scope==r&&(a=DT.prefix+" ",0>Iw.indexOf(t.keyCode)&&(c=!0,DT=null));let h=new Set,d=e=>{if(e){for(let t of e.run)if(!h.has(t)&&(h.add(t),t(n)))return e.stopPropagation&&(u=!0),!0;e.preventDefault&&(e.stopPropagation&&(u=!0),c=!0)}return!1},p=e[r],f,m;return p&&(d(p[a+DA(o,t,!s)])?l=!0:s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(Tf.windows&&t.ctrlKey&&t.altKey)&&!(Tf.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(f=O6[t.keyCode])&&f!=o?d(p[a+DA(f,t,!0)])?l=!0:t.shiftKey&&(m=O9[t.keyCode])!=o&&m!=f&&d(p[a+DA(m,t,!1)])&&(l=!0):s&&t.shiftKey&&d(p[a+DA(o,t,!0)])&&(l=!0),!l&&d(p._any)&&(l=!0)),c&&(l=!0),l&&u&&t.stopPropagation(),D_=null,l}class DD{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(!n.empty)return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==TJ.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=DR(e),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),d=a.right-(u?parseInt(u.paddingRight):0),p=In(e,r,1),f=In(e,i,-1),m=p.type==Tx.Text?p:null,g=f.type==Tx.Text?f:null;if(m&&(e.lineWrapping||p.widgetLineBreaks)&&(m=DE(e,r,1,m)),g&&(e.lineWrapping||f.widgetLineBreaks)&&(g=DE(e,i,-1,g)),m&&g&&m.from==g.from&&m.to==g.to)return y(b(n.from,n.to,m));{let t=m?b(n.from,null,m):x(p,!1),r=g?b(null,n.to,g):x(f,!0),i=[];return(m||p).to<(g||f).from-(m&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(v(h,t.bottom,d,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==Tx.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),y(t).concat(i).concat(y(r))}function v(e,n,r,i){return new DD(t,e-l.left,n-l.top,Math.max(0,r-e),i-n)}function y({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(v(n[i],e,n[i+1],t));return r}function b(t,n,r){let i=1e9,s=-1e9,a=[];function l(t,n,l,c,u){let p=e.coordsAtPos(t,t==r.to?-2:2),f=e.coordsAtPos(l,l==r.from?2:-2);p&&f&&(i=Math.min(p.top,f.top,i),s=Math.max(p.bottom,f.bottom,s),u==TJ.LTR?a.push(o&&n?h:p.left,o&&c?d:f.right):a.push(!o&&c?h:f.left,!o&&n?d:p.right))}let c=null!=t?t:r.from,u=null!=n?n:r.to;for(let r of e.visibleRanges)if(r.to>c&&r.from<u)for(let i=Math.max(r.from,c),o=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let s of e.bidiSpans(r)){let e=s.from+r.from,a=s.to+r.from;if(e>=o)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,o),null==n&&a>=u,s.dir)}if((i=r.to+1)>=o)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:i,bottom:s,horizontal:a}}function x(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n);{let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=DR(e);return[new DD(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}}}function DR(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==TJ.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function DE(e,t,n,r){let i=e.coordsAtPos(t,2*n);if(!i)return r;let o=e.dom.getBoundingClientRect(),s=(i.top+i.bottom)/2,a=e.posAtCoords({x:o.left+1,y:s}),l=e.posAtCoords({x:o.right-1,y:s});return null==a||null==l?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}class DP{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(DL)!=e.state.facet(DL)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){!1!==this.layer.updateOnDocViewUpdate&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(DL);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>{var n;return n=this.drawn[t],!(e.constructor==n.constructor&&e.eq(n))})){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,Tf.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}let DL=M7.define();function DN(e){return[_S.define(t=>new DP(t,e)),DL.of(e)]}let DB=!Tf.ios,Dj=M7.define({combine:e=>OE(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function Dz(e){return e.startState.facet(Dj)!=e.state.facet(Dj)}let D$=DN({above:!0,markers(e){let{state:t}=e,n=t.facet(Dj),r=[];for(let i of t.selection.ranges){let o=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(o&&Tf.ios&&n.iosSelectionHandles)){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:M6.cursor(i.head,i.assoc);for(let i of DD.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=Dz(e);return n&&DF(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){DF(t.state,e)},class:"cm-cursorLayer"});function DF(e,t){t.style.animationDuration=e.facet(Dj).cursorBlinkRate+"ms"}let DV=DN({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let i of r)if(!i.empty&&(DB||i!=n))for(let n of DD.forRange(e,"cm-selectionBackground",i))t.push(n);if(Tf.ios&&!n.empty&&e.state.facet(Dj).iosSelectionHandles){for(let r of DD.forRange(e,"cm-selectionHandle cm-selectionHandle-start",M6.cursor(n.from,1)))t.push(r);for(let r of DD.forRange(e,"cm-selectionHandle cm-selectionHandle-end",M6.cursor(n.to,1)))t.push(r)}return t},update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||Dz(e),class:"cm-selectionLayer"}),DH=Tf.gecko&&153==Tf.gecko_version?"#ffffff01":"transparent",DW=Oa.highest(Dv.theme({".cm-line":{...DB?{"& ::selection, &::selection":{backgroundColor:`${DH} !important`}}:{},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important",...DB?{"&::selection, & ::selection":{backgroundColor:"Highlight !important"}}:{}}}})),DU=OC.define({map:(e,t)=>null==e?null:t.mapPos(e)}),DG=Oo.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(DU)?t.value:e,e))}),Dq=_S.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(DG);null==n?null!=this.cursor&&(null==(t=this.cursor)||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(DG)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:e}=this,t=e.state.field(DG),n=null!=t&&e.coordsAtPos(t);if(!n)return null;let r=e.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+e.scrollDOM.scrollLeft*e.scaleX,top:n.top-r.top+e.scrollDOM.scrollTop*e.scaleY,height:n.bottom-n.top}}drawCursor(e){if(this.cursor){let{scaleX:t,scaleY:n}=this.view;e?(this.cursor.style.left=e.left/t+"px",this.cursor.style.top=e.top/n+"px",this.cursor.style.height=e.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(DG)!=e&&this.view.dispatch({effects:DU.of(e)})}},{eventObservers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function DX(e,t,n,r,i){t.lastIndex=0;for(let o=e.iterRange(n,r),s=n,a;!o.next().done;s+=o.value.length)if(!o.lineBreak)for(;a=t.exec(o.value);)i(s+a.index,a)}class DY{constructor(e){let{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:o=1e3}=e;if(!t.global)throw RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let o=n(e,t,r);o&&i(r,r+e[0].length,o)};else if(n)this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n);else throw RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=i,this.maxLength=o}createDeco(e){let t=new OF,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}(e,this.maxLength))DX(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return(e.docChanged&&e.changes.iterChanges((t,i,o,s)=>{s>=e.view.viewport.from&&o<=e.view.viewport.to&&(n=Math.min(o,n),r=Math.max(s,r))}),e.viewportMoved||r-n>1e3)?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let o=Math.max(i.from,n),s=Math.min(i.to,r);if(s>=o){let n=e.state.doc.lineAt(o),r=n.to<s?e.state.doc.lineAt(s):n,a=Math.max(i.from,n.from),l=Math.min(i.to,r.to);if(this.boundary){for(;o>n.from;o--)if(this.boundary.test(n.text[o-1-n.from])){a=o;break}for(;s<r.to;s++)if(this.boundary.test(r.text[s-r.from])){l=s;break}}let c=[],u,h=(e,t,n)=>c.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(u=this.regexp.exec(n.text))&&u.index<l-n.from;)this.addMatch(u,e,u.index+n.from,h);else DX(e.state.doc,this.regexp,a,l,(t,n)=>this.addMatch(n,e,t,h));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>e<a||t>l,add:c})}}return t}}let DK=null!=/x/.unicode?"gu":"g",DQ=RegExp("[\0-\b\n-\x1f-\u2028\u2029\uFEFF-]",DK),DZ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},DJ=null,D0=M7.define({combine(e){let t=OE(e,{render:null,specialChars:DQ,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==DJ&&"u">typeof document&&document.body){let t=document.body.style;DJ=(null!=(e=t.tabSize)?e:t.MozTabSize)!=null}return DJ||!1}())&&(t.specialChars=RegExp(" |"+t.specialChars.source,DK)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,DK)),t}}),D1=null;class D2 extends Tb{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){var t;let n=(t=this.code)>=32?"•":10==t?"":String.fromCharCode(9216+t),r=e.state.phrase("Control character")+" "+(DZ[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class D5 extends Tb{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}let D3=Tw.line({class:"cm-activeLine"}),D4=_S.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(D3.range(i.from)),t=i.from)}return Tw.set(n)}},{decorations:e=>e.decorations});class D6 extends Tb{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?TE(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=Tz(t[0],"rtl"!=n.direction),i=parseInt(n.lineHeight);return r.bottom-r.top>1.5*i?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}function D9(e,t){var n;let r,i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),o=e.state.doc.lineAt(i),s=i-o.from,a=s>2e3?-1:s==o.length?(n=t.clientX,(r=e.coordsAtPos(e.viewport.from))?Math.round(Math.abs((r.left-n)/e.defaultCharacterWidth)):-1):OZ(o.text,e.state.tabSize,i-o.from);return{line:o.number,col:a,off:s}}let D8={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},D7={style:"cursor: crosshair"},Re="-10000px";class Rt{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let o=[],s=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],a=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(a=e)}if(a<0)o[n]=this.createTooltipView(r,n?o[n-1]:null),s&&(s[n]=!!r.above);else{let r=o[n]=this.tooltipViews[a];s&&(s[n]=t[a]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)0>o.indexOf(e)&&(this.removeTooltipView(e),null==(n=e.destroy)||n.call(e));return t&&(s.forEach((e,n)=>t[n]=e),t.length=s.length),this.input=r,this.tooltips=i,this.tooltipViews=o,!0}}function Rn(e){let t=e.dom.ownerDocument.documentElement,n=t.clientWidth,r=getComputedStyle(t);if(!/stable/.test(r.scrollbarGutter||""))return{left:0,right:n};let i=t.getBoundingClientRect(),o=e.win.scrollX;return{left:Math.max(0,i.left+o-parseFloat(r.marginLeft)),right:Math.min(n,i.right+o+parseFloat(r.marginRight))}}function Rr(e){let{left:t,right:n}=Rn(e);return{top:0,left:t,right:n,bottom:e.dom.ownerDocument.documentElement.clientHeight}}let Ri=M7.define({combine:e=>{var t,n,r;return{position:Tf.ios?"absolute":(null==(t=e.find(e=>e.position))?void 0:t.position)||"fixed",parent:(null==(n=e.find(e=>e.parent))?void 0:n.parent)||null,tooltipSpace:(null==(r=e.find(e=>e.tooltipSpace))?void 0:r.tooltipSpace)||Rr}}}),Ro=new WeakMap,Rs=_S.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(Ri);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Rt(e,Ru,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver)for(let e of(this.intersectionObserver.disconnect(),this.manager.tooltipViews))this.intersectionObserver.observe(e.dom)}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(Ri);if(r.position!=this.position&&!this.madeAbsolute){for(let e of(this.position=r.position,this.manager.tooltipViews))e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){for(let e of(this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer(),this.manager.tooltipViews))this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=Re,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;for(let t of(this.view.win.removeEventListener("resize",this.measureSoon),this.manager.tooltipViews))t.dom.remove(),null==(e=t.destroy)||e.call(t);this.parent&&this.container.remove(),null==(t=this.resizeObserver)||t.disconnect(),null==(n=this.intersectionObserver)||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1,r=0;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(Tf.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState);else r=Rn(this.view).left;let i=this.view.scrollDOM.getBoundingClientRect(),o=_E(this.view);return{visible:{left:i.left+o.left,top:i.top+o.top,right:i.right-o.right,bottom:i.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(Ri).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n,fixedLeft:r}}writeMeasure(e){var t;if(e.makeAbsolute)for(let e of(this.madeAbsolute=!0,this.position="absolute",this.manager.tooltipViews))e.dom.style.position="absolute";let{visible:n,space:r,scaleX:i,scaleY:o}=e,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,h=e.pos[a],d=e.size[a];if(!h||!1!==l.clip&&(h.bottom<=Math.max(n.top,r.top)||h.top>=Math.min(n.bottom,r.bottom)||h.right<Math.max(n.left,r.left)-.1||h.left>Math.min(n.right,r.right)+.1)){u.style.top=Re;continue}let p=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=7*!!p,m=d.right-d.left,g=null!=(t=Ro.get(c))?t:d.bottom-d.top,v=c.offset||Rc,y=this.view.textDirection==TJ.LTR,b=d.width>r.right-r.left?y?r.left:r.right-d.width:y?Math.max(r.left,Math.min(h.left-14*!!p+v.x,r.right-m)):Math.min(Math.max(r.left,h.left-m+14*!!p-v.x),r.right-m),x=this.above[a];!l.strictSide&&(x?h.top-g-f-v.y<r.top:h.bottom+g+f+v.y>r.bottom)&&x==r.bottom-h.bottom>h.top-r.top&&(x=this.above[a]=!x);let w=(x?h.top-r.top:r.bottom-h.bottom)-f;if(w<g&&!1!==c.resize){if(w<this.view.defaultLineHeight){u.style.top=Re;continue}Ro.set(c,g),u.style.height=(g=w)/o+"px"}else u.style.height&&(u.style.height="");let S=x?h.top-g-f-v.y:h.bottom+f+v.y,A=b+m;if(!0!==c.overlap)for(let e of s)e.left<A&&e.right>b&&e.top<S+g&&e.bottom>S&&(S=x?e.top-g-2-f:e.bottom+f+2);if("absolute"==this.position?(u.style.top=(S-e.parent.top)/o+"px",Ra(u,(b-e.parent.left)/i)):(u.style.top=S/o+"px",Ra(u,(b-e.fixedLeft)/i)),p){let e=h.left+(y?v.x:-v.x)-(b+14-7);p.style.left=e/i+"px"}!0!==c.overlap&&s.push({left:b,top:S,right:A,bottom:S+g}),u.classList.toggle("cm-tooltip-above",x),u.classList.toggle("cm-tooltip-below",!x),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView)&&(this.inView=this.view.inView,!this.inView))for(let e of this.manager.tooltipViews)e.dom.style.top=Re}},{eventObservers:{scroll(){this.maybeMeasure()}}});function Ra(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+"px")}let Rl=Dv.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Rc={x:0,y:0},Ru=M7.define({enables:[Rs,Rl]}),Rh=M7.define({combine:e=>e.reduce((e,t)=>e.concat(t),[])});class Rd{static create(e){return new Rd(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Rt(e,Rh,(e,t)=>this.createHostedView(e,t),e=>e.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null==(e=t.destroy)||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let r=n[e];if(void 0!==r){if(void 0===t)t=r;else if(t!==r)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}let Rp=Ru.compute([Rh],e=>{let t=e.facet(Rh);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.map(e=>{var t;return null!=(t=e.end)?t:e.pos})),create:Rd.create,above:t[0].above,arrow:t.some(e=>e.arrow)}}),Rf=M7.define();class Rm{constructor(e,t,n,r,i,o){this.view=e,this.source=t,this.field=n,this.locked=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:t}=this,n=e.docView.tile.nearest(t.target);if(!n)return;let r,i=1;if(n.isWidget())r=n.posAtStart;else{if(null==(r=e.posAtCoords(t)))return;let n=e.coordsAtPos(r);if(!n||t.y<n.top||t.y>n.bottom||t.x<n.left-e.defaultCharacterWidth||t.x>n.right+e.defaultCharacterWidth)return;let o=e.bidiSpans(e.state.doc.lineAt(r)).find(e=>e.from<=r&&e.to>=r),s=o&&o.dir==TJ.RTL?-1:1;i=t.x<n.left?-s:s}this.activateHover(e,r,i)}activateHover(e,t,n,r){let i=this.source(e,t,n),o=t=>{if(t&&!(Array.isArray(t)&&!t.length)){let n=Array.isArray(t)?t:[t];r&&this.locked.set(n,r),e.dispatch({effects:this.setHover.of(n)})}};if(i&&"then"in i){let n=this.pending={pos:t};i.then(e=>{this.pending==n&&(this.pending=null,o(e))},t=>_y(e.state,t,"hover tooltip"))}else o(i)}get tooltip(){let e=this.view.plugin(Rs),t=e?e.manager.tooltips.findIndex(e=>e.create==Rd.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&!this.locked.has(r)&&i&&!function(e,t){let{left:n,right:r,top:i,bottom:o}=e.getBoundingClientRect(),s;if(s=e.querySelector(".cm-tooltip-arrow")){let e=s.getBoundingClientRect();i=Math.min(e.top,i),o=Math.max(e.bottom,o)}return t.clientX>=n-4&&t.clientX<=r+4&&t.clientY>=i-4&&t.clientY<=o+4}(i.dom,e)||this.pending){let{pos:i}=r[0]||this.pending,o=null!=(n=null==(t=r[0])?void 0:t.end)?n:i;(i==o?this.view.posAtCoords(this.lastMove)!=i:!function(e,t,n,r,i){let o=e.scrollDOM.getBoundingClientRect(),s=e.documentTop+e.documentPadding.top+e.contentHeight;if(o.left>r||o.right<r||o.top>i||Math.min(o.bottom,s)<i)return!1;let a=e.posAtCoords({x:r,y:i},!1);return a>=t&&a<=n}(this.view,i,o,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length&&!this.locked.has(t)){let{tooltip:t}=this;t&&t.dom.contains(e.relatedTarget)?this.watchTooltipLeave(t.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t);let{active:r}=this;!r.length||this.locked.has(r)||this.view.dom.contains(n.relatedTarget)||this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Rg(e,t){let n=e.plugin(Rs);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}let Rv=OC.define(),Ry=M7.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function Rb(e,t){let n=e.plugin(Rx),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}let Rx=_S.fromClass(class{constructor(e){this.input=e.state.facet(RA),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(Ry);for(let n of(this.top=new Rw(e,!0,t.topContainer),this.bottom=new Rw(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top)),this.panels))n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(e){let t=e.state.facet(Ry);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new Rw(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new Rw(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(RA);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],o=[],s=[];for(let n of t){let t=this.specs.indexOf(n),a;t<0?(a=n(e.view),s.push(a)):(a=this.panels[t]).update&&a.update(e),r.push(a),(a.top?i:o).push(a)}for(let e of(this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(o),s))e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>Dv.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Rw{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&0>e.indexOf(t)&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=RS(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=RS(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function RS(e){let t=e.nextSibling;return e.remove(),t}let RA=M7.define({enables:Rx}),RC=Oo.define({create:()=>[],update(e,t){for(let n of t.effects)n.is(Rk)?e=[n.value].concat(e):n.is(RM)&&(e=e.filter(e=>e!=n.value));return e},provide:e=>RA.computeN([e],t=>t.field(e))}),Rk=OC.define(),RM=OC.define();class RO extends OP{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}RO.prototype.elementClass="",RO.prototype.toDOM=void 0,RO.prototype.mapMode=MK.TrackBefore,RO.prototype.startSide=RO.prototype.endSide=-1,RO.prototype.point=!0;let RT=M7.define(),R_=M7.define(),RI={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Oz.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},RD=M7.define();function RR(e){return[RP(),RD.of({...RI,...e})]}let RE=M7.define({combine:e=>e.some(e=>e)});function RP(e){let t=[RL];return e&&!1===e.fixed&&t.push(RE.of(!0)),t}let RL=_S.fromClass(class{constructor(e){for(let t of(this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=e.state.facet(RD).map(t=>new Rz(e,t)),this.fixed=!e.state.facet(RE),this.gutters))"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(RE)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Oz.iter(this.view.state.facet(RT),this.view.viewport.from),r=[],i=this.gutters.map(e=>new Rj(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==Tx.Text&&t){for(let e of(RB(n,r,o.from),i))e.line(this.view,o,r);t=!1}else if(o.widget)for(let e of i)e.widget(this.view,o)}else if(e.type==Tx.Text)for(let t of(RB(n,r,e.from),i))t.line(this.view,e,r);else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(RD),n=e.state.facet(RD),r=e.docChanged||e.heightChanged||e.viewportChanged||!Oz.eq(e.startState.facet(RT),e.state.facet(RT),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Rz(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),0>i.indexOf(e)&&e.destroy();for(let e of i)"after"==e.config.side?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Dv.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==TJ.LTR?{left:r,right:i}:{right:r,left:i}})});function RN(e){return Array.isArray(e)?e:[e]}function RB(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class Rj{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Oz.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==r.elements.length){let t=new R$(e,o,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,o,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];RB(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(R_)){let i=n(e,t.widget,t);i&&(r||(r=[])).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class Rz{constructor(e,t){for(let n in this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:""),t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,o;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();o=(e.top+e.bottom)/2}else o=r.clientY;let s=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=RN(t.markers(e)),t.initialSpacer&&(this.spacer=new R$(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=RN(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!Oz.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class R${constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),!function(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}(this.markers,r)&&this.setMarkers(e,r)}setMarkers(e,t){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,o=0;;){let s=o,a=i<t.length?t[i++]:null,l=!1;if(a){let e=a.elementClass;e&&(n+=" "+e);for(let e=o;e<this.markers.length;e++)if(this.markers[e].compare(a)){s=e,l=!0;break}}else s=this.markers.length;for(;o<s;){let e=this.markers[o++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(e),r)),l&&o++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}}let RF=M7.define(),RV=M7.define(),RH=M7.define({combine:e=>OE(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class RW extends RO{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function RU(e,t){return e.state.facet(RH).formatNumber(t,e.state)}let RG=RD.compute([RH],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(RF),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new RW(RU(e,e.state.doc.lineAt(t.from).number)),widgetMarker:(e,t,n)=>{for(let r of e.state.facet(RV)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(RH)!=e.state.facet(RH),initialSpacer:e=>new RW(RU(e,Rq(e.state.doc.lines))),updateSpacer(e,t){let n=RU(t.view,Rq(t.view.state.doc.lines));return n==e.number?e:new RW(n)},domEventHandlers:e.facet(RH).domEventHandlers,side:"before"}));function Rq(e){let t=9;for(;t<e;)t=10*t+9;return t}let RX=new class extends RO{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},RY=RT.compute(["selection"],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(RX.range(i)))}return Oz.of(t)}),RK=new kd,RQ=new kd;class RZ{constructor(e,t,n=[],r=""){this.data=e,this.name=r,OR.prototype.hasOwnProperty("tree")||Object.defineProperty(OR.prototype,"tree",{get(){return R1(this)}}),this.parser=t,this.extension=[Ee.of(this),OR.languageData.of((e,t,n)=>{let r=RJ(e,t,n),i=r.type.prop(RK);if(!i)return[];let o=e.facet(i),s=r.type.prop(RQ);if(s){let i=r.resolve(t-r.from,n);for(let t of s)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(e,t,n=-1){return RJ(e,t,n).type.prop(RK)==this.data}findRegions(e){let t=e.facet(Ee);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(RK)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(kd.mounted);if(i){if(i.tree.prop(RK)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof kb&&r(i,e.positions[n]+t)}};return r(R1(e),0),n}get allowsNesting(){return!0}}function RJ(e,t,n){let r=e.facet(Ee),i=R1(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,XK.ExcludeBuffers|XK.EnterBracketed))e.type.isTop&&(i=e);return i}RZ.setState=OC.define();class R0 extends RZ{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){var t;let n=(t=e.languageData,M7.define({combine:t?e=>e.concat(t):void 0}));return new R0(n,e.parser.configure({props:[RK.add(e=>e.isTop?n:void 0)]}),e.name)}configure(e,t){return new R0(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function R1(e){let t=e.field(RZ.state,!1);return t?t.tree:kb.empty}class R2{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let R5=null;class R3{constructor(e,t,n=[],r,i,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new R3(e,t,[],kb.empty,0,n,[],null)}startParse(){return this.parser.startParse(new R2(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=kb.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(kB.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!=(n=this.parse.stoppedAt)?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(kB.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=R5;R5=this;try{return e()}finally{R5=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=R4(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=kB.applyChanges(n,t),r=kb.empty,i=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length)for(let t of(s=[],this.skipped)){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);n<r&&s.push({from:n,to:r})}}return new R3(this.parser,t,n,r,i,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=R4(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends kj{createParse(t,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let t=R5;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new kb(km.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return R5}}function R4(e,t,n){return kB.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class R6{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new R6(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=R3.create(e.facet(Ee).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new R6(n)}}RZ.state=Oo.define({create:R6.init,update(e,t){for(let e of t.effects)if(e.is(RZ.setState))return e.value;return t.startState.facet(Ee)!=t.state.facet(Ee)?R6.init(t.state):e.apply(t)}});let R9=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"u">typeof requestIdleCallback&&(R9=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let R8="u">typeof navigator&&(null==(XQ=navigator.scheduling)?void 0:XQ.isInputPending)?()=>navigator.scheduling.isInputPending():null,R7=_S.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(RZ.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(RZ.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=R9(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(RZ.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!R8?Math.max(25,e.timeRemaining()-5):1e9),s=i.context.treeLen<r&&n.doc.length>r+1e3,a=i.context.work(()=>R8&&R8()||Date.now()>o,r+1e5*!s);this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:RZ.setState.of(new R6(i.context))})),this.chunkBudget>0&&!(a&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>_y(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Ee=M7.define({combine:e=>e.length?e[0]:null,enables:e=>[RZ.state,R7,Dv.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class Et{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let En=M7.define(),Er=M7.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Ei(e){let t=e.facet(Er);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function Eo(e,t){let n="",r=e.tabSize,i=e.facet(Er)[0];if(" "==i){for(;t>=r;)n+=" ",t-=r;i=" "}for(let e=0;e<t;e++)n+=i;return n}function Es(e,t){for(let n of(e instanceof OR&&(e=new Ea(e)),e.state.facet(En))){let r=n(e,t);if(void 0!==r)return r}let n=R1(e.state);return n.length>=t?function(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Ec(r,e,n)}(e,n,t):null}class Ea{constructor(e,t={}){this.state=e,this.options=t,this.unit=Ei(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;if(null!=r&&r>=n.from&&r<=n.to)if(i&&r==e)return{text:"",from:e};else if(t<0?r<e:r<=e)return{text:n.text.slice(r-n.from),from:r};else return{text:n.text.slice(0,r-n.from),from:n.from};return n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return OZ(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let El=new kd;function Ec(e,t,n){for(let r=e;r;r=r.next){let e=function(e){let t=e.type.prop(El);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(kd.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>Ep(e,!0,1,void 0,n&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?Eu:null}(r.node);if(e)return e(Eh.create(t,n,r))}return 0}function Eu(){return 0}class Eh extends Ea{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new Eh(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Ec(this.context.next,this.base,this.pos)}}function Ed({closing:e,align:t=!0,units:n=1}){return r=>Ep(r,t,n,e)}function Ep(e,t,n,r,i){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=s)return null;let e=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}(e):null;return l?a?e.column(l.from):e.column(l.to):e.baseIndent+(a?0:e.unit*n)}function Ef({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}let Em=M7.define(),Eg=new kd;function Ev(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function Ey(e,t,n){for(let r of e.facet(Em)){let i=r(e,t,n);if(i)return i}return function(e,t,n){let r=R1(e);if(r.length<n)return null;let i=r.resolveStack(n,1),o=null;for(let s=i;s;s=s.next){let i=s.node;if(i.to<=n||i.from>n)continue;if(o&&i.from<t)break;let a=i.type.prop(Eg);if(a&&(i.to<r.length-50||r.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(i))){let r=a(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(o=r)}}return o}(e,t,n)}function Eb(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}let Ex=OC.define({map:Eb}),Ew=OC.define({map:Eb});function ES(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}let EA=Oo.define({create:()=>Tw.none,update(e,t){t.isUserEvent("delete")&&t.changes.iterChangedRanges((t,n)=>e=EC(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(Ex)&&!function(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}(e,r.value.from,r.value.to)?n.push(r.value):r.is(Ew)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(EI),i=n.map(e=>(r?Tw.replace({widget:new EP(r(t.state,e))}):EE).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=EC(e,t.selection.main.head)),e},provide:e=>Dv.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if("number"!=typeof r||"number"!=typeof i)throw RangeError("Invalid JSON for fold state");t.push(EE.range(r,i))}return Tw.set(t,!0)}});function EC(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function Ek(e,t,n){var r;let i=null;return null==(r=e.field(EA,!1))||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function EM(e,t){return e.field(EA,!1)?t:t.concat(OC.appendConfig.of(ED()))}function EO(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return Dv.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}let ET=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of ES(e)){let n=Ey(e.state,t.from,t.to);if(n)return e.dispatch({effects:EM(e.state,[Ex.of(n),EO(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(EA,!1))return!1;let t=[];for(let n of ES(e)){let r=Ek(e.state,n.from,n.to);r&&t.push(Ew.of(r),EO(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),o=Ey(t,i.from,i.to);o&&n.push(Ex.of(o)),r=(o?e.lineBlockAt(o.to):i).to+1}return n.length&&e.dispatch({effects:EM(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field(EA,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(Ew.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],E_={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},EI=M7.define({combine:e=>OE(e,E_)});function ED(e){let t=[EA,EB];return e&&t.push(EI.of(e)),t}function ER(e,t){let{state:n}=e,r=n.facet(EI),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=Ek(e.state,n.from,n.to);r&&e.dispatch({effects:Ew.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}let EE=Tw.replace({widget:new class extends Tb{toDOM(e){return ER(e,null)}}});class EP extends Tb{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return ER(e,this.value)}}let EL={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class EN extends RO{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}let EB=Dv.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Ej{constructor(e,t){let n;function r(e){let t=O5.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;let i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof RZ?e=>e.prop(RK)==o.data:o?e=>e==o:void 0,this.style=Ma(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new O5(n):null,this.themeType=t.themeType}static define(e,t){return new Ej(e,t||{})}}let Ez=M7.define(),E$=M7.define({combine:e=>e.length?[e[0]]:null});function EF(e){let t=e.facet(Ez);return t.length?t:e.facet(E$)}function EV(e,t){let n=[EH],r;return e instanceof Ej&&(e.module&&n.push(Dv.styleModule.of(e.module)),r=e.themeType),(null==t?void 0:t.fallback)?n.push(E$.of(e)):r?n.push(Ez.computeN([Dv.darkTheme],t=>t.facet(Dv.darkTheme)==("dark"==r)?[e]:[])):n.push(Ez.of(e)),n}let EH=Oa.high(_S.fromClass(class{constructor(e){this.markCache=Object.create(null),this.tree=R1(e.state),this.decorations=this.buildDeco(e,EF(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=R1(e.state),n=EF(e.state),r=n!=EF(e.startState),{viewport:i}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&o>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Tw.none;let n=new OF;for(let{from:r,to:i}of e.visibleRanges)!function(e,t,n,r=0,i=e.length){let o=new Ml(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=Tw.mark({class:r})))},r,i);return n.finish()}},{decorations:e=>e.decorations})),EW=Ej.define([{tag:MC.meta,color:"#404740"},{tag:MC.link,textDecoration:"underline"},{tag:MC.heading,textDecoration:"underline",fontWeight:"bold"},{tag:MC.emphasis,fontStyle:"italic"},{tag:MC.strong,fontWeight:"bold"},{tag:MC.strikethrough,textDecoration:"line-through"},{tag:MC.keyword,color:"#708"},{tag:[MC.atom,MC.bool,MC.url,MC.contentSeparator,MC.labelName],color:"#219"},{tag:[MC.literal,MC.inserted],color:"#164"},{tag:[MC.string,MC.deleted],color:"#a11"},{tag:[MC.regexp,MC.escape,MC.special(MC.string)],color:"#e40"},{tag:MC.definition(MC.variableName),color:"#00f"},{tag:MC.local(MC.variableName),color:"#30a"},{tag:[MC.typeName,MC.namespace],color:"#085"},{tag:MC.className,color:"#167"},{tag:[MC.special(MC.variableName),MC.macroName],color:"#256"},{tag:MC.definition(MC.propertyName),color:"#00c"},{tag:MC.comment,color:"#940"},{tag:MC.invalid,color:"#f00"}]),EU=Dv.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),EG="()[]{}",Eq=M7.define({combine:e=>OE(e,{afterCursor:!0,brackets:EG,maxScanDistance:1e4,renderMatch:EK})}),EX=Tw.mark({class:"cm-matchingBracket"}),EY=Tw.mark({class:"cm-nonmatchingBracket"});function EK(e){let t=[],n=e.matched?EX:EY;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function EQ(e){let t=[],n=e.facet(Eq);for(let r of e.selection.ranges){if(!r.empty)continue;let i=E2(e,r.head,-1,n)||r.head>0&&E2(e,r.head-1,1,n)||n.afterCursor&&(E2(e,r.head,1,n)||r.head<e.doc.length&&E2(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return Tw.set(t,!0)}let EZ=[_S.fromClass(class{constructor(e){this.paused=!1,this.decorations=EQ(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=EQ(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),EU],EJ=new kd;function E0(e,t,n){let r=e.prop(t<0?kd.openedBy:kd.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function E1(e){let t=e.type.prop(EJ);return t?t(e.node):e}function E2(e,t,n,r={}){let i=r.maxScanDistance||1e4,o=r.brackets||EG,s=R1(e),a=s.resolveInner(t,n);for(let e=a;e;e=e.parent){let r=E0(e.type,n,o);if(r&&e.from<e.to){let i=E1(e);if(i&&(n>0?t>=i.from&&t<i.to:t>i.from&&t<=i.to))return function(e,t,n,r,i){let o=t.parent,s={from:n.from,to:n.to},a=0,l=null==o?void 0:o.cursor();if(l&&(e<0?l.childBefore(t.from):l.childAfter(t.to)))do if(e<0?l.to<=t.from:l.from>=t.to){if(0==a&&r.indexOf(l.type.name)>-1&&l.from<l.to){let e=E1(l);return{start:s,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(E0(l.type,e,i))a++;else if(E0(l.type,-e,i)){if(0==a){let e=E1(l);return{start:s,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}a--}}while(e<0?l.prevSibling():l.nextSibling())return{start:s,matched:!1}}(n,e,i,r,o)}}return function(e,t,n,r,i,o,s){if(n<0?!t:t==e.doc.length)return null;let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),h=0;for(let e=0;!u.next().done&&e<=o;){let o=u.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0)&&r.resolveInner(a+e,1).type==i)if(t%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};h--}}n>0&&(e+=o.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,i,o)}let E5=Object.create(null),E3=[km.none],E4=[],E6=Object.create(null),E9=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])E9[e]=function(e,t){let n=[];for(let r of t.split(" ")){let t=[];for(let n of r.split(".")){let r=e[n]||MC[n];r?"function"==typeof r?t.length?t=t.map(r):E8(n,`Modifier ${n} used at start of tag`):t.length?E8(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:E8(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),i=r+" "+n.map(e=>e.id),o=E6[i];if(o)return o.id;let s=E6[i]=km.define({id:E3.length,name:r,props:[Mi({[r]:n})]});return E3.push(s),s.id}(E5,t);function E8(e,t){E4.indexOf(e)>-1||(E4.push(e),console.warn(t))}TJ.RTL,TJ.LTR;let E7=R0.define({name:"json",parser:MM.configure({props:[El.add({Object:Ef({except:/^\s*\}/}),Array:Ef({except:/^\s*\]/})}),Eg.add({"Object Array":Ev})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});class Pe{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class Pt{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=n.facet(Pf).markerFilter;r&&(e=r(e,n));let i=e.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new OF,s=[],a=0,l=n.doc.iter(),c=0,u=n.doc.length;for(let e=0;;){let t,n,r=e==i.length?null:i[e];if(!r&&!s.length)break;if(s.length)t=a,n=s.reduce((e,t)=>Math.min(e,t.to),r&&r.from>t?r.from:1e8);else{if((t=r.from)>u)break;n=r.to,s.push(r),e++}for(;e<i.length;){let r=i[e];if(r.from==t&&(r.to>r.from||r.to==t))s.push(r),e++,n=Math.min(r.to,n);else{n=Math.min(r.from,n);break}}n=Math.min(n,u);let h=!1;if(s.some(e=>e.from==t&&(e.to==n||n==u))&&!(h=t==n)&&n-t<10){let e=t-(c+l.value.length);e>0&&(l.next(e),c=t);for(let e=t;;){if(e>=n){h=!0;break}if(!l.lineBreak&&c+l.value.length>e)break;e=c+l.value.length,c+=l.value.length,l.next()}}let d=Pk(s);if(h)o.add(t,t,Tw.widget({widget:new Pb(d),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+" "+t.markClass:e,"");o.add(t,n,Tw.mark({class:"cm-lintRange cm-lintRange-"+d+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>n)}))}if((a=n)==u)break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1)}let h=o.finish();return new Pt(h,t,Pn(h))}}function Pn(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&0>i.diagnostics.indexOf(t)))if(r){if(0>i.diagnostics.indexOf(r.diagnostic))return!1;r=new Pe(r.from,n,r.diagnostic)}else r=new Pe(e,n,t||i.diagnostics[0])}),r}function Pr(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(Pf).hideOn(e,n,r);if(null!=i)return i;let o=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(Po))||e.changes.touchesRange(o.from,Math.max(o.to,r)))}function Pi(e,t){return e.field(Pl,!1)?t:t.concat(OC.appendConfig.of(PE))}let Po=OC.define(),Ps=OC.define(),Pa=OC.define(),Pl=Oo.define({create:()=>new Pt(Tw.none,null,null),update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=Pn(n,e.selected.diagnostic,i)||Pn(n,null,i)}!n.size&&i&&t.state.facet(Pf).autoPanel&&(i=null),e=new Pt(n,i,r)}for(let n of t.effects)if(n.is(Po)){let r=t.state.facet(Pf).autoPanel?n.value.length?Pw.open:null:e.panel;e=Pt.init(n.value,r,t.state)}else n.is(Ps)?e=new Pt(e.diagnostics,n.value?Pw.open:null,e.selected):n.is(Pa)&&(e=new Pt(e.diagnostics,e.panel,n.value));return e},provide:e=>[RA.from(e,e=>e.panel),Dv.decorations.from(e,e=>e.diagnostics)]}),Pc=Tw.mark({class:"cm-lintRange cm-lintRange-active"});function Pu(e,t){return Tn("ul",{class:"cm-tooltip-lint"},t.map(t=>Py(e,t,!1)))}let Ph=e=>{let t=e.state.field(Pl,!1);return!!t&&!!t.panel&&(e.dispatch({effects:Ps.of(!1)}),!0)},Pd=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(Pl,!1);t&&t.panel||e.dispatch({effects:Pi(e.state,[Ps.of(!0)])});let n=Rb(e,Pw.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(Pl,!1);if(!t)return!1;let n=e.state.selection.main,r=Pn(t.diagnostics,null,n.to+1);return(!!r||!!(r=Pn(t.diagnostics,null,0))&&(r.from!=n.from||r.to!=n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!function(e,t,n={}){var r;let i=e.state.facet(Rf).map(t=>e.plugin(t)).filter(e=>!!e);if(n.tooltip&&n.tooltip.active){let e=i.find(e=>e.field==n.tooltip.active);e&&(i=[e])}for(let o of i)o.activateHover(e,t,1,null!=(r=n.until)?r:()=>!1)}(e,r.from,{tooltip:PR,until:e=>e.docChanged||e.newSelection.main.head<r.from||e.newSelection.main.head>r.to}),!0)}}],Pp=_S.fromClass(class{constructor(e){this.view=e,this.timeout=-1,this.set=!0;let{delay:t}=e.state.facet(Pf);this.lintTime=Date.now()+t,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,t)}run(){clearTimeout(this.timeout);let e=Date.now();if(e<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-e);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(Pf);t.length&&function(e,t,n){let r=[],i=-1;for(let o of e)o.then(n=>{r.push(n),clearTimeout(i),r.length==e.length?t(r):i=setTimeout(()=>t(r),200)},n)}(t.map(e=>Promise.resolve(e(this.view))),t=>{var n,r;this.view.state.doc==e.doc&&this.view.dispatch((n=this.view.state,r=t.reduce((e,t)=>e.concat(t)),{effects:Pi(n,[Po.of(r)])}))},e=>{_y(this.view.state,e)})}}update(e){let t=e.state.facet(Pf);(e.docChanged||t!=e.startState.facet(Pf)||t.needsRefresh&&t.needsRefresh(e))&&(this.lintTime=Date.now()+t.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,t.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),Pf=M7.define({combine:e=>({sources:e.map(e=>e.source).filter(e=>null!=e),...OE(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Pm,tooltipFilter:Pm,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})})});function Pm(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function Pg(e,t={}){return[Pf.of({source:e,config:t}),Pp,PE]}function Pv(e){let t=[];if(e)c:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue c}}t.push("")}return t}function Py(e,t,n){var r;let i=n?Pv(t.actions):[];return Tn("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},Tn("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),null==(r=t.actions)?void 0:r.map((n,r)=>{let o=!1,s=r=>{if(r.preventDefault(),o)return;o=!0;let i=Pn(e.state.field(Pl).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),Tn("u",a.slice(l,l+1)),a.slice(l+1)];return Tn("button",{type:"button",class:"cm-diagnosticAction"+(n.markClass?" "+n.markClass:""),onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)}),t.source&&Tn("div",{class:"cm-diagnosticSource"},t.source))}class Pb extends Tb{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Tn("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Px{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(0xffffffff*Math.random()).toString(16),this.dom=Py(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Pw{constructor(e){this.view=e,this.items=[];let t=t=>{if(!t.ctrlKey&&!t.altKey&&!t.metaKey){if(27==t.keyCode)Ph(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65)||!(t.keyCode<=90)||!(this.selectedIndex>=0))return;let{diagnostic:n}=this.items[this.selectedIndex],r=Pv(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=Pn(this.view.state.field(Pl).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}t.preventDefault()}},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=Tn("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:n}),this.dom=Tn("div",{class:"cm-panel-lint"},this.list,Tn("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Ph(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Pl).selected;if(!e)return -1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return -1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Pl),n=0,r=!1,i=null,o=new Set;for(e.between(0,this.view.state.doc.length,(e,s,{spec:a})=>{for(let e of a.diagnostics){if(o.has(e))continue;o.add(e);let s=-1,a;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){s=t;break}s<0?(a=new Px(this.view,e),this.items.splice(n,0,a),r=!0):(a=this.items[s],s>n&&(this.items.splice(n,s-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new Px(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=Pn(this.view.state.field(Pl).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Pa.of(t)})}static open(e){return new Pw(e)}}function PS(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function PA(e){return PS(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}let PC=Dv.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:PA("#f11")},".cm-lintRange-warning":{backgroundImage:PA("orange")},".cm-lintRange-info":{backgroundImage:PA("#999")},".cm-lintRange-hint":{backgroundImage:PA("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function Pk(e){let t="hint",n=1;for(let i of e){var r;let e="error"==(r=i.severity)?4:"warning"==r?3:"info"==r?2:1;e>n&&(n=e,t=i.severity)}return t}class PM extends RO{constructor(e){super(),this.diagnostics=e,this.severity=Pk(e)}toDOM(e){let t=document.createElement("div");t.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=e.state.facet(PP).tooltipFilter;return r&&(n=r(n,e.state)),n.length&&(t.onmouseover=()=>(function(e,t,n){function r(){let r,i=e.elementAtHeight(t.getBoundingClientRect().top+5-e.documentTop);e.coordsAtPos(i.from)&&e.dispatch({effects:P_.of({pos:i.from,above:!1,clip:!1,create:()=>({dom:Pu(e,n),getCoords:()=>t.getBoundingClientRect()})})}),t.onmouseout=t.onmousemove=null,r=n=>{let i=t.getBoundingClientRect();if(!(n.clientX>i.left-10)||!(n.clientX<i.right+10)||!(n.clientY>i.top-10)||!(n.clientY<i.bottom+10)){for(let e=n.target;e;e=e.parentNode)if(1==e.nodeType&&e.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",r),e.state.field(PI)&&e.dispatch({effects:P_.of(null)})}},window.addEventListener("mousemove",r)}let{hoverTime:i}=e.state.facet(PP),o=setTimeout(r,i);t.onmouseout=()=>{clearTimeout(o),t.onmouseout=t.onmousemove=null},t.onmousemove=()=>{clearTimeout(o),o=setTimeout(r,i)}})(e,t,n)),t}}let PO=RR({class:"cm-gutter-lint",markers:e=>e.state.field(PT),widgetMarker:(e,t,n)=>{let r=[];return e.state.field(PT).between(n.from,n.to,(e,t,i)=>{e>n.from&&e<n.to&&r.push(...i.diagnostics)}),r.length?new PM(r):null}}),PT=Oo.define({create:()=>Oz.empty,update(e,t){e=e.map(t.changes);let n=t.state.facet(PP).markerFilter;for(let r of t.effects)if(r.is(Po)){let i=r.value;n&&(i=n(i||[],t.state)),e=function(e,t){let n=Object.create(null);for(let r of t){let t=e.lineAt(r.from);(n[t.from]||(n[t.from]=[])).push(r)}let r=[];for(let e in n)r.push(new PM(n[e]).range(+e));return Oz.of(r,!0)}(t.state.doc,i.slice(0))}return e}}),P_=OC.define(),PI=Oo.define({create:()=>null,update:(e,t)=>(e&&t.docChanged&&(e=Pr(t,e)?null:{...e,pos:t.changes.mapPos(e.pos)}),t.effects.reduce((e,t)=>t.is(P_)?t.value:e,e)),provide:e=>Ru.from(e)}),PD=Dv.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:PS('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:PS('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:PS('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),PR=function(e,t={}){let n=OC.define(),r=new WeakMap,i=Oo.define({create:()=>[],update(e,o){let s=r.get(e);if(e.length&&(t.hideOnChange&&(o.docChanged||o.selection)||s&&s(o)?e=[]:t.hideOn&&(e=e.filter(e=>!t.hideOn(o,e)))),o.docChanged&&e.length){let t=[];for(let n of e){let e=o.changes.mapPos(n.pos,-1,MK.TrackDel);if(null!=e){let r=Object.assign(Object.create(null),n);r.pos=e,null!=r.end&&(r.end=o.changes.mapPos(r.end)),t.push(r)}}e=t}for(let t of o.effects)t.is(n)&&(e=t.value,s=void 0),(t.is(Rv)&&!t.value||t.value==i)&&(e=[]);return e.length&&s&&r.set(e,s),e},provide:e=>Rh.from(e)}),o=_S.define(o=>new Rm(o,e,i,r,n,t.hoverTime||300));return{active:i,extension:[i,o,Rf.of(o),Rp]}}(function(e,t,n){let{diagnostics:r}=e.state.field(Pl),i,o=-1,s=-1;r.between(t-(n<0),t+ +(n>0),(e,r,{spec:a})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=a.diagnostics,o=e,s=r,!1});let a=e.state.facet(Pf).tooltipFilter;return(i&&a&&(i=a(i,e.state)),i)?{pos:o,end:s,above:!0,create:()=>({dom:Pu(e,i)})}:null},{hideOn:Pr}),PE=[Pl,Dv.decorations.compute([Pl],e=>{let{selected:t,panel:n}=e.field(Pl);return t&&n&&t.from!=t.to?Tw.set([Pc.range(t.from,t.to)]):Tw.none}),PR,PC],PP=M7.define({combine:e=>OE(e,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function PL(e={}){return[PP.of(e),PT,PO,PD,PI]}var PN=n("I"),PB=n("rS");function Pj(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}let Pz=Pj(function(e,t,n=t.selection.ranges){let r=[],i=-1;u:for(let{from:e,to:o}of n){let n=r.length,s=1e9,a;for(let n=e;n<=o;){let l=t.doc.lineAt(n);if(void 0==a&&!(a=PV(t,l.from).line))continue u;if(l.from>i&&(e==o||o>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;e<l.text.length&&e<s&&(s=e),r.push({line:l,comment:n,token:a,indent:e,empty:t,single:!1})}n=l.to+1}if(s<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=s);r.length==n+1&&(r[n].single=!0)}if(2!=e&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:s}of r)(s||!o)&&e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null},0),P$=Pj(PH,0),PF=Pj((e,t)=>PH(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function PV(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}function PH(e,t,n=t.selection.ranges){let r=n.map(e=>PV(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>(function(e,{open:t,close:n},r,i){let o,s,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-t.length,h)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=100?o=s=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+50),s=e.sliceDoc(i-50,i));let d=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(s)[0].length,f=s.length-p-n.length;return o.slice(d,d+t.length)==t&&s.slice(f,f+n.length)==n?{open:{pos:r+d+t.length,margin:+!!/\s/.test(o.charAt(d+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(s.charAt(f-1))}}:null})(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:o,close:s}=n;e.push({from:o.pos-i.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+i.close.length})}return{changes:e}}return null}let PW=Ow.define(),PU=Ow.define(),PG=M7.define(),Pq=M7.define({combine:e=>OE(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}),PX=Oo.define({create:()=>P9.empty,update(e,t){let n=t.state.facet(Pq),r=t.annotation(PW);if(r){let i=P0.fromTransaction(t,r.selection),o=r.side,s=0==o?e.undone:e.done;return s=i?P1(s,s.length,n.minDepth,i):P3(s,t.startState.selection),new P9(0==o?r.rest:s,0==o?s:r.rest)}let i=t.annotation(PU);if(("full"==i||"before"==i)&&(e=e.isolate()),!1===t.annotation(Ok.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=P0.fromTransaction(t),s=t.annotation(Ok.time),a=t.annotation(Ok.userEvent);return o?e=e.addChanges(o,s,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay)),("full"==i||"after"==i)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new P9(e.done.map(P0.fromJSON),e.undone.map(P0.fromJSON))});function PY(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(PX,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}let PK=PY(0,!1),PQ=PY(1,!1),PZ=PY(0,!0),PJ=PY(1,!0);class P0{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new P0(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null==(e=this.changes)?void 0:e.toJSON(),mapped:null==(t=this.mapped)?void 0:t.toJSON(),startSelection:null==(n=this.startSelection)?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new P0(e.changes&&MZ.fromJSON(e.changes),[],e.mapped&&MQ.fromJSON(e.mapped),e.startSelection&&M6.fromJSON(e.startSelection),e.selectionsAfter.map(M6.fromJSON))}static fromTransaction(e,t){let n=P5;for(let t of e.startState.facet(PG)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new P0(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,P5)}static selection(e){return new P0(void 0,P5,void 0,void 0,e)}}function P1(e,t,n,r){let i=e.slice(t+1>n+20?t-n-1:0,t);return i.push(r),i}function P2(e,t){return e.length?t.length?e.concat(t):e:t}let P5=[];function P3(e,t){if(!e.length)return[P0.selection([t])];{let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),P1(e,e.length-1,1e9,n.setSelAfter(r)))}}function P4(e,t){if(!e.length)return e;let n=e.length,r=P5;for(;n;){let i=function(e,t,n){let r=P2(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):P5,n);if(!e.changes)return P0.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new P0(i,OC.mapEffects(e.effects,t),s,e.startSelection.map(o),r)}(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[P0.selection(r)]:P5}let P6=/^(input\.type|delete)($|\.)/;class P9{constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new P9(this.done,this.undone):this}addChanges(e,t,n,r,i){var o,s;let a,l,c=this.done,u=c[c.length-1];return new P9(c=u&&u.changes&&!u.changes.empty&&e.changes&&(!n||P6.test(n))&&(!u.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(i,(o=u.changes,s=e.changes,a=[],l=!1,o.iterChangedRanges((e,t)=>a.push(e,t)),s.iterChangedRanges((e,t,n,r)=>{for(let e=0;e<a.length;){let t=a[e++],i=a[e++];r>=t&&n<=i&&(l=!0)}}),l))||"input.type.compose"==n)?P1(c,c.length-1,r.minDepth,new P0(e.changes.compose(u.changes),P2(OC.mapEffects(e.effects,u.changes),u.effects),u.mapped,u.startSelection,P5)):P1(c,c.length,r.minDepth,e),P5,t,n)}addSelection(e,t,n,r){var i;let o=this.done.length?this.done[this.done.length-1].selectionsAfter:P5;return o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(i=o[o.length-1],i.ranges.length==e.ranges.length&&0===i.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length)?this:new P9(P3(this.done,e),this.undone,t,n)}addMapping(e){return new P9(P4(this.done,e),P4(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],o=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length){let n,s;return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:PW.of({side:e,rest:(n=r[r.length-1],(s=r.slice())[r.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),s),selection:o}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}{if(!i.changes)return null;let n=1==r.length?P5:r.slice(0,r.length-1);return i.mapped&&(n=P4(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:PW.of({side:e,rest:n,selection:o}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}P9.empty=new P9(P5,P5);let P8=[{key:"Mod-z",run:PK,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:PQ,preventDefault:!0},{linux:"Ctrl-Shift-z",run:PQ,preventDefault:!0},{key:"Mod-u",run:PZ,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:PJ,preventDefault:!0}];function P7(e,t){return M6.create(e.ranges.map(t),e.mainIndex)}function Le(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function Lt({state:e,dispatch:t},n){let r=P7(e.selection,n);return!r.eq(e.selection,!0)&&(t(Le(e,r)),!0)}function Ln(e,t){return M6.cursor(t?e.to:e.from)}function Lr(e,t){return Lt(e,n=>n.empty?e.moveByChar(n,t):Ln(n,t))}function Li(e){return e.textDirectionAt(e.state.selection.main.head)==TJ.LTR}let Lo=e=>Lr(e,!Li(e)),Ls=e=>Lr(e,Li(e));function La(e,t){return Lt(e,n=>n.empty?e.moveByGroup(n,t):Ln(n,t))}function Ll(e,t,n){let r,i,o=R1(e).resolveInner(t.head),s=n?kd.closedBy:kd.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;!function(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,s)?r=n?t.to:t.from:o=t}return i=o.type.prop(s)&&(r=n?E2(e,o.from,1):E2(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,M6.cursor(i,n?-1:1)}function Lc(e,t){return Lt(e,n=>{if(!n.empty)return Ln(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}"u">typeof Intl&&Intl.Segmenter;let Lu=e=>Lc(e,!1),Lh=e=>Lc(e,!0);function Ld(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(Dv.scrollMargins)){let i=t(e);(null==i?void 0:i.top)&&(n=Math.max(null==i?void 0:i.top,n)),(null==i?void 0:i.bottom)&&(r=Math.max(null==i?void 0:i.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function Lp(e,t){let n,r=Ld(e),{state:i}=e,o=P7(i.selection,n=>n.empty?e.moveVertically(n,t,r.height):Ln(n,t));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>a&&t.bottom<l&&(n=Dv.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(Le(i,o),{effects:n}),!0}let Lf=e=>Lp(e,!1),Lm=e=>Lp(e,!0);function Lg(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=M6.cursor(r.from+n))}return i}function Lv(e,t,n){let r=P7(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=M6.range(e.head,e.anchor));let r=n(e);return M6.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(Le(e.state,r)),!0)}function Ly(e,t){return Lv(e,t,n=>e.moveByChar(n,t))}let Lb=e=>Ly(e,!Li(e)),Lx=e=>Ly(e,Li(e));function Lw(e,t){return Lv(e,t,n=>e.moveByGroup(n,t))}function LS(e,t){return Lv(e,t,n=>e.moveVertically(n,t))}let LA=e=>LS(e,!1),LC=e=>LS(e,!0);function Lk(e,t){return Lv(e,t,n=>e.moveVertically(n,t,Ld(e).height))}let LM=e=>Lk(e,!1),LO=e=>Lk(e,!0),LT=({state:e,dispatch:t})=>(t(Le(e,{anchor:0})),!0),L_=({state:e,dispatch:t})=>(t(Le(e,{anchor:e.doc.length})),!0),LI=({state:e,dispatch:t})=>(t(Le(e,{anchor:e.selection.main.anchor,head:0})),!0),LD=({state:e,dispatch:t})=>(t(Le(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function LR(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let o=n.doc.lineAt(r.head);if(t?o.to<e.state.doc.length:o.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<o.from||r.head>o.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(Le(n,M6.create(i,i.length-1))),!0)}function LE(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let s=t(r);s<i?(n="delete.backward",s=LP(e,s,!1)):s>i&&(n="delete.forward",s=LP(e,s,!0)),i=Math.min(i,s),o=Math.max(o,s)}else i=LP(e,i,!1),o=LP(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:M6.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?Dv.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function LP(e,t,n){if(e instanceof Dv)for(let r of e.state.facet(Dv.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}let LL=(e,t,n)=>LE(e,r=>{let i=r.from,{state:o}=e,s=o.doc.lineAt(i),a,l;if(n&&!t&&i>s.from&&i<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,i-s.from))){if(" "==a[a.length-1])return i-1;let e=OZ(a,o.tabSize)%Ei(o)||Ei(o);for(let t=0;t<e&&" "==a[a.length-1-t];t++)i--;l=i}else(l=MU(s.text,i-s.from,t,t)+s.from)==i&&s.number!=(t?o.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(s.text.slice(l-s.from,i-s.from))&&(l=MU(s.text,l-s.from,!1,!1)+s.from);return l}),LN=e=>LL(e,!1,!0),LB=e=>LL(e,!0,!1),Lj=(e,t)=>LE(e,n=>{let r=n.head,{state:i}=e,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n.head&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=MU(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(l);if(null!=e&&c!=e)break;(" "!=l||r!=n.head)&&(e=c),r=a}return r}),Lz=e=>Lj(e,!1);function L$(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),o=e.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function LF(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of L$(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),s=o.length+1;if(n)for(let n of(r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))i.push(M6.range(Math.min(e.doc.length,n.anchor+s),Math.min(e.doc.length,n.head+s)));else for(let n of(r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))i.push(M6.range(n.anchor-s,n.head-s))}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:M6.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function LV(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of L$(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}let LH=LU(!1),LW=LU(!0);function LU(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),s=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=R1(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),o;return r&&i&&r.to<=t&&i.from>=t&&(o=r.type.prop(kd.closedBy))&&o.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let a=new Ea(t,{simulateBreak:r,simulateDoubleBreak:!!s}),l=Es(a,r);for(null==l&&(l=OZ(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;s?{from:r,to:i}=s:r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let c=["",Eo(t,l)];return s&&c.push(Eo(t,a.lineIndent(o.from,-1))),{changes:{from:r,to:i,insert:MN.of(c)},range:M6.cursor(r+1+c[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function LG(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let o=e.changes(i);return{changes:i,range:M6.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}let Lq=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(LG(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Er)})}),{userEvent:"input.indent"})),!0),LX=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(LG(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=OZ(r,e.tabSize),o=0,s=Eo(e,Math.max(0,i-Ei(e)));for(;o<r.length&&o<s.length&&r.charCodeAt(o)==s.charCodeAt(o);)o++;n.push({from:t.from+o,to:t.from+r.length,insert:s.slice(o)})}),{userEvent:"delete.dedent"})),!0),LY=[{key:"Ctrl-b",run:Lo,shift:Lb,preventDefault:!0},{key:"Ctrl-f",run:Ls,shift:Lx},{key:"Ctrl-p",run:Lu,shift:LA},{key:"Ctrl-n",run:Lh,shift:LC},{key:"Ctrl-a",run:e=>Lt(e,t=>e.moveToLineBoundary(t,!1,!1)),shift:e=>Lv(e,!1,t=>M6.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>Lt(e,t=>e.moveToLineBoundary(t,!0,!1)),shift:e=>Lv(e,!0,t=>M6.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:LB},{key:"Ctrl-h",run:LN},{key:"Ctrl-k",run:e=>LE(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:Lz},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:MN.of(["",""])},range:M6.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:MU(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:MU(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:M6.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Lm}],LK=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>Lt(e,t=>Ll(e.state,t,!Li(e))),shift:e=>{let t=!Li(e);return Lv(e,t,n=>Ll(e.state,n,t))}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>Lt(e,t=>Ll(e.state,t,Li(e))),shift:e=>{let t=Li(e);return Lv(e,t,n=>Ll(e.state,n,t))}},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>LF(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>LV(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>LF(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>LV(e,t,!0)},{key:"Mod-Alt-ArrowUp",run:e=>LR(e,!1)},{key:"Mod-Alt-ArrowDown",run:e=>LR(e,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=M6.create([n.main]):n.main.empty||(r=M6.create([M6.cursor(n.main.head)])),!!r&&(t(Le(e,r)),!0)}},{key:"Mod-Enter",run:LW},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=L$(e).map(({from:t,to:n})=>M6.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:M6.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=P7(e.selection,t=>{let n=R1(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return M6.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(Le(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:LX},{key:"Mod-]",run:Lq},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Ea(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=LG(e,(t,i,o)=>{let s=Es(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=Eo(e,s);(a!=l||o.from<t.from+a.length)&&(n[t.from]=s,i.push({from:t.from,to:t.from+a.length,insert:l}))});return i.changes.empty||t(e.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(L$(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=P7(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>{let n,r;return n=!1,r=P7(e.selection,t=>{let r=E2(e,t.head,-1)||E2(e,t.head,1)||t.head>0&&E2(e,t.head-1,1)||t.head<e.doc.length&&E2(e,t.head+1,-1);if(!r||!r.end)return t;n=!0;let i=r.start.from==t.head?r.end.to:r.end.from;return M6.cursor(i)}),!!n&&(t(Le(e,r)),!0)}},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=PV(e.state,n.from);return r.line?Pz(e):!!r.block&&PF(e)}},{key:"Alt-A",mac:"Ctrl-A",run:P$},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:Lo,shift:Lb,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>La(e,!Li(e)),shift:e=>Lw(e,!Li(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>Lt(e,t=>Lg(e,t,!Li(e))),shift:e=>{let t=!Li(e);return Lv(e,t,n=>Lg(e,n,t))},preventDefault:!0},{key:"ArrowRight",run:Ls,shift:Lx,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>La(e,Li(e)),shift:e=>Lw(e,Li(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>Lt(e,t=>Lg(e,t,Li(e))),shift:e=>{let t=Li(e);return Lv(e,t,n=>Lg(e,n,t))},preventDefault:!0},{key:"ArrowUp",run:Lu,shift:LA,preventDefault:!0},{mac:"Cmd-ArrowUp",run:LT,shift:LI},{mac:"Ctrl-ArrowUp",run:Lf,shift:LM},{key:"ArrowDown",run:Lh,shift:LC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:L_,shift:LD},{mac:"Ctrl-ArrowDown",run:Lm,shift:LO},{key:"PageUp",run:Lf,shift:LM},{key:"PageDown",run:Lm,shift:LO},{key:"Home",run:e=>Lt(e,t=>Lg(e,t,!1)),shift:e=>Lv(e,!1,t=>Lg(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:LT,shift:LI},{key:"End",run:e=>Lt(e,t=>Lg(e,t,!0)),shift:e=>Lv(e,!0,t=>Lg(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:L_,shift:LD},{key:"Enter",run:LH,shift:LH},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:LN,shift:LN,preventDefault:!0},{key:"Delete",run:LB,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Lz,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>Lj(e,!0),preventDefault:!0},{mac:"Mod-Backspace",run:e=>LE(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),preventDefault:!0},{mac:"Mod-Delete",run:e=>LE(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),preventDefault:!0}].concat(LY.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),LQ={key:"Tab",run:Lq,shift:LX},LZ="function"==typeof String.prototype.normalize?e=>e.normalize("NFKD"):e=>e;class LJ{constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(LZ(e)):LZ,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return -1;this.bufferPos=0,this.buffer=this.iter.value}return MG(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Mq(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=MX(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,o=!0;;e++){let n=r.charCodeAt(e),s=this.match(n,i,o,this.bufferPos+this.bufferStart,e==r.length-1);if(s)return this.value=s,this;if(e==r.length-1)break;o&&e<t.length&&t.charCodeAt(e)==n?i++:o=!1}}}match(e,t,n,r,i){let o=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],s=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?o={from:n.from,to:r,precise:i&&n.precise}:(n.index++,s=!0)),s?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(1==this.query.length?o={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),o&&this.test&&!this.test(o.from,o.to,this.buffer,this.bufferStart)&&(o=null),o}}"u">typeof Symbol&&(LJ.prototype[Symbol.iterator]=function(){return this});let L0={from:-1,to:-1,match:/.*/.exec(""),precise:!0},L1="gm"+(null==/x/.unicode?"":"u");class L2{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine="",this.done=!1,this.value=L0,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new L4(e,t,n,r,i);this.re=new RegExp(t,L1+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=L6(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=L6(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),e=0}}}}let L5=new WeakMap;class L3{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let r=L5.get(e);if(!r||r.from>=n||r.to<=t){let r=new L3(t,e.sliceString(t,n));return L5.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to<n&&(i+=e.sliceString(r.to,n)),L5.set(e,new L3(o,i)),new L3(t,i.slice(t-o,n-o))}}class L4{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=L0,this.matchPos=L6(e,r),this.re=new RegExp(t,L1+((null==n?void 0:n.ignoreCase)?"i":"")),this.test=null==n?void 0:n.test,this.flat=L3.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=L6(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=L3.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function L6(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}"u">typeof Symbol&&(L2.prototype[Symbol.iterator]=L4.prototype[Symbol.iterator]=function(){return this});let L9={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},L8=M7.define({combine:e=>OE(e,L9,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}),L7=Tw.mark({class:"cm-selectionMatch"}),Ne=Tw.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Nt(e,t,n,r){return(0==n||e(t.sliceDoc(n-1,n))!=OI.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=OI.Word)}let Nn=_S.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(L8),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Tw.none;let i=r.main,o,s=null;if(i.empty){if(!t.highlightWordAroundCursor)return Tw.none;let e=n.wordAt(i.head);if(!e)return Tw.none;s=n.charCategorizer(i.head),o=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return Tw.none;if(t.wholeWords){var a,l,c;if(o=n.sliceDoc(i.from,i.to),!(Nt(s=n.charCategorizer(i.head),n,i.from,i.to)&&(a=s,l=i.from,c=i.to,a(n.sliceDoc(l,l+1))==OI.Word&&a(n.sliceDoc(c-1,c))==OI.Word)))return Tw.none}else if(!(o=n.sliceDoc(i.from,i.to)))return Tw.none}let u=[];for(let r of e.visibleRanges){let e=new LJ(n.doc,o,r.from,r.to);for(;!e.next().done;){let{from:r,to:o}=e.value;if((!s||Nt(s,n,r,o))&&(i.empty&&r<=i.from&&o>=i.to?u.push(Ne.range(r,o)):(r>=i.to||o<=i.from)&&u.push(L7.range(r,o)),u.length>t.maxMatches))return Tw.none}}return Tw.set(u)}},{decorations:e=>e.decorations}),Nr=Dv.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ni=M7.define({combine:e=>OE(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new NE(e),scrollToMatch:e=>Dv.scrollIntoView(e)})});class No{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,L1),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Nd(this):new Nl(this)}getCursor(e,t=0,n){let r=e.doc?e:OR.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?Nc(this,r,t,n):Na(this,r,t,n)}}class Ns{constructor(e){this.spec=e}}function Na(e,t,n,r){var i,o,s,a;let l;return e.wholeWord&&(s=t.doc,a=t.charCategorizer(t.selection.main.head),l=(e,t,n,r)=>((r>e||r+n.length<t)&&(r=Math.max(0,e-2),n=s.sliceString(r,Math.min(s.length,t+2))),(a(Nu(n,e-r))!=OI.Word||a(Nh(n,e-r))!=OI.Word)&&(a(Nh(n,t-r))!=OI.Word||a(Nu(n,t-r))!=OI.Word))),e.test&&(i=e.test,o=l,l=(e,n,r,s)=>(!o||!!o(e,n,r,s))&&i(e>=s&&n<=s+r.length?r.slice(e-s,n-s):t.doc.sliceString(e,n),t,e,n)),new LJ(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),l)}class Nl extends Ns{constructor(e){super(e)}nextMatch(e,t,n){let r=Na(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Na(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Na(this.spec,e,n,r),o=null;for(;!i.nextOverlapping().done;)o=i.value;if(o)return o;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Na(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Na(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function Nc(e,t,n,r){var i,o,s;let a;return e.wholeWord&&(s=t.charCategorizer(t.selection.main.head),a=(e,t,n)=>!n[0].length||(s(Nu(n.input,n.index))!=OI.Word||s(Nh(n.input,n.index))!=OI.Word)&&(s(Nh(n.input,n.index+n[0].length))!=OI.Word||s(Nu(n.input,n.index+n[0].length))!=OI.Word)),e.test&&(i=e.test,o=a,a=(e,n,r)=>(!o||o(e,n,r))&&i(r[0],t,e,n)),new L2(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:a},n,r)}function Nu(e,t){return e.slice(MU(e,t,!1),t)}function Nh(e,t){return e.slice(t,MU(e,t))}class Nd extends Ns{nextMatch(e,t,n){let r=Nc(this.spec,e,n,e.doc.length).next();return r.done&&(r=Nc(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=Nc(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if("&"==n)return e.match[0];if("$"==n)return"$";for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=Nc(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Nc(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}let Np=OC.define(),Nf=OC.define(),Nm=Oo.define({create:e=>new Ng(NO(e).create(),null),update(e,t){for(let n of t.effects)n.is(Np)?e=new Ng(n.value.create(),e.panel):n.is(Nf)&&(e=new Ng(e.query,n.value?NM:null));return e},provide:e=>RA.from(e,e=>e.panel)});class Ng{constructor(e,t){this.query=e,this.panel=t}}let Nv=Tw.mark({class:"cm-searchMatch"}),Ny=Tw.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Nb=_S.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Nm))}update(e){let t=e.state.field(Nm);(t!=e.startState.field(Nm)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Tw.none;let{view:n}=this,r=new OF;for(let t=0,i=n.visibleRanges,o=i.length;t<o;t++){let{from:s,to:a}=i[t];for(;t<o-1&&a>i[t+1].from-500;)a=i[++t].to;e.highlight(n.state,s,a,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Ny:Nv)})}return r.finish()}},{decorations:e=>e.decorations});function Nx(e){return t=>{let n=t.state.field(Nm,!1);return n&&n.query.spec.valid?e(t,n):NI(t)}}let Nw=Nx((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=M6.single(r.from,r.to),o=e.state.facet(Ni);return e.dispatch({selection:i,effects:[NN(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),N_(e),!0}),NS=Nx((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=M6.single(i.from,i.to),s=e.state.facet(Ni);return e.dispatch({selection:o,effects:[NN(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),N_(e),!0}),NA=Nx((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!!n&&!!n.length&&(e.dispatch({selection:M6.create(n.map(e=>M6.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),NC=Nx((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let s=o,a=[],l,c,u=[];s.precise?s.from==r&&s.to==i&&(c=n.toText(t.getReplacement(s)),a.push({from:s.from,to:s.to,insert:c}),s=t.nextMatch(n,s.from,s.to),u.push(Dv.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))):s=t.nextMatch(n,s.from,s.to);let h=e.state.changes(a);return s&&(l=M6.single(s.from,s.to).map(h),u.push(NN(e,s)),u.push(n.facet(Ni).scrollToMatch(l.main,e))),e.dispatch({changes:h,selection:l,effects:u,userEvent:"input.replace"}),!0}),Nk=Nx((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:o}=r;o&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:Dv.announce.of(r),userEvent:"input.replace.all"}),!0});function NM(e){return e.state.facet(Ni).createPanel(e)}function NO(e,t){var n,r,i,o,s;let a=e.selection.main,l=a.empty||a.to>a.from+100?"":e.sliceDoc(a.from,a.to);if(t&&!l)return t;let c=e.facet(Ni);return new No({search:(null!=(n=null==t?void 0:t.literal)?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!=(r=null==t?void 0:t.caseSensitive)?r:c.caseSensitive,literal:null!=(i=null==t?void 0:t.literal)?i:c.literal,regexp:null!=(o=null==t?void 0:t.regexp)?o:c.regexp,wholeWord:null!=(s=null==t?void 0:t.wholeWord)?s:c.wholeWord})}function NT(e){let t=Rb(e,NM);return t&&t.dom.querySelector("[main-field]")}function N_(e){let t=NT(e);t&&t==e.root.activeElement&&t.select()}let NI=e=>{let t=e.state.field(Nm,!1);if(t&&t.panel){let n=NT(e);if(n&&n!=e.root.activeElement){let r=NO(e.state,t.query.spec);r.valid&&e.dispatch({effects:Np.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[Nf.of(!0),t?Np.of(NO(e.state,t.query.spec)):OC.appendConfig.of(Nj)]});return!0},ND=e=>{let t=e.state.field(Nm,!1);if(!t||!t.panel)return!1;let n=Rb(e,NM);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Nf.of(!1)}),!0},NR=[{key:"Mod-f",run:NI,scope:"editor search-panel"},{key:"F3",run:Nw,shift:NS,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Nw,shift:NS,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ND,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let t=new LJ(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(s=o.length),o.push(M6.range(t.value.from,t.value.to))}return t(e.update({selection:M6.create(o,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:e=>{var t;let n,r,i,o,s=function(e,t){for(let n of e.state.field(RC,!1)||[]){let r=Rb(e,n);if(r&&r.dom.classList.contains(t))return r}return null}(e,"cm-goto-line");if(s){let e=s.dom.querySelector("input[type=text]");return e&&e.select(),!0}let{state:a}=e,l=String(a.doc.lineAt(e.state.selection.main.head).number),{close:c,result:u}=(t={class:"cm-goto-line",label:a.phrase("Go to line"),input:{type:"text",name:"line",value:l},focus:!0,submitLabel:a.phrase("go")},r=new Promise(e=>n=e),i=e=>(function(e,t,n){let r=t.content?t.content(e,()=>a(null)):null;if(!r){if(r=Tn("form"),t.input){let e=Tn("input",t.input);/^(text|password|number|email|tel|url)$/.test(e.type)&&e.classList.add("cm-textfield"),e.name||(e.name="input"),r.appendChild(Tn("label",(t.label||"")+": ",e))}else r.appendChild(document.createTextNode(t.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(Tn("button",{class:"cm-button",type:"submit"},t.submitLabel||"OK"))}let i="FORM"==r.nodeName?[r]:r.querySelectorAll("form");for(let e=0;e<i.length;e++){let t=i[e];t.addEventListener("keydown",e=>{27==e.keyCode?(e.preventDefault(),a(null)):13==e.keyCode&&(e.preventDefault(),a(t))}),t.addEventListener("submit",e=>{e.preventDefault(),a(t)})}let o=Tn("div",r,Tn("button",{onclick:()=>a(null),"aria-label":e.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));t.class&&(o.className=t.class),o.classList.add("cm-dialog");let s="string"==typeof t.focus?r.querySelector(t.focus):t.focus?r.querySelector("input")||r.querySelector("button"):null;function a(t){o.contains(o.ownerDocument.activeElement)&&e.focus(),n(t)}return{dom:o,top:t.top,mount:()=>{s&&("select"in s?s.select():"focus"in s&&s.focus())},destroy:()=>n(null)}})(e,t,n),e.state.field(RC,!1)?e.dispatch({effects:Rk.of(i)}):e.dispatch({effects:OC.appendConfig.of(RC.init(()=>[i]))}),{close:o=RM.of(i),result:r.then(t=>((e.win.queueMicrotask||(t=>e.win.setTimeout(t,10)))(()=>{e.state.field(RC).indexOf(i)>-1&&e.dispatch({effects:o})}),t))});return u.then(t=>{let n=t&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);if(!n)return void e.dispatch({effects:c});let r=a.doc.lineAt(a.selection.main.head),[,i,o,s,l]=n,u=s?+s.slice(1):0,h=o?+o:r.number;if(o&&l){let e=h/100;i&&(e=e*("-"==i?-1:1)+r.number/a.doc.lines),h=Math.round(a.doc.lines*e)}else o&&i&&(h=h*("-"==i?-1:1)+r.number);let d=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),p=M6.cursor(d.from+Math.max(0,Math.min(u,d.length)));e.dispatch({effects:[c,Dv.scrollIntoView(p.from,{y:"center"})],selection:p})}),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=M6.create(n.ranges.map(t=>e.wordAt(t.head)||M6.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new LJ(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new LJ(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(M6.range(i.from,i.to),!1),effects:Dv.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class NE{constructor(e){this.view=e;let t=this.query=e.state.field(Nm).query.spec;function n(e,t,n){return Tn("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Tn("input",{value:t.search,placeholder:NP(e,"Find"),"aria-label":NP(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tn("input",{value:t.replace,placeholder:NP(e,"Replace"),"aria-label":NP(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=Tn("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>Nw(e),[NP(e,"next")]),n("prev",()=>NS(e),[NP(e,"previous")]),n("select",()=>NA(e),[NP(e,"all")]),Tn("label",null,[this.caseField,NP(e,"match case")]),Tn("label",null,[this.reField,NP(e,"regexp")]),Tn("label",null,[this.wordField,NP(e,"by word")]),...e.state.readOnly?[]:[Tn("br"),this.replaceField,n("replace",()=>NC(e),[NP(e,"replace")]),n("replaceAll",()=>Nk(e),[NP(e,"replace all")])],Tn("button",{name:"close",onclick:()=>ND(e),"aria-label":NP(e,"close"),type:"button"},["×"])])}commit(){let e=new No({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Np.of(e)}))}keydown(e){var t;(t=this.view,DI(DO(t.state),e,t,"search-panel"))?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?NS:Nw)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),NC(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Np)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ni).top}}function NP(e,t){return e.state.phrase(t)}let NL=/[\s\.,:;?!]/;function NN(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-30),s=Math.min(i,n+30),a=e.state.sliceDoc(o,s);if(o!=r.from){for(let e=0;e<30;e++)if(!NL.test(a[e+1])&&NL.test(a[e])){a=a.slice(e);break}}if(s!=i){for(let e=a.length-1;e>a.length-30;e--)if(!NL.test(a[e-1])&&NL.test(a[e])){a=a.slice(0,e);break}}return Dv.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}let NB=Dv.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Nj=[Nm,Oa.low(Nb),NB];class Nz{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=R1(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(NH(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function N$(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}class NF{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function NV(e){return e.selection.main.from}function NH(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!=(n=e.flags)?n:e.ignoreCase?"i":""):e}let NW=Ow.define(),NU=new WeakMap;function NG(e){if(!Array.isArray(e))return e;let t=NU.get(e);return t||NU.set(e,t=function(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=N$(t)+N$(n)+"*$";return[RegExp("^"+r),new RegExp(r)]}(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}(e)),t}let Nq=OC.define(),NX=OC.define();class NY{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=MG(e,t),r=MX(n);this.chars.push(n);let i=e.slice(t,t+r),o=i.toUpperCase();this.folded.push(MG(o==i?i.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:o}=this;if(1==t.length){let r=MG(e,0),i=MX(r),o=i==e.length?0:-100;if(r==t[0]);else{if(r!=n[0])return null;o+=-200}return this.ret(o,[0,i])}let s=e.indexOf(this.pattern);if(0==s)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,l=0;if(s<0){for(let i=0,o=Math.min(e.length,200);i<o&&l<a;){let o=MG(e,i);(o==t[l]||o==n[l])&&(r[l++]=i),i+=MX(o)}if(l<a)return null}let c=0,u=0,h=!1,d=0,p=-1,f=-1,m=/[a-z]/.test(e),g=!0;for(let r=0,l=Math.min(e.length,200),v=0;r<l&&u<a;){let l=MG(e,r);s<0&&(c<a&&l==t[c]&&(i[c++]=r),d<a&&(l==t[d]||l==n[d]?(0==d&&(p=r),f=r+1,d++):d=0));let y,b=l<255?l>=48&&l<=57||l>=97&&l<=122?2:+(l>=65&&l<=90):(y=Mq(l))!=y.toLowerCase()?1:2*(y!=y.toUpperCase());(!r||1==b&&m||0==v&&0!=b)&&(t[u]==l||n[u]==l&&(h=!0)?o[u++]=r:o.length&&(g=!1)),v=b,r+=MX(l)}return u==a&&0==o[0]&&g?this.result(-100+(h?-200:0),o,e):d==a&&0==p?this.ret(-200-e.length+(f==e.length?0:-100),[0,f]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):d==a?this.ret(-900-e.length,[p,f]):u==a?this.result(-100+(h?-200:0)+-700+(g?0:-1100),o,e):2==t.length?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?MX(MG(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}}class NK{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}let NQ=M7.define({combine:e=>OE(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:NJ,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>NZ(e(n),t(n)),optionClass:(e,t)=>n=>NZ(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})});function NZ(e,t){return e?t?e+" "+t:e:t}function NJ(e,t,n,r,i,o){let s=e.textDirection==TJ.RTL,a=s,l=!1,c="top",u,h,d=t.left-i.left,p=i.right-t.right,f=r.right-r.left,m=r.bottom-r.top;if(a&&d<Math.min(f,p)?a=!1:!a&&p<Math.min(f,d)&&(a=!0),f<=(a?d:p))u=Math.max(i.top,Math.min(n.top,i.bottom-m))-t.top,h=Math.min(400,a?d:p);else{l=!0,h=Math.min(400,(s?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=m||e>t.top?u=n.bottom-t.top:(c="bottom",u=t.bottom-n.top)}let g=(t.bottom-t.top)/o.offsetHeight,v=(t.right-t.left)/o.offsetWidth;return{style:`${c}: ${u/g}px; max-width: ${h/v}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}let N0=OC.define();function N1(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}class N2{constructor(e,t,n){let r;this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:o,selected:s}=i.open,a=e.state.facet(NQ);this.optionContent=(r=a.addToOptions.slice(),a.icons&&r.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),r.push({render(e,t,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let o=e.displayLabel||e.label,s=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>s&&i.appendChild(document.createTextNode(o.slice(s,t)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(o.slice(t,n))),a.className="cm-completionMatchedText",s=n}return s<o.length&&i.appendChild(document.createTextNode(o.slice(s))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),r.sort((e,t)=>e.position-t.position).map(e=>e.render)),this.optionClass=a.optionClass,this.tooltipClass=a.tooltipClass,this.range=N1(o.length,s,a.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains("cm-completionListIncompleteTop")&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;null!=t&&(e.dispatch({effects:N0.of(t)}),n.preventDefault())}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(NQ).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:NX.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:i,selected:o,disabled:s}=n.open;r.open&&r.open.options==i||(this.range=N1(i.length,o,e.state.facet(NQ).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),s!=(null==(t=r.open)?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=N1(t.options.length,t.selected,this.view.state.facet(NQ).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let o="string"==typeof i?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>_y(this.view.state,e,"completion info")):(this.addInfoPane(o,r),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(65535*Math.random()).toString(16),null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,n;let r,i,o,s=null;for(let t=this.list.firstChild,n=this.range.from;t;t=t.nextSibling,n++)"LI"==t.nodeName&&t.id?n==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),s=t):t.hasAttribute("aria-selected")&&(t.removeAttribute("aria-selected"),t.removeAttribute("aria-describedby")):n--;return s&&(t=this.list,n=s,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=r.height/t.offsetHeight,i.top<r.top?t.scrollTop-=(r.top-i.top)/o:i.bottom>r.bottom&&(t.scrollTop+=(i.bottom-r.bottom)/o)),s}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(NQ).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",e=>{e.target==r&&e.preventDefault()});let i=null;for(let o=n.from;o<n.to;o++){let{completion:s,match:a}=e[o],{section:l}=s;if(l){let e="string"==typeof l?l:l.name;e!=i&&(o>n.from||0==n.from)&&(i=e,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=e)}let c=r.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let u=this.optionClass(s);for(let e of(u&&(c.className=u),this.optionContent)){let t=e(s,this.view.state,this.view,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function N5(e){return 100*(e.boost||0)+10*!!e.apply+5*!!e.info+ +!!e.type}class N3{constructor(e,t,n,r,i,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new N3(this.options,N8(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i,o){if(r&&!o&&e.some(e=>e.isPending))return r.setDisabled();let s=function(e,t){let n=[],r=null,i=null,o=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}},s=t.facet(NQ);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(!1===r.result.filter)for(let t of r.result.options)o(new NF(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),a,l=s.filterStrict?new NK(n):new NY(n);for(let t of r.result.options)if(a=l.match(t.label)){let n=t.displayLabel?e?e(t,a.matched):[]:a.matched,s=a.score+(t.boost||0);if(o(new NF(t,r.source,n,s)),"object"==typeof t.section&&"dynamic"===t.section.rank){let{name:e}=t.section;i||(i=Object.create(null)),i[e]=Math.max(s,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0;for(let n of r.sort((e,t)=>("dynamic"===e.rank&&"dynamic"===t.rank?i[t.name]-i[e.name]:0)||("number"==typeof e.rank?e.rank:1e9)-("number"==typeof t.rank?t.rank:1e9)||(e.name<t.name?-1:1)))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let a=[],l=null,c=s.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||c(e.completion,t.completion))){let t=e.completion;l&&l.label==t.label&&l.detail==t.detail&&(null==l.type||null==t.type||l.type==t.type)&&l.apply==t.apply&&l.boost==t.boost?N5(e.completion)>N5(l)&&(a[a.length-1]=e):a.push(e),l=e.completion}return a}(e,t);if(!s.length)return r&&e.some(e=>e.isPending)?r.setDisabled():null;let a=t.facet(NQ).selectOnOpen?0:-1;if(r&&r.selected!=a&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){a=t;break}}return new N3(s,N8(n,a),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Bs,above:i.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new N3(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new N3(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class N4{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new N4(N7,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(NQ),r=(n.override||t.languageDataAt("autocomplete",NV(t)).map(NG)).map(t=>(this.active.find(e=>e.source==t)||new Bt(t,+!!this.active.some(e=>0!=e.state))).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open,o=e.effects.some(e=>e.is(Br));for(let s of(i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,o=r==t.length;if(i||o)return i==o;if(e[n++].result!=t[r++].result)return!1}}(r,this.active)||o?i=N3.build(r,t,this.id,i,n,o):i&&i.disabled&&!r.some(e=>e.isPending)&&(i=null),!i&&r.every(e=>!e.isPending)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new Bt(e.source,0):e)),e.effects))s.is(N0)&&(i=i&&i.setSelected(s.value,this.id));return r==this.active&&i==this.open?this:new N4(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?N6:N9}}let N6={"aria-autocomplete":"list"},N9={};function N8(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}let N7=[];function Be(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(NW);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:16*!!e.docChanged}class Bt{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=Be(e,t),r=this;for(let t of((8&n||16&n&&this.touches(e))&&(r=new Bt(r.source,0)),4&n&&0==r.state&&(r=new Bt(this.source,1)),r=r.updateFor(e,n),e.effects))if(t.is(Nq))r=new Bt(r.source,1,t.value);else if(t.is(NX))r=new Bt(r.source,0);else if(t.is(Br))for(let e of t.value)e.source==r.source&&(r=e);return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(NV(e.state))}}class Bn extends Bt{constructor(e,t,n,r,i,o){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=NV(e.state);if(s>o||!r||2&t&&(NV(e.startState)==this.from||s<this.limit))return new Bt(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return!function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):NH(e,!0).test(i)}(r.validFor,e.state,i,o)?r.update&&(r=r.update(r,i,o,new Nz(e.state,s,!1)))?new Bn(this.source,this.explicit,a,r,r.from,null!=(n=r.to)?n:NV(e.state)):new Bt(this.source,1,this.explicit):new Bn(this.source,this.explicit,a,r,i,o)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new Bn(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new Bt(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let Br=OC.define({map:(e,t)=>e.map(e=>e.map(t))}),Bi=Oo.define({create:()=>N4.start(),update:(e,t)=>e.update(t),provide:e=>[Ru.from(e,e=>e.tooltip),Dv.contentAttributes.from(e,e=>e.attrs)]});function Bo(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(Bi).active.find(e=>e.source==t.source);return r instanceof Bn&&("string"==typeof n?e.dispatch({...function(e,t,n,r){let{main:i}=e.selection,o=n-i.from,s=r-i.from;return{...e.changeByRange(a=>{if(a!=i&&n!=r&&e.sliceDoc(a.from+o,a.from+s)!=e.sliceDoc(n,r))return{range:a};let l=e.toText(t);return{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:l},range:M6.cursor(a.from+o+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}(e.state,n,r.from,r.to),annotations:NW.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}let Bs=e=>new N2(e,Bi,Bo);function Ba(e,t="option"){return n=>{let r=n.state.field(Bi,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(NQ).interactionDelay)return!1;let i=1,o;"page"==t&&(o=Rg(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:s-1;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:N0.of(a)}),!0}}let Bl=e=>!!e.state.field(Bi,!1)&&(e.dispatch({effects:Nq.of(!0)}),!0);class Bc{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}let Bu=_S.fromClass(class{constructor(e){for(let t of(this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0,e.state.field(Bi).active))t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(Bi),n=e.state.facet(NQ);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Bi)==t)return;let r=e.transactions.some(e=>{let t=Be(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){_y(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(Nq)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Bi);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(NQ).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=NV(t),r=new Nz(t,n,e.explicit,this.view),i=new Bc(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:NX.of(null)}),_y(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(NQ).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(NQ),r=this.view.state.field(Bi);for(let i=0;i<this.running.length;i++){let o=this.running[i];if(void 0===o.done)continue;if(this.running.splice(i--,1),o.done){let r=NV(o.updates.length?o.updates[0].startState:this.view.state),i=Math.min(r,o.done.from+ +!o.active.explicit),s=new Bn(o.active.source,o.active.explicit,i,o.done,o.done.from,null!=(e=o.done.to)?e:r);for(let e of o.updates)s=s.update(e,n);if(s.hasResult()){t.push(s);continue}}let s=r.active.find(e=>e.source==o.active.source);if(s&&s.isPending)if(null==o.done){let e=new Bt(o.active.source,0);for(let t of o.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(s)}(t.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:Br.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Bi,!1);if(t&&t.tooltip&&this.view.state.facet(NQ).closeOnBlur){let n=t.open&&Rg(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:NX.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:Nq.of(!1)}),20),this.composing=0}}}),Bh="object"==typeof navigator&&/Win/.test(navigator.platform),Bd=Oa.highest(Dv.domEventHandlers({keydown(e,t){let n=t.state.field(Bi,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||!e.key||e.key.length>1||e.ctrlKey&&!(Bh&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(e.key)>-1&&Bo(t,r),!1}})),Bp=Dv.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Bf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Bm=OC.define({map(e,t){let n=t.mapPos(e,-1,MK.TrackAfter);return null==n?void 0:n}}),Bg=new class extends OP{};Bg.startSide=1,Bg.endSide=-1;let Bv=Oo.define({create:()=>Oz.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Bm)&&(e=e.update({add:[Bg.range(n.value,n.value+1)]}));return e}}),By="()[]{}<>«»»«[]{}";function Bb(e){for(let t=0;t<By.length;t+=2)if(By.charCodeAt(t)==e)return By.charAt(t+1);return Mq(e<128?e:e+1)}function Bx(e,t){return e.languageDataAt("closeBrackets",t)[0]||Bf}let Bw="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),BS=Dv.inputHandler.of((e,t,n,r)=>{if((Bw?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==MX(MG(r,0))||t!=i.from||n!=i.to)return!1;let o=function(e,t){let n=Bx(e,e.selection.main.head),r=n.brackets||Bf.brackets;for(let i of r){let o=Bb(MG(i,0));if(t==i)return o==i?function(e,t,n,r){let i=r.stringPrefixes||Bf.stringPrefixes,o=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Bm.of(r.to+t.length),range:M6.range(r.anchor+t.length,r.head+t.length)};let s=r.head,a=Bk(e.doc,s),l;if(a==t){if(BM(e,s))return{changes:{insert:t+t,from:s},effects:Bm.of(s+t.length),range:M6.cursor(s+t.length)};else if(BC(e,s)){let r=n&&e.sliceDoc(s,s+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:M6.cursor(s+r.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=BO(e,s-2*t.length,i))>-1&&BM(e,l))return{changes:{insert:t+t+t+t,from:s},effects:Bm.of(s+t.length),range:M6.cursor(s+t.length)};else if(e.charCategorizer(s)(a)!=OI.Word&&BO(e,s,i)>-1&&!function(e,t,n,r){let i=R1(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,s,t,i))return{changes:{insert:t+t,from:s},effects:Bm.of(s+t.length),range:M6.cursor(s+t.length)};return{range:o=r}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}(e,i,r.indexOf(i+i+i)>-1,n):function(e,t,n,r){let i=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:Bm.of(o.to+t.length),range:M6.range(o.anchor+t.length,o.head+t.length)};let s=Bk(e.doc,o.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:Bm.of(o.head+t.length),range:M6.cursor(o.head+t.length)}:{range:i=o}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(e,i,o,n.before||Bf.before);if(t==o&&BC(e,e.selection.main.from))return function(e,t){let n=null,r=e.changeByRange(r=>r.empty&&Bk(e.doc,r.head)==t?{changes:{from:r.head,to:r.head+t.length,insert:t},range:M6.cursor(r.head+t.length)}:n={range:r});return n?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}(e,o)}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}),BA=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Bx(e,e.selection.main.head).brackets||Bf.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){var i,o;let r,s=(i=e.doc,o=t.head,MX(MG(r=i.sliceString(o-2,o),0))==r.length?r:r.slice(1));for(let r of n)if(r==s&&Bk(e.doc,t.head)==Bb(MG(r,0)))return{changes:{from:t.head-r.length,to:t.head+r.length},range:M6.cursor(t.head-r.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function BC(e,t){let n=!1;return e.field(Bv).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function Bk(e,t){let n=e.sliceString(t,t+2);return n.slice(0,MX(MG(n,0)))}function BM(e,t){let n=R1(e).resolveInner(t+1);return n.parent&&n.from==t}function BO(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=OI.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=OI.Word)return n}return -1}let BT=[{key:"Ctrl-Space",run:Bl},{mac:"Alt-`",run:Bl},{mac:"Alt-i",run:Bl},{key:"Escape",run:e=>{let t=e.state.field(Bi,!1);return!!t&&!!t.active.some(e=>0!=e.state)&&(e.dispatch({effects:NX.of(null)}),!0)}},{key:"ArrowDown",run:Ba(!0)},{key:"ArrowUp",run:Ba(!1)},{key:"PageDown",run:Ba(!0,"page")},{key:"PageUp",run:Ba(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(Bi,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(NQ).interactionDelay)&&Bo(e,t.open.options[t.open.selected])}}],B_=Oa.highest(Dk.computeN([NQ],e=>e.facet(NQ).defaultKeymap?[BT]:[]));var BI=function(e){let t;void 0===e&&(e={});var n=e.crosshairCursor,r=[];!1!==e.closeBracketsKeymap&&(r=r.concat(BA)),!1!==e.defaultKeymap&&(r=r.concat(LK)),!1!==e.searchKeymap&&(r=r.concat(NR)),!1!==e.historyKeymap&&(r=r.concat(P8)),!1!==e.foldKeymap&&(r=r.concat(ET)),!1!==e.completionKeymap&&(r=r.concat(BT)),!1!==e.lintKeymap&&(r=r.concat(Pd));var i=[];return!1!==e.lineNumbers&&i.push(function(e={}){return[RH.of(e),RP(),RG]}()),!1!==e.highlightActiveLineGutter&&i.push(RY),!1!==e.highlightSpecialChars&&i.push(function(e={}){return[D0.of(e),D1||(D1=_S.fromClass(class{constructor(e){this.view=e,this.decorations=Tw.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(D0)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new DY({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,o=MG(t[0],0);if(9==o){let e=i.lineAt(r),t=n.state.tabSize,o=OZ(e.text,t,r-e.from);return Tw.replace({widget:new D5((t-o%t)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Tw.replace({widget:new D2(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(D0);e.startState.facet(D0)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}()),!1!==e.history&&i.push(function(e={}){return[PX,Pq.of(e),Dv.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?PK:"historyRedo"==e.inputType?PQ:null;return!!n&&(e.preventDefault(),n(t))}})]}()),!1!==e.foldGutter&&i.push(function(e={}){let t={...EL,...e},n=new EN(t,!0),r=new EN(t,!1),i=_S.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(Ee)!=e.state.facet(Ee)||e.startState.field(EA,!1)!=e.state.field(EA,!1)||R1(e.startState)!=R1(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new OF;for(let i of e.viewportLineBlocks){let o=Ek(e.state,i.from,i.to)?r:Ey(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[i,RR({class:"cm-foldGutter",markers(e){var t;return(null==(t=e.plugin(i))?void 0:t.markers)||Oz.empty},initialSpacer:()=>new EN(t,!1),domEventHandlers:{...o,click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let r=Ek(e.state,t.from,t.to);if(r)return e.dispatch({effects:Ew.of(r)}),!0;let i=Ey(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:Ex.of(i)}),!0)}}}),ED()]}()),!1!==e.drawSelection&&i.push(function(e={}){return[Dj.of(e),D$,DV,DW,_p.of(!0)]}()),!1!==e.dropCursor&&i.push([DG,Dq]),!1!==e.allowMultipleSelections&&i.push(OR.allowMultipleSelections.of(!0)),!1!==e.indentOnInput&&i.push(OR.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);if(!t.some(e=>e.test(o)))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=Es(s,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=Eo(s,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e})),!1!==e.syntaxHighlighting&&i.push(EV(EW,{fallback:!0})),!1!==e.bracketMatching&&i.push(function(e={}){return[Eq.of(e),EZ]}()),!1!==e.closeBrackets&&i.push([BS,Bv]),!1!==e.autocompletion&&i.push(function(e={}){return[Bd,Bi,NQ.of(e),Bu,B_,Bp]}()),!1!==e.rectangularSelection&&i.push((t=e=>e.altKey&&0==e.button,Dv.mouseSelectionStyle.of((e,n)=>{let r,i;return t(n)?(r=D9(e,n),i=e.state.selection,r?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(r.line).from),n=e.state.doc.lineAt(t);r={line:n.number,col:r.col,off:Math.min(r.off,n.length)},i=i.map(e.changes)}},get(t,n,o){let s=D9(e,t);if(!s)return i;let a=function(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),o=[];if(t.off>2e3||n.off>2e3||t.col<0||n.col<0){let s=Math.min(t.off,n.off),a=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=a&&o.push(M6.range(n.from+s,n.to+a))}}else{let s=Math.min(t.col,n.col),a=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=OJ(n.text,s,e.tabSize,!0);if(r<0)o.push(M6.cursor(n.to));else{let t=OJ(n.text,a,e.tabSize);o.push(M6.range(n.from+r,n.from+t))}}}return o}(e.state,r,s);return a.length?o?M6.create(a.concat(i.ranges)):M6.create(a):i}}:null):null}))),!1!==(void 0!==n&&n)&&i.push(function(e={}){let[t,n]=D8[e.key||"Alt"],r=_S.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventObservers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,Dv.contentAttributes.of(e=>{var t;return(null==(t=e.plugin(r))?void 0:t.isDown)?D7:null})]}()),!1!==e.highlightActiveLine&&i.push(D4),!1!==e.highlightSelectionMatches&&i.push([Nr,Nn]),e.tabSize&&"number"==typeof e.tabSize&&i.push(Er.of(" ".repeat(e.tabSize))),i.concat([Dk.of(r.flat())]).filter(Boolean)};let BD="#e06c75",BR="#abb2bf",BE="#7d8799",BP="#d19a66",BL="#2c313a",BN="#282c34",BB="#353a42",Bj="#528bff",Bz=[Dv.theme({"&":{color:BR,backgroundColor:BN},".cm-content":{caretColor:Bj},".cm-cursor, .cm-dropCursor":{borderLeftColor:Bj},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:BR},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:BN,color:BE,border:"none"},".cm-activeLineGutter":{backgroundColor:BL},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:BB},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:BB,borderBottomColor:BB},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:BL,color:BR}}},{dark:!0}),EV(Ej.define([{tag:MC.keyword,color:"#c678dd"},{tag:[MC.name,MC.deleted,MC.character,MC.propertyName,MC.macroName],color:BD},{tag:[MC.function(MC.variableName),MC.labelName],color:"#61afef"},{tag:[MC.color,MC.constant(MC.name),MC.standard(MC.name)],color:BP},{tag:[MC.definition(MC.name),MC.separator],color:BR},{tag:[MC.typeName,MC.className,MC.number,MC.changed,MC.annotation,MC.modifier,MC.self,MC.namespace],color:"#e5c07b"},{tag:[MC.operator,MC.operatorKeyword,MC.url,MC.escape,MC.regexp,MC.link,MC.special(MC.string)],color:"#56b6c2"},{tag:[MC.meta,MC.comment],color:BE},{tag:MC.strong,fontWeight:"bold"},{tag:MC.emphasis,fontStyle:"italic"},{tag:MC.strikethrough,textDecoration:"line-through"},{tag:MC.link,color:BE,textDecoration:"underline"},{tag:MC.heading,fontWeight:"bold",color:BD},{tag:[MC.atom,MC.bool,MC.special(MC.variableName)],color:BP},{tag:[MC.processingInstruction,MC.string,MC.inserted],color:"#98c379"},{tag:MC.invalid,color:"#ffffff"}]))];var B$=Dv.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),BF=function(e){let t;void 0===e&&(e={});var n=e,r=n.indentWithTab,i=n.editable,o=n.readOnly,s=n.theme,a=void 0===s?"light":s,l=n.placeholder,c=void 0===l?"":l,u=n.basicSetup,h=void 0===u||u,d=[];switch((void 0===r||r)&&d.unshift(Dk.of([LQ])),h&&("boolean"==typeof h?d.unshift(BI()):d.unshift(BI(h))),c&&d.unshift((t=_S.fromClass(class{constructor(e){this.view=e,this.placeholder=c?Tw.set([Tw.widget({widget:new D6(c),side:1}).range(0)]):Tw.none}get decorations(){return this.view.state.doc.length?Tw.none:this.placeholder}},{decorations:e=>e.decorations}),"string"==typeof c?[t,Dv.contentAttributes.of({"aria-placeholder":c})]:t)),a){case"light":d.push(B$);break;case"dark":d.push(Bz);break;case"none":break;default:d.push(a)}return!1===(void 0===i||i)&&d.push(Dv.editable.of(!1)),void 0!==o&&o&&d.push(OR.readOnly.of(!0)),[...d]};class BV{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error("TimeoutLatch callback error:",e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class BH{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),0===this.latches.size&&this.stop()}start(){null===this.interval&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){null!==this.interval&&(clearInterval(this.interval),this.interval=null)}}var BW=null,BU=Dv.theme({"& .cm-scroller":{height:"100% !important"}}),BG=null,Bq=null,BX=Ow.define(),BY=[],BK=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],BQ=(0,u.forwardRef)((e,t)=>{var n,r,i,o,s,a,c,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O,T,_,I,D,R,E,P,L,N,B,j,z,$,F,V,H,W,U,G,q,X,Y,K,Q,Z,J,ee,et=e.className,en=e.value,er=void 0===en?"":en,ei=e.selection,eo=e.extensions,es=e.onChange,ea=e.onStatistics,el=e.onCreateEditor,ec=e.onUpdate,eu=e.autoFocus,eh=e.theme,ed=void 0===eh?"light":eh,ep=e.height,ef=e.minHeight,em=e.maxHeight,eg=e.width,ev=e.minWidth,ey=e.maxWidth,eb=e.basicSetup,ex=e.placeholder,ew=e.indentWithTab,eS=e.editable,eA=e.readOnly,eC=e.root,ek=e.initialState,eM=(0,PB.A)(e,BK),eO=(0,u.useRef)(null),eT=(r=(n={root:eC,value:er,autoFocus:eu,theme:ed,height:ep,minHeight:ef,maxHeight:em,width:eg,minWidth:ev,maxWidth:ey,basicSetup:eb,placeholder:ex,indentWithTab:ew,editable:eS,readOnly:eA,selection:ei,onChange:es,onStatistics:ea,onCreateEditor:el,onUpdate:ec,extensions:void 0===eo?[]:eo,initialState:ek}).value,i=n.selection,o=n.onChange,s=n.onStatistics,a=n.onCreateEditor,c=n.onUpdate,d=void 0===(h=n.extensions)?BY:h,p=n.autoFocus,m=void 0===(f=n.theme)?"light":f,v=void 0===(g=n.height)?null:g,b=void 0===(y=n.minHeight)?null:y,w=void 0===(x=n.maxHeight)?null:x,A=void 0===(S=n.width)?null:S,k=void 0===(C=n.minWidth)?null:C,O=void 0===(M=n.maxWidth)?null:M,_=void 0===(T=n.placeholder)?"":T,D=void 0===(I=n.editable)||I,E=void 0!==(R=n.readOnly)&&R,L=void 0===(P=n.indentWithTab)||P,B=void 0===(N=n.basicSetup)||N,j=n.root,z=n.initialState,F=($=(0,u.useState)())[0],V=$[1],W=(H=(0,u.useState)())[0],U=H[1],q=(G=(0,u.useState)())[0],X=G[1],Y=(0,u.useState)(()=>({current:null}))[0],K=(0,u.useState)(()=>({current:null}))[0],Q=function(e,t,n,r,i,o){if(!e&&!t&&!n&&!r&&!i&&!o)return null;var s=JSON.stringify({height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:o});return s===BG?Bq:(BG=s,Bq=Dv.theme({"&":{height:e,minHeight:t,maxHeight:n,width:r,minWidth:i,maxWidth:o}}))}(v,b,w,A,k,O),Z=Dv.updateListener.of(e=>{e.docChanged&&"function"==typeof o&&!e.transactions.some(e=>e.annotation(BX))&&(Y.current?Y.current.reset():(Y.current=new BV(()=>{if(K.current){var e=K.current;K.current=null,e()}Y.current=null},200),("u"<typeof window?new BH:(!BW&&(BW=new BH),BW)).add(Y.current)),o(e.state.doc.toString(),e)),s&&s({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)})}),J=BF({theme:m,editable:D,readOnly:E,placeholder:_,indentWithTab:L,basicSetup:B}),ee=[Z,...Q?[Q]:[],BU,...J],c&&"function"==typeof c&&ee.push(Dv.updateListener.of(c)),ee=ee.concat(d),(0,u.useLayoutEffect)(()=>{if(F&&!q){var e={doc:r,selection:i,extensions:ee},t=z?OR.fromJSON(z.json,e,z.fields):OR.create(e);if(X(t),!W){var n=new Dv({state:t,parent:F,root:j});U(n),a&&a(n,t)}}return()=>{W&&(X(void 0),U(void 0))}},[F,q]),(0,u.useEffect)(()=>{n.container&&V(n.container)},[n.container]),(0,u.useEffect)(()=>()=>{W&&(W.destroy(),U(void 0)),Y.current&&(Y.current.cancel(),Y.current=null)},[W]),(0,u.useEffect)(()=>{p&&W&&W.focus()},[p,W]),(0,u.useEffect)(()=>{W&&W.dispatch({effects:OC.reconfigure.of(ee)})},[m,d,v,b,w,A,k,O,_,D,E,L,B,o,c]),(0,u.useEffect)(()=>{if(void 0!==r){var e=W?W.state.doc.toString():"";if(W&&r!==e){var t=Y.current&&!Y.current.isDone,n=()=>{W&&r!==W.state.doc.toString()&&W.dispatch({changes:{from:0,to:W.state.doc.toString().length,insert:r||""},annotations:[BX.of(!0)]})};t?K.current=n:n()}}},[r,W]),{state:q,setState:X,view:W,setView:U,container:F,setContainer:V}),e_=eT.state,eI=eT.view,eD=eT.container,eR=eT.setContainer;(0,u.useImperativeHandle)(t,()=>({editor:eO.current,state:e_,view:eI}),[eO,eD,e_,eI]);var eE=(0,u.useCallback)(e=>{eO.current=e,eR(e)},[eR]);if("string"!=typeof er)throw Error("value must be typeof string but got "+typeof er);return(0,l.jsx)("div",(0,PN.A)({ref:eE,className:("string"==typeof ed?"cm-theme-"+ed:"cm-theme")+(et?" "+et:"")},eM))});function BZ(e){let t,n,r,i,o,s,a,h,d,p,f=(0,c.c)(26);f[0]!==e?({value:n,serialize:o,extensions:t,onChange:r,...i}=e,f[0]=e,f[1]=t,f[2]=n,f[3]=r,f[4]=i,f[5]=o):(t=f[1],n=f[2],r=f[3],i=f[4],o=f[5]);let m=(0,e8.A)(),g="dark"===m.palette.mode;f[6]!==n||f[7]!==o?(s=()=>o(n),f[6]=n,f[7]=o,f[8]=s):s=f[8];let[v,y]=(0,u.useState)(s),[b,x]=(0,u.useState)(v),w=`1px solid ${m.palette.divider}`;f[9]!==w?(a={border:w},f[9]=w,f[10]=a):a=f[10];let S=g?"dark":"light";return f[11]!==r?(h=e=>{y(e),r&&r(e)},f[11]=r,f[12]=h):h=f[12],f[13]!==b||f[14]!==r||f[15]!==v?(d=()=>{b!==v&&void 0!==r&&(r(v),x(v))},f[13]=b,f[14]=r,f[15]=v,f[16]=d):d=f[16],f[17]!==t||f[18]!==e.placeholder||f[19]!==i||f[20]!==a||f[21]!==S||f[22]!==h||f[23]!==d||f[24]!==v?(p=(0,l.jsx)(BQ,{...i,style:a,theme:S,extensions:t,value:v,onChange:h,onBlur:d,placeholder:e.placeholder}),f[17]=t,f[18]=e.placeholder,f[19]=i,f[20]=a,f[21]=S,f[22]=h,f[23]=d,f[24]=v,f[25]=p):p=f[25],p}BQ.displayName="CodeMirror";let BJ=[new Et(E7),Pg(e=>{try{JSON.parse(e.state.doc.toString())}catch(i){var t;let n;if(!(i instanceof SyntaxError))throw i;let r=(t=e.state.doc,(n=i.message.match(/at position (\d+)/))?Math.min(+n[1],t.length):(n=i.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+n[1]).from+ +n[2]-1,t.length):0);return[{from:r,message:i.message,severity:"error",to:r}]}return[]}),PL()];function B0(e){return JSON.stringify(e,null,2)}function B1(e){let t,n=(0,c.c)(2);return n[0]!==e?(t=(0,l.jsx)(BZ,{...e,extensions:BJ,serialize:B0}),n[0]=e,n[1]=t):t=n[1],t}var B2=n("Ct");let B5=e=>{let t,n,r,i,o,s,a,u,h=(0,c.c)(29),{mode:d,url:p,name:f,newTabOpen:m,renderVariables:g,tooltip:v}=e,y=p.error?.hasError,b=p.error?.helperText;return h[0]!==y||h[1]!==b||h[2]!==p.label||h[3]!==p.onBlur||h[4]!==p.onChange||h[5]!==p.placeholder||h[6]!==p.value?(t=(0,l.jsx)(hR,{label:p.label,error:y,helperText:b,onChange:p.onChange,onBlur:p.onBlur,placeholder:p.placeholder,multiline:!0,maxRows:5,required:!0,fullWidth:!0,value:p.value}),h[0]=y,h[1]=b,h[2]=p.label,h[3]=p.onBlur,h[4]=p.onChange,h[5]=p.placeholder,h[6]=p.value,h[7]=t):t=h[7],h[8]!==d||h[9]!==f||h[10]!==v?(n=(f||v)&&(0,l.jsxs)(eb,{gap:1,direction:"inline"===d?"row":"column",children:[f&&(0,l.jsx)(hR,{sx:{flexGrow:"1"},label:f.label,onChange:f?.onChange,placeholder:f?.placeholder,value:f?.value}),v&&(0,l.jsx)(hR,{sx:{flexGrow:"1"},label:v.label,onChange:v?.onChange,placeholder:v?.placeholder,value:v?.value})]}),h[8]=d,h[9]=f,h[10]=v,h[11]=n):n=h[11],h[12]!==g?(r=g&&(0,l.jsx)(B2.A,{label:g.label,control:(0,l.jsx)(lm,{checked:g.value,onChange:e=>{g?.onChange(e.target.checked)}})}),h[12]=g,h[13]=r):r=h[13],h[14]!==m?(i=e=>{m?.onChange(e.target.checked)},h[14]=m,h[15]=i):i=h[15],h[16]!==m.value||h[17]!==i?(o=(0,l.jsx)(lm,{checked:m.value,onChange:i}),h[16]=m.value,h[17]=i,h[18]=o):o=h[18],h[19]!==m.label||h[20]!==o?(s=(0,l.jsx)(B2.A,{label:m.label,control:o}),h[19]=m.label,h[20]=o,h[21]=s):s=h[21],h[22]!==r||h[23]!==s?(a=(0,l.jsxs)(eb,{direction:"row",gap:1,children:[r,s]}),h[22]=r,h[23]=s,h[24]=a):a=h[24],h[25]!==t||h[26]!==n||h[27]!==a?(u=(0,l.jsxs)(eb,{direction:"column",gap:2,flexGrow:1,children:[t,n,a]}),h[25]=t,h[26]=n,h[27]=a,h[28]=u):u=h[28],u},B3=[{id:"value",label:"Value"},{id:"percentage",label:"Percentage"}];function B4(e){let t,n,r,i,o=(0,c.c)(10),{disablePercentageMode:s,onChange:a,value:u}=e,h=void 0===u?"value":u;o[0]!==a?(t=(e,t)=>{let{id:n}=t;a(n)},o[0]=a,o[1]=t):t=o[1];let d=t;return o[2]!==h?(n=B3.find(e=>e.id===h),o[2]=h,o[3]=n):n=o[3],o[4]!==s?(r=e=>"percentage"===e.id&&s,o[4]=s,o[5]=r):r=o[5],o[6]!==d||o[7]!==n||o[8]!==r?(i=(0,l.jsx)(f0,{label:"Mode",control:(0,l.jsx)(mP,{value:n,options:B3,getOptionLabel:B6,getOptionDisabled:r,onChange:d,disableClearable:!0})}),o[6]=d,o[7]=n,o[8]=r,o[9]=i):i=o[9],i}function B6(e){return e.label}let B9=u.createContext();function B8(e){return(0,M.Ay)("MuiGrid",e)}let B7=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],je=(0,k.A)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map(e=>`spacing-xs-${e}`),...["column-reverse","column","row-reverse","row"].map(e=>`direction-xs-${e}`),...["nowrap","wrap-reverse","wrap"].map(e=>`wrap-xs-${e}`),...B7.map(e=>`grid-xs-${e}`),...B7.map(e=>`grid-sm-${e}`),...B7.map(e=>`grid-md-${e}`),...B7.map(e=>`grid-lg-${e}`),...B7.map(e=>`grid-xl-${e}`)]);function jt({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(e=>{""===n&&0!==t[e]&&(n=e)});let r=Object.keys(e).sort((t,n)=>e[t]-e[n]);return r.slice(0,r.indexOf(n))}let jn=(0,y.A)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n,u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];let r=[];return t.forEach(t=>{let i=e[t];Number(i)>0&&r.push(n[`spacing-${t}-${String(i)}`])}),r}(s,c,t));let h=[];return c.forEach(e=>{let r=n[e];r&&h.push(t[`grid-${e}-${String(r)}`])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...u,"row"!==i&&t[`direction-xs-${String(i)}`],"wrap"!==a&&t[`wrap-xs-${String(a)}`],...h]}})(({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},..."wrap"!==e.wrap&&{flexWrap:e.wrap}}),function({theme:e,ownerState:t}){let n=(0,ed.kW)({values:t.direction,breakpoints:e.breakpoints.values});return(0,ed.NI)({theme:e},n,e=>{let t={flexDirection:e};return e.startsWith("column")&&(t[`& > .${je.item}`]={maxWidth:"none"}),t})},function({theme:e,ownerState:t}){let{container:n,rowSpacing:r}=t,i={};if(n&&0!==r){let t,n=(0,ed.kW)({values:r,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=jt({breakpoints:e.breakpoints.values,values:n})),i=(0,ed.NI)({theme:e},n,(n,r)=>{let i=e.spacing(n);return"0px"!==i?{marginTop:`calc(-1 * ${i})`,[`& > .${je.item}`]:{paddingTop:i}}:t?.includes(r)?{}:{marginTop:0,[`& > .${je.item}`]:{paddingTop:0}}})}return i},function({theme:e,ownerState:t}){let{container:n,columnSpacing:r}=t,i={};if(n&&0!==r){let t,n=(0,ed.kW)({values:r,breakpoints:e.breakpoints.values});"object"==typeof n&&(t=jt({breakpoints:e.breakpoints.values,values:n})),i=(0,ed.NI)({theme:e},n,(n,r)=>{let i=e.spacing(n);if("0px"!==i){let e=`calc(-1 * ${i})`;return{width:`calc(100% + ${i})`,marginLeft:e,[`& > .${je.item}`]:{paddingLeft:i}}}return t?.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${je.item}`]:{paddingLeft:0}}})}return i},function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,i)=>{let o={};if(t[i]&&(n=t[i]),!n)return r;if(!0===n)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{let s=(0,ed.kW)({values:t.columns,breakpoints:e.breakpoints.values}),a="object"==typeof s?s[i]:s;if(null==a)return r;let l=`${Math.round(n/a*1e8)/1e6}%`,c={};if(t.container&&t.item&&0!==t.columnSpacing){let n=e.spacing(t.columnSpacing);if("0px"!==n){let e=`calc(${l} + ${n})`;c={flexBasis:e,maxWidth:e}}}o={flexBasis:l,flexGrow:0,maxWidth:l,...c}}return 0===e.breakpoints.values[i]?Object.assign(r,o):r[e.breakpoints.up(i)]=o,r},{})}),jr=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiGrid"}),{breakpoints:r}=(0,e8.A)(),i=(0,eu.A)(n),{className:o,columns:s,columnSpacing:a,component:c="div",container:h=!1,direction:p="row",item:m=!1,rowSpacing:g,spacing:v=0,wrap:y="wrap",zeroMinWidth:b=!1,...w}=i,S=u.useContext(B9),A=h?s||12:S,C={},k={...w};r.keys.forEach(e=>{null!=w[e]&&(C[e]=w[e],delete k[e])});let M={...i,columns:A,container:h,direction:p,item:m,rowSpacing:g||v,columnSpacing:a||v,wrap:y,zeroMinWidth:b,spacing:v,...C,breakpoints:r.keys},O=(e=>{let{classes:t,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=e,c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];let n=[];return t.forEach(t=>{let r=e[t];if(Number(r)>0){let e=`spacing-${t}-${String(r)}`;n.push(e)}}),n}(o,l));let u=[];l.forEach(t=>{let n=e[t];n&&u.push(`grid-${t}-${String(n)}`)});let h={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==s&&`wrap-xs-${String(s)}`,...u]};return(0,f.A)(h,B8,t)})(M);return(0,l.jsx)(B9.Provider,{value:A,children:(0,l.jsx)(jn,{ownerState:M,className:(0,d.A)(O.root,o),as:c,ref:t,...k})})}),ji=e=>{let t,n=(0,c.c)(2),{children:r}=e;return n[0]!==r?(t=(0,l.jsx)(jr,{item:!0,xs:4,children:(0,l.jsx)(eb,{spacing:3,children:r})}),n[0]=r,n[1]=t):t=n[1],t},jo=e=>{let t,n=(0,c.c)(2),{children:r}=e;return n[0]!==r?(t=(0,l.jsx)(jr,{container:!0,spacing:8,children:r}),n[0]=r,n[1]=t):t=n[1],t},js=e=>{let t,n,r,i,o,s=(0,c.c)(12),{title:a,children:u,icon:h}=e;return s[0]!==a?(t=(0,l.jsx)(nc.A,{variant:"overline",component:"h4",children:a}),s[0]=a,s[1]=t):t=s[1],s[2]!==h?(n=h&&(0,l.jsx)(e7.A,{sx:{marginLeft:"auto"},children:h}),s[2]=h,s[3]=n):n=s[3],s[4]!==t||s[5]!==n?(r=(0,l.jsxs)(e7.A,{display:"flex",borderBottom:1,borderColor:"grey.300",marginBottom:ja,children:[t,n]}),s[4]=t,s[5]=n,s[6]=r):r=s[6],s[7]!==u?(i=(0,l.jsx)(eb,{spacing:1,children:u}),s[7]=u,s[8]=i):i=s[8],s[9]!==r||s[10]!==i?(o=(0,l.jsxs)(e7.A,{children:[r,i]}),s[9]=r,s[10]=i,s[11]=o):o=s[11],o};function ja(e){return e.spacing(1)}function jl(e){return(0,M.Ay)("MuiSkeleton",e)}(0,k.A)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);let jc=(0,S.keyframes)`
|
|
31
|
+
0% {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
50% {
|
|
36
|
+
opacity: 0.4;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
100% {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
`,ju=(0,S.keyframes)`
|
|
43
|
+
0% {
|
|
44
|
+
transform: translateX(-100%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
50% {
|
|
48
|
+
/* +0.5s of delay between each loop */
|
|
49
|
+
transform: translateX(100%);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
100% {
|
|
53
|
+
transform: translateX(100%);
|
|
54
|
+
}
|
|
55
|
+
`,jh="string"!=typeof jc?(0,S.css)`
|
|
56
|
+
animation: ${jc} 2s ease-in-out 0.5s infinite;
|
|
57
|
+
`:null,jd="string"!=typeof ju?(0,S.css)`
|
|
58
|
+
&::after {
|
|
59
|
+
animation: ${ju} 2s linear 0.5s infinite;
|
|
60
|
+
}
|
|
61
|
+
`:null,jp=(0,y.A)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!1!==n.animation&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})((0,b.A)(({theme:e})=>{let t=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",n=parseFloat(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:(0,m.X4)(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:jh||{animation:`${jc} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient(
|
|
62
|
+
90deg,
|
|
63
|
+
transparent,
|
|
64
|
+
${(e.vars||e).palette.action.hover},
|
|
65
|
+
transparent
|
|
66
|
+
)`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:jd||{"&::after":{animation:`${ju} 2s linear 0.5s infinite`}}}]}})),jf=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiSkeleton"}),{animation:r="pulse",className:i,component:o="span",height:s,style:a,variant:c="text",width:u,...h}=n,p={...n,animation:r,component:o,variant:c,hasChildren:!!h.children},m=(e=>{let{classes:t,variant:n,animation:r,hasChildren:i,width:o,height:s}=e;return(0,f.A)({root:["root",n,r,i&&"withChildren",i&&!o&&"fitContent",i&&!s&&"heightAuto"]},jl,t)})(p);return(0,l.jsx)(jp,{as:o,ref:t,className:(0,d.A)(m.root,i),ownerState:p,...h,style:{width:u,height:s,...a}})});function jm(e){let t,n,r=(0,c.c)(3),{message:i}=e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={height:"100%",alignItems:"center",justifyContent:"center"},r[0]=t):t=r[0],r[1]!==i?(n=(0,l.jsx)(eb,{sx:t,children:(0,l.jsx)(nc.A,{children:i})}),r[1]=i,r[2]=n):n=r[2],n}function jg(e){let t,n=(0,c.c)(2),{resource:r}=e,i=`No ${r}`;return n[0]!==i?(t=(0,l.jsx)(jm,{message:i}),n[0]=i,n[1]=t):t=n[1],t}function jv(e){let t,n,r=(0,c.c)(3),{variant:i}=e,o=void 0===i?"rounded":i;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t={height:"100%",alignItems:"center",justifyContent:"center",px:1},r[0]=t):t=r[0],r[1]!==o?(n=(0,l.jsx)(eb,{sx:t,children:(0,l.jsx)(jf,{variant:o,width:"100%",height:"30%","aria-label":"Loading..."})}),r[1]=o,r[2]=n):n=r[2],n}let jy=[{id:"asc",label:"Ascending"},{id:"desc",label:"Descending"}];function jb(e){let t,n,r,i=(0,c.c)(7),{onChange:o,value:s}=e,a=void 0===s?"desc":s;i[0]!==o?(t=(e,t)=>{let{id:n}=t;o(n)},i[0]=o,i[1]=t):t=i[1];let u=t;return i[2]!==a?(n=jy.find(e=>e.id===a),i[2]=a,i[3]=n):n=i[3],i[4]!==u||i[5]!==n?(r=(0,l.jsx)(f0,{label:"Sort",control:(0,l.jsx)(mP,{value:n,options:jy,getOptionLabel:jx,onChange:u,disableClearable:!0})}),i[4]=u,i[5]=n,i[6]=r):r=i[6],r}function jx(e){return e.label}function jw(e){let t,n,r,i,o,s,a,u,h,d,p=(0,c.c)(24);if(p[0]!==e){let{onChange:i,value:o,...s}=e;r=o,t=s,n=e=>{i(e)},p[0]=e,p[1]=t,p[2]=n,p[3]=r}else t=p[1],n=p[2],r=p[3];let f=n;p[4]!==f?(i=()=>f(void 0),p[4]=f,p[5]=i):i=p[5];let m=void 0===r?"contained":"outlined";p[6]!==i||p[7]!==m?(o=(0,l.jsx)(G,{onClick:i,variant:m,children:"None"}),p[6]=i,p[7]=m,p[8]=o):o=p[8],p[9]!==f?(s=()=>f("asc"),p[9]=f,p[10]=s):s=p[10];let g="asc"===r?"contained":"outlined";p[11]!==s||p[12]!==g?(a=(0,l.jsx)(G,{onClick:s,variant:g,children:"Asc"}),p[11]=s,p[12]=g,p[13]=a):a=p[13],p[14]!==f?(u=()=>f("desc"),p[14]=f,p[15]=u):u=p[15];let v="desc"===r?"contained":"outlined";return p[16]!==u||p[17]!==v?(h=(0,l.jsx)(G,{onClick:u,variant:v,children:"Desc"}),p[16]=u,p[17]=v,p[18]=h):h=p[18],p[19]!==t||p[20]!==h||p[21]!==o||p[22]!==a?(d=(0,l.jsxs)(Q,{"aria-label":"Sort",...t,children:[o,a,h]}),p[19]=t,p[20]=h,p[21]=o,p[22]=a,p[23]=d):d=p[23],d}function jS(e){return(0,M.Ay)("MuiToggleButton",e)}let jA=(0,k.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),jC=u.createContext({}),jk=u.createContext(void 0),jM=(0,y.A)(w.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${(0,A.A)(n.size)}`]]}})((0,b.A)(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${jA.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${jA.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,m.X4)(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter((0,C.A)()).map(([t])=>({props:{color:t},style:{[`&.${jA.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,m.X4)(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,m.X4)(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),jO=u.forwardRef(function(e,t){var n;let{value:r,...i}=u.useContext(jC),o=u.useContext(jk),s=(0,p.A)({...i,selected:(n=e.value,void 0!==r&&void 0!==n&&(Array.isArray(r)?r.includes(n):n===r))},e),a=(0,x.b)({props:s,name:"MuiToggleButton"}),{children:c,className:h,color:m="standard",disabled:g=!1,disableFocusRipple:v=!1,fullWidth:y=!1,onChange:b,onClick:w,selected:S,size:C="medium",value:k,...M}=a,O={...a,color:m,disabled:g,disableFocusRipple:v,fullWidth:y,size:C},T=(e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:o,color:s}=e,a={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${(0,A.A)(o)}`,s]};return(0,f.A)(a,jS,t)})(O);return(0,l.jsx)(jM,{className:(0,d.A)(i.className,T.root,h,o||""),disabled:g,focusRipple:!v,ref:t,onClick:e=>{w&&(w(e,k),e.defaultPrevented)||b&&b(e,k)},onChange:b,value:k,ownerState:O,"aria-pressed":S,...M,children:c})});function jT(e){return(0,M.Ay)("MuiToggleButtonGroup",e)}let j_=(0,k.A)("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),jI=(0,y.A)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${j_.grouped}`]:t.grouped},{[`& .${j_.grouped}`]:t[`grouped${(0,A.A)(n.orientation)}`]},{[`& .${j_.firstButton}`]:t.firstButton},{[`& .${j_.lastButton}`]:t.lastButton},{[`& .${j_.middleButton}`]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((0,b.A)(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${j_.grouped}`]:{[`&.${j_.selected} + .${j_.grouped}.${j_.selected}`]:{borderTop:0,marginTop:0}},[`& .${j_.firstButton},& .${j_.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${j_.lastButton},& .${j_.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${j_.lastButton}.${jA.disabled},& .${j_.middleButton}.${jA.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${j_.grouped}`]:{[`&.${j_.selected} + .${j_.grouped}.${j_.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${j_.firstButton},& .${j_.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${j_.lastButton},& .${j_.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${j_.lastButton}.${jA.disabled},& .${j_.middleButton}.${jA.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),jD=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:i,color:o="standard",disabled:s=!1,exclusive:a=!1,fullWidth:c=!1,onChange:h,orientation:p="horizontal",size:m="medium",value:g,...v}=n,y={...n,disabled:s,fullWidth:c,orientation:p,size:m},b=(e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e,o={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${(0,A.A)(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,f.A)(o,jT,t)})(y),w=u.useCallback((e,t)=>{let n;if(!h)return;let r=g&&g.indexOf(t);g&&r>=0?(n=g.slice()).splice(r,1):n=g?g.concat(t):[t],h(e,n)},[h,g]),S=u.useCallback((e,t)=>{h&&h(e,g===t?null:t)},[h,g]),C=u.useMemo(()=>({className:b.grouped,onChange:a?S:w,value:g,size:m,fullWidth:c,color:o,disabled:s}),[b.grouped,a,S,w,g,m,c,o,s]),k=q(r),M=k.length;return(0,l.jsx)(jI,{role:"group",className:(0,d.A)(b.root,i),ref:t,ownerState:y,...v,children:(0,l.jsx)(jC.Provider,{value:C,children:k.map((e,t)=>{let n,r;return(0,l.jsx)(jk.Provider,{value:(n=0===t,r=t===M-1,n&&r?"":n?b.firstButton:r?b.lastButton:b.middleButton),children:e},t)})})})}),jR=ey();var jE=n("iS"),jP=n("Ny");function jL(e){let t,n,r,i,o,s,a,h,d,p=(0,c.c)(31),{inputRef:f,label:m,color:g,value:v,mode:y,onChange:b,onColorChange:x,onBlur:w,onDelete:S}=e,[A,C]=(0,u.useState)(0);p[0]!==g||p[1]!==m||p[2]!==x?(t=(0,l.jsx)(e4,{label:m,color:g,onColorChange:x}),p[0]=g,p[1]=m,p[2]=x,p[3]=t):t=p[3],p[4]!==m?(n=(0,l.jsx)(fG.A,{htmlFor:m,children:m}),p[4]=m,p[5]=n):n=p[5];let k=0===v?"":v;p[6]!==A||p[7]!==w?(r=e=>{"Enter"===e.key&&(w(),C(A+1))},p[6]=A,p[7]=w,p[8]=r):r=p[8],p[9]!==y?(i="percent"===y?(0,l.jsx)(e7.A,{paddingX:1,children:"%"}):void 0,p[9]=y,p[10]=i):i=p[10],p[11]!==i?(o={endAdornment:i},p[11]=i,p[12]=o):o=p[12],p[13]!==f||p[14]!==A||p[15]!==m||p[16]!==w||p[17]!==b||p[18]!==k||p[19]!==r||p[20]!==o?(s=(0,l.jsx)(ex.A,{id:m,inputRef:f,type:"number",value:k,placeholder:"0",onChange:b,onBlur:w,onKeyDown:r,InputProps:o},A),p[13]=f,p[14]=A,p[15]=m,p[16]=w,p[17]=b,p[18]=k,p[19]=r,p[20]=o,p[21]=s):s=p[21];let M=`delete threshold ${m}`;return p[22]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.jsx)(jP,{}),p[22]=a):a=p[22],p[23]!==S||p[24]!==M?(h=(0,l.jsx)(er,{"aria-label":M,size:"small",onClick:S,children:a}),p[23]=S,p[24]=M,p[25]=h):h=p[25],p[26]!==t||p[27]!==h||p[28]!==n||p[29]!==s?(d=(0,l.jsxs)(eb,{flex:1,direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[t,n,s,h]}),p[26]=t,p[27]=h,p[28]=n,p[29]=s,p[30]=d):d=p[30],d}function jN(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w=(0,c.c)(52),{thresholds:S,onChange:A,hideDefault:C,disablePercentMode:k}=e,{thresholds:M}=e3(),{defaultColor:O,palette:T}=M,_=S?.defaultColor??O,I=S?.steps,D=(0,u.useRef)(null),R=(0,u.useRef)(!1);w[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{D.current&&R.current&&(D.current?.focus(),R.current=!1)},w[0]=t):t=w[0],(0,u.useEffect)(t),w[1]!==A||w[2]!==S?(n=(e,t)=>{void 0!==S&&A(t6(S,n=>{let r=n.steps?.[t];r&&(r.value=Number(e.target.value))}))},w[1]=A,w[2]=S,w[3]=n):n=w[3];let E=n;w[4]!==A||w[5]!==S?(r=(e,t)=>{void 0!==S&&A(t6(S,n=>{if(void 0!==n.steps){let r=n.steps[t];r&&(r.color=e)}}))},w[4]=A,w[5]=S,w[6]=r):r=w[6];let P=r;w[7]!==A||w[8]!==S?(i=e=>{void 0!==S?A(t6(S,t=>{t.defaultColor=e})):A({defaultColor:e})},w[7]=A,w[8]=S,w[9]=i):i=w[9];let L=i;w[10]!==A||w[11]!==I||w[12]!==S?(o=()=>{if(void 0!==I){let e=[...I];e.sort(jj),void 0!==S&&A(t6(S,t=>{t.steps=e}))}},w[10]=A,w[11]=I,w[12]=S,w[13]=o):o=w[13];let N=o;w[14]!==A||w[15]!==S?(s=e=>{void 0!==S&&A(t6(S,t=>{t.steps&&t.steps.splice(e,1)}))},w[14]=A,w[15]=S,w[16]=s):s=w[16];let B=s;w[17]!==A||w[18]!==T||w[19]!==S?(a=()=>{R.current=!0,void 0===S?A({steps:[{value:10}]}):S&&void 0===S.steps?A(t6(S,jB)):A(t6(S,e=>{let t=e.steps;if(t?.length){let e=t[t.length-1],n=T[t.length]??jz();t.push({color:n,value:(e?.value??0)+10})}else t&&t.push({value:10})}))},w[17]=A,w[18]=T,w[19]=S,w[20]=a):a=w[20];let j=a;w[21]!==A||w[22]!==S?(h=(e,t)=>{let n="percent"===t?"percent":void 0;void 0!==S?A(t6(S,e=>{e.mode=n})):A({mode:n})},w[21]=A,w[22]=S,w[23]=h):h=w[23];let z=h;w[24]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(jE,{}),w[24]=d):d=w[24],w[25]!==j?(p=(0,l.jsx)(fY,{description:"Add threshold",children:(0,l.jsx)(er,{size:"small","aria-label":"add threshold",onClick:j,children:d})}),w[25]=j,w[26]=p):p=w[26];let $=S?.mode??"absolute";return w[27]===Symbol.for("react.memo_cache_sentinel")?(f={height:"36px",marginLeft:"auto"},w[27]=f):f=w[27],w[28]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)(jO,{"aria-label":"absolute",value:"absolute",sx:{fontWeight:500},children:"Absolute"}),w[28]=m):m=w[28],w[29]===Symbol.for("react.memo_cache_sentinel")?(g=(0,l.jsx)(jO,{"aria-label":"percent",value:"percent",sx:{fontWeight:500},children:"Percent"}),w[29]=g):g=w[29],w[30]!==k||w[31]!==z||w[32]!==$?(v=(0,l.jsx)(f0,{label:"Mode",description:"Percentage means thresholds relative to min & max",control:(0,l.jsxs)(jD,{exclusive:!0,disabled:k,value:$,onChange:z,sx:f,children:[m,g]})}),w[30]=k,w[31]=z,w[32]=$,w[33]=v):v=w[33],w[34]!==_||w[35]!==B||w[36]!==N||w[37]!==P||w[38]!==E||w[39]!==T||w[40]!==I||w[41]!==S?.mode?(y=I&&I.map((e,t)=>(0,l.jsx)(jL,{inputRef:t===I.length-1?D:void 0,label:`T${t+1}`,color:e.color??T[t]??_,value:e.value,mode:S?.mode,onColorChange:e=>P(e,t),onChange:e=>{E(e,t)},onDelete:()=>{B(t)},onBlur:N},t)).toReversed(),w[34]=_,w[35]=B,w[36]=N,w[37]=P,w[38]=E,w[39]=T,w[40]=I,w[41]=S?.mode,w[42]=y):y=w[42],w[43]!==_||w[44]!==L||w[45]!==C?(b=!C&&(0,l.jsxs)(jR,{flex:1,direction:"row",alignItems:"center",spacing:1,children:[(0,l.jsx)(e4,{label:"default",color:_,onColorChange:L}),(0,l.jsx)(nc.A,{children:"Default"})]}),w[43]=_,w[44]=L,w[45]=C,w[46]=b):b=w[46],w[47]!==p||w[48]!==v||w[49]!==y||w[50]!==b?(x=(0,l.jsxs)(js,{title:"Thresholds",icon:p,children:[v,y,b]}),w[47]=p,w[48]=v,w[49]=y,w[50]=b,w[51]=x):x=w[51],x}function jB(e){e.steps=[{value:10}]}function jj(e,t){return e.value-t.value}let jz=()=>"#"+Math.floor(0x1000000*Math.random()).toString(16).padStart(6,"0"),j$=/^(?:(\d+)y)?(?:(\d+)w)?(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?(?:(\d+)ms)?$/;function jF(e){let t=j$.exec(e);if(null===t)throw Error(`Invalid duration string '${e}'`);return{years:parseInt(t[1]??"0"),months:0,weeks:parseInt(t[2]??"0"),days:parseInt(t[3]??"0"),hours:parseInt(t[4]??"0"),minutes:parseInt(t[5]??"0"),seconds:parseInt(t[6]??"0")+parseInt(t[7]??"0")/1e3}}function jV(e){return void 0!==e.pastDuration}var jH=n("IA"),jW=n("rP");function jU(){return["local","UTC",...Intl.supportedValuesOf?.("timeZone")??[]].filter((e,t,n)=>n.indexOf(e)===t).map(e=>({value:e,display:"local"===e?"Local":e.replace(/_/g," ")}))}var jG=n("VuA"),jq=n.n(jG),jX=n("DS");function jY({props:e,name:t}){return ec({props:e,name:t,defaultTheme:jX.A,themeId:gW.A})}let jK=["localeText"],jQ=u.createContext(null),jZ=function(e){let{localeText:t}=e,n=(0,PB.A)(e,jK),{utils:r,localeText:i}=u.useContext(jQ)??{utils:void 0,localeText:void 0},{children:o,dateAdapter:s,dateFormats:a,dateLibInstance:c,adapterLocale:h,localeText:d}=jY({props:n,name:"MuiLocalizationProvider"}),p=u.useMemo(()=>(0,PN.A)({},d,i,t),[d,i,t]),f=u.useMemo(()=>{if(!s)return r||null;let e=new s({locale:h,formats:a,instance:c});if(!e.isMUIAdapter)throw Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
67
|
+
`));return e},[s,h,a,c,r]),m=u.useMemo(()=>f?{minDate:f.date("1900-01-01T00:00:00.000"),maxDate:f.date("2099-12-31T00:00:00.000")}:null,[f]),g=u.useMemo(()=>({utils:f,defaultDates:m,localeText:p}),[m,f,p]);return(0,l.jsx)(jQ.Provider,{value:g,children:o})},jJ={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>"year"===e?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(null===t||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||null!==e&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>"letter"===e.contentType?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>"letter"===e.contentType?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"};(0,PN.A)({},jJ);let j0=()=>{let e=u.useContext(jQ);if(null===e)throw Error("MUI X: Can not find the date and time pickers localization context.\nIt looks like you forgot to wrap your component in LocalizationProvider.\nThis can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package");if(null===e.utils)throw Error("MUI X: Can not find the date and time pickers adapter from its localization context.\nIt looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.");let t=u.useMemo(()=>(0,PN.A)({},jJ,e.localeText),[e.localeText]);return u.useMemo(()=>(0,PN.A)({},e,{localeText:t}),[e,t])},j1=e=>{let t=j0().utils,n=u.useRef(void 0);return void 0===n.current&&(n.current=t.date(void 0,e)),n.current},j2=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n))},j5=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:o,utils:s,timezone:a})=>{let l=j2(s,s.date(void 0,a),e);n&&s.isBefore(i,l)&&(i=l),t&&s.isAfter(r,l)&&(r=l);let c=e,u=e;for(s.isBefore(e,i)&&(c=i,u=null),s.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&s.isAfter(c,r)&&(c=null),u&&s.isBefore(u,i)&&(u=null),c){if(!o(c))return c;c=s.addDays(c,1)}if(u){if(!o(u))return u;u=s.addDays(u,-1)}}return null},j3=(e,t,n)=>null!=t&&e.isValid(t)?t:n,j4=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},j6=(e,t,n)=>"date"===n?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),j9=(e,t)=>{let n=e.setHours(e.date(),"am"===t?2:14);return e.format(n,"meridiem")},j8=["year","month","day"],j7=e=>j8.includes(e);function ze(e){return(0,M.Ay)("MuiTab",e)}let zt=(0,k.A)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),zn=(0,y.A)(w.A,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${(0,A.A)(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${zt.iconWrapper}`]:t.iconWrapper},{[`& .${zt.icon}`]:t.icon}]}})((0,b.A)(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${zt.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${zt.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${zt.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${zt.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${zt.selected}`]:{opacity:1},[`&.${zt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${zt.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${zt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${zt.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${zt.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),zr=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTab"}),{className:r,disabled:i=!1,disableFocusRipple:o=!1,fullWidth:s,icon:a,iconPosition:c="top",indicator:h,label:p,onChange:m,onClick:g,onFocus:v,selected:y,selectionFollowsFocus:b,textColor:w="inherit",value:S,wrapped:C=!1,...k}=n,M={...n,disabled:i,disableFocusRipple:o,selected:y,icon:!!a,iconPosition:c,label:!!p,fullWidth:s,textColor:w,wrapped:C},O=(e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:s,selected:a,disabled:l}=e,c={root:["root",o&&s&&"labelIcon",`textColor${(0,A.A)(n)}`,r&&"fullWidth",i&&"wrapped",a&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return(0,f.A)(c,ze,t)})(M),T=a&&p&&u.isValidElement(a)?u.cloneElement(a,{className:(0,d.A)(O.icon,a.props.className)}):a;return(0,l.jsxs)(zn,{focusRipple:!o,className:(0,d.A)(O.root,r),ref:t,role:"tab","aria-selected":y,disabled:i,onClick:e=>{!y&&m&&m(e,S),g&&g(e)},onFocus:e=>{b&&!y&&m&&m(e,S),v&&v(e)},ownerState:M,tabIndex:y?0:-1,...k,children:["top"===c||"start"===c?(0,l.jsxs)(u.Fragment,{children:[T,p]}):(0,l.jsxs)(u.Fragment,{children:[p,T]}),h]})});function zi(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}let zo={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function zs(e){return(0,M.Ay)("MuiTabScrollButton",e)}let za=(0,k.A)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),zl=(0,y.A)(w.A,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${za.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),zc=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiTabScrollButton"}),{className:r,slots:i={},slotProps:o={},direction:s,orientation:a,disabled:c,...u}=n,h=(0,lE.I)(),p={isRtl:h,...n},m=(e=>{let{classes:t,orientation:n,disabled:r}=e;return(0,f.A)({root:["root",n,r&&"disabled"]},zs,t)})(p),g=i.StartScrollButtonIcon??lP,v=i.EndScrollButtonIcon??lL,y=(0,hi.A)({elementType:g,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),b=(0,hi.A)({elementType:v,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return(0,l.jsx)(zl,{component:"div",className:(0,d.A)(m.root,r),ref:t,role:null,ownerState:p,tabIndex:null,...u,style:{...u.style,..."vertical"===a&&{"--TabScrollButton-svgRotate":`rotate(${h?-90:90}deg)`}},children:"left"===s?(0,l.jsx)(g,{...y}):(0,l.jsx)(v,{...b})})});function zu(e){return(0,M.Ay)("MuiTabs",e)}let zh=(0,k.A)("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var zd=n("zI");let zp=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,zf=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,zm=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},zg=(0,y.A)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${zh.scrollButtons}`]:t.scrollButtons},{[`& .${zh.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})((0,b.A)(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${zh.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),zv=(0,y.A)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),zy=(0,y.A)("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),zb=(0,y.A)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((0,b.A)(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),zx=(0,y.A)(function(e){let{onChange:t,...n}=e,r=u.useRef(),i=u.useRef(null),o=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return(0,nm.A)(()=>{let e=(0,gq.A)(()=>{let e=r.current;o(),e!==r.current&&t(r.current)}),n=(0,gY.A)(i.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),u.useEffect(()=>{o(),t(r.current)},[t]),(0,l.jsx)("div",{style:zo,...n,ref:i})})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),zw={},zS=u.forwardRef(function(e,t){let n,r,i=(0,x.b)({props:e,name:"MuiTabs"}),o=(0,e8.A)(),s=(0,lE.I)(),{"aria-label":a,"aria-labelledby":c,action:h,centered:p=!1,children:m,className:g,component:v="div",allowScrollButtonsMobile:y=!1,indicatorColor:b="primary",onChange:w,orientation:S="horizontal",ScrollButtonComponent:A,scrollButtons:C="auto",selectionFollowsFocus:k,slots:M={},slotProps:O={},TabIndicatorProps:T={},TabScrollButtonProps:_={},textColor:I="primary",value:D,variant:R="standard",visibleScrollbar:E=!1,...P}=i,L="scrollable"===R,N="vertical"===S,B=N?"scrollTop":"scrollLeft",j=N?"top":"left",z=N?"bottom":"right",$=N?"clientHeight":"clientWidth",F=N?"height":"width",V={...i,component:v,allowScrollButtonsMobile:y,indicatorColor:b,orientation:S,vertical:N,scrollButtons:C,textColor:I,variant:R,visibleScrollbar:E,fixed:!L,hideScrollbar:L&&!E,scrollableX:L&&!N,scrollableY:L&&N,centered:p&&!L,scrollButtonsHideMobile:!y},H=(e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:s,scrollButtonsHideMobile:a,classes:l}=e;return(0,f.A)({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},zu,l)})(V),W=(0,hi.A)({elementType:M.StartScrollButtonIcon,externalSlotProps:O.startScrollButtonIcon,ownerState:V}),U=(0,hi.A)({elementType:M.EndScrollButtonIcon,externalSlotProps:O.endScrollButtonIcon,ownerState:V}),[G,q]=u.useState(!1),[X,Y]=u.useState(zw),[K,Q]=u.useState(!1),[Z,J]=u.useState(!1),[ee,et]=u.useState(!1),[en,er]=u.useState({overflow:"hidden",scrollbarWidth:0}),ei=new Map,eo=u.useRef(null),es=u.useRef(null),ea={slots:M,slotProps:{indicator:T,scrollButton:_,...O}},el=()=>{let e,t,n=eo.current;if(n){let t=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollWidth:n.scrollWidth,top:t.top,bottom:t.bottom,left:t.left,right:t.right}}if(n&&!1!==D){let e=es.current.children;if(e.length>0){let n=e[ei.get(D)];t=n?n.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},ec=(0,hp.A)(()=>{let e,{tabsMeta:t,tabMeta:n}=el(),r=0;N?(e="top",n&&t&&(r=n.top-t.top+t.scrollTop)):(e=s?"right":"left",n&&t&&(r=(s?-1:1)*(n[e]-t[e]+t.scrollLeft)));let i={[e]:r,[F]:n?n[F]:0};if("number"!=typeof X[e]||"number"!=typeof X[F])Y(i);else{let t=Math.abs(X[e]-i[e]),n=Math.abs(X[F]-i[F]);(t>=1||n>=1)&&Y(i)}}),eu=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=()=>{}){let{ease:o=zi,duration:s=300}=r,a=null,l=t[e],c=!1,u=r=>{if(c)return void i(Error("Animation cancelled"));null===a&&(a=r);let h=Math.min(1,(r-a)/s);(t[e]=o(h)*(n-l)+l,h>=1)?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(u)};l===n?i(Error("Element already at target position")):requestAnimationFrame(u)}(B,eo.current,e,{duration:o.transitions.duration.standard}):eo.current[B]=e},eh=e=>{let t=eo.current[B];N?t+=e:t+=e*(s?-1:1),eu(t)},ed=()=>{let e=eo.current[$],t=0,n=Array.from(es.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[$]>e){0===r&&(t=e);break}t+=i[$]}return t},[ep,{onChange:ef,...em}]=(0,nd.A)("scrollbar",{className:(0,d.A)(H.scrollableX,H.hideScrollbar),elementType:zx,shouldForwardComponentProp:!0,externalForwardedProps:ea,ownerState:V}),eg=u.useCallback(e=>{ef?.(e),er({overflow:null,scrollbarWidth:e})},[ef]),[ev,ey]=(0,nd.A)("scrollButtons",{className:(0,d.A)(H.scrollButtons,_.className),elementType:zc,externalForwardedProps:ea,ownerState:V,additionalProps:{orientation:S,slots:{StartScrollButtonIcon:M.startScrollButtonIcon||M.StartScrollButtonIcon,EndScrollButtonIcon:M.endScrollButtonIcon||M.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:W,endScrollButtonIcon:U}}}),eb=(0,hp.A)(e=>{let{tabsMeta:t,tabMeta:n}=el();n&&t&&(n[j]<t[j]?eu(t[B]+(n[j]-t[j]),{animation:e}):n[z]>t[z]&&eu(t[B]+(n[z]-t[z]),{animation:e}))}),ex=(0,hp.A)(()=>{L&&!1!==C&&et(!ee)});u.useEffect(()=>{let e,t,n=(0,gq.A)(()=>{eo.current&&ec()}),r=(0,gY.A)(eo.current);return r.addEventListener("resize",n),"u">typeof ResizeObserver&&(e=new ResizeObserver(n),Array.from(es.current.children).forEach(t=>{e.observe(t)})),"u">typeof MutationObserver&&(t=new MutationObserver(t=>{t.forEach(t=>{t.removedNodes.forEach(t=>{e?.unobserve(t)}),t.addedNodes.forEach(t=>{e?.observe(t)})}),n(),ex()})).observe(es.current,{childList:!0}),()=>{n.clear(),r.removeEventListener("resize",n),t?.disconnect(),e?.disconnect()}},[ec,ex]),u.useEffect(()=>{let e=Array.from(es.current.children),t=e.length;if("u">typeof IntersectionObserver&&t>0&&L&&!1!==C){let n=e[0],r=e[t-1],i={root:eo.current,threshold:.99},o=new IntersectionObserver(e=>{Q(!e[0].isIntersecting)},i);o.observe(n);let s=new IntersectionObserver(e=>{J(!e[0].isIntersecting)},i);return s.observe(r),()=>{o.disconnect(),s.disconnect()}}},[L,C,ee,m?.length]),u.useEffect(()=>{q(!0)},[]),u.useEffect(()=>{ec()}),u.useEffect(()=>{eb(zw!==X)},[eb,X]),u.useImperativeHandle(h,()=>({updateIndicator:ec,updateScrollButtons:ex}),[ec,ex]);let[ew,eS]=(0,nd.A)("indicator",{className:(0,d.A)(H.indicator,T.className),elementType:zb,externalForwardedProps:ea,ownerState:V,additionalProps:{style:X}}),eA=(0,l.jsx)(ew,{...eS}),eC=0,ek=u.Children.map(m,e=>{if(!u.isValidElement(e))return null;let t=void 0===e.props.value?eC:e.props.value;ei.set(t,eC);let n=t===D;return eC+=1,u.cloneElement(e,{fullWidth:"fullWidth"===R,indicator:n&&!G&&eA,selected:n,selectionFollowsFocus:k,onChange:w,textColor:I,value:t,...1===eC&&!1===D&&!e.props.tabIndex?{tabIndex:0}:{}})}),eM=((n={}).scrollbarSizeListener=L?(0,l.jsx)(ep,{...em,onChange:eg}):null,n.scrollButtonStart=(r=L&&("auto"===C&&(K||Z)||!0===C))?(0,l.jsx)(ev,{direction:s?"right":"left",onClick:()=>{eh(-1*ed())},disabled:!K,...ey}):null,n.scrollButtonEnd=r?(0,l.jsx)(ev,{direction:s?"left":"right",onClick:()=>{eh(ed())},disabled:!Z,...ey}):null,n),[eO,eT]=(0,nd.A)("root",{ref:t,className:(0,d.A)(H.root,g),elementType:zg,externalForwardedProps:{...ea,...P,component:v},ownerState:V}),[e_,eI]=(0,nd.A)("scroller",{ref:eo,className:H.scroller,elementType:zv,externalForwardedProps:ea,ownerState:V,additionalProps:{style:{overflow:en.overflow,[N?`margin${s?"Left":"Right"}`:"marginBottom"]:E?void 0:-en.scrollbarWidth}}}),[eD,eR]=(0,nd.A)("list",{ref:es,className:(0,d.A)(H.list,H.flexContainer),elementType:zy,externalForwardedProps:ea,ownerState:V,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=es.current,n=(0,zd.A)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===S?"ArrowLeft":"ArrowUp",i="horizontal"===S?"ArrowRight":"ArrowDown";switch("horizontal"===S&&s&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),zm(t,n,zf);break;case i:e.preventDefault(),zm(t,n,zp);break;case"Home":e.preventDefault(),zm(t,null,zp);break;case"End":e.preventDefault(),zm(t,null,zf)}})(t),e.onKeyDown?.(t)}})});return(0,l.jsxs)(eO,{...eT,children:[eM.scrollButtonStart,eM.scrollbarSizeListener,(0,l.jsxs)(e_,{...eI,children:[(0,l.jsx)(eD,{"aria-label":a,"aria-labelledby":c,"aria-orientation":"vertical"===S?"vertical":null,role:"tablist",...eR,children:ek}),G&&eA]}),eM.scrollButtonEnd]})}),zA=(0,li.A)((0,l.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),zC=(0,li.A)((0,l.jsx)("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),zk=(0,li.A)((0,l.jsx)("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight");(0,li.A)((0,l.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),(0,li.A)((0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,l.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");let zM=(0,li.A)((0,l.jsx)("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),zO=(0,li.A)((0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),(0,l.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),zT=(0,li.A)((0,l.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function z_(e){return(0,M.Ay)("MuiDateTimePickerTabs",e)}(0,k.A)("MuiDateTimePickerTabs",["root"]);let zI=(0,y.A)(zS,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${zh.indicator}`]:{bottom:"auto",top:0}}})),zD=function(e){let t=jY({props:e,name:"MuiDateTimePickerTabs"}),{dateIcon:n=(0,l.jsx)(zM,{}),onViewChange:r,timeIcon:i=(0,l.jsx)(zO,{}),view:o,hidden:s="u"<typeof window||window.innerHeight<667,className:a,sx:c}=t,h=j0().localeText,p=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},z_,t)})(t);return s?null:(0,l.jsxs)(zI,{ownerState:t,variant:"fullWidth",value:j7(o)?"date":"time",onChange:(e,t)=>{r("date"===t?"day":"hours")},className:(0,d.A)(a,p.root),sx:c,children:[(0,l.jsx)(zr,{value:"date","aria-label":h.dateTableLabel,icon:(0,l.jsx)(u.Fragment,{children:n})}),(0,l.jsx)(zr,{value:"time","aria-label":h.timeTableLabel,icon:(0,l.jsx)(u.Fragment,{children:i})})]})};function zR(e){return(0,M.Ay)("MuiPickersToolbarText",e)}let zE=(0,k.A)("MuiPickersToolbarText",["root","selected"]),zP=["className","selected","value"],zL=(0,y.A)(nc.A,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${zE.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${zE.selected}`]:{color:(e.vars||e).palette.text.primary}})),zN=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersToolbarText"}),{className:r,value:i}=n,o=(0,PB.A)(n,zP),s=(e=>{let{classes:t,selected:n}=e;return(0,f.A)({root:["root",n&&"selected"]},zR,t)})(n);return(0,l.jsx)(zL,(0,PN.A)({ref:t,className:(0,d.A)(s.root,r),component:"span"},o,{children:i}))});function zB(e){return(0,M.Ay)("MuiPickersToolbar",e)}let zj=(0,k.A)("MuiPickersToolbar",["root","content"]),zz=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],z$=(0,y.A)("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),zF=(0,y.A)("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),zV=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersToolbar"}),{children:r,className:i,toolbarTitle:o,hidden:s,titleId:a}=n,c=(0,PB.A)(n,zz),u=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],content:["content"]},zB,t)})(n);return s?null:(0,l.jsxs)(z$,(0,PN.A)({ref:t,className:(0,d.A)(u.root,i),ownerState:n},c,{children:[(0,l.jsx)(nc.A,{color:"text.secondary",variant:"overline",id:a,children:o}),(0,l.jsx)(zF,{className:u.content,ownerState:n,children:r})]}))}),zH=["align","className","selected","typographyClassName","value","variant","width"],zW=(0,y.A)(G,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),zU=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersToolbarButton"}),{align:r,className:i,selected:o,typographyClassName:s,value:a,variant:c,width:u}=n,h=(0,PB.A)(n,zH),p=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},zB,t)})(n);return(0,l.jsx)(zW,(0,PN.A)({variant:"text",ref:t,className:(0,d.A)(p.root,i)},u?{sx:{width:u}}:{},h,{children:(0,l.jsx)(zN,{align:r,className:s,variant:c,value:a,selected:o})}))});function zG(e){return(0,M.Ay)("MuiDateTimePickerToolbar",e)}let zq=(0,k.A)("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),zX=["hours","minutes","seconds"],zY=e=>zX.includes(e),zK=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?"am"===t?e-12:e+12:e,zQ=(e,t)=>3600*t.getHours(e)+60*t.getMinutes(e)+t.getSeconds(e),zZ=(e,t)=>(n,r)=>e?t.isAfter(n,r):zQ(n,t)>zQ(r,t);function zJ(e,t,n,r){let i=j0().utils;return{meridiemMode:e?i.getHours(e)>=12?"pm":"am":null,handleMeridiemChange:u.useCallback(o=>{var s;let a;n(null==e?null:(s=!!t,a=zK(i.getHours(e),o,s),i.setHours(e,a)),r??"partial")},[t,e,n,r,i])}}let z0=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],z1=(0,y.A)(zV,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${zj.content} .${zE.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),z2=(0,y.A)("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),z5=(0,y.A)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&"desktop"!==t,style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&"desktop"!==t&&n,style:{flexDirection:"column-reverse"}}]}),z3=(0,y.A)("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),z4=(0,y.A)(zN,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),z6=(0,y.A)("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${zq.ampmLabel}`]:t.ampmLabel},{[`&.${zq.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${zq.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function z9(e){let t=jY({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:i,onChange:o,view:s,isLandscape:a,onViewChange:c,toolbarFormat:h,toolbarPlaceholder:p="––",views:m,disabled:g,readOnly:v,toolbarVariant:y="mobile",toolbarTitle:b,className:x}=t,w=(0,PB.A)(t,z0),S=(0,lE.I)(),A=(0,PN.A)({},t,{isRtl:S}),C=j0().utils,{meridiemMode:k,handleMeridiemChange:M}=zJ(i,n,o),O=!!(n&&!r),T="desktop"===y,_=j0().localeText,I=(e=>{let{classes:t,isLandscape:n,isRtl:r}=e;return(0,f.A)({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},zG,t)})(A),D=b??_.dateTimePickerToolbarTitle,R=u.useMemo(()=>i?h?C.formatByString(i,h):C.format(i,"shortDate"):p,[i,h,p,C]);return(0,l.jsxs)(z1,(0,PN.A)({isLandscape:a,className:(0,d.A)(I.root,x),toolbarTitle:D},w,{ownerState:A,children:[(0,l.jsxs)(z2,{className:I.dateContainer,ownerState:A,children:[m.includes("year")&&(0,l.jsx)(zU,{tabIndex:-1,variant:"subtitle1",onClick:()=>c("year"),selected:"year"===s,value:i?C.format(i,"year"):"–"}),m.includes("day")&&(0,l.jsx)(zU,{tabIndex:-1,variant:T?"h5":"h4",onClick:()=>c("day"),selected:"day"===s,value:R})]}),(0,l.jsxs)(z5,{className:I.timeContainer,ownerState:A,children:[(0,l.jsxs)(z3,{className:I.timeDigitsContainer,ownerState:A,children:[m.includes("hours")&&(0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)(zU,{variant:T?"h5":"h3",width:T&&!a?48:void 0,onClick:()=>c("hours"),selected:"hours"===s,value:i?n?C.format(i,"hours12h"):C.format(i,"hours24h"):"--"}),(0,l.jsx)(z4,{variant:T?"h5":"h3",value:":",className:I.separator,ownerState:A}),(0,l.jsx)(zU,{variant:T?"h5":"h3",width:T&&!a?48:void 0,onClick:()=>c("minutes"),selected:"minutes"===s||!m.includes("minutes")&&"hours"===s,value:i?C.format(i,"minutes"):"--",disabled:!m.includes("minutes")})]}),m.includes("seconds")&&(0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)(z4,{variant:T?"h5":"h3",value:":",className:I.separator,ownerState:A}),(0,l.jsx)(zU,{variant:T?"h5":"h3",width:T&&!a?48:void 0,onClick:()=>c("seconds"),selected:"seconds"===s,value:i?C.format(i,"seconds"):"--"})]})]}),O&&!T&&(0,l.jsxs)(z6,{className:I.ampmSelection,ownerState:A,children:[(0,l.jsx)(zU,{variant:"subtitle2",selected:"am"===k,typographyClassName:I.ampmLabel,value:j9(C,"am"),onClick:v?void 0:()=>M("am"),disabled:g}),(0,l.jsx)(zU,{variant:"subtitle2",selected:"pm"===k,typographyClassName:I.ampmLabel,value:j9(C,"pm"),onClick:v?void 0:()=>M("pm"),disabled:g})]}),n&&T&&(0,l.jsx)(zU,{variant:"h5",onClick:()=>c("meridiem"),selected:"meridiem"===s,value:i&&k?j9(C,k):"--",width:48})]})]}))}function z8(e){return(0,M.Ay)("MuiPickersArrowSwitcher",e)}(0,k.A)("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);let z7=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],$e=["ownerState"],$t=["ownerState"],$n=(0,y.A)("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),$r=(0,y.A)("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),$i=(0,y.A)(er,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),$o=u.forwardRef(function(e,t){let n=(0,lE.I)(),r=jY({props:e,name:"MuiPickersArrowSwitcher"}),{children:i,className:o,slots:s,slotProps:a,isNextDisabled:c,isNextHidden:u,onGoToNext:h,nextLabel:p,isPreviousDisabled:m,isPreviousHidden:g,onGoToPrevious:v,previousLabel:y,labelId:b}=r,x=(0,PB.A)(r,z7),w=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},z8,t)})(r),S=s?.previousIconButton??$i,A=(0,hi.A)({elementType:S,externalSlotProps:a?.previousIconButton,additionalProps:{size:"medium",title:y,"aria-label":y,disabled:m,edge:"end",onClick:v},ownerState:(0,PN.A)({},r,{hidden:g}),className:(0,d.A)(w.button,w.previousIconButton)}),C=s?.nextIconButton??$i,k=(0,hi.A)({elementType:C,externalSlotProps:a?.nextIconButton,additionalProps:{size:"medium",title:p,"aria-label":p,disabled:c,edge:"start",onClick:h},ownerState:(0,PN.A)({},r,{hidden:u}),className:(0,d.A)(w.button,w.nextIconButton)}),M=s?.leftArrowIcon??zC,O=(0,hi.A)({elementType:M,externalSlotProps:a?.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:w.leftArrowIcon}),T=(0,PB.A)(O,$e),_=s?.rightArrowIcon??zk,I=(0,hi.A)({elementType:_,externalSlotProps:a?.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:r,className:w.rightArrowIcon}),D=(0,PB.A)(I,$t);return(0,l.jsxs)($n,(0,PN.A)({ref:t,className:(0,d.A)(w.root,o),ownerState:r},x,{children:[(0,l.jsx)(S,(0,PN.A)({},A,{children:n?(0,l.jsx)(_,(0,PN.A)({},D)):(0,l.jsx)(M,(0,PN.A)({},T))})),i?(0,l.jsx)(nc.A,{variant:"subtitle1",component:"span",id:b,children:i}):(0,l.jsx)($r,{className:w.spacer,ownerState:r}),(0,l.jsx)(C,(0,PN.A)({},k,{children:n?(0,l.jsx)(M,(0,PN.A)({},T)):(0,l.jsx)(_,(0,PN.A)({},D))}))]}))});function $s({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:s,onFocusedViewChange:a}){let l=u.useRef(n),c=u.useRef(i),h=u.useRef(i.includes(n)?n:i[0]),[d,p]=(0,f5.A)({name:"useViews",state:"view",controlled:r,default:h.current}),f=u.useRef(o?d:null),[m,g]=(0,f5.A)({name:"useViews",state:"focusedView",controlled:s,default:f.current});u.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(e=>!i.includes(e)))&&(p(i.includes(n)?n:i[0]),c.current=i,l.current=n)},[n,p,d,i]);let v=i.indexOf(d),y=i[v-1]??null,b=i[v+1]??null,x=(0,f3.A)((e,t)=>{t?g(e):g(t=>e===t?null:t),a?.(e,t)}),w=(0,f3.A)(e=>{x(e,!0),e!==d&&(p(e),t&&t(e))}),S=(0,f3.A)(()=>{b&&w(b)}),A=(0,f3.A)((t,n,r)=>{let o="finish"===n,s=r?i.indexOf(r)<i.length-1:!!b;if(e(t,o&&s?"partial":n,r),r&&r!==d){let e=i[i.indexOf(r)+1];e&&w(e)}else o&&S()});return{view:d,setView:w,focusedView:m,setFocusedView:x,nextView:b,previousView:y,defaultView:i.includes(n)?n:i[0],goToNextView:S,setValueAndGoToNextView:A}}let $a=(0,y.A)("div")({overflow:"hidden",width:320,maxHeight:336,display:"flex",flexDirection:"column",margin:"0 auto"});function $l(e){return(0,M.Ay)("MuiTimeClock",e)}function $c(e){return(0,M.Ay)("MuiClockPointer",e)}(0,k.A)("MuiTimeClock",["root","arrowSwitcher"]),(0,k.A)("MuiClockPointer",["root","thumb"]);let $u=["className","hasSelected","isInner","type","viewValue"],$h=(0,y.A)("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),$d=(0,y.A)("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:"calc(50% - 18px)",border:`16px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function $p(e){let t,n=jY({props:e,name:"MuiClockPointer"}),{className:r,isInner:i,type:o,viewValue:s}=n,a=(0,PB.A)(n,$u),c=u.useRef(o);u.useEffect(()=>{c.current=o},[o]);let h=(0,PN.A)({},n,{shouldAnimate:c.current!==o}),p=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],thumb:["thumb"]},$c,t)})(h);return(0,l.jsx)($h,(0,PN.A)({style:(t=360/("hours"===o?12:60)*s,"hours"===o&&s>12&&(t-=360),{height:Math.round((i?.26:.4)*220),transform:`rotateZ(${t}deg)`}),className:(0,d.A)(p.root,r),ownerState:h},a,{children:(0,l.jsx)($d,{ownerState:h,className:p.thumb})}))}let $f=110,$m=110,$g=$f,$v=0,$y=$g-$f,$b=$v-$m,$x=(e,t,n)=>{let r=t-$f,i=n-$m,o=180/Math.PI*(Math.atan2($y,$b)-Math.atan2(r,i));return{value:Math.floor((o=Math.round(o/e)*e%360)/e)||0,distance:Math.sqrt(r**2+i**2)}};function $w(e){return(0,M.Ay)("MuiClock",e)}(0,k.A)("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);let $S=(0,y.A)("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),$A=(0,y.A)("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),$C=(0,y.A)("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),$k=(0,y.A)("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),$M=(0,y.A)("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),$O=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),$T=(0,y.A)(er,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>(0,PN.A)({},$O(e,"am"),{position:"absolute",left:8})),$_=(0,y.A)(er,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>(0,PN.A)({},$O(e,"pm"),{position:"absolute",right:8})),$I=(0,y.A)(nc.A,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function $D(e){let t=jY({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:i,children:o,value:s,handleMeridiemChange:a,isTimeDisabled:c,meridiemMode:h,minutesStep:p=1,onChange:m,selectedId:g,type:v,viewValue:y,viewRange:[b,x],disabled:w=!1,readOnly:S,className:A}=t,C=j0().utils,k=j0().localeText,M=u.useRef(!1),O=(e=>{let{classes:t,meridiemMode:n}=e;return(0,f.A)({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton","am"===n&&"selected"],pmButton:["pmButton","pm"===n&&"selected"],meridiemText:["meridiemText"]},$w,t)})(t),T=c(y,v),_=!n&&"hours"===v&&(y<1||y>12),I=(e,t)=>{w||S||c(e,v)||m(e,t)},D=(e,t)=>{let{offsetX:r,offsetY:i}=e;if(void 0===r){let t=e.target.getBoundingClientRect();r=e.changedTouches[0].clientX-t.left,i=e.changedTouches[0].clientY-t.top}I("seconds"===v||"minutes"===v?((e,t,n=1)=>{let{value:r}=$x(6*n,e,t);return r*n%60})(r,i,p):((e,t,n)=>{let{value:r,distance:i}=$x(30,e,t),o=r||12;return n?o%=12:i<74&&(o+=12,o%=24),o})(r,i,!!n),t)},R=e=>{M.current=!0,D(e,"shallow")},E=u.useMemo(()=>"hours"===v||y%5==0,[v,y]),P="minutes"===v?p:1,L=u.useRef(null);(0,uu.A)(()=>{i&&L.current.focus()},[i]);let N=e=>Math.max(b,Math.min(x,e)),B=e=>(e+(x+1))%(x+1);return(0,l.jsxs)($S,{className:(0,d.A)(O.root,A),children:[(0,l.jsxs)($A,{className:O.clock,children:[(0,l.jsx)($k,{onTouchMove:R,onTouchStart:R,onTouchEnd:e=>{M.current&&(D(e,"finish"),M.current=!1),e.preventDefault()},onMouseUp:e=>{M.current&&(M.current=!1),D(e.nativeEvent,"finish")},onMouseMove:e=>{e.buttons>0&&D(e.nativeEvent,"shallow")},ownerState:{disabled:w},className:O.squareMask}),!T&&(0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)($M,{className:O.pin}),null!=s&&(0,l.jsx)($p,{type:v,viewValue:y,isInner:_,hasSelected:E})]}),(0,l.jsx)($C,{"aria-activedescendant":g,"aria-label":k.clockLabelText(v,s,C,null==s?null:C.format(s,"fullTime")),ref:L,role:"listbox",onKeyDown:e=>{if(!M.current)switch(e.key){case"Home":I(b,"partial"),e.preventDefault();break;case"End":I(x,"partial"),e.preventDefault();break;case"ArrowUp":I(B(y+P),"partial"),e.preventDefault();break;case"ArrowDown":I(B(y-P),"partial"),e.preventDefault();break;case"PageUp":I(N(y+5),"partial"),e.preventDefault();break;case"PageDown":I(N(y-5),"partial"),e.preventDefault();break;case"Enter":case" ":I(y,"finish"),e.preventDefault()}},tabIndex:0,className:O.wrapper,children:o})]}),n&&r&&(0,l.jsxs)(u.Fragment,{children:[(0,l.jsx)($T,{onClick:S?void 0:()=>a("am"),disabled:w||null===h,ownerState:t,className:O.amButton,title:j9(C,"am"),children:(0,l.jsx)($I,{variant:"caption",className:O.meridiemText,children:j9(C,"am")})}),(0,l.jsx)($_,{disabled:w||null===h,onClick:S?void 0:()=>a("pm"),ownerState:t,className:O.pmButton,title:j9(C,"pm"),children:(0,l.jsx)($I,{variant:"caption",className:O.meridiemText,children:j9(C,"pm")})})]})]})}function $R(e){return(0,M.Ay)("MuiClockNumber",e)}let $E=(0,k.A)("MuiClockNumber",["root","selected","disabled"]),$P=["className","disabled","index","inner","label","selected"],$L=(0,y.A)("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${$E.disabled}`]:t.disabled},{[`&.${$E.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:"absolute",left:"calc((100% - 36px) / 2)",display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${$E.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${$E.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:(0,PN.A)({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function $N(e){let t=jY({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:i,inner:o,label:s,selected:a}=t,c=(0,PB.A)(t,$P),u=(e=>{let{classes:t,selected:n,disabled:r}=e;return(0,f.A)({root:["root",n&&"selected",r&&"disabled"]},$R,t)})(t),h=i%12/12*Math.PI*2-Math.PI/2,p=91*(o?.65:1),m=Math.round(Math.cos(h)*p),g=Math.round(Math.sin(h)*p);return(0,l.jsx)($L,(0,PN.A)({className:(0,d.A)(u.root,n),"aria-disabled":!!r||void 0,"aria-selected":!!a||void 0,role:"option",style:{transform:`translate(${m}px, ${g+92}px`},ownerState:t},c,{children:s}))}let $B=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let o=e.formatNumber;return[[5,o("05")],[10,o("10")],[15,o("15")],[20,o("20")],[25,o("25")],[30,o("30")],[35,o("35")],[40,o("40")],[45,o("45")],[50,o("50")],[55,o("55")],[0,o("00")]].map(([e,o],s)=>{let a=e===t;return(0,l.jsx)($N,{label:o,id:a?i:void 0,index:s+1,inner:!1,disabled:n(e),selected:a,"aria-label":r(o)},e)})},$j=({timezone:e,value:t,defaultValue:n,referenceDate:r,onChange:i,valueManager:o})=>{let s,a=j0().utils,l=u.useRef(n),c=t??l.current??o.emptyValue,h=u.useMemo(()=>o.getTimezone(a,c),[a,o,c]),d=(0,f3.A)(e=>null==h?e:o.setTimezone(a,h,e));return s=e||h||(r?a.getTimezone(r):"default"),{value:u.useMemo(()=>o.setTimezone(a,s,c),[o,a,s,c]),handleValueChange:(0,f3.A)((e,...t)=>{let n=d(e);i?.(n,...t)}),timezone:s}},$z=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:o,valueManager:s})=>{let[a,l]=(0,f5.A)({name:e,state:"value",controlled:n,default:r??s.emptyValue});return $j({timezone:t,value:a,defaultValue:void 0,referenceDate:i,onChange:(0,f3.A)((e,...t)=>{l(e),o?.(e,...t)}),valueManager:s})},$$={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},$F=(e,t,n)=>{if(t===$$.year)return e.startOfYear(n);if(t===$$.month)return e.startOfMonth(n);if(t===$$.day)return e.startOfDay(n);let r=n;return t<$$.minutes&&(r=e.setMinutes(r,0)),t<$$.seconds&&(r=e.setSeconds(r,0)),t<$$.milliseconds&&(r=e.setMilliseconds(r,0)),r},$V=(e,t)=>{let n=e.formatTokenMap[t];if(null==n)throw Error(`MUI X: The token "${t}" is not supported by the Date and Time Pickers.
|
|
68
|
+
Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.`);return"string"==typeof n?{type:n,contentType:"meridiem"===n?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},$H=(e,t)=>{let n=[],r=e.date(void 0,"default"),i=e.startOfWeek(r),o=e.endOfWeek(r),s=i;for(;e.isBefore(s,o);)n.push(s),s=e.addDays(s,1);return n.map(n=>e.formatByString(n,t))},$W=(e,t,n,r)=>{switch(n){case"month":return j4(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case"weekDay":return $H(e,r);case"meridiem":{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},$U=["0","1","2","3","4","5","6","7","8","9"],$G=(e,t)=>{if("0"===t[0])return e;let n=[],r="";for(let i=0;i<e.length;i+=1){r+=e[i];let o=t.indexOf(r);o>-1&&(n.push(o.toString()),r="")}return n.join("")},$q=(e,t)=>"0"===t[0]?e:e.split("").map(e=>t[Number(e)]).join(""),$X=(e,t)=>{let n=$G(e,t);return" "!==n&&!Number.isNaN(Number(n))},$Y=(e,t)=>{let n=e;for(n=Number(n).toString();n.length<t;)n=`0${n}`;return n},$K=(e,t,n,r,i)=>{if("day"===i.type&&"digit-with-letter"===i.contentType){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let o=t.toString();return i.hasLeadingZerosInInput&&(o=$Y(o,i.maxLength)),$q(o,r)},$Q=(e,t,n)=>{let r=e.value||e.placeholder,i="non-input"===t?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return"non-input"===t&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number($G(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&"digit"===e.contentType&&!i&&1===r.length&&(r=`${r}`),"input-rtl"===t&&(r=`${r}`),r},$Z=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),$J=(e,t,n,r)=>{if("digit"!==t)return!1;let i=e.date(void 0,"default");switch(n){case"year":if("dayjs"===e.lib&&"YY"===r)return!0;return e.formatByString(e.setYear(i,1),r).startsWith("0");case"month":return e.formatByString(e.startOfYear(i),r).length>1;case"day":return e.formatByString(e.startOfMonth(i),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(i),r).length>1;case"hours":return e.formatByString(e.setHours(i,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(i,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error("Invalid section type")}},$0=(e,t)=>{},$1={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},$2=(e,t,n,r,i)=>[...n].sort((e,t)=>$1[e.type]-$1[t.type]).reduce((n,r)=>!i||r.modified?((e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{let r=$H(e,t.format),i=e.formatByString(n,t.format),o=r.indexOf(i),s=r.indexOf(t.value);return e.addDays(n,s-o)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{let t=12>e.getHours(n),i=e.getHours(r);if(t&&i>=12)return e.addHours(r,-12);if(!t&&i<12)return e.addHours(r,12);return r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}})(e,r,t,n):n,r),$5=(e,t)=>{if(null==e)return null;if("all"===e)return"all";if("string"==typeof e){let n=t.findIndex(t=>t.type===e);return -1===n?null:n}return e},$3=["value","referenceDate"],$4={emptyValue:null,getTodayValue:j6,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=(0,PB.A)(e,$3);return null!=t&&r.utils.isValid(t)?t:null!=n?n:(({props:e,utils:t,granularity:n,timezone:r,getTodayDate:i})=>{let o=i?i():$F(t,n,j6(t,r));null!=e.minDate&&t.isAfterDay(e.minDate,o)&&(o=$F(t,n,e.minDate)),null!=e.maxDate&&t.isBeforeDay(e.maxDate,o)&&(o=$F(t,n,e.maxDate));let s=zZ(e.disableIgnoringDatePartForTimeValidation??!1,t);return null!=e.minTime&&s(e.minTime,o)&&(o=$F(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:j2(t,o,e.minTime))),null!=e.maxTime&&s(o,e.maxTime)&&(o=$F(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:j2(t,o,e.maxTime))),o})(r)},cleanValue:(e,t)=>null!=t&&e.isValid(t)?t:null,areValuesEqual:(e,t,n)=>!(e.isValid(t)||null==t||e.isValid(n))&&null!=n||e.isEqual(t,n),isSameError:(e,t)=>e===t,hasError:e=>null!=e,defaultErrorState:null,getTimezone:(e,t)=>null!=t&&e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>null==n?null:e.setTimezone(n,t)},$6={updateReferenceValue:(e,t,n)=>null!=t&&e.isValid(t)?t:n,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&n?n:r(t),getV7HiddenInputValueFromSections:e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),getV6InputValueFromSections:(e,t,n)=>{let r=e.map(e=>{let r=$Q(e,n?"input-rtl":"input-ltr",t);return`${e.startSeparator}${r}${e.endSeparator}`}).join("");return n?`${r}`:r},getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:e=>e,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:null!=n&&e.isValid(n)?n:t.referenceValue})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},$9=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],$8=(0,y.A)($a,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),$7=(0,y.A)($o,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),Fe=["hours","minutes"],Ft=u.forwardRef(function(e,t){let n=j0().utils,r=jY({props:e,name:"MuiTimeClock"}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:o=!1,autoFocus:s,slots:a,slotProps:c,value:h,defaultValue:p,referenceDate:m,disableIgnoringDatePartForTimeValidation:g=!1,maxTime:v,minTime:y,disableFuture:b,disablePast:x,minutesStep:w=1,shouldDisableTime:S,showViewSwitcher:A,onChange:C,view:k,views:M=Fe,openTo:O,onViewChange:T,focusedView:_,onFocusedViewChange:I,className:D,disabled:R,readOnly:E,timezone:P}=r,L=(0,PB.A)(r,$9),{value:N,handleValueChange:B,timezone:j}=$z({name:"TimeClock",timezone:P,value:h,defaultValue:p,referenceDate:m,onChange:C,valueManager:$4}),z=(({value:e,referenceDate:t,utils:n,props:r,timezone:i})=>{let o=u.useMemo(()=>$4.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:$$.day,timezone:i,getTodayDate:()=>j6(n,i,"date")}),[]);return e??o})({value:N,referenceDate:m,utils:n,props:r,timezone:j}),$=j0().localeText,F=j1(j),{view:V,setView:H,previousView:W,nextView:U,setValueAndGoToNextView:G}=$s({view:k,views:M,openTo:O,onViewChange:T,onChange:B,focusedView:_,onFocusedViewChange:I}),{meridiemMode:q,handleMeridiemChange:X}=zJ(z,i,G),Y=u.useCallback((e,t)=>{let r=zZ(g,n),o="hours"===t||"minutes"===t&&M.includes("seconds"),s=({start:e,end:t})=>!(y&&r(y,t)||v&&r(e,v)||b&&r(e,F)||x&&r(F,o?t:e)),a=(e,r=1)=>{if(e%r!=0)return!1;if(S)switch(t){case"hours":return!S(n.setHours(z,e),"hours");case"minutes":return!S(n.setMinutes(z,e),"minutes");case"seconds":return!S(n.setSeconds(z,e),"seconds");default:return!1}return!0};switch(t){case"hours":{let t=zK(e,q,i),r=n.setHours(z,t);if(n.getHours(r)!==t)return!0;return!s({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!a(t)}case"minutes":{let t=n.setMinutes(z,e);return!s({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!a(e,w)}case"seconds":{let t=n.setSeconds(z,e);return!s({start:t,end:t})||!a(e)}default:throw Error("not supported")}},[i,z,g,v,q,y,w,S,n,b,x,F,M]),K=(0,dc.A)(),Q=u.useMemo(()=>{switch(V){case"hours":{let e,t=(e,t)=>{let r=zK(e,q,i);G(n.setHours(z,r),t,"hours")},r=n.getHours(z);return e=i?r>12?[12,23]:[0,11]:[0,23],{onChange:t,viewValue:r,children:(({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,utils:o})=>{let s=t?o.getHours(t):null,a=[],c=+!!e,u=e?12:23,h=t=>null!==s&&(e?12===t?12===s||0===s:s===t||s-12===t:s===t);for(let t=c;t<=u;t+=1){let s=t.toString();0===t&&(s="00");let c=!e&&(0===t||t>12);s=o.formatNumber(s);let u=h(t);a.push((0,l.jsx)($N,{id:u?i:void 0,index:t,inner:c,selected:u,disabled:r(t),label:s,"aria-label":n(s)},t))}return a})({value:N,utils:n,ampm:i,onChange:t,getClockNumberText:$.hoursClockNumberText,isDisabled:e=>R||Y(e,"hours"),selectedId:K}),viewRange:e}}case"minutes":{let e=n.getMinutes(z),t=(e,t)=>{G(n.setMinutes(z,e),t,"minutes")};return{viewValue:e,onChange:t,children:$B({utils:n,value:e,onChange:t,getClockNumberText:$.minutesClockNumberText,isDisabled:e=>R||Y(e,"minutes"),selectedId:K}),viewRange:[0,59]}}case"seconds":{let e=n.getSeconds(z),t=(e,t)=>{G(n.setSeconds(z,e),t,"seconds")};return{viewValue:e,onChange:t,children:$B({utils:n,value:e,onChange:t,getClockNumberText:$.secondsClockNumberText,isDisabled:e=>R||Y(e,"seconds"),selectedId:K}),viewRange:[0,59]}}default:throw Error("You must provide the type for ClockView")}},[V,n,N,i,$.hoursClockNumberText,$.minutesClockNumberText,$.secondsClockNumberText,q,G,z,Y,K,R]),Z=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],arrowSwitcher:["arrowSwitcher"]},$l,t)})(r);return(0,l.jsxs)($8,(0,PN.A)({ref:t,className:(0,d.A)(Z.root,D),ownerState:r},L,{children:[(0,l.jsx)($D,(0,PN.A)({autoFocus:s??!!_,ampmInClock:o&&M.includes("hours"),value:N,type:V,ampm:i,minutesStep:w,isTimeDisabled:Y,meridiemMode:q,handleMeridiemChange:X,selectedId:K,disabled:R,readOnly:E},Q)),A&&(0,l.jsx)($7,{className:Z.arrowSwitcher,slots:a,slotProps:c,onGoToPrevious:()=>H(W),isPreviousDisabled:!W,previousLabel:$.openPreviousView,onGoToNext:()=>H(U),isNextDisabled:!U,nextLabel:$.openNextView,ownerState:r})]}))}),Fn=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:o,defaultValue:s,referenceDate:a,onChange:c,className:u,classes:h,disableFuture:d,disablePast:p,minTime:f,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:y,ampmInClock:b,slots:x,slotProps:w,readOnly:S,disabled:A,sx:C,autoFocus:k,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:O,timezone:T})=>(0,l.jsx)(Ft,{view:e,onViewChange:t,focusedView:n&&zY(n)?n:null,onFocusedViewChange:r,views:i.filter(zY),value:o,defaultValue:s,referenceDate:a,onChange:c,className:u,classes:h,disableFuture:d,disablePast:p,minTime:f,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:y,ampmInClock:b,slots:x,slotProps:w,readOnly:S,disabled:A,sx:C,autoFocus:k,showViewSwitcher:M,disableIgnoringDatePartForTimeValidation:O,timezone:T}),Fr=({props:e,value:t,timezone:n,adapter:r})=>{if(null===t)return null;let{shouldDisableDate:i,shouldDisableMonth:o,shouldDisableYear:s,disablePast:a,disableFuture:l}=e,c=r.utils.date(void 0,n),u=j3(r.utils,e.minDate,r.defaultDates.minDate),h=j3(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(i&&i(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(s&&s(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(a&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(h&&r.utils.isAfterDay(t,h)):return"maxDate";default:return null}};Fr.valueManager=$4;let Fi=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:s,timezone:a})=>{let l=j0();return u.useCallback(c=>null!==Fr({adapter:l,value:c,timezone:a,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:o,disablePast:s}}),[l,e,t,n,r,i,o,s,a])};var Fo=n("j6");let Fs=e=>(0,M.Ay)("MuiPickersFadeTransitionGroup",e);(0,k.A)("MuiPickersFadeTransitionGroup",["root"]);let Fa=(0,y.A)(Fo.A,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function Fl(e){let t=jY({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,s=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},Fs,t)})(t),a=(0,e8.A)();return i?n:(0,l.jsx)(Fa,{className:(0,d.A)(s.root,r),children:(0,l.jsx)(dh.A,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:a.transitions.duration.enteringScreen,enter:a.transitions.duration.enteringScreen,exit:0},children:n},o)})}function Fc(e){return(0,M.Ay)("MuiPickersDay",e)}let Fu=(0,k.A)("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Fh=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Fd=({theme:e})=>(0,PN.A)({},e.typography.caption,{width:36,height:36,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:(0,m.X4)(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Fu.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Fu.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Fu.disabled}:not(.${Fu.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Fu.disabled}&.${Fu.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:"0 2px"}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Fu.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),Fp=(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Ff=(0,y.A)(w.A,{name:"MuiPickersDay",slot:"Root",overridesResolver:Fp})(Fd),Fm=(0,y.A)("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:Fp})(({theme:e})=>(0,PN.A)({},Fd({theme:e}),{opacity:0,pointerEvents:"none"})),Fg=()=>{},Fv=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersDay"}),{autoFocus:r=!1,className:i,day:o,disabled:s=!1,disableHighlightToday:a=!1,disableMargin:c=!1,isAnimating:h,onClick:p,onDaySelect:m,onFocus:g=Fg,onBlur:v=Fg,onKeyDown:y=Fg,onMouseDown:b=Fg,onMouseEnter:x=Fg,outsideCurrentMonth:w,selected:S=!1,showDaysOutsideCurrentMonth:A=!1,children:C,today:k=!1}=n,M=(0,PB.A)(n,Fh),O=(0,PN.A)({},n,{autoFocus:r,disabled:s,disableHighlightToday:a,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:A,today:k}),T=(e=>{let{selected:t,disableMargin:n,disableHighlightToday:r,today:i,disabled:o,outsideCurrentMonth:s,showDaysOutsideCurrentMonth:a,classes:l}=e,c=s&&!a;return(0,f.A)({root:["root",t&&!c&&"selected",o&&"disabled",!n&&"dayWithMargin",!r&&i&&"today",s&&a&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Fc,l)})(O),_=j0().utils,I=u.useRef(null),D=(0,uc.A)(I,t);return((0,uu.A)(()=>{!r||s||h||w||I.current.focus()},[r,s,h,w]),w&&!A)?(0,l.jsx)(Fm,{className:(0,d.A)(T.root,T.hiddenDaySpacingFiller,i),ownerState:O,role:M.role}):(0,l.jsx)(Ff,(0,PN.A)({className:(0,d.A)(T.root,i),ref:D,centerRipple:!0,disabled:s,tabIndex:S?0:-1,onKeyDown:e=>y(e,o),onFocus:e=>g(e,o),onBlur:e=>v(e,o),onMouseEnter:e=>x(e,o),onClick:e=>{s||m(o),w&&e.currentTarget.focus(),p&&p(e)},onMouseDown:e=>{b(e),w&&e.preventDefault()}},M,{ownerState:O,children:C||_.format(o,"dayOfMonth")}))}),Fy=u.memo(Fv);var Fb=n("h");function Fx(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}var Fw=n("qa"),FS=function(e,t){return e&&t&&t.split(" ").forEach(function(t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=Fx(e.className,t):e.setAttribute("class",Fx(e.className&&e.className.baseVal||"",t))})},FA=function(e){function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.removeClasses(i,"exit"),t.addClass(i,o?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1];t.addClass(i,o?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],o=r[1]?"appear":"enter";t.removeClasses(i,o),t.addClass(i,o,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,i=r&&n?n+"-":"",o=r?""+i+e:n[e],s=r?o+"-active":n[e+"Active"],a=r?o+"-done":n[e+"Done"];return{baseClassName:o,activeClassName:s,doneClassName:a}},t}(0,Fb.A)(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r,i=this.getClassNames(t)[n+"ClassName"],o=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&o&&(i+=" "+o),"active"===n&&e&&(0,Fw.F)(e),i&&(this.appliedClasses[t][n]=i,r=i,e&&r&&r.split(" ").forEach(function(t){e.classList?e.classList.add(t):(e.classList?t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" "))||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,o=n.done;this.appliedClasses[t]={},r&&FS(e,r),i&&FS(e,i),o&&FS(e,o)},n.render=function(){var e=this.props,t=(e.classNames,(0,PB.A)(e,["classNames"]));return u.createElement(gG.Ay,(0,PN.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(u.Component);FA.defaultProps={classNames:""},FA.propTypes={};let FC=e=>(0,M.Ay)("MuiPickersSlideTransition",e),Fk=(0,k.A)("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),FM=["children","className","reduceAnimations","slideDirection","transKey","classes"],FO=(0,y.A)(Fo.A,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Fk["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Fk["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Fk.slideEnterActive}`]:t.slideEnterActive},{[`.${Fk.slideExit}`]:t.slideExit},{[`.${Fk["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Fk["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{let t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Fk["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Fk["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Fk.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Fk.slideExit}`]:{transform:"translate(0%)"},[`& .${Fk["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Fk["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}}),FT=e=>(0,M.Ay)("MuiDayCalendar",e);(0,k.A)("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);let F_=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],FI=["ownerState"],FD=(0,y.A)("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),FR=(0,y.A)("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),FE=(0,y.A)(nc.A,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),FP=(0,y.A)(nc.A,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),FL=(0,y.A)(nc.A,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>(0,PN.A)({},e.typography.caption,{width:36,height:36,padding:0,margin:"0 2px",color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),FN=(0,y.A)("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:240}),FB=(0,y.A)(function(e){let t=jY({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:i,transKey:o}=t,s=(0,PB.A)(t,FM),a=(e=>{let{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return(0,f.A)(r,FC,t)})(t),c=(0,e8.A)();if(i)return(0,l.jsx)("div",{className:(0,d.A)(a.root,r),children:n});let h={exit:a.exit,enterActive:a.enterActive,enter:a.enter,exitActive:a.exitActive};return(0,l.jsx)(FO,{className:(0,d.A)(a.root,r),childFactory:e=>u.cloneElement(e,{classNames:h}),role:"presentation",children:(0,l.jsx)(FA,(0,PN.A)({mountOnEnter:!0,unmountOnExit:!0,timeout:c.transitions.duration.complex,classNames:h},s,{children:n}),o)})},{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:240}),Fj=(0,y.A)("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Fz=(0,y.A)("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:"2px 0",display:"flex",justifyContent:"center"});function F$(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:i,isDateDisabled:o,currentMonthNumber:s,isViewFocused:a}=e,c=(0,PB.A)(e,F_),{disabled:h,disableHighlightToday:d,isMonthSwitchingAnimating:p,showDaysOutsideCurrentMonth:f,slots:m,slotProps:g,timezone:v}=t,y=j0().utils,b=j1(v),x=null!==r&&y.isSameDay(n,r),w=i.some(e=>y.isSameDay(e,n)),S=y.isSameDay(n,b),A=m?.day??Fy,C=(0,hi.A)({elementType:A,externalSlotProps:g?.day,additionalProps:(0,PN.A)({disableHighlightToday:d,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:p,"data-timestamp":y.toJsDate(n).valueOf()},c),ownerState:(0,PN.A)({},t,{day:n,selected:w})}),k=(0,PB.A)(C,FI),M=u.useMemo(()=>h||o(n),[h,o,n]),O=u.useMemo(()=>y.getMonth(n)!==s,[y,n,s]),T=u.useMemo(()=>{let e=y.startOfMonth(y.setMonth(n,s));return f?y.isSameDay(n,y.startOfWeek(e)):y.isSameDay(n,e)},[s,n,f,y]),_=u.useMemo(()=>{let e=y.endOfMonth(y.setMonth(n,s));return f?y.isSameDay(n,y.endOfWeek(e)):y.isSameDay(n,e)},[s,n,f,y]);return(0,l.jsx)(A,(0,PN.A)({},k,{day:n,disabled:M,autoFocus:a&&x,today:S,outsideCurrentMonth:O,isFirstVisibleCell:T,isLastVisibleCell:_,selected:w,tabIndex:x?0:-1,"aria-selected":w,"aria-current":S?"date":void 0}))}function FF(e){let t,n=jY({props:e,name:"MuiDayCalendar"}),r=j0().utils,{onFocusedDayChange:i,className:o,currentMonth:s,selectedDays:a,focusedDay:c,loading:h,onSelectedDaysChange:p,onMonthSwitchingAnimationEnd:m,readOnly:g,reduceAnimations:v,renderLoading:y=()=>(0,l.jsx)("span",{children:"..."}),slideDirection:b,TransitionProps:x,disablePast:w,disableFuture:S,minDate:A,maxDate:C,shouldDisableDate:k,shouldDisableMonth:M,shouldDisableYear:O,dayOfWeekFormatter:T=e=>r.format(e,"weekdayShort").charAt(0).toUpperCase(),hasFocus:_,onFocusedViewChange:I,gridLabelId:D,displayWeekNumber:R,fixedWeekNumber:E,autoFocus:P,timezone:L}=n,N=j1(L),B=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},FT,t)})(n),j=(0,lE.I)(),z=Fi({shouldDisableDate:k,shouldDisableMonth:M,shouldDisableYear:O,minDate:A,maxDate:C,disablePast:w,disableFuture:S,timezone:L}),$=j0().localeText,[F,V]=(0,f5.A)({name:"DayCalendar",state:"hasFocus",controlled:_,default:P??!1}),[H,W]=u.useState(()=>c||N),U=(0,f3.A)(e=>{g||p(e)}),G=e=>{z(e)||(i(e),W(e),I?.(!0),V(!0))},q=(0,f3.A)((e,t)=>{switch(e.key){case"ArrowUp":G(r.addDays(t,-7)),e.preventDefault();break;case"ArrowDown":G(r.addDays(t,7)),e.preventDefault();break;case"ArrowLeft":{let n=r.addDays(t,j?1:-1),i=r.addMonths(t,j?1:-1);G(j5({utils:r,date:n,minDate:j?n:r.startOfMonth(i),maxDate:j?r.endOfMonth(i):n,isDateDisabled:z,timezone:L})||n),e.preventDefault();break}case"ArrowRight":{let n=r.addDays(t,j?-1:1),i=r.addMonths(t,j?-1:1);G(j5({utils:r,date:n,minDate:j?r.startOfMonth(i):n,maxDate:j?n:r.endOfMonth(i),isDateDisabled:z,timezone:L})||n),e.preventDefault();break}case"Home":G(r.startOfWeek(t)),e.preventDefault();break;case"End":G(r.endOfWeek(t)),e.preventDefault();break;case"PageUp":G(r.addMonths(t,1)),e.preventDefault();break;case"PageDown":G(r.addMonths(t,-1)),e.preventDefault()}}),X=(0,f3.A)((e,t)=>G(t)),Y=(0,f3.A)((e,t)=>{F&&r.isSameDay(H,t)&&I?.(!1)}),K=r.getMonth(s),Q=r.getYear(s),Z=u.useMemo(()=>a.filter(e=>!!e).map(e=>r.startOfDay(e)),[r,a]),J=`${Q}-${K}`,ee=u.useMemo(()=>u.createRef(),[J]),et=u.useMemo(()=>{let e=r.startOfMonth(s),t=r.endOfMonth(s);return z(H)||r.isAfterDay(H,t)||r.isBeforeDay(H,e)?j5({utils:r,date:H,minDate:e,maxDate:t,disablePast:w,disableFuture:S,isDateDisabled:z,timezone:L}):H},[s,S,w,H,z,r,L]),en=u.useMemo(()=>{let e=r.getWeekArray(s),t=r.addMonths(s,1);for(;E&&e.length<E;){let n=r.getWeekArray(t),i=r.isSameDay(e[e.length-1][0],n[0][0]);n.slice(+!!i).forEach(t=>{e.length<E&&e.push(t)}),t=r.addMonths(t,1)}return e},[s,E,r]);return(0,l.jsxs)(FD,{role:"grid","aria-labelledby":D,className:B.root,children:[(0,l.jsxs)(FR,{role:"row",className:B.header,children:[R&&(0,l.jsx)(FP,{variant:"caption",role:"columnheader","aria-label":$.calendarWeekNumberHeaderLabel,className:B.weekNumberLabel,children:$.calendarWeekNumberHeaderText}),(t=r.startOfWeek(N),[0,1,2,3,4,5,6].map(e=>r.addDays(t,e))).map((e,t)=>(0,l.jsx)(FE,{variant:"caption",role:"columnheader","aria-label":r.format(e,"weekday"),className:B.weekDayLabel,children:T(e)},t.toString()))]}),h?(0,l.jsx)(FN,{className:B.loadingContainer,children:y()}):(0,l.jsx)(FB,(0,PN.A)({transKey:J,onExited:m,reduceAnimations:v,slideDirection:b,className:(0,d.A)(o,B.slideTransition)},x,{nodeRef:ee,children:(0,l.jsx)(Fj,{ref:ee,role:"rowgroup",className:B.monthContainer,children:en.map((e,t)=>(0,l.jsxs)(Fz,{role:"row",className:B.weekContainer,"aria-rowindex":t+1,children:[R&&(0,l.jsx)(FL,{className:B.weekNumber,role:"rowheader","aria-label":$.calendarWeekNumberAriaLabelText(r.getWeekNumber(e[0])),children:$.calendarWeekNumberText(r.getWeekNumber(e[0]))}),e.map((e,t)=>(0,l.jsx)(F$,{parentProps:n,day:e,selectedDays:Z,focusableDay:et,onKeyDown:q,onFocus:X,onBlur:Y,onDaySelect:U,isDateDisabled:z,currentMonthNumber:K,isViewFocused:F,"aria-colindex":t+1},e.toString()))]},`week-${e[0]}`))})}))]})}function FV(e){return(0,M.Ay)("MuiPickersMonth",e)}let FH=(0,k.A)("MuiPickersMonth",["root","monthButton","disabled","selected"]),FW=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],FU=(0,y.A)("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),FG=(0,y.A)("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${FH.disabled}`]:t.disabled},{[`&.${FH.selected}`]:t.selected}]})(({theme:e})=>(0,PN.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${FH.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${FH.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Fq=u.memo(function(e){let t=jY({props:e,name:"MuiPickersMonth"}),{autoFocus:n,className:r,children:i,disabled:o,selected:s,value:a,tabIndex:c,onClick:h,onKeyDown:p,onFocus:m,onBlur:g,"aria-current":v,"aria-label":y,slots:b,slotProps:x}=t,w=(0,PB.A)(t,FW),S=u.useRef(null),A=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,f.A)({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},FV,r)})(t);(0,uu.A)(()=>{n&&S.current?.focus()},[n]);let C=b?.monthButton??FG,k=(0,hi.A)({elementType:C,externalSlotProps:x?.monthButton,additionalProps:{children:i,disabled:o,tabIndex:c,ref:S,type:"button",role:"radio","aria-current":v,"aria-checked":s,"aria-label":y,onClick:e=>h(e,a),onKeyDown:e=>p(e,a),onFocus:e=>m(e,a),onBlur:e=>g(e,a)},ownerState:t,className:A.monthButton});return(0,l.jsx)(FU,(0,PN.A)({className:(0,d.A)(A.root,r),ownerState:t},w,{children:(0,l.jsx)(C,(0,PN.A)({},k))}))});function FX(e){return(0,M.Ay)("MuiMonthCalendar",e)}(0,k.A)("MuiMonthCalendar",["root"]);let FY=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],FK=(0,y.A)("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:320,boxSizing:"border-box"}),FQ=u.forwardRef(function(e,t){let n,r,i,o=(n=j0().utils,r=j0().defaultDates,i=jY({props:e,name:"MuiMonthCalendar"}),(0,PN.A)({disableFuture:!1,disablePast:!1},i,{minDate:j3(n,i.minDate,r.minDate),maxDate:j3(n,i.maxDate,r.maxDate)})),{className:s,value:a,defaultValue:c,referenceDate:h,disabled:p,disableFuture:m,disablePast:g,maxDate:v,minDate:y,onChange:b,shouldDisableMonth:x,readOnly:w,autoFocus:S=!1,onMonthFocus:A,hasFocus:C,onFocusedViewChange:k,monthsPerRow:M=3,timezone:O,gridLabelId:T,slots:_,slotProps:I}=o,D=(0,PB.A)(o,FY),{value:R,handleValueChange:E,timezone:P}=$z({name:"MonthCalendar",timezone:O,value:a,defaultValue:c,referenceDate:h,onChange:b,valueManager:$4}),L=j1(P),N=(0,lE.I)(),B=j0().utils,j=u.useMemo(()=>$4.getInitialReferenceValue({value:R,utils:B,props:o,timezone:P,referenceDate:h,granularity:$$.month}),[]),z=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},FX,t)})(o),$=u.useMemo(()=>B.getMonth(L),[B,L]),F=u.useMemo(()=>null!=R?B.getMonth(R):null,[R,B]),[V,H]=u.useState(()=>F||B.getMonth(j)),[W,U]=(0,f5.A)({name:"MonthCalendar",state:"hasFocus",controlled:C,default:S??!1}),G=(0,f3.A)(e=>{U(e),k&&k(e)}),q=u.useCallback(e=>{let t=B.startOfMonth(g&&B.isAfter(L,y)?L:y),n=B.startOfMonth(m&&B.isBefore(L,v)?L:v),r=B.startOfMonth(e);return!!(B.isBefore(r,t)||B.isAfter(r,n))||!!x&&x(r)},[m,g,v,y,L,x,B]),X=(0,f3.A)((e,t)=>{w||E(B.setMonth(R??j,t))}),Y=(0,f3.A)(e=>{!q(B.setMonth(R??j,e))&&(H(e),G(!0),A&&A(e))});u.useEffect(()=>{H(e=>null!==F&&e!==F?F:e)},[F]);let K=(0,f3.A)((e,t)=>{switch(e.key){case"ArrowUp":Y((12+t-3)%12),e.preventDefault();break;case"ArrowDown":Y((12+t+3)%12),e.preventDefault();break;case"ArrowLeft":Y((12+t+(N?1:-1))%12),e.preventDefault();break;case"ArrowRight":Y((12+t+(N?-1:1))%12),e.preventDefault()}}),Q=(0,f3.A)((e,t)=>{Y(t)}),Z=(0,f3.A)((e,t)=>{V===t&&G(!1)});return(0,l.jsx)(FK,(0,PN.A)({ref:t,className:(0,d.A)(z.root,s),ownerState:o,role:"radiogroup","aria-labelledby":T},D,{children:j4(B,R??j).map(e=>{let t=B.getMonth(e),n=B.format(e,"monthShort"),r=B.format(e,"month"),i=p||q(e);return(0,l.jsx)(Fq,{selected:t===F,value:t,onClick:X,onKeyDown:K,autoFocus:W&&t===V,disabled:i,tabIndex:t!==V||i?-1:0,onFocus:Q,onBlur:Z,"aria-current":$===t?"date":void 0,"aria-label":r,monthsPerRow:M,slots:_,slotProps:I,children:n},n)})}))});function FZ(e){return(0,M.Ay)("MuiPickersYear",e)}let FJ=(0,k.A)("MuiPickersYear",["root","yearButton","selected","disabled"]),F0=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],F1=(0,y.A)("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),F2=(0,y.A)("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${FJ.disabled}`]:t.disabled},{[`&.${FJ.selected}`]:t.selected}]})(({theme:e})=>(0,PN.A)({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:(0,m.X4)(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,m.X4)(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${FJ.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${FJ.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),F5=u.memo(function(e){let t=jY({props:e,name:"MuiPickersYear"}),{autoFocus:n,className:r,children:i,disabled:o,selected:s,value:a,tabIndex:c,onClick:h,onKeyDown:p,onFocus:m,onBlur:g,"aria-current":v,slots:y,slotProps:b}=t,x=(0,PB.A)(t,F0),w=u.useRef(null),S=(e=>{let{disabled:t,selected:n,classes:r}=e;return(0,f.A)({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},FZ,r)})(t);(0,uu.A)(()=>{n&&w.current?.focus()},[n]);let A=y?.yearButton??F2,C=(0,hi.A)({elementType:A,externalSlotProps:b?.yearButton,additionalProps:{children:i,disabled:o,tabIndex:c,ref:w,type:"button",role:"radio","aria-current":v,"aria-checked":s,onClick:e=>h(e,a),onKeyDown:e=>p(e,a),onFocus:e=>m(e,a),onBlur:e=>g(e,a)},ownerState:t,className:S.yearButton});return(0,l.jsx)(F1,(0,PN.A)({className:(0,d.A)(S.root,r),ownerState:t},x,{children:(0,l.jsx)(A,(0,PN.A)({},C))}))});function F3(e){return(0,M.Ay)("MuiYearCalendar",e)}(0,k.A)("MuiYearCalendar",["root"]);let F4=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],F6=(0,y.A)("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:320,maxHeight:280,boxSizing:"border-box",position:"relative"}),F9=u.forwardRef(function(e,t){let n,r,i,o=(n=j0().utils,r=j0().defaultDates,i=jY({props:e,name:"MuiYearCalendar"}),(0,PN.A)({disablePast:!1,disableFuture:!1},i,{yearsPerRow:i.yearsPerRow??3,minDate:j3(n,i.minDate,r.minDate),maxDate:j3(n,i.maxDate,r.maxDate)})),{autoFocus:s,className:a,value:c,defaultValue:h,referenceDate:p,disabled:m,disableFuture:g,disablePast:v,maxDate:y,minDate:b,onChange:x,readOnly:w,shouldDisableYear:S,onYearFocus:A,hasFocus:C,onFocusedViewChange:k,yearsOrder:M="asc",yearsPerRow:O,timezone:T,gridLabelId:_,slots:I,slotProps:D}=o,R=(0,PB.A)(o,F4),{value:E,handleValueChange:P,timezone:L}=$z({name:"YearCalendar",timezone:T,value:c,defaultValue:h,referenceDate:p,onChange:x,valueManager:$4}),N=j1(L),B=(0,lE.I)(),j=j0().utils,z=u.useMemo(()=>$4.getInitialReferenceValue({value:E,utils:j,props:o,timezone:L,referenceDate:p,granularity:$$.year}),[]),$=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"]},F3,t)})(o),F=u.useMemo(()=>j.getYear(N),[j,N]),V=u.useMemo(()=>null!=E?j.getYear(E):null,[E,j]),[H,W]=u.useState(()=>V||j.getYear(z)),[U,G]=(0,f5.A)({name:"YearCalendar",state:"hasFocus",controlled:C,default:s??!1}),q=(0,f3.A)(e=>{G(e),k&&k(e)}),X=u.useCallback(e=>!!(v&&j.isBeforeYear(e,N)||g&&j.isAfterYear(e,N)||b&&j.isBeforeYear(e,b)||y&&j.isAfterYear(e,y))||!!S&&S(j.startOfYear(e)),[g,v,y,b,N,S,j]),Y=(0,f3.A)((e,t)=>{w||P(j.setYear(E??z,t))}),K=(0,f3.A)(e=>{X(j.setYear(E??z,e))||(W(e),q(!0),A?.(e))});u.useEffect(()=>{W(e=>null!==V&&e!==V?V:e)},[V]);let Q="desc"!==M?+O:-1*O,Z=B&&"asc"===M||!B&&"desc"===M?-1:1,J=(0,f3.A)((e,t)=>{switch(e.key){case"ArrowUp":K(t-Q),e.preventDefault();break;case"ArrowDown":K(t+Q),e.preventDefault();break;case"ArrowLeft":K(t-Z),e.preventDefault();break;case"ArrowRight":K(t+Z),e.preventDefault()}}),ee=(0,f3.A)((e,t)=>{K(t)}),et=(0,f3.A)((e,t)=>{H===t&&q(!1)}),en=u.useRef(null),er=(0,uc.A)(t,en);u.useEffect(()=>{if(s||null===en.current)return;let e=en.current.querySelector('[tabindex="0"]');if(!e)return;let t=e.offsetHeight,n=e.offsetTop,r=en.current.clientHeight,i=en.current.scrollTop;t>r||n<i||(en.current.scrollTop=n+t-r/2-t/2)},[s]);let ei=j.getYearRange([b,y]);return"desc"===M&&ei.reverse(),(0,l.jsx)(F6,(0,PN.A)({ref:er,className:(0,d.A)($.root,a),ownerState:o,role:"radiogroup","aria-labelledby":_},R,{children:ei.map(e=>{let t=j.getYear(e),n=m||X(e);return(0,l.jsx)(F5,{selected:t===V,value:t,onClick:Y,onKeyDown:J,autoFocus:U&&t===H,disabled:n,tabIndex:t!==H||n?-1:0,onFocus:ee,onBlur:et,"aria-current":F===t?"date":void 0,yearsPerRow:O,slots:I,slotProps:D,children:j.format(e,"year")},j.format(e,"year"))})}))}),F8=e=>(0,M.Ay)("MuiPickersCalendarHeader",e),F7=(0,k.A)("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Ve=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],Vt=["ownerState"],Vn=(0,y.A)("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Vr=(0,y.A)("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>(0,PN.A)({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Vi=(0,y.A)("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Vo=(0,y.A)(er,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${F7.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Vs=(0,y.A)(zA,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Va=u.forwardRef(function(e,t){let n=j0().localeText,r=j0().utils,i=jY({props:e,name:"MuiPickersCalendarHeader"}),{slots:o,slotProps:s,currentMonth:a,disabled:c,disableFuture:h,disablePast:p,maxDate:m,minDate:g,onMonthChange:v,onViewChange:y,view:b,reduceAnimations:x,views:w,labelId:S,className:A,timezone:C,format:k=`${r.formats.month} ${r.formats.year}`}=i,M=(0,PB.A)(i,Ve),O=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},F8,t)})(i),T=o?.switchViewButton??Vo,_=(0,hi.A)({elementType:T,externalSlotProps:s?.switchViewButton,additionalProps:{size:"small","aria-label":n.calendarViewSwitchingButtonAriaLabel(b)},ownerState:i,className:O.switchViewButton}),I=o?.switchViewIcon??Vs,D=(0,hi.A)({elementType:I,externalSlotProps:s?.switchViewIcon,ownerState:i,className:O.switchViewIcon}),R=(0,PB.A)(D,Vt),E=function(e,{disableFuture:t,maxDate:n,timezone:r}){let i=j0().utils;return u.useMemo(()=>{let o=i.date(void 0,r),s=i.startOfMonth(t&&i.isBefore(o,n)?o:n);return!i.isAfter(s,e)},[t,n,e,i,r])}(a,{disableFuture:h,maxDate:m,timezone:C}),P=function(e,{disablePast:t,minDate:n,timezone:r}){let i=j0().utils;return u.useMemo(()=>{let o=i.date(void 0,r),s=i.startOfMonth(t&&i.isAfter(o,n)?o:n);return!i.isBefore(s,e)},[t,n,e,i,r])}(a,{disablePast:p,minDate:g,timezone:C});if(1===w.length&&"year"===w[0])return null;let L=r.formatByString(a,k);return(0,l.jsxs)(Vn,(0,PN.A)({},M,{ownerState:i,className:(0,d.A)(O.root,A),ref:t,children:[(0,l.jsxs)(Vr,{role:"presentation",onClick:()=>{if(1!==w.length&&y&&!c)if(2===w.length)y(w.find(e=>e!==b)||w[0]);else{let e=+(0===w.indexOf(b));y(w[e])}},ownerState:i,"aria-live":"polite",className:O.labelContainer,children:[(0,l.jsx)(Fl,{reduceAnimations:x,transKey:L,children:(0,l.jsx)(Vi,{id:S,ownerState:i,className:O.label,children:L})}),w.length>1&&!c&&(0,l.jsx)(T,(0,PN.A)({},_,{children:(0,l.jsx)(I,(0,PN.A)({},R))}))]}),(0,l.jsx)(dh.A,{in:"day"===b,appear:!x,enter:!x,children:(0,l.jsx)($o,{slots:o,slotProps:s,onGoToPrevious:()=>v(r.addMonths(a,-1),"right"),isPreviousDisabled:P,previousLabel:n.previousMonth,onGoToNext:()=>v(r.addMonths(a,1),"left"),isNextDisabled:E,nextLabel:n.nextMonth})})]}))}),Vl="u">typeof navigator&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Vc=Vl&&Vl[1]?parseInt(Vl[1],10):null,Vu=Vl&&Vl[2]?parseInt(Vl[2],10):null,Vh=Vc&&Vc<10||Vu&&Vu<13||!1,Vd=e=>(0,M.Ay)("MuiDateCalendar",e);(0,k.A)("MuiDateCalendar",["root","viewTransitionContainer"]);let Vp=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Vf=(0,y.A)($a,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:336}),Vm=(0,y.A)(Fl,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Vg=u.forwardRef(function(e,t){let n,r,i,o,s=j0().utils,a=(0,dc.A)(),c=(n=j0().utils,r=j0().defaultDates,i=gU("@media (prefers-reduced-motion: reduce)",{defaultMatches:!1})||Vh,o=jY({props:e,name:"MuiDateCalendar"}),(0,PN.A)({},o,{loading:o.loading??!1,disablePast:o.disablePast??!1,disableFuture:o.disableFuture??!1,openTo:o.openTo??"day",views:o.views??["year","day"],reduceAnimations:o.reduceAnimations??i,renderLoading:o.renderLoading??(()=>(0,l.jsx)("span",{children:"..."})),minDate:j3(n,o.minDate,r.minDate),maxDate:j3(n,o.maxDate,r.maxDate)})),{autoFocus:h,onViewChange:p,value:m,defaultValue:g,referenceDate:v,disableFuture:y,disablePast:b,onChange:x,onYearChange:w,onMonthChange:S,reduceAnimations:A,shouldDisableDate:C,shouldDisableMonth:k,shouldDisableYear:M,view:O,views:T,openTo:_,className:I,disabled:D,readOnly:R,minDate:E,maxDate:P,disableHighlightToday:L,focusedView:N,onFocusedViewChange:B,showDaysOutsideCurrentMonth:j,fixedWeekNumber:z,dayOfWeekFormatter:$,slots:F,slotProps:V,loading:H,renderLoading:W,displayWeekNumber:U,yearsOrder:G,yearsPerRow:q,monthsPerRow:X,timezone:Y}=c,K=(0,PB.A)(c,Vp),{value:Q,handleValueChange:Z,timezone:J}=$z({name:"DateCalendar",timezone:Y,value:m,defaultValue:g,referenceDate:v,onChange:x,valueManager:$4}),{view:ee,setView:et,focusedView:en,setFocusedView:er,goToNextView:ei,setValueAndGoToNextView:eo}=$s({view:O,views:T,openTo:_,onChange:Z,onViewChange:p,autoFocus:h,focusedView:N,onFocusedViewChange:B}),{referenceDate:es,calendarState:ea,changeFocusedDay:el,changeMonth:ec,handleChangeMonth:eu,isDateDisabled:eh,onMonthSwitchingAnimationEnd:ed}=(e=>{let t,{value:n,referenceDate:r,disableFuture:i,disablePast:o,disableSwitchToMonthOnDayFocus:s=!1,maxDate:a,minDate:l,onMonthChange:c,reduceAnimations:h,shouldDisableDate:d,timezone:p}=e,f=j0().utils,m=u.useRef((t=!!h,(e,n)=>{switch(n.type){case"changeMonth":return(0,PN.A)({},e,{slideDirection:n.direction,currentMonth:n.newMonth,isMonthSwitchingAnimating:!t});case"changeMonthTimezone":{let t=n.newTimezone;if(f.getTimezone(e.currentMonth)===t)return e;let r=f.setTimezone(e.currentMonth,t);return f.getMonth(r)!==f.getMonth(e.currentMonth)&&(r=f.setMonth(r,f.getMonth(e.currentMonth))),(0,PN.A)({},e,{currentMonth:r})}case"finishMonthSwitchingAnimation":return(0,PN.A)({},e,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(null!=e.focusedDay&&null!=n.focusedDay&&f.isSameDay(n.focusedDay,e.focusedDay))return e;let r=null!=n.focusedDay&&!s&&!f.isSameMonth(e.currentMonth,n.focusedDay);return(0,PN.A)({},e,{focusedDay:n.focusedDay,isMonthSwitchingAnimating:r&&!t&&!n.withoutMonthSwitchingAnimation,currentMonth:r?f.startOfMonth(n.focusedDay):e.currentMonth,slideDirection:null!=n.focusedDay&&f.isAfterDay(n.focusedDay,e.currentMonth)?"left":"right"})}default:throw Error("missing support")}})).current,g=u.useMemo(()=>$4.getInitialReferenceValue({value:n,utils:f,timezone:p,props:e,referenceDate:r,granularity:$$.day}),[r,p]),[v,y]=u.useReducer(m,{isMonthSwitchingAnimating:!1,focusedDay:g,currentMonth:f.startOfMonth(g),slideDirection:"left"});u.useEffect(()=>{y({type:"changeMonthTimezone",newTimezone:f.getTimezone(g)})},[g,f]);let b=u.useCallback(e=>{y((0,PN.A)({type:"changeMonth"},e)),c&&c(e.newMonth)},[c]),x=u.useCallback(e=>{f.isSameMonth(e,v.currentMonth)||b({newMonth:f.startOfMonth(e),direction:f.isAfterDay(e,v.currentMonth)?"left":"right"})},[v.currentMonth,b,f]),w=Fi({shouldDisableDate:d,minDate:l,maxDate:a,disableFuture:i,disablePast:o,timezone:p}),S=u.useCallback(()=>{y({type:"finishMonthSwitchingAnimation"})},[]);return{referenceDate:g,calendarState:v,changeMonth:x,changeFocusedDay:(0,f3.A)((e,t)=>{w(e)||y({type:"changeFocusedDay",focusedDay:e,withoutMonthSwitchingAnimation:t})}),isDateDisabled:w,onMonthSwitchingAnimationEnd:S,handleChangeMonth:b}})({value:Q,referenceDate:v,reduceAnimations:A,onMonthChange:S,minDate:E,maxDate:P,shouldDisableDate:C,disablePast:b,disableFuture:y,timezone:J}),ep=D&&Q||E,ef=D&&Q||P,em=`${a}-grid-label`,eg=null!==en,ev=F?.calendarHeader??Va,ey=(0,hi.A)({elementType:ev,externalSlotProps:V?.calendarHeader,additionalProps:{views:T,view:ee,currentMonth:ea.currentMonth,onViewChange:et,onMonthChange:(e,t)=>eu({newMonth:e,direction:t}),minDate:ep,maxDate:ef,disabled:D,disablePast:b,disableFuture:y,reduceAnimations:A,timezone:J,labelId:em},ownerState:c}),eb=(0,f3.A)(e=>{let t=s.startOfMonth(e),n=s.endOfMonth(e),r=eh(e)?j5({utils:s,date:e,minDate:s.isBefore(E,t)?t:E,maxDate:s.isAfter(P,n)?n:P,disablePast:b,disableFuture:y,isDateDisabled:eh,timezone:J}):e;r?(eo(r,"finish"),S?.(t)):(ei(),ec(t)),el(r,!0)}),ex=(0,f3.A)(e=>{let t=s.startOfYear(e),n=s.endOfYear(e),r=eh(e)?j5({utils:s,date:e,minDate:s.isBefore(E,t)?t:E,maxDate:s.isAfter(P,n)?n:P,disablePast:b,disableFuture:y,isDateDisabled:eh,timezone:J}):e;r?(eo(r,"finish"),w?.(r)):(ei(),ec(t)),el(r,!0)}),ew=(0,f3.A)(e=>e?Z(j2(s,e,Q??es),"finish",ee):Z(e,"finish",ee));u.useEffect(()=>{null!=Q&&s.isValid(Q)&&ec(Q)},[Q]);let eS=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Vd,t)})(c),eA={disablePast:b,disableFuture:y,maxDate:P,minDate:E},eC={disableHighlightToday:L,readOnly:R,disabled:D,timezone:J,gridLabelId:em,slots:F,slotProps:V},ek=u.useRef(ee);u.useEffect(()=>{ek.current!==ee&&(en===ek.current&&er(ee,!0),ek.current=ee)},[en,er,ee]);let eM=u.useMemo(()=>[Q],[Q]);return(0,l.jsxs)(Vf,(0,PN.A)({ref:t,className:(0,d.A)(eS.root,I),ownerState:c},K,{children:[(0,l.jsx)(ev,(0,PN.A)({},ey,{slots:F,slotProps:V})),(0,l.jsx)(Vm,{reduceAnimations:A,className:eS.viewTransitionContainer,transKey:ee,ownerState:c,children:(0,l.jsxs)("div",{children:["year"===ee&&(0,l.jsx)(F9,(0,PN.A)({},eA,eC,{value:Q,onChange:ex,shouldDisableYear:M,hasFocus:eg,onFocusedViewChange:e=>er("year",e),yearsOrder:G,yearsPerRow:q,referenceDate:es})),"month"===ee&&(0,l.jsx)(FQ,(0,PN.A)({},eA,eC,{hasFocus:eg,className:I,value:Q,onChange:eb,shouldDisableMonth:k,onFocusedViewChange:e=>er("month",e),monthsPerRow:X,referenceDate:es})),"day"===ee&&(0,l.jsx)(FF,(0,PN.A)({},ea,eA,eC,{onMonthSwitchingAnimationEnd:ed,onFocusedDayChange:el,reduceAnimations:A,selectedDays:eM,onSelectedDaysChange:ew,shouldDisableDate:C,shouldDisableMonth:k,shouldDisableYear:M,hasFocus:eg,onFocusedViewChange:e=>er("day",e),showDaysOutsideCurrentMonth:j,fixedWeekNumber:z,dayOfWeekFormatter:$,displayWeekNumber:U,loading:H,renderLoading:W}))]})})]}))}),Vv=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:o,defaultValue:s,referenceDate:a,onChange:c,className:u,classes:h,disableFuture:d,disablePast:p,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:b,onMonthChange:x,monthsPerRow:w,onYearChange:S,yearsOrder:A,yearsPerRow:C,slots:k,slotProps:M,loading:O,renderLoading:T,disableHighlightToday:_,readOnly:I,disabled:D,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:E,sx:P,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:j})=>(0,l.jsx)(Vg,{view:e,onViewChange:t,views:n.filter(j7),focusedView:r&&j7(r)?r:null,onFocusedViewChange:i,value:o,defaultValue:s,referenceDate:a,onChange:c,className:u,classes:h,disableFuture:d,disablePast:p,minDate:f,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:y,reduceAnimations:b,onMonthChange:x,monthsPerRow:w,onYearChange:S,yearsOrder:A,yearsPerRow:C,slots:k,slotProps:M,loading:O,renderLoading:T,disableHighlightToday:_,readOnly:I,disabled:D,showDaysOutsideCurrentMonth:R,dayOfWeekFormatter:E,sx:P,autoFocus:L,fixedWeekNumber:N,displayWeekNumber:B,timezone:j});function Vy(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,s=j0(),a=u.useRef(n.valueManager.defaultErrorState),l=n({adapter:s,value:r,timezone:i,props:t}),c=n.valueManager.hasError(l);return u.useEffect(()=>{o&&!n.valueManager.isSameError(l,a.current)&&o(l,r),a.current=l},[n,o,l,r]),{validationError:l,hasValidationError:c,getValidationErrorForNewValue:(0,f3.A)(e=>n({adapter:s,value:e,timezone:i,props:t}))}}let Vb=["className","sx"],Vx=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Vx(t.shadowRoot):t:null};function Vw(){return"u"<typeof window?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?90===Math.abs(window.screen.orientation.angle)?"landscape":"portrait":window.orientation&&90===Math.abs(Number(window.orientation))?"landscape":"portrait"}function VS(e){return(0,M.Ay)("MuiPickersLayout",e)}let VA=(0,k.A)("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),VC=["onAccept","onClear","onCancel","onSetToday","actions"];function Vk(e){let{onAccept:t,onClear:n,onCancel:r,onSetToday:i,actions:o}=e,s=(0,PB.A)(e,VC),a=j0().localeText;if(null==o||0===o.length)return null;let c=o?.map(e=>{switch(e){case"clear":return(0,l.jsx)(G,{onClick:n,children:a.clearButtonLabel},e);case"cancel":return(0,l.jsx)(G,{onClick:r,children:a.cancelButtonLabel},e);case"accept":return(0,l.jsx)(G,{onClick:t,children:a.okButtonLabel},e);case"today":return(0,l.jsx)(G,{onClick:i,children:a.todayButtonLabel},e);default:return null}});return(0,l.jsx)(dA,(0,PN.A)({},s,{children:c}))}var VM=n("Xy"),VO=n("nP"),VT=n("tu");function V_(e){return(0,M.Ay)("MuiListItem",e)}function VI(e){return(0,M.Ay)("MuiListItemSecondaryAction",e)}(0,k.A)("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]),(0,k.A)("MuiListItemSecondaryAction",["root","disableGutters"]);let VD=(0,y.A)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),VR=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiListItemSecondaryAction"}),{className:r,...i}=n,o=u.useContext(nu.A),s={...n,disableGutters:o.disableGutters},a=(e=>{let{disableGutters:t,classes:n}=e;return(0,f.A)({root:["root",t&&"disableGutters"]},VI,n)})(s);return(0,l.jsx)(VD,{className:(0,d.A)(a.root,r),ownerState:s,ref:t,...i})});VR.muiName="ListItemSecondaryAction";let VE=(0,y.A)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]}})((0,b.A)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${ny.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),VP=(0,y.A)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),VL=u.forwardRef(function(e,t){let n=(0,x.b)({props:e,name:"MuiListItem"}),{alignItems:r="center",children:i,className:o,component:s,components:a={},componentsProps:c={},ContainerComponent:h="li",ContainerProps:{className:p,...m}={},dense:g=!1,disableGutters:v=!1,disablePadding:y=!1,divider:b=!1,secondaryAction:w,slotProps:S={},slots:A={},...C}=n,k=u.useContext(nu.A),M=u.useMemo(()=>({dense:g||k.dense||!1,alignItems:r,disableGutters:v}),[r,k.dense,g,v]),O=u.useRef(null),T=u.Children.toArray(i),_=T.length&&(0,VT.A)(T[T.length-1],["ListItemSecondaryAction"]),I={...n,alignItems:r,dense:M.dense,disableGutters:v,disablePadding:y,divider:b,hasSecondaryAction:_},D=(e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:o,divider:s,hasSecondaryAction:a}=e;return(0,f.A)({root:["root",r&&"dense",!i&&"gutters",!o&&"padding",s&&"divider","flex-start"===t&&"alignItemsFlexStart",a&&"secondaryAction"],container:["container"]},V_,n)})(I),R=(0,ng.A)(O,t),E=A.root||a.Root||VE,P=S.root||c.root||{},L={className:(0,d.A)(D.root,P.className,o),...C},N=s||"li";return _?(N=L.component||s?N:"div","li"===h&&("li"===N?N="div":"li"===L.component&&(L.component="div")),(0,l.jsx)(nu.A.Provider,{value:M,children:(0,l.jsxs)(VP,{as:h,className:(0,d.A)(D.container,p),ref:R,ownerState:I,...m,children:[(0,l.jsx)(E,{...P,...!(0,VO.A)(E)&&{as:N,ownerState:{...I,...P.ownerState}},...L,children:T}),T.pop()]})})):(0,l.jsx)(nu.A.Provider,{value:M,children:(0,l.jsxs)(E,{...P,as:N,ref:R,...!(0,VO.A)(E)&&{ownerState:{...I,...P.ownerState}},...L,children:[T,w&&(0,l.jsx)(VR,{children:w})]})})}),VN=["items","changeImportance","isLandscape","onChange","isValid"],VB=["getValue"];function Vj(e){let{items:t,changeImportance:n="accept",onChange:r,isValid:i}=e,o=(0,PB.A)(e,VN);if(null==t||0===t.length)return null;let s=t.map(e=>{let{getValue:t}=e,o=(0,PB.A)(e,VB),s=t({isValid:i});return(0,PN.A)({},o,{label:o.label,onClick:()=>{r(s,n,o)},disabled:!i(s)})});return(0,l.jsx)(VM.A,(0,PN.A)({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:"auto"},...Array.isArray(o.sx)?o.sx:[o.sx]]},o,{children:s.map(e=>(0,l.jsx)(VL,{children:(0,l.jsx)(md,(0,PN.A)({},e))},e.id??e.label))}))}let Vz=(0,y.A)("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${VA.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${VA.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${VA.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${VA.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${VA.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${VA.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${VA.shortcuts}`]:{gridColumn:3}}}]}),V$=(0,y.A)("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),VF=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersLayout"}),{toolbar:r,content:i,tabs:o,actionBar:s,shortcuts:a}=(e=>{let{wrapperVariant:t,onAccept:n,onClear:r,onCancel:i,onSetToday:o,view:s,views:a,onViewChange:c,value:u,onChange:h,onSelectShortcut:d,isValid:p,isLandscape:m,disabled:g,readOnly:v,children:y,slots:b,slotProps:x}=e,w=(e=>{let{classes:t,isLandscape:n}=e;return(0,f.A)({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},VS,t)})(e),S=b?.actionBar??Vk,A=(0,hi.A)({elementType:S,externalSlotProps:x?.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:i,onSetToday:o,actions:"desktop"===t?[]:["cancel","accept"]},className:w.actionBar,ownerState:(0,PN.A)({},e,{wrapperVariant:t})}),C=(0,l.jsx)(S,(0,PN.A)({},A)),k=b?.toolbar,M=(0,hi.A)({elementType:k,externalSlotProps:x?.toolbar,additionalProps:{isLandscape:m,onChange:h,value:u,view:s,onViewChange:c,views:a,disabled:g,readOnly:v},className:w.toolbar,ownerState:(0,PN.A)({},e,{wrapperVariant:t})}),O=null!==M.view&&k?(0,l.jsx)(k,(0,PN.A)({},M)):null,T=b?.tabs,_=s&&T?(0,l.jsx)(T,(0,PN.A)({view:s,onViewChange:c,className:w.tabs},x?.tabs)):null,I=b?.shortcuts??Vj,D=(0,hi.A)({elementType:I,externalSlotProps:x?.shortcuts,additionalProps:{isValid:p,isLandscape:m,onChange:d},className:w.shortcuts,ownerState:{isValid:p,isLandscape:m,onChange:d,wrapperVariant:t}});return{toolbar:O,content:y,tabs:_,actionBar:C,shortcuts:s&&I?(0,l.jsx)(I,(0,PN.A)({},D)):null}})(n),{sx:c,className:h,isLandscape:p,wrapperVariant:m}=n,g=(e=>{let{isLandscape:t,classes:n}=e;return(0,f.A)({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},VS,n)})(n);return(0,l.jsxs)(Vz,{ref:t,sx:c,className:(0,d.A)(g.root,h),ownerState:n,children:[p?a:r,p?r:a,(0,l.jsx)(V$,{className:g.contentWrapper,children:"desktop"===m?(0,l.jsxs)(u.Fragment,{children:[i,o]}):(0,l.jsxs)(u.Fragment,{children:[o,i]})}),s]})}),VV=["props","ref"],VH=(0,y.A)(VF)(({theme:e})=>({overflow:"hidden",minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),VW=({adapter:e,value:t,timezone:n,props:r})=>{if(null===t)return null;let{minTime:i,maxTime:o,minutesStep:s,shouldDisableTime:a,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,h=e.utils.date(void 0,n),d=zZ(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(i&&d(i,t)):return"minTime";case!!(o&&d(t,o)):return"maxTime";case!!(u&&e.utils.isAfter(t,h)):return"disableFuture";case!!(c&&e.utils.isBefore(t,h)):return"disablePast";case!!(a&&a(t,"hours")):return"shouldDisableTime-hours";case!!(a&&a(t,"minutes")):return"shouldDisableTime-minutes";case!!(a&&a(t,"seconds")):return"shouldDisableTime-seconds";case!!(s&&e.utils.getMinutes(t)%s!=0):return"minutesStep";default:return null}};VW.valueManager=$4;let VU=({adapter:e,value:t,timezone:n,props:r})=>{let i=Fr({adapter:e,value:t,timezone:n,props:r});return null!==i?i:VW({adapter:e,value:t,timezone:n,props:r})};VU.valueManager=$4;let VG=u.forwardRef(function(e,t){let n,r,i,o,s,a=(n=j0().utils,r=j0().defaultDates,o=(i=jY({props:e,name:"MuiStaticDateTimePicker"})).ampm??n.is12HourCycleInCurrentLocale(),s=u.useMemo(()=>i.localeText?.toolbarTitle==null?i.localeText:(0,PN.A)({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle}),[i.localeText]),(0,PN.A)({},i,(({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i,o=n??r;if(null!=e)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}})({views:i.views,openTo:i.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:o,localeText:s,orientation:i.orientation??"portrait",disableIgnoringDatePartForTimeValidation:i.disableIgnoringDatePartForTimeValidation??!!(i.minDateTime||i.maxDateTime||i.disablePast||i.disableFuture),disableFuture:i.disableFuture??!1,disablePast:i.disablePast??!1,minDate:j3(n,i.minDateTime??i.minDate,r.minDate),maxDate:j3(n,i.maxDateTime??i.maxDate,r.maxDate),minTime:i.minDateTime??i.minTime,maxTime:i.maxDateTime??i.maxTime,slots:(0,PN.A)({toolbar:z9,tabs:zD},i.slots),slotProps:(0,PN.A)({},i.slotProps,{toolbar:(0,PN.A)({ampm:o},i.slotProps?.toolbar)})})),c=a.displayStaticWrapperAs??"mobile",h=a.ampmInClock??"desktop"===c,p=(0,PN.A)({day:Vv,month:Vv,year:Vv,hours:Fn,minutes:Fn,seconds:Fn},a.viewRenderers),{renderPicker:f}=(e=>{let{props:t,ref:n}=e,r=(0,PB.A)(e,VV),{localeText:i,slots:o,slotProps:s,className:a,sx:c,displayStaticWrapperAs:h,autoFocus:p}=t,{layoutProps:f,renderCurrentView:m}=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:i,validator:o,autoFocusView:s,rendererInterceptor:a,fieldRef:l})=>{let c=(({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i})=>{let{onAccept:o,onChange:s,value:a,defaultValue:l,closeOnSelect:c="desktop"===r,timezone:h,referenceDate:d}=e,{current:p}=u.useRef(l),{current:f}=u.useRef(void 0!==a),[m,g]=u.useState(h),v=j0().utils,y=j0(),{isOpen:b,setIsOpen:x}=(({open:e,onOpen:t,onClose:n})=>{let r=u.useRef("boolean"==typeof e).current,[i,o]=u.useState(!1);return u.useEffect(()=>{if(r){if("boolean"!=typeof e)throw Error("You must not mix controlling and uncontrolled mode for `open` prop");o(e)}},[r,e]),{isOpen:i,setIsOpen:u.useCallback(e=>{r||o(e),e&&t&&t(),!e&&n&&n()},[r,t,n])}})(e),{timezone:w,value:S,handleValueChange:A}=$j({timezone:h,value:a,defaultValue:p,referenceDate:d,onChange:s,valueManager:t}),[C,k]=u.useState(()=>{let e;return{draft:e=void 0!==S?S:void 0!==p?p:t.emptyValue,lastPublishedValue:e,lastCommittedValue:e,lastControlledValue:a,hasBeenModifiedSinceMount:!1}}),M=t.getTimezone(v,C.draft);m!==h&&(g(h),h&&M&&h!==M&&k(e=>(0,PN.A)({},e,{draft:t.setTimezone(v,h,e.draft)})));let{getValidationErrorForNewValue:O}=Vy({props:e,validator:i,timezone:w,value:C.draft,onError:e.onError}),T=(0,f3.A)(e=>{let n={action:e,dateState:C,hasChanged:n=>!t.areValuesEqual(v,e.value,n),isControlled:f,closeOnSelect:c},r=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i}=e,o=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromField"===t.name||("setValueFromAction"===t.name?!!(o&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastPublishedValue):("setValueFromView"===t.name&&"shallow"!==t.selectionState||"setValueFromShortcut"===t.name)&&(!!o||n(r.lastPublishedValue)))})(n),i=(e=>{let{action:t,hasChanged:n,dateState:r,isControlled:i,closeOnSelect:o}=e,s=!i&&!r.hasBeenModifiedSinceMount;return"setValueFromAction"===t.name?!!(s&&["accept","today","clear"].includes(t.pickerAction))||n(r.lastCommittedValue):"setValueFromView"===t.name&&"finish"===t.selectionState&&o?!!s||n(r.lastCommittedValue):"setValueFromShortcut"===t.name&&"accept"===t.changeImportance&&n(r.lastCommittedValue)})(n),s=(e=>{let{action:t,closeOnSelect:n}=e;return"setValueFromAction"===t.name||("setValueFromView"===t.name?"finish"===t.selectionState&&n:"setValueFromShortcut"===t.name&&"accept"===t.changeImportance)})(n);k(t=>(0,PN.A)({},t,{draft:e.value,lastPublishedValue:r?e.value:t.lastPublishedValue,lastCommittedValue:i?e.value:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let a=null,l=()=>(a||(a={validationError:"setValueFromField"===e.name?e.context.validationError:O(e.value)},"setValueFromShortcut"===e.name&&(a.shortcut=e.shortcut)),a);r&&A(e.value,l()),i&&o&&o(e.value,l()),s&&x(!1)});if(C.lastControlledValue!==a){let e=t.areValuesEqual(v,C.draft,S);k(t=>(0,PN.A)({},t,{lastControlledValue:a},e?{}:{lastCommittedValue:S,lastPublishedValue:S,draft:S,hasBeenModifiedSinceMount:!0}))}let _=(0,f3.A)(()=>{T({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),I=(0,f3.A)(()=>{T({value:C.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),D=(0,f3.A)(()=>{T({value:C.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=(0,f3.A)(()=>{T({value:C.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),E=(0,f3.A)(()=>{T({value:t.getTodayValue(v,w,n),name:"setValueFromAction",pickerAction:"today"})}),P=(0,f3.A)(e=>{e.preventDefault(),x(!0)}),L=(0,f3.A)(e=>{e?.preventDefault(),x(!1)}),N=(0,f3.A)((e,t="partial")=>T({name:"setValueFromView",value:e,selectionState:t})),B=(0,f3.A)((e,t,n)=>T({name:"setValueFromShortcut",value:e,changeImportance:t,shortcut:n})),j=(0,f3.A)((e,t)=>T({name:"setValueFromField",value:e,context:t})),z={onClear:_,onAccept:I,onDismiss:D,onCancel:R,onSetToday:E,onOpen:P,onClose:L},$={value:C.draft,onChange:j},F=u.useMemo(()=>t.cleanValue(v,C.draft),[v,t,C.draft]),V=(0,PN.A)({},z,{value:F,onChange:N,onSelectShortcut:B,isValid:n=>{let r=i({adapter:y,value:n,timezone:w,props:e});return!t.hasError(r)}}),H=u.useMemo(()=>({onOpen:P,onClose:L,open:b}),[b,L,P]);return{open:b,fieldProps:$,viewProps:{value:F,onChange:N,onClose:L,open:b},layoutProps:V,actions:z,contextValue:H}})({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o}),h=(({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:i,fieldRef:o})=>{let{onChange:s,open:a,onClose:l}=t,{view:c,views:h,openTo:d,onViewChange:p,viewRenderers:f,timezone:m}=e,g=(0,PB.A)(e,Vb),{view:v,setView:y,defaultView:b,focusedView:x,setFocusedView:w,setValueAndGoToNextView:S}=$s({view:c,views:h,openTo:d,onChange:s,onViewChange:p,autoFocus:r}),{hasUIView:A,viewModeLookup:C}=u.useMemo(()=>h.reduce((e,t)=>{let n;return n=null!=f[t]?"UI":"field",e.viewModeLookup[t]=n,"UI"===n&&(e.hasUIView=!0),e},{hasUIView:!1,viewModeLookup:{}}),[f,h]),k=u.useMemo(()=>h.reduce((e,t)=>null!=f[t]&&zY(t)?e+1:e,0),[f,h]),M=C[v],O=(0,f3.A)(()=>"UI"===M),[T,_]=u.useState("UI"===M?v:null);return T!==v&&"UI"===C[v]&&_(v),(0,uu.A)(()=>{"field"===M&&a&&(l(),setTimeout(()=>{o?.current?.setSelectedSections(v),o?.current?.focusField(v)}))},[v]),(0,uu.A)(()=>{if(!a)return;let e=v;"field"===M&&null!=T&&(e=T),e!==b&&"UI"===C[e]&&"UI"===C[b]&&(e=b),e!==v&&y(e),w(e,!0)},[a]),{hasUIView:A,shouldRestoreFocus:O,layoutProps:{views:h,view:T,onViewChange:y},renderCurrentView:()=>{if(null==T)return null;let e=f[T];if(null==e)return null;let r=(0,PN.A)({},g,n,t,{views:h,timezone:m,onChange:S,view:T,onViewChange:y,focusedView:x,onFocusedViewChange:w,showViewSwitcher:k>1,timeViewsCount:k});return i?i(f,T,r):e(r)}}})({props:e,additionalViewProps:i,autoFocusView:s,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:a}),d=(({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{let{orientation:i}=e,o=((e,t)=>{var n;let[r,i]=u.useState(Vw);return(0,uu.A)(()=>{let e=()=>{i(Vw())};return window.addEventListener("orientationchange",e),()=>{window.removeEventListener("orientationchange",e)}},[]),(Array.isArray(n=["hours","minutes","seconds"])?!n.every(t=>-1!==e.indexOf(t)):-1===e.indexOf(n))&&"landscape"===(t||r)})(n.views,i),s=(0,lE.I)();return{layoutProps:(0,PN.A)({},n,t,{isLandscape:o,isRtl:s,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}})({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:h.layoutProps}),p=function(e){let{props:t,pickerValueResponse:n}=e;return u.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:h.renderCurrentView,hasUIView:h.hasUIView,shouldRestoreFocus:h.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:p}})((0,PN.A)({},r,{props:t,autoFocusView:p??!1,additionalViewProps:{},wrapperVariant:h})),g=o?.layout??VH;return{renderPicker:()=>(0,l.jsx)(jZ,{localeText:i,children:(0,l.jsx)(g,(0,PN.A)({},f,s?.layout,{slots:o,slotProps:s,sx:[...Array.isArray(c)?c:[c],...Array.isArray(s?.layout?.sx)?s.layout.sx:[s?.layout?.sx]],className:(0,d.A)(a,s?.layout?.className),ref:n,children:m()}))})}})({props:(0,PN.A)({},a,{viewRenderers:p,displayStaticWrapperAs:c,ampmInClock:h,yearsPerRow:a.yearsPerRow??("mobile"===c?3:4),slotProps:(0,PN.A)({},a.slotProps,{tabs:(0,PN.A)({hidden:"desktop"===c},a.slotProps?.tabs),toolbar:(0,PN.A)({hidden:"desktop"===c,ampmInClock:h},a.slotProps?.toolbar)})}),valueManager:$4,valueType:"date-time",validator:VU,ref:t});return f()});VG.propTypes={ampm:jq().bool,ampmInClock:jq().bool,autoFocus:jq().bool,className:jq().string,dayOfWeekFormatter:jq().func,defaultValue:jq().object,disabled:jq().bool,disableFuture:jq().bool,disableHighlightToday:jq().bool,disableIgnoringDatePartForTimeValidation:jq().bool,disablePast:jq().bool,displayStaticWrapperAs:jq().oneOf(["desktop","mobile"]),displayWeekNumber:jq().bool,fixedWeekNumber:jq().number,loading:jq().bool,localeText:jq().object,maxDate:jq().object,maxDateTime:jq().object,maxTime:jq().object,minDate:jq().object,minDateTime:jq().object,minTime:jq().object,minutesStep:jq().number,monthsPerRow:jq().oneOf([3,4]),onAccept:jq().func,onChange:jq().func,onClose:jq().func,onError:jq().func,onMonthChange:jq().func,onViewChange:jq().func,onYearChange:jq().func,openTo:jq().oneOf(["day","hours","minutes","month","seconds","year"]),orientation:jq().oneOf(["landscape","portrait"]),readOnly:jq().bool,reduceAnimations:jq().bool,referenceDate:jq().object,renderLoading:jq().func,shouldDisableDate:jq().func,shouldDisableMonth:jq().func,shouldDisableTime:jq().func,shouldDisableYear:jq().func,showDaysOutsideCurrentMonth:jq().bool,slotProps:jq().object,slots:jq().object,sx:jq().oneOfType([jq().arrayOf(jq().oneOfType([jq().func,jq().object,jq().bool])),jq().func,jq().object]),timezone:jq().string,value:jq().object,view:jq().oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:jq().shape({day:jq().func,hours:jq().func,minutes:jq().func,month:jq().func,seconds:jq().func,year:jq().func}),views:jq().arrayOf(jq().oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:jq().oneOf(["asc","desc"]),yearsPerRow:jq().oneOf([3,4])};let Vq=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:o,token:s,startSeparator:a})=>{if(""===s)throw Error("MUI X: Should not call `commitToken` with an empty token");let l=$V(e,s),c=$J(e,l.contentType,l.type,s),u=n?c:"digit"===l.contentType,h=null!=t&&e.isValid(t),d=h?e.formatByString(t,s):"",p=null;if(u)if(c)p=""===d?e.formatByString(o,s).length:d.length;else{if(null==l.maxLength)throw Error(`MUI X: The token ${s} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,h&&(d=$q($Y($G(d,i),p),i))}return(0,PN.A)({},l,{format:s,maxLength:p,value:d,placeholder:((e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}})(e,r,l,s),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:a,endSeparator:"",modified:!1})},VX=e=>{let t=(({utils:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),(n-=1)<0)throw Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return i})(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));let n=(({utils:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,o=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,"g"),s=null;for(;s=o.exec(t);)n.push({start:s.index,end:o.lastIndex-1});return n})((0,PN.A)({},e,{expandedFormat:t})),r=(e=>{let{utils:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),o=[],s="",a=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),l=/^([a-zA-Z]+)/,c=RegExp(`^(${a.join("|")})*$`),u=RegExp(`^(${a.join("|")})`),h=e=>r.find(t=>t.start<=e&&t.end>=e),d=0;for(;d<n.length;){let t=h(d),r=null!=t,a=l.exec(n.slice(d))?.[1];if(!r&&null!=a&&c.test(a)){let t=a;for(;t.length>0;){let n=u.exec(t)[1];t=t.slice(n.length),o.push(Vq((0,PN.A)({},e,{now:i,token:n,startSeparator:s}))),s=""}d+=a.length}else{let e=n[d];r&&t?.start===d||t?.end===d||(0===o.length?s+=e:o[o.length-1].endSeparator+=e),d+=1}}return 0===o.length&&s.length>0&&o.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:s,endSeparator:"",modified:!1}),o})((0,PN.A)({},e,{expandedFormat:t,escapedParts:n}));return(({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&null!==r&&r.includes(" ")&&(r=`${r}`),"spacious"===t&&["/",".","-"].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}))((0,PN.A)({},e,{sections:r}))},VY=e=>{let{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:i,onClick:o,onFocus:s,onInput:a,onPaste:l,focused:c,autoFocus:h=!1},fieldValueManager:d,applyCharacterEditing:p,resetCharacterQuery:f,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:y,clearValue:b,updateSectionValue:x,updateValueFromValueStr:w,sectionOrder:S,areAllSectionsEmpty:A,sectionsValueBoundaries:C}=e,k=u.useRef(null),M=(0,uc.A)(r,k),O=j0().localeText,T=j0().utils,_=(0,dc.A)(),[I,D]=u.useState(!1),R=u.useMemo(()=>({syncSelectionToDOM:()=>{let e;if(!k.current)return;let t=document.getSelection();if(!t)return;if(null==g){t.rangeCount>0&&k.current.getRoot().contains(t.getRangeAt(0).startContainer)&&t.removeAllRanges(),I&&k.current.getRoot().blur();return}if(!k.current.getRoot().contains(Vx(document)))return;let n=new window.Range;e="all"===g?k.current.getRoot():"empty"===v.sections[g].type?k.current.getSectionContainer(g):k.current.getSectionContent(g),n.selectNodeContents(e),e.focus(),t.removeAllRanges(),t.addRange(n)},getActiveSectionIndexFromDOM:()=>{let e=Vx(document);return e&&k.current&&k.current.getRoot().contains(e)?k.current.getSectionIndexFromDOMElement(e):null},focusField:(e=0)=>{if(!k.current||null!=R.getActiveSectionIndexFromDOM())return;let t=$5(e,v.sections);D(!0),k.current.getSectionContent(t).focus()},setSelectedSections:e=>{if(!k.current)return;let t=$5(e,v.sections);D(null!==("all"===t?0:t)),m(e)},isFieldFocused:()=>{let e=Vx(document);return!!k.current&&k.current.getRoot().contains(e)}}),[g,m,v.sections,I]),E=(0,f3.A)(e=>{if(!k.current)return;let t=v.sections[e];k.current.getSectionContent(e).innerHTML=t.value||t.placeholder,R.syncSelectionToDOM()}),P=(0,f3.A)((e,...t)=>{!e.isDefaultPrevented()&&k.current&&(D(!0),o?.(e,...t),"all"===g?setTimeout(()=>{let e=document.getSelection().getRangeAt(0).startOffset;if(0===e)return void m(S.startIndex);let t=0,n=0;for(;n<e&&t<v.sections.length;){let e=v.sections[t];t+=1,n+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}m(t-1)}):I?k.current.getRoot().contains(e.target)||m(S.startIndex):(D(!0),m(S.startIndex)))}),L=(0,f3.A)(e=>{if(a?.(e),!k.current||"all"!==g)return;let t=e.target.textContent??"";k.current.getRoot().innerHTML=v.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(""),R.syncSelectionToDOM(),0===t.length||10===t.charCodeAt(0)?(f(),b(),m("all")):t.length>1?w(t):("all"===g&&m(0),p({keyPressed:t,sectionIndex:0}))}),N=(0,f3.A)(e=>{if(l?.(e),n||"all"!==g)return void e.preventDefault();let t=e.clipboardData.getData("text");e.preventDefault(),f(),w(t)}),B=(0,f3.A)((...e)=>{s?.(...e),I||!k.current||(D(!0),null==k.current.getSectionIndexFromDOMElement(Vx(document))&&m(S.startIndex))}),j=(0,f3.A)((...e)=>{i?.(...e),setTimeout(()=>{if(!k.current)return;let e=Vx(document);k.current.getRoot().contains(e)||(D(!1),m(null))})}),z=(0,f3.A)(e=>t=>{t.isDefaultPrevented()||m(e)}),$=(0,f3.A)(e=>{e.preventDefault()}),F=(0,f3.A)(e=>()=>{m(e)}),V=(0,f3.A)(e=>{if(e.preventDefault(),n||t||"number"!=typeof g)return;let r=v.sections[g],i=e.clipboardData.getData("text"),o=/^[a-zA-Z]+$/.test(i),s=/^[0-9]+$/.test(i),a=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(i);"letter"===r.contentType&&o||"digit"===r.contentType&&s||"digit-with-letter"===r.contentType&&a?(f(),x({activeSection:r,newSectionValue:i,shouldGoToNextSection:!0})):o||s||(f(),w(i))}),H=(0,f3.A)(e=>{e.preventDefault(),e.dataTransfer.dropEffect="none"}),W=(0,f3.A)(e=>{if(!k.current)return;let t=e.target,r=t.textContent??"",i=k.current.getSectionIndexFromDOMElement(t),o=v.sections[i];if(n||!k.current)return void E(i);if(0===r.length){if(""===o.value)return void E(i);let t=e.nativeEvent.inputType;return"insertParagraph"===t||"insertLineBreak"===t?void E(i):(f(),void y())}p({keyPressed:r,sectionIndex:i}),E(i)});(0,uu.A)(()=>{if(I&&k.current){if("all"===g)k.current.getRoot().focus();else if("number"==typeof g){let e=k.current.getSectionContent(g);e&&e.focus()}}},[g,I]);let U=u.useMemo(()=>v.sections.reduce((e,t)=>(e[t.type]=C[t.type]({currentDate:null,contentType:t.contentType,format:t.format}),e),{}),[C,v.sections]),G="all"===g,q=u.useMemo(()=>v.sections.map((e,r)=>{let i=!G&&!t&&!n;return{container:{"data-sectionindex":r,onClick:z(r)},content:{tabIndex:G||r>0?-1:0,contentEditable:!G&&!t&&!n,role:"spinbutton",id:`${_}-${e.type}`,"aria-labelledby":`${_}-${e.type}`,"aria-readonly":n,"aria-valuenow":((e,t)=>{if(e.value)switch(e.type){case"weekDay":if("letter"===e.contentType)return;return Number(e.value);case"meridiem":{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);if(n)return+(t.getHours(n)>=12);return}case"day":return"digit-with-letter"===e.contentType?parseInt(e.value,10):Number(e.value);case"month":{if("digit"===e.contentType)return Number(e.value);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return"letter"!==e.contentType?Number(e.value):void 0}})(e,T),"aria-valuemin":U[e.type].minimum,"aria-valuemax":U[e.type].maximum,"aria-valuetext":e.value?((e,t)=>{if(e.value)switch(e.type){case"month":{if("digit"===e.contentType)return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");let n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return"digit"===e.contentType?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;default:return}})(e,T):O.empty,"aria-label":O[e.type],"aria-disabled":t,spellCheck:!i&&void 0,autoCapitalize:i?"off":void 0,autoCorrect:i?"off":void 0,[parseInt(u.version,10)>=17?"enterKeyHint":"enterkeyhint"]:i?"next":void 0,children:e.value||e.placeholder,onInput:W,onPaste:V,onFocus:F(r),onDragOver:H,onMouseUp:$,inputMode:"letter"===e.contentType?"text":"numeric"},before:{children:e.startSeparator},after:{children:e.endSeparator}}}),[v.sections,F,V,H,W,z,$,t,n,G,O,T,U,_]),X=(0,f3.A)(e=>{w(e.target.value)}),Y=u.useMemo(()=>A?"":d.getV7HiddenInputValueFromSections(v.sections),[A,v.sections,d]);return u.useEffect(()=>{if(null==k.current)throw Error("MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`\nYou probably tried to pass a component to the `textField` slot that contains an `<input />` element instead of a `PickersSectionList`.\n\nIf you want to keep using an `<input />` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:\n\n<DatePicker slots={{ textField: MyCustomTextField }} />\n\nLearn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element");h&&k.current&&k.current.getSectionContent(S.startIndex).focus()},[]),{interactions:R,returnedValue:{autoFocus:h,readOnly:n,focused:c??I,sectionListRef:M,onBlur:j,onClick:P,onFocus:B,onInput:L,onPaste:N,enableAccessibleFieldDOMStructure:!0,elements:q,tabIndex:0===g?-1:0,contentEditable:G,value:Y,onChange:X,areAllSectionsEmpty:A}}},VK=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),VQ=e=>{let t=(0,lE.I)(),n=u.useRef(void 0),r=u.useRef(void 0),{forwardedProps:{onFocus:i,onClick:o,onPaste:s,onBlur:a,inputRef:l,placeholder:c},internalProps:{readOnly:h=!1,disabled:d=!1},parsedSelectedSections:p,activeSectionIndex:f,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:y,resetCharacterQuery:b,updateSectionValue:x,updateValueFromValueStr:w,clearActiveSection:S,clearValue:A,setTempAndroidValueStr:C,setSelectedSections:k,getSectionsFromValue:M,areAllSectionsEmpty:O,localizedDigits:T}=e,_=u.useRef(null),I=(0,uc.A)(l,_),D=u.useMemo(()=>((e,t,n)=>{let r=0,i=+!!n,o=[];for(let s=0;s<e.length;s+=1){let a=e[s],l=$Q(a,n?"input-rtl":"input-ltr",t),c=`${a.startSeparator}${l}${a.endSeparator}`,u=VK(c).length,h=c.length,d=VK(l),p=i+(""===d?0:l.indexOf(d[0]))+a.startSeparator.length,f=p+d.length;o.push((0,PN.A)({},a,{start:r,end:r+u,startInInput:p,endInInput:f})),r+=u,i+=h}return o})(m.sections,T,t),[m.sections,T,t]),R=u.useMemo(()=>({syncSelectionToDOM:()=>{if(!_.current)return;if(null==p){_.current.scrollLeft&&(_.current.scrollLeft=0);return}if(_.current!==Vx(document))return;let e=_.current.scrollTop;if("all"===p)_.current.select();else{let e=D[p],t="empty"===e.type?e.startInInput-e.startSeparator.length:e.startInInput,n="empty"===e.type?e.endInInput+e.endSeparator.length:e.endInInput;(t!==_.current.selectionStart||n!==_.current.selectionEnd)&&_.current===Vx(document)&&_.current.setSelectionRange(t,n),clearTimeout(r.current),r.current=setTimeout(()=>{_.current&&_.current===Vx(document)&&_.current.selectionStart===_.current.selectionEnd&&(_.current.selectionStart!==t||_.current.selectionEnd!==n)&&R.syncSelectionToDOM()})}_.current.scrollTop=e},getActiveSectionIndexFromDOM:()=>{let e=_.current.selectionStart??0,t=_.current.selectionEnd??0;if(0===e&&0===t)return null;let n=e<=D[0].startInInput?1:D.findIndex(t=>t.startInInput-t.startSeparator.length>e);return -1===n?D.length-1:n-1},focusField:(e=0)=>{Vx(document)!==_.current&&(_.current?.focus(),k(e))},setSelectedSections:e=>k(e),isFieldFocused:()=>_.current===Vx(document)}),[_,p,D,k]),E=()=>{let e,t=_.current.selectionStart??0;k(-1===(e=t<=D[0].startInInput||t>=D[D.length-1].endInInput?1:D.findIndex(e=>e.startInInput-e.startSeparator.length>t))?D.length-1:e-1)},P=(0,f3.A)((...e)=>{i?.(...e);let t=_.current;clearTimeout(n.current),n.current=setTimeout(()=>{t&&t===_.current&&null==f&&(t.value.length&&Number(t.selectionEnd)-Number(t.selectionStart)===t.value.length?k("all"):E())})}),L=(0,f3.A)((e,...t)=>{e.isDefaultPrevented()||(o?.(e,...t),E())}),N=(0,f3.A)(e=>{if(s?.(e),e.preventDefault(),h||d)return;let t=e.clipboardData.getData("text");if("number"==typeof p){let e=m.sections[p],n=/^[a-zA-Z]+$/.test(t),r=/^[0-9]+$/.test(t),i=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(t);if("letter"===e.contentType&&n||"digit"===e.contentType&&r||"digit-with-letter"===e.contentType&&i){b(),x({activeSection:e,newSectionValue:t,shouldGoToNextSection:!0});return}if(n||r)return}b(),w(t)}),B=(0,f3.A)((...e)=>{a?.(...e),k(null)}),j=(0,f3.A)(e=>{let n;if(h)return;let r=e.target.value;if(""===r){b(),A();return}let i=e.nativeEvent.data,o=i&&i.length>1,s=o?i:r,a=VK(s);if("all"===p&&k(f),null==f||o)return void w(o?i:a);if("all"===p&&1===a.length)n=a;else{let e=VK(g.getV6InputValueFromSections(D,T,t)),r=-1,i=-1;for(let t=0;t<e.length;t+=1)-1===r&&e[t]!==a[t]&&(r=t),-1===i&&e[e.length-t-1]!==a[a.length-t-1]&&(i=t);let o=D[f];if(r<o.start||e.length-i-1>o.end)return;let s=a.length-e.length+o.end-VK(o.endSeparator||"").length;n=a.slice(o.start+VK(o.startSeparator||"").length,s)}if(0===n.length){navigator.userAgent.toLowerCase().includes("android")&&C(s),b(),S();return}y({keyPressed:n,sectionIndex:f})}),z=u.useMemo(()=>void 0!==c?c:g.getV6InputValueFromSections(M(v.emptyValue),T,t),[c,g,M,v.emptyValue,T,t]),$=u.useMemo(()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,T,t),[m.sections,g,m.tempValueStrAndroid,T,t]);return u.useEffect(()=>(_.current&&_.current===Vx(document)&&k("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]),{interactions:R,returnedValue:{readOnly:h,onBlur:B,onClick:L,onFocus:P,onPaste:N,inputRef:I,enableAccessibleFieldDOMStructure:!1,placeholder:z,inputMode:u.useMemo(()=>null==f||"letter"===m.sections[f].contentType?"text":"numeric",[f,m.sections]),autoComplete:"off",value:!(_.current&&_.current===Vx(document))&&O?"":$,onChange:j}}},VZ=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],VJ=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],V0=["minDateTime","maxDateTime"];[...VZ,...VJ,...V0];let V1=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],V2=["clearable","onClear","InputProps","sx","slots","slotProps"],V5=["ownerState"];var V3=n("Rf"),V4=n("ku");function V6(e){return(0,M.Ay)("MuiPickersTextField",e)}function V9(e){return(0,M.Ay)("MuiPickersInputBase",e)}(0,k.A)("MuiPickersTextField",["root","focused","disabled","error","required"]);let V8=(0,k.A)("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function V7(e){return(0,M.Ay)("MuiPickersOutlinedInput",e)}let He=(0,PN.A)({},V8,(0,k.A)("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Ht=["children","className","label","notched","shrink"],Hn=(0,y.A)("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Hr=(0,y.A)("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),Hi=(0,y.A)("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Ho(e){let{className:t,label:n}=e,r=(0,PB.A)(e,Ht),i=null!=n&&""!==n,o=(0,PN.A)({},e,{withLabel:i});return(0,l.jsx)(Hn,(0,PN.A)({"aria-hidden":!0,className:t},r,{ownerState:o,children:(0,l.jsx)(Hi,{ownerState:o,children:i?(0,l.jsx)(Hr,{children:n}):(0,l.jsx)(Hr,{className:"notranslate",children:""})})}))}var Hs=n("e0");function Ha(e){return(0,M.Ay)("MuiPickersSectionList",e)}let Hl=(0,k.A)("MuiPickersSectionList",["root","section","sectionContent"]),Hc=["slots","slotProps","elements","sectionListRef"],Hu=(0,y.A)("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Hh=(0,y.A)("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Hd=(0,y.A)("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Hp=(0,y.A)("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"});function Hf(e){let{slots:t,slotProps:n,element:r,classes:i}=e,o=t?.section??Hh,s=(0,hi.A)({elementType:o,externalSlotProps:n?.section,externalForwardedProps:r.container,className:i.section,ownerState:{}}),a=t?.sectionContent??Hp,c=(0,hi.A)({elementType:a,externalSlotProps:n?.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:{}}),u=t?.sectionSeparator??Hd,h=(0,hi.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=(0,hi.A)({elementType:u,externalSlotProps:n?.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return(0,l.jsxs)(o,(0,PN.A)({},s,{children:[(0,l.jsx)(u,(0,PN.A)({},h)),(0,l.jsx)(a,(0,PN.A)({},c)),(0,l.jsx)(u,(0,PN.A)({},d))]}))}let Hm=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersSectionList"}),{slots:r,slotProps:i,elements:o,sectionListRef:s}=n,a=(0,PB.A)(n,Hc),c=(e=>{let{classes:t}=e;return(0,f.A)({root:["root"],section:["section"],sectionContent:["sectionContent"]},Ha,t)})(n),h=u.useRef(null),d=(0,uc.A)(t,h),p=e=>{if(!h.current)throw Error(`MUI X: Cannot call sectionListRef.${e} before the mount of the component.`);return h.current};u.useImperativeHandle(s,()=>({getRoot:()=>p("getRoot"),getSectionContainer:e=>p("getSectionContainer").querySelector(`.${Hl.section}[data-sectionindex="${e}"]`),getSectionContent:e=>p("getSectionContent").querySelector(`.${Hl.section}[data-sectionindex="${e}"] .${Hl.sectionContent}`),getSectionIndexFromDOMElement(e){let t=p("getSectionIndexFromDOMElement");if(null==e||!t.contains(e))return null;let n=null;return(e.classList.contains(Hl.section)?n=e:e.classList.contains(Hl.sectionContent)&&(n=e.parentElement),null==n)?null:Number(n.dataset.sectionindex)}}));let m=r?.root??Hu,g=(0,hi.A)({elementType:m,externalSlotProps:i?.root,externalForwardedProps:a,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return(0,l.jsx)(m,(0,PN.A)({},g,{children:g.contentEditable?o.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(""):(0,l.jsx)(u.Fragment,{children:o.map((e,t)=>(0,l.jsx)(Hf,{slots:r,slotProps:i,element:e,classes:c},t))})}))}),Hg=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],Hv=(0,y.A)("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>(0,PN.A)({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Math.round(.15/16*1e5)/1e5}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),Hy=(0,y.A)(Hu,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:e,focused:t,filled:n,label:r})=>!e&&!t&&!n&&null==r,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:"light"===e.palette.mode?.42:.5}}]})),Hb=(0,y.A)(Hh,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"inline-block",whiteSpace:"nowrap"})),Hx=(0,y.A)(Hp,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Hw=(0,y.A)(Hd,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),HS=(0,y.A)("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})((0,PN.A)({},{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"})),HA=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersInputBase"}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:s,id:a,endAdornment:c,startAdornment:h,renderSuffix:d,slots:p,slotProps:m,contentEditable:g,tabIndex:v,onInput:y,onPaste:b,onKeyDown:x,name:w,readOnly:S,inputProps:A,inputRef:C,sectionListRef:k}=n,M=(0,PB.A)(n,Hg),O=u.useRef(null),T=(0,uc.A)(t,O),_=(0,uc.A)(A?.ref,C),I=(0,lE.I)(),D=(0,ut.A)();if(!D)throw Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");u.useEffect(()=>{D&&D.setAdornedStart(!!h)},[D,h]),u.useEffect(()=>{D&&(i?D.onEmpty():D.onFilled())},[D,i]);let R=(0,PN.A)({},n,D,{isRtl:I}),E=(e=>{let{focused:t,disabled:n,error:r,classes:i,fullWidth:o,readOnly:s,color:a,size:l,endAdornment:c,startAdornment:u}=e,h={root:["root",t&&!n&&"focused",n&&"disabled",s&&"readOnly",r&&"error",o&&"fullWidth",`color${(0,Hs.A)(a)}`,"small"===l&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return(0,f.A)(h,V9,i)})(R),P=p?.root||Hv,L=(0,hi.A)({elementType:P,externalSlotProps:m?.root,externalForwardedProps:M,additionalProps:{"aria-invalid":D.error,ref:T},className:E.root,ownerState:R}),N=p?.input||Hy;return(0,l.jsxs)(P,(0,PN.A)({},L,{children:[h,(0,l.jsx)(Hm,{sectionListRef:k,elements:r,contentEditable:g,tabIndex:v,className:E.sectionsContainer,onFocus:e=>{D.disabled?e.stopPropagation():D.onFocus?.(e)},onBlur:D.onBlur,onInput:y,onPaste:b,onKeyDown:x,slots:{root:N,section:Hb,sectionContent:Hx,sectionSeparator:Hw},slotProps:{root:{ownerState:R},sectionContent:{className:V8.sectionContent},sectionSeparator:({position:e})=>({className:"before"===e?V8.sectionBefore:V8.sectionAfter})}}),c,d?d((0,PN.A)({},D)):null,(0,l.jsx)(HS,(0,PN.A)({name:w,className:E.input,value:o,onChange:s,id:a,"aria-hidden":"true",tabIndex:-1,readOnly:S,required:D.required,disabled:D.disabled},A,{ref:_}))]}))}),HC=["label","autoFocus","ownerState","notched"],Hk=(0,y.A)(Hv,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${He.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${He.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${He.focused} .${He.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${He.disabled}`]:{[`& .${He.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${He.error} .${He.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t]?.main??!1).map(t=>({props:{color:t},style:{[`&.${He.focused}:not(.${He.error}) .${He.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),HM=(0,y.A)(Hy,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),HO=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersOutlinedInput"}),{label:r,ownerState:i,notched:o}=n,s=(0,PB.A)(n,HC),a=(0,ut.A)(),c=(0,PN.A)({},n,i,a,{color:a?.color||"primary"}),h=(e=>{let{classes:t}=e,n=(0,f.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},V7,t);return(0,PN.A)({},t,n)})(c);return(0,l.jsx)(HA,(0,PN.A)({slots:{root:Hk,input:HM},renderSuffix:e=>(0,l.jsx)(Ho,{shrink:!!(o||e.adornedStart||e.focused||e.filled),notched:!!(o||e.adornedStart||e.focused||e.filled),className:h.notchedOutline,label:null!=r&&""!==r&&a?.required?(0,l.jsxs)(u.Fragment,{children:[r," ","*"]}):r,ownerState:c})},s,{label:r,classes:h,ref:t}))});function HT(e){return(0,M.Ay)("MuiPickersFilledInput",e)}HO.muiName="Input";let H_=(0,PN.A)({},V8,(0,k.A)("MuiPickersFilledInput",["root","underline","input"])),HI=["label","autoFocus","disableUnderline","ownerState"],HD=(0,y.A)(Hv,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,eo.MC)(e)&&"disableUnderline"!==e})(({theme:e})=>{let t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${H_.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${H_.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${H_.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${H_.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)"}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${H_.disabled}, .${H_.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${H_.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:12}},{props:({endAdornment:e})=>!!e,style:{paddingRight:12}}]}}),HR=(0,y.A)(Hy,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),HE=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersFilledInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,s=(0,PB.A)(n,HI),a=(0,ut.A)(),c=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,f.A)({root:["root",!n&&"underline"],input:["input"]},HT,t);return(0,PN.A)({},t,r)})((0,PN.A)({},n,o,a,{color:a?.color||"primary"}));return(0,l.jsx)(HA,(0,PN.A)({slots:{root:HD,input:HR},slotProps:{root:{disableUnderline:i}}},s,{label:r,classes:c,ref:t}))});function HP(e){return(0,M.Ay)("MuiPickersFilledInput",e)}HE.muiName="Input";let HL=(0,PN.A)({},V8,(0,k.A)("MuiPickersInput",["root","input"])),HN=["label","autoFocus","disableUnderline","ownerState"],HB=(0,y.A)(Hv,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${HL.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${HL.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${HL.disabled}, .${HL.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${HL.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Hj=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersInput"}),{label:r,disableUnderline:i=!1,ownerState:o}=n,s=(0,PB.A)(n,HN),a=(0,ut.A)(),c=(e=>{let{classes:t,disableUnderline:n}=e,r=(0,f.A)({root:["root",!n&&"underline"],input:["input"]},HP,t);return(0,PN.A)({},t,r)})((0,PN.A)({},n,o,a,{disableUnderline:i,color:a?.color||"primary"}));return(0,l.jsx)(HA,(0,PN.A)({slots:{root:HB}},s,{label:r,classes:c,ref:t}))});Hj.muiName="Input";let Hz=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],H$={standard:Hj,filled:HE,outlined:HO},HF=(0,y.A)(fq.A,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({maxWidth:"100%"}),HV=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiPickersTextField"}),{onFocus:r,onBlur:i,className:o,color:s="primary",disabled:a=!1,error:c=!1,variant:h="outlined",required:p=!1,InputProps:m,inputProps:g,inputRef:v,sectionListRef:y,elements:b,areAllSectionsEmpty:x,onClick:w,onKeyDown:S,onKeyUp:A,onPaste:C,onInput:k,endAdornment:M,startAdornment:O,tabIndex:T,contentEditable:_,focused:I,value:D,onChange:R,fullWidth:E,id:P,name:L,helperText:N,FormHelperTextProps:B,label:j,InputLabelProps:z}=n,$=(0,PB.A)(n,Hz),F=u.useRef(null),V=(0,uc.A)(t,F),H=(0,dc.A)(P),W=N&&H?`${H}-helper-text`:void 0,U=j&&H?`${H}-label`:void 0,G=(0,PN.A)({},n,{color:s,disabled:a,error:c,focused:I,required:p,variant:h}),q=(e=>{let{focused:t,disabled:n,classes:r,required:i}=e;return(0,f.A)({root:["root",t&&!n&&"focused",n&&"disabled",i&&"required"]},V6,r)})(G),X=H$[h];return(0,l.jsxs)(HF,(0,PN.A)({className:(0,d.A)(q.root,o),ref:V,focused:I,onFocus:r,onBlur:i,disabled:a,variant:h,error:c,color:s,fullWidth:E,required:p,ownerState:G},$,{children:[(0,l.jsx)(V3.A,(0,PN.A)({htmlFor:H,id:U},z,{children:j})),(0,l.jsx)(X,(0,PN.A)({elements:b,areAllSectionsEmpty:x,onClick:w,onKeyDown:S,onKeyUp:A,onInput:k,onPaste:C,endAdornment:M,startAdornment:O,tabIndex:T,contentEditable:_,value:D,onChange:R,id:H,fullWidth:E,inputProps:g,inputRef:v,sectionListRef:y,label:j,name:L,role:"group","aria-labelledby":U,"aria-describedby":W,"aria-live":W?"polite":void 0},m)),N&&(0,l.jsx)(V4.A,(0,PN.A)({id:W},B,{children:N}))]}))}),HH=["enableAccessibleFieldDOMStructure"],HW=["InputProps","readOnly"],HU=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],HG=["slots","slotProps","InputProps","inputProps"],Hq=u.forwardRef(function(e,t){let n=jY({props:e,name:"MuiDateTimeField"}),{slots:r,slotProps:i,InputProps:o,inputProps:s}=n,a=(0,PB.A)(n,HG),c=r?.textField??(e.enableAccessibleFieldDOMStructure?HV:ex.A),h=(0,hi.A)({elementType:c,externalSlotProps:i?.textField,externalForwardedProps:a,ownerState:n,additionalProps:{ref:t}});h.inputProps=(0,PN.A)({},s,h.inputProps),h.InputProps=(0,PN.A)({},o,h.InputProps);let d=(e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=(0,PB.A)(e,HH);if(t){let{InputProps:e,readOnly:t}=n,r=(0,PB.A)(n,HW);return(0,PN.A)({},r,{InputProps:(0,PN.A)({},e??{},{readOnly:t})})}let{onPaste:r,onKeyDown:i,inputMode:o,readOnly:s,InputProps:a,inputProps:l,inputRef:c}=n,u=(0,PB.A)(n,HU);return(0,PN.A)({},u,{InputProps:(0,PN.A)({},a??{},{readOnly:s}),inputProps:(0,PN.A)({},l??{},{inputMode:o,onPaste:r,onKeyDown:i,ref:c})})})((e=>{let t,n,r,i,o,{forwardedProps:s,internalProps:a}=(t=j0().utils,n=j0().defaultDates,r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h,i=(0,PN.A)({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:j3(t,e.minDateTime??e.minDate,n.minDate),maxDate:j3(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),o="date-time",u.useMemo(()=>{let e=(0,PN.A)({},i),t={},n=n=>{e.hasOwnProperty(n)&&(t[n]=e[n],delete e[n])};return V1.forEach(n),VZ.forEach(n),VJ.forEach(n),V0.forEach(n),{forwardedProps:e,internalProps:t}},[i,o]));return(e=>{let t=j0().utils,{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:i,enableAccessibleFieldDOMStructure:o=!1,disabled:s=!1,readOnly:a=!1},forwardedProps:{onKeyDown:l,error:c,clearable:h,onClear:d},fieldValueManager:p,valueManager:f,validator:m}=e,g=(0,lE.I)(),v=(e=>{let t=j0().utils,n=j0().localeText,r=j0(),i=(0,lE.I)(),{valueManager:o,fieldValueManager:s,valueType:a,validator:l,internalProps:c,internalProps:{value:h,defaultValue:d,referenceDate:p,onChange:f,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:y,shouldRespectLeadingZeros:b=!1,timezone:x,enableAccessibleFieldDOMStructure:w=!1}}=e,{timezone:S,value:A,handleValueChange:C}=$j({timezone:x,value:h,defaultValue:d,referenceDate:p,onChange:f,valueManager:o}),k=u.useMemo(()=>{let e;return e=t.date(void 0),"0"===t.formatByString(t.setSeconds(e,0),"s")?$U:Array.from({length:10}).map((n,r)=>t.formatByString(t.setSeconds(e,r),"s"))},[t]),M=u.useMemo(()=>((e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),o=e.endOfDay(r),{maxDaysInMonth:s,longestMonth:a}=j4(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:4===e.formatByString(e.date(void 0,"system"),t).length?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:null!=t&&e.isValid(t)?e.getDaysInMonth(t):s,longestMonth:a}),weekDay:({format:t,contentType:n})=>{if("digit"===n){let n=$H(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(o);return $G(e.formatByString(e.endOfDay(r),n),t)!==i.toString()?{minimum:1,maximum:Number($G(e.formatByString(e.startOfDay(r),n),t))}:{minimum:0,maximum:i}},minutes:()=>({minimum:0,maximum:e.getMinutes(o)}),seconds:()=>({minimum:0,maximum:e.getSeconds(o)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}})(t,k,S),[t,k,S]),O=u.useCallback((e,r=null)=>s.getSectionsFromValue(t,e,r,e=>VX({utils:t,localeText:n,localizedDigits:k,format:m,date:e,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:i})),[s,m,n,k,i,b,t,g,w]),[T,_]=u.useState(()=>{let e=O(A);$0(e,a);let n={sections:e,value:A,referenceValue:o.emptyValue,tempValueStrAndroid:null},r=Math.max(...e.map(e=>$$[e.type]??1)),i=o.getInitialReferenceValue({referenceDate:p,value:A,utils:t,props:c,granularity:r,timezone:S});return(0,PN.A)({},n,{referenceValue:i})}),[I,D]=(0,f5.A)({controlled:v,default:null,name:"useField",state:"selectedSections"}),R=e=>{D(e),y?.(e)},E=u.useMemo(()=>$5(I,T.sections),[I,T.sections]),P="all"===E?0:E,L=({value:e,referenceValue:n,sections:i})=>{if(_(t=>(0,PN.A)({},t,{sections:i,value:e,referenceValue:n,tempValueStrAndroid:null})),o.areValuesEqual(t,T.value,e))return;let s={validationError:l({adapter:r,value:e,timezone:S,props:c})};C(e,s)},N=(e,t)=>{let n=[...T.sections];return n[e]=(0,PN.A)({},n[e],{value:t,modified:!0}),n};return u.useEffect(()=>{let e=O(T.value);$0(e,a),_(t=>(0,PN.A)({},t,{sections:e}))},[m,t.locale,i]),u.useEffect(()=>{o.areValuesEqual(t,T.value,A)&&o.getTimezone(t,T.value)===o.getTimezone(t,A)||_(e=>(0,PN.A)({},e,{value:A,referenceValue:s.updateReferenceValue(t,A,e.referenceValue),sections:O(A)}))},[A]),{state:T,activeSectionIndex:P,parsedSelectedSections:E,setSelectedSections:R,clearValue:()=>{L({value:o.emptyValue,referenceValue:T.referenceValue,sections:O(o.emptyValue)})},clearActiveSection:()=>{if(null==P)return;let e=T.sections[P],n=s.getActiveDateManager(t,T,e),r=n.getSections(T.sections).filter(e=>""!==e.value).length===+(""!==e.value),i=N(P,""),o=r?null:t.getInvalidDate(),a=n.getNewValuesFromNewActiveDate(o);L((0,PN.A)({},a,{sections:i}))},updateSectionValue:({activeSection:e,newSectionValue:n,shouldGoToNextSection:r})=>{let i,o;r&&P<T.sections.length-1&&R(P+1);let a=s.getActiveDateManager(t,T,e),l=N(P,n),c=a.getSections(l),u=((e,t,n)=>{let r=t.some(e=>"day"===e.type),i=[],o=[];for(let e=0;e<t.length;e+=1){let s=t[e];r&&"weekDay"===s.type||(i.push(s.format),o.push($Q(s,"non-input",n)))}let s=i.join(" "),a=o.join(" ");return e.parse(a,s)})(t,c,k);if(null!=u&&t.isValid(u)){let e=$2(t,u,c,a.referenceDate,!0);i=a.getNewValuesFromNewActiveDate(e),o=!0}else i=a.getNewValuesFromNewActiveDate(u),o=(null!=u&&!t.isValid(u))!=(null!=a.date&&!t.isValid(a.date));return o?L((0,PN.A)({},i,{sections:l})):_(e=>(0,PN.A)({},e,i,{sections:l,tempValueStrAndroid:null}))},updateValueFromValueStr:e=>{let r=s.parseValueStr(e,T.referenceValue,(e,r)=>{let o=t.parse(e,m);if(null==o||!t.isValid(o))return null;let s=VX({utils:t,localeText:n,localizedDigits:k,format:m,date:o,formatDensity:g,shouldRespectLeadingZeros:b,enableAccessibleFieldDOMStructure:w,isRtl:i});return $2(t,o,s,r,!1)}),o=s.updateReferenceValue(t,r,T.referenceValue);L({value:r,referenceValue:o,sections:O(r,T.sections)})},setTempAndroidValueStr:e=>_(t=>(0,PN.A)({},t,{tempValueStrAndroid:e})),getSectionsFromValue:O,sectionsValueBoundaries:M,localizedDigits:k,timezone:S}})(e),{state:y,activeSectionIndex:b,parsedSelectedSections:x,setSelectedSections:w,clearValue:S,clearActiveSection:A,updateSectionValue:C,setTempAndroidValueStr:k,sectionsValueBoundaries:M,localizedDigits:O,timezone:T}=v,_=(({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:i,timezone:o})=>{let s=j0().utils,[a,l]=u.useState(null),c=(0,f3.A)(()=>l(null));u.useEffect(()=>{null!=a&&e[a.sectionIndex]?.type!==a.sectionType&&c()},[e,a,c]),u.useEffect(()=>{if(null!=a){let e=setTimeout(()=>c(),5e3);return()=>{clearTimeout(e)}}return()=>{}},[a,c]);let h=({keyPressed:t,sectionIndex:n},r,i)=>{let o=t.toLowerCase(),s=e[n];if(null!=a&&(!i||i(a.value))&&a.sectionIndex===n){let e=`${a.value}${o}`,t=r(e,s);if(null==t.saveQuery)return l({sectionIndex:n,value:e,sectionType:s.type}),t}let u=r(o,s);return null==u.saveQuery||u.saveQuery?(l({sectionIndex:n,value:o,sectionType:s.type}),null!=u.saveQuery?null:u):(c(),null)};return{applyCharacterEditing:(0,f3.A)(a=>{var l;let c,u,d,p=e[a.sectionIndex],f=$X(a.keyPressed,r)?(l=(0,PN.A)({},a,{keyPressed:$q(a.keyPressed,r)}),c=(e,t)=>{let i=$G(e,r),o=Number(i),a=n[t.type]({currentDate:null,format:t.format,contentType:t.contentType});if(o>a.maximum)return{saveQuery:!1};if(o<a.minimum)return{saveQuery:!0};let l=10*o>a.maximum||i.length===a.maximum.toString().length;return{sectionValue:$K(s,o,a,r,t),shouldGoToNextSection:l}},h(l,(e,t)=>{if("digit"===t.contentType||"digit-with-letter"===t.contentType)return c(e,t);if("month"===t.type){let n=$J(s,"digit","month","MM"),r=c(e,{type:t.type,format:"MM",hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(null!=r.saveQuery)return r;let i=$Z(s,r.sectionValue,"MM",t.format);return(0,PN.A)({},r,{sectionValue:i})}if("weekDay"===t.type){let n=c(e,t);if(null!=n.saveQuery)return n;let r=$H(s,t.format)[Number(n.sectionValue)-1];return(0,PN.A)({},n,{sectionValue:r})}return{saveQuery:!1}},e=>$X(e,r))):(u=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return 0===r.length?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:1===r.length}},d=(e,t,n,r)=>{let i=e=>$W(s,o,t.type,e);if("letter"===t.contentType)return u(t.format,i(t.format),e);if(n&&null!=r&&"letter"===$V(s,n).contentType){let t=i(n),o=u(n,t,e);return null!=o.saveQuery?{saveQuery:!1}:(0,PN.A)({},o,{sectionValue:r(o.sectionValue,t)})}return{saveQuery:!1}},h(a,(e,t)=>{switch(t.type){case"month":return d(e,t,s.formats.month,e=>$Z(s,e,s.formats.month,t.format));case"weekDay":return d(e,t,s.formats.weekday,(e,t)=>t.indexOf(e).toString());case"meridiem":return d(e,t);default:return{saveQuery:!1}}}));null==f?i(null):t({activeSection:p,newSectionValue:f.sectionValue,shouldGoToNextSection:f.shouldGoToNextSection})}),resetCharacterQuery:c}})({sections:y.sections,updateSectionValue:C,sectionsValueBoundaries:M,localizedDigits:O,setTempAndroidValueStr:k,timezone:T}),{resetCharacterQuery:I}=_,D=f.areValuesEqual(t,y.value,f.emptyValue),R=o?VY:VQ,E=u.useMemo(()=>((e,t)=>{let n={};if(!t)return e.forEach((t,r)=>{let i=r===e.length-1?null:r+1;n[r]={leftIndex:0===r?null:r-1,rightIndex:i}}),{neighbors:n,startIndex:0,endIndex:e.length-1};let r={},i={},o=0,s=0,a=e.length-1;for(;a>=0;){-1===(s=e.findIndex((e,t)=>t>=o&&e.endSeparator?.includes(" ")&&" / "!==e.endSeparator))&&(s=e.length-1);for(let e=s;e>=o;e-=1)i[e]=a,r[a]=e,a-=1;o=s+1}return e.forEach((t,o)=>{let s=i[o],a=0===s?null:r[s-1],l=s===e.length-1?null:r[s+1];n[o]={leftIndex:a,rightIndex:l}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}})(y.sections,g&&!o),[y.sections,g,o]),{returnedValue:P,interactions:L}=R((0,PN.A)({},e,v,_,{areAllSectionsEmpty:D,sectionOrder:E})),N=(0,f3.A)(e=>{if(l?.(e),!s)switch(!0){case(e.ctrlKey||e.metaKey)&&"A"===String.fromCharCode(e.keyCode)&&!e.shiftKey&&!e.altKey:e.preventDefault(),w("all");break;case"ArrowRight"===e.key:if(e.preventDefault(),null==x)w(E.startIndex);else if("all"===x)w(E.endIndex);else{let e=E.neighbors[x].rightIndex;null!==e&&w(e)}break;case"ArrowLeft"===e.key:if(e.preventDefault(),null==x)w(E.endIndex);else if("all"===x)w(E.startIndex);else{let e=E.neighbors[x].leftIndex;null!==e&&w(e)}break;case"Delete"===e.key:if(e.preventDefault(),a)break;null==x||"all"===x?S():A(),I();break;case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(e.key):{if(e.preventDefault(),a||null==b)break;"all"===x&&w(b);let n=y.sections[b],r=p.getActiveDateManager(t,y,n),o=((e,t,n,r,i,o,s,a)=>{let l=(e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return -1;case"PageUp":return 5;case"PageDown":return -5;default:return 0}})(r),c="Home"===r,u="End"===r,h=""===n.value||c||u;if("digit"===n.contentType||"digit-with-letter"===n.contentType){let r,d=i[n.type]({currentDate:s,format:n.format,contentType:n.contentType}),p="minutes"===n.type&&a?.minutesStep?a.minutesStep:1;if(h){if("year"===n.type&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);r=l>0||c?d.minimum:d.maximum}else r=parseInt($G(n.value,o),10)+l*p;return(r%p!=0&&((l<0||c)&&(r+=p-(p+r)%p),(l>0||u)&&(r-=r%p)),r>d.maximum)?$K(e,d.minimum+(r-d.maximum-1)%(d.maximum-d.minimum+1),d,o,n):r<d.minimum?$K(e,d.maximum-(d.minimum-r-1)%(d.maximum-d.minimum+1),d,o,n):$K(e,r,d,o,n)}let d=$W(e,t,n.type,n.format);if(0===d.length)return n.value;if(h)return l>0||c?d[0]:d[d.length-1];let p=((d.indexOf(n.value)+l)%d.length+d.length)%d.length;return d[p]})(t,T,n,e.key,M,O,r.date,{minutesStep:i});C({activeSection:n,newSectionValue:o,shouldGoToNextSection:!1})}}});(0,uu.A)(()=>{L.syncSelectionToDOM()});let{hasValidationError:B}=Vy({props:n,validator:m,timezone:T,value:y.value,onError:n.onError}),j=u.useMemo(()=>void 0!==c?c:B,[B,c]);u.useEffect(()=>{j||null!=b||I()},[y.referenceValue,b,j]),u.useEffect(()=>{null!=y.tempValueStrAndroid&&null!=b&&(I(),A())},[y.sections]),u.useImperativeHandle(r,()=>({getSections:()=>y.sections,getActiveSectionIndex:L.getActiveSectionIndexFromDOM,setSelectedSections:L.setSelectedSections,focusField:L.focusField,isFieldFocused:L.isFieldFocused}));let z={onKeyDown:N,onClear:(0,f3.A)((e,...t)=>{e.preventDefault(),d?.(e,...t),S(),L.isFieldFocused()?w(E.startIndex):L.focusField(0)}),error:j,clearable:!!(h&&!D&&!a&&!s)};return(0,PN.A)({},e.forwardedProps,z,{disabled:s,readOnly:a},P)})({forwardedProps:s,internalProps:a,valueManager:$4,fieldValueManager:$6,validator:VU,valueType:"date-time"})})(h)),p=(e=>{let t=j0().localeText,{clearable:n,onClear:r,InputProps:i,sx:o,slots:s,slotProps:a}=e,c=(0,PB.A)(e,V2),h=s?.clearButton??er,d=(0,hi.A)({elementType:h,externalSlotProps:a?.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),p=(0,PB.A)(d,V5),f=s?.clearIcon??zT,m=(0,hi.A)({elementType:f,externalSlotProps:a?.clearIcon,ownerState:{}});return(0,PN.A)({},c,{InputProps:(0,PN.A)({},i,{endAdornment:(0,l.jsxs)(u.Fragment,{children:[n&&(0,l.jsx)(uo,{position:"end",sx:{marginRight:i?.endAdornment?-1:-1.5},children:(0,l.jsx)(h,(0,PN.A)({},p,{onClick:r,children:(0,l.jsx)(f,(0,PN.A)({fontSize:"small"},m))}))}),i?.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(o)?o:[o]]})})((0,PN.A)({},d,{slots:r,slotProps:i}));return(0,l.jsx)(c,(0,PN.A)({},p))});var HX=n("Ir"),HY=n("kH"),HK=n("Kc"),HQ=n("nm"),HZ=n("SV"),HJ=n("sH"),H0=n("Yh"),H1=n("RV"),H2=n("Lp"),H5=n("J5"),H3=n("oy"),H4=n("U5"),H6=n("IyL"),H9=n("iH"),H8=n("HqY"),H7=n("Um"),We=n("gJ"),Wt=n("Qe"),Wn=n("QXV"),Wr=n("QM"),Wi=n("TF"),Wo=n("YP"),Ws=n("j2"),Wa=n("li"),Wl=n("Mr"),Wc=n("Mx"),Wu=n("is"),Wh=n("Sz"),Wd=n("J9"),Wp=n("F6"),Wf=n("Ic"),Wm=n("zt"),Wg=n("R1"),Wv=n("cX"),Wy=n("aZ"),Wb=n("nR"),Wx=n("bQs"),Ww=n("mU"),WS=n("p1"),WA=n("fY"),WC=n("hf"),Wk=n("Se"),WM=n("dP"),WO=n("cz");let WT={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyy:{sectionType:"year",contentType:"digit",maxLength:4},yyyy:"year",M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMMM:{sectionType:"month",contentType:"letter"},MMM:{sectionType:"month",contentType:"letter"},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",do:{sectionType:"day",contentType:"digit-with-letter"},E:{sectionType:"weekDay",contentType:"letter"},EE:{sectionType:"weekDay",contentType:"letter"},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},EEEEE:{sectionType:"weekDay",contentType:"letter"},i:{sectionType:"weekDay",contentType:"digit",maxLength:1},ii:"weekDay",iii:{sectionType:"weekDay",contentType:"letter"},iiii:{sectionType:"weekDay",contentType:"letter"},e:{sectionType:"weekDay",contentType:"digit",maxLength:1},ee:"weekDay",eee:{sectionType:"weekDay",contentType:"letter"},eeee:{sectionType:"weekDay",contentType:"letter"},eeeee:{sectionType:"weekDay",contentType:"letter"},eeeeee:{sectionType:"weekDay",contentType:"letter"},c:{sectionType:"weekDay",contentType:"digit",maxLength:1},cc:"weekDay",ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},ccccc:{sectionType:"weekDay",contentType:"letter"},cccccc:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",aa:"meridiem",aaa:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},W_={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"do",weekday:"EEEE",weekdayShort:"EEEEEE",hours24h:"HH",hours12h:"hh",meridiem:"aa",minutes:"mm",seconds:"ss",fullDate:"PP",keyboardDate:"P",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"p",fullTime12h:"hh:mm aa",fullTime24h:"HH:mm",keyboardDateTime:"P p",keyboardDateTime12h:"P hh:mm aa",keyboardDateTime24h:"P HH:mm"};class WI{constructor(e){this.isMUIAdapter=!0,this.isTimezoneCompatible=!1,this.lib=void 0,this.locale=void 0,this.formats=void 0,this.formatTokenMap=WT,this.escapedCharacters={start:"'",end:"'"},this.longFormatters=void 0,this.date=e=>void 0===e?new Date:null===e?null:new Date(e),this.getInvalidDate=()=>new Date("Invalid Date"),this.getTimezone=()=>"default",this.setTimezone=e=>e,this.toJsDate=e=>e,this.getCurrentLocaleCode=()=>this.locale.code,this.is12HourCycleInCurrentLocale=()=>/a/.test(this.locale.formatLong.time({width:"short"})),this.expandFormat=e=>e.match(/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,this.longFormatters[t])(e,this.locale.formatLong):e}).join(""),this.formatNumber=e=>e,this.getDayOfWeek=e=>e.getDay()+1;let{locale:t,formats:n,longFormatters:r,lib:i}=e;this.locale=t,this.formats=(0,PN.A)({},W_,n),this.longFormatters=r,this.lib=i||"date-fns"}}class WD extends WI{constructor({locale:e,formats:t}={}){super({locale:e??WO.c,formats:t,longFormatters:H3.m}),this.parse=(e,t)=>""===e?null:(0,Wp.qg)(e,t,new Date,{locale:this.locale}),this.isValid=e=>null!=e&&(0,Wd.f)(e),this.format=(e,t)=>this.formatByString(e,this.formats[t]),this.formatByString=(e,t)=>(0,H4.GP)(e,t,{locale:this.locale}),this.isEqual=(e,t)=>null===e&&null===t||null!==e&&null!==t&&(0,Wa.n)(e,t),this.isSameYear=(e,t)=>(0,Wc.s)(e,t),this.isSameMonth=(e,t)=>(0,Wu.t)(e,t),this.isSameDay=(e,t)=>(0,Wl.r)(e,t),this.isSameHour=(e,t)=>(0,Wh.l)(e,t),this.isAfter=(e,t)=>(0,Wo.d)(e,t),this.isAfterYear=(e,t)=>(0,Wo.d)(e,(0,H5.Q)(t)),this.isAfterDay=(e,t)=>(0,Wo.d)(e,(0,H1.D)(t)),this.isBefore=(e,t)=>(0,Ws.Y)(e,t),this.isBeforeYear=(e,t)=>(0,Ws.Y)(e,this.startOfYear(t)),this.isBeforeDay=(e,t)=>(0,Ws.Y)(e,this.startOfDay(t)),this.isWithinRange=(e,[t,n])=>(0,WM.v)(e,{start:t,end:n}),this.startOfYear=e=>(0,Wk.D)(e),this.startOfMonth=e=>(0,WS.w)(e),this.startOfWeek=e=>(0,WC.k)(e,{locale:this.locale}),this.startOfDay=e=>(0,Ww.o)(e),this.endOfYear=e=>(0,H5.Q)(e),this.endOfMonth=e=>(0,WA.p)(e),this.endOfWeek=e=>(0,H2.$)(e,{locale:this.locale}),this.endOfDay=e=>(0,H1.D)(e),this.addYears=(e,t)=>(0,H0.e)(e,t),this.addMonths=(e,t)=>(0,HJ.P)(e,t),this.addWeeks=(e,t)=>(0,HZ.J)(e,t),this.addDays=(e,t)=>(0,HX.f)(e,t),this.addHours=(e,t)=>(0,HQ.L)(e,t),this.addMinutes=(e,t)=>(0,HK.z)(e,t),this.addSeconds=(e,t)=>(0,HY.p)(e,t),this.getYear=e=>(0,Wi.C)(e),this.getMonth=e=>(0,We.t)(e),this.getDate=e=>(0,H6.p)(e),this.getHours=e=>(0,H8.q)(e),this.getMinutes=e=>(0,H7.O)(e),this.getSeconds=e=>(0,Wt.S)(e),this.getMilliseconds=e=>(0,Wn.D)(e),this.setYear=(e,t)=>(0,Wx.i)(e,t),this.setMonth=(e,t)=>(0,Wv.Z)(e,t),this.setDate=(e,t)=>(0,Wf.X)(e,t),this.setHours=(e,t)=>(0,Wm.a)(e,t),this.setMinutes=(e,t)=>(0,Wg.g)(e,t),this.setSeconds=(e,t)=>(0,Wy.g)(e,t),this.setMilliseconds=(e,t)=>(0,Wb.$)(e,t),this.getDaysInMonth=e=>(0,H9.P)(e),this.getWeekArray=e=>{let t=this.startOfWeek(this.startOfMonth(e)),n=this.endOfWeek(this.endOfMonth(e)),r=0,i=t,o=[];for(;this.isBefore(i,n);){let e=Math.floor(r/7);o[e]=o[e]||[],o[e].push(i),i=this.addDays(i,1),r+=1}return o},this.getWeekNumber=e=>(0,Wr.N)(e,{locale:this.locale}),this.getYearRange=([e,t])=>{let n=this.startOfYear(e),r=this.endOfYear(t),i=[],o=n;for(;this.isBefore(o,r);)i.push(o),o=this.addYears(o,1);return i}}}let WR="yyyy-MM-dd HH:mm:ss";function WE(e,t){let n,r;return e?jV(e)?e.pastDuration:(n=dU(e.start,WR,t),r=dU(e.end,WR,t),`${n} - ${r}`):"Custom Time Range"}let WP=e=>{let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M=(0,c.c)(56),{initialTimeRange:O,onChange:T,onCancel:_,timeZone:I}=e;M[0]!==I?(t=["local","browser"].includes(I.toLowerCase())?new Intl.DateTimeFormat().resolvedOptions().timeZone:I,M[0]=I,M[1]=t):t=M[1];let D=t,[R,E]=(0,u.useState)(O),[P,L]=(0,u.useState)(!0);M[2]===Symbol.for("react.memo_cache_sentinel")?(n=(e,t)=>{E(n=>({...n,[t]:e}))},M[2]=n):n=M[2];let N=n;M[3]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{N(e,"start")},M[3]=r):r=M[3];let B=r;M[4]===Symbol.for("react.memo_cache_sentinel")?(i=e=>{N(e,"end")},M[4]=i):i=M[4];let j=i;M[5]!==R.end||M[6]!==R.start?(o=()=>{var e,t;let n={start:R.start,end:R.end};if(e=n.start,t=n.end,(0,dH.isValid)(e)&&(0,dH.isValid)(t)?!!(0,dH.isBefore)(e,t)||(console.error("End Time is before Start Time"),!1):(console.error("Invalid Date"),!1))return n},M[5]=R.end,M[6]=R.start,M[7]=o):o=M[7];let z=o;M[8]!==T||M[9]!==z?(s=()=>{let e=z();e&&T(e)},M[8]=T,M[9]=z,M[10]=s):s=M[10];let $=s;return M[11]!==P||M[12]!==D||M[13]!==R.start?(a=P&&(0,l.jsxs)(e7.A,{sx:WN,children:[(0,l.jsx)(nc.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select Start Time"}),(0,l.jsx)(VG,{timezone:D,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new dV(R.start,D),onChange:e=>{null!==e&&B(e)},onAccept:()=>{L(!1)}})]}),M[11]=P,M[12]=D,M[13]=R.start,M[14]=a):a=M[14],M[15]!==P||M[16]!==D||M[17]!==R.end||M[18]!==R.start?(h=!P&&(0,l.jsxs)(e7.A,{sx:WB,children:[(0,l.jsx)(nc.A,{variant:"h3",padding:1,paddingLeft:2,children:"Select End Time"}),(0,l.jsx)(VG,{timezone:D,displayStaticWrapperAs:"desktop",openTo:"day",disableHighlightToday:!0,value:new dV(R.end,D),minDateTime:new dV(R.start,D),onChange:e=>{null!==e&&j(e)},onAccept:e=>{null!==e&&(L(!0),j(e))}})]}),M[15]=P,M[16]=D,M[17]=R.end,M[18]=R.start,M[19]=h):h=M[19],M[20]!==D||M[21]!==R.start?(d=new dV(R.start,D),M[20]=D,M[21]=R.start,M[22]=d):d=M[22],M[23]===Symbol.for("react.memo_cache_sentinel")?(p=e=>{e&&B(e)},M[23]=p):p=M[23],M[24]!==z?(f=()=>z(),M[24]=z,M[25]=f):f=M[25],M[26]!==D||M[27]!==f||M[28]!==d?(m=(0,l.jsx)(ki.ErrorBoundary,{FallbackComponent:kr,children:(0,l.jsx)(Hq,{"data-testid":"start_time_input",timezone:D,label:"Start Time",value:d,onChange:p,onBlur:f,format:WR})}),M[26]=D,M[27]=f,M[28]=d,M[29]=m):m=M[29],M[30]!==D||M[31]!==R.end?(g=new dV(R.end,D),M[30]=D,M[31]=R.end,M[32]=g):g=M[32],M[33]===Symbol.for("react.memo_cache_sentinel")?(v=e=>{e&&j(e)},M[33]=v):v=M[33],M[34]!==z?(y=()=>z(),M[34]=z,M[35]=y):y=M[35],M[36]!==D||M[37]!==g||M[38]!==y?(b=(0,l.jsx)(ki.ErrorBoundary,{FallbackComponent:kr,children:(0,l.jsx)(Hq,{"data-testid":"end_time_input",timezone:D,label:"End Time",value:g,onChange:v,onBlur:y,format:WR})}),M[36]=D,M[37]=g,M[38]=y,M[39]=b):b=M[39],M[40]!==m||M[41]!==b?(x=(0,l.jsxs)(eb,{direction:"row",alignItems:"center",gap:1,pl:1,pr:1,children:[m,b]}),M[40]=m,M[41]=b,M[42]=x):x=M[42],M[43]===Symbol.for("react.memo_cache_sentinel")?(w={padding:Wj},M[43]=w):w=M[43],M[44]!==$?(S=(0,l.jsx)(G,{variant:"contained",onClick:()=>$(),fullWidth:!0,children:"Apply"}),M[44]=$,M[45]=S):S=M[45],M[46]!==_?(A=(0,l.jsx)(G,{variant:"outlined",onClick:()=>_(),fullWidth:!0,children:"Cancel"}),M[46]=_,M[47]=A):A=M[47],M[48]!==S||M[49]!==A?(C=(0,l.jsxs)(eb,{direction:"row",sx:w,gap:1,children:[S,A]}),M[48]=S,M[49]=A,M[50]=C):C=M[50],M[51]!==x||M[52]!==C||M[53]!==a||M[54]!==h?(k=(0,l.jsx)(jZ,{dateAdapter:WD,children:(0,l.jsxs)(eb,{spacing:2,sx:WL,children:[a,h,x,C]})}),M[51]=x,M[52]=C,M[53]=a,M[54]=h,M[55]=k):k=M[55],k};function WL(e){return{padding:e.spacing(1,0,2)}}function WN(e){return{".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}}function WB(e){return{".MuiPickersLayout-contentWrapper":{backgroundColor:e.palette.background.default}}}function Wj(e){return e.spacing(0,1)}function Wz(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O,T,_,I,D,R,E,P,L,N,B,j,z,$,F,V,H,W,U,G=(0,c.c)(101),{value:q,timeOptions:X,onChange:Y,height:K,showCustomTimeRange:Q,timeZone:Z,timeZoneOptions:J,onTimeZoneChange:ee}=e,et=void 0===Q||Q,{timeZone:en}=dQ(),ei=Z??en,[eo,es]=(0,u.useState)(null),[ea,el]=(0,u.useState)(!1);if(G[0]!==q){let e;t=jV(q)?(e=q.end??new Date,{start:(0,dH.sub)(e,jF(q.pastDuration)),end:e}):q,G[0]=q,G[1]=t}else t=G[1];let ec=t,eu=jV(q)?void 0:q;G[2]!==eu||G[3]!==ei?(n={value:eu,display:WE(eu,ei)},G[2]=eu,G[3]=ei,G[4]=n):n=G[4];let eh=n,[ed,ep]=(0,u.useState)(!1);G[5]!==J?(r=J??jU(),G[5]=J,G[6]=r):r=G[6];let ef=r,[em,eg]=(0,u.useState)(null),ev=!!em;G[7]!==ei||G[8]!==ef?(i=ef.find(e=>e.value===ei)?.display??ei,G[7]=ei,G[8]=ef,G[9]=i):i=G[9];let ey=i;G[10]!==ei?(o=dG(ei),G[10]=ei,G[11]=o):o=G[11];let ex=o;G[12]===Symbol.for("react.memo_cache_sentinel")?(s=dG("local"),G[12]=s):s=G[12];let ew=s;if(G[13]!==ei||G[14]!==ef){let e;h=ef.map(WU),G[17]!==ei?(e=e=>e.id===ei,G[17]=ei,G[18]=e):e=G[18],a=h.find(e),G[13]=ei,G[14]=ef,G[15]=a,G[16]=h}else a=G[15],h=G[16];let eS=a;G[19]!==X||G[20]!==ei||G[21]!==q?(d=X.find(e=>WE(e.value,ei)===WE(q,ei))?.display??WE(q,ei),G[19]=X,G[20]=ei,G[21]=q,G[22]=d):d=G[22];let eA=d;G[23]===Symbol.for("react.memo_cache_sentinel")?(p={vertical:"bottom",horizontal:"right"},f={vertical:"top",horizontal:"right"},G[23]=p,G[24]=f):(p=G[23],f=G[24]),G[25]===Symbol.for("react.memo_cache_sentinel")?(m=()=>eg(null),G[25]=m):m=G[25],G[26]===Symbol.for("react.memo_cache_sentinel")?(g={p:1,minWidth:260},G[26]=g):g=G[26],G[27]!==ee||G[28]!==ef?(v=(e,t)=>{if(t){let e=ef.find(e=>e.value===t.id);e&&ee?.(e)}eg(null)},G[27]=ee,G[28]=ef,G[29]=v):v=G[29],G[30]!==v||G[31]!==h||G[32]!==eS?(y=(0,l.jsx)(e7.A,{sx:g,onClick:WH,children:(0,l.jsx)(mP,{options:h,value:eS,onChange:v,disableClearable:!0,renderInput:WV})}),G[30]=v,G[31]=h,G[32]=eS,G[33]=y):y=G[33],G[34]!==y||G[35]!==em||G[36]!==ev?(b=(0,l.jsx)(e0.Ay,{anchorEl:em,anchorOrigin:p,transformOrigin:f,open:ev,onClose:m,sx:WW,children:y}),G[34]=y,G[35]=em,G[36]=ev,G[37]=b):b=G[37],G[38]===Symbol.for("react.memo_cache_sentinel")?(x={vertical:"bottom",horizontal:"center"},G[38]=x):x=G[38],G[39]===Symbol.for("react.memo_cache_sentinel")?(w=()=>el(!1),G[39]=w):w=G[39],G[40]!==Y?(S=e=>{Y(e),el(!1),ep(!1)},G[40]=Y,G[41]=S):S=G[41],G[42]===Symbol.for("react.memo_cache_sentinel")?(A=()=>el(!1),G[42]=A):A=G[42],G[43]!==ec||G[44]!==S||G[45]!==ei?(C=(0,l.jsx)(WP,{initialTimeRange:ec,onChange:S,onCancel:A,timeZone:ei}),G[43]=ec,G[44]=S,G[45]=ei,G[46]=C):C=G[46],G[47]!==eo||G[48]!==ea||G[49]!==C?(k=(0,l.jsx)(e0.Ay,{anchorEl:eo,anchorOrigin:x,open:ea,onClose:w,sx:WF,children:C}),G[47]=eo,G[48]=ea,G[49]=C,G[50]=k):k=G[50],G[51]!==ei||G[52]!==q?(M=WE(q,ei),G[51]=ei,G[52]=q,G[53]=M):M=G[53],G[54]!==ed?(O=()=>ep(!ed),G[54]=ed,G[55]=O):O=G[55],G[56]!==eA||G[57]!==ex?(T=()=>(0,l.jsxs)(eb,{direction:"row",alignItems:"center",spacing:1,children:[(0,l.jsx)("span",{children:eA}),ex!==ew&&(0,l.jsxs)(e7.A,{sx:{typography:"caption",color:"text.secondary"},children:["· ",ex]})]}),G[56]=eA,G[57]=ex,G[58]=T):T=G[58];let eC=`Select time range. Currently set to ${eA}`;if(G[59]!==eC?(_={"aria-label":eC},G[59]=eC,G[60]=_):_=G[60],G[61]===Symbol.for("react.memo_cache_sentinel")?(I={marginTop:"1px",transform:"none"},D={paddingRight:"36px"},G[61]=I,G[62]=D):(I=G[61],D=G[62]),G[63]!==K?(R={".MuiSelect-icon":I,".MuiSelect-select.MuiSelect-outlined.MuiInputBase-input":D,".MuiSelect-select":K?{lineHeight:K,paddingY:0}:{}},G[63]=K,G[64]=R):R=G[64],G[65]===Symbol.for("react.memo_cache_sentinel")?(E={cursor:"default","&:hover":{backgroundColor:"transparent"},py:.5,px:1},G[65]=E):E=G[65],G[66]===Symbol.for("react.memo_cache_sentinel")?(P={display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},G[66]=P):P=G[66],G[67]===Symbol.for("react.memo_cache_sentinel")?(L={display:"flex",flexDirection:"column",alignItems:"flex-start"},G[67]=L):L=G[67],G[68]===Symbol.for("react.memo_cache_sentinel")?(N=(0,l.jsx)(e7.A,{sx:{typography:"subtitle1"},children:"Time Range"}),G[68]=N):N=G[68],G[69]===Symbol.for("react.memo_cache_sentinel")?(B={color:"text.secondary",typography:"caption",mt:.25},G[69]=B):B=G[69],G[70]!==ey?(j=(0,l.jsxs)(e7.A,{sx:L,children:[N,(0,l.jsxs)(e7.A,{sx:B,children:["Timezone: ",ey]})]}),G[70]=ey,G[71]=j):j=G[71],G[72]===Symbol.for("react.memo_cache_sentinel")?(z={display:"flex",alignItems:"center",pr:1,ml:1.5},G[72]=z):z=G[72],G[73]===Symbol.for("react.memo_cache_sentinel")?($=(0,l.jsx)(e7.A,{sx:z,children:(0,l.jsx)(er,{size:"small","aria-label":"Select timezone",onClick:e=>{e.preventDefault(),e.stopPropagation(),eg(e.currentTarget)},children:(0,l.jsx)(jW,{fontSize:"small"})})}),G[73]=$):$=G[73],G[74]!==j?(F=(0,l.jsx)(lA.A,{disableRipple:!0,onClick:W$,sx:E,children:(0,l.jsxs)(e7.A,{sx:P,children:[j,$]})}),G[74]=j,G[75]=F):F=G[75],G[76]!==Y||G[77]!==X||G[78]!==ei){let e;G[80]!==Y||G[81]!==ei?(e=(e,t)=>(0,l.jsx)(lA.A,{value:WE(e.value,ei),onClick:()=>{Y(e.value)},children:e.display},t),G[80]=Y,G[81]=ei,G[82]=e):e=G[82],V=X.map(e),G[76]=Y,G[77]=X,G[78]=ei,G[79]=V}else V=G[79];return G[83]!==eh||G[84]!==et||G[85]!==ei?(H=et&&(0,l.jsx)(lA.A,{value:WE(eh.value,ei),onClick:()=>el(!0),children:eh.display}),G[83]=eh,G[84]=et,G[85]=ei,G[86]=H):H=G[86],G[87]!==ed||G[88]!==M||G[89]!==O||G[90]!==T||G[91]!==_||G[92]!==R||G[93]!==F||G[94]!==V||G[95]!==H?(W=(0,l.jsx)(e7.A,{ref:es,children:(0,l.jsxs)(lC.A,{open:ed,value:M,onClick:O,IconComponent:jH,renderValue:T,inputProps:_,sx:R,children:[F,V,H]})}),G[87]=ed,G[88]=M,G[89]=O,G[90]=T,G[91]=_,G[92]=R,G[93]=F,G[94]=V,G[95]=H,G[96]=W):W=G[96],G[97]!==b||G[98]!==k||G[99]!==W?(U=(0,l.jsxs)(l.Fragment,{children:[b,k,W]}),G[97]=b,G[98]=k,G[99]=W,G[100]=U):U=G[100],U}function W$(e){e.preventDefault(),e.stopPropagation()}function WF(e){return{padding:e.spacing(2)}}function WV(e){return(0,l.jsx)(ex.A,{...e,placeholder:"Search timezones",size:"small"})}function WH(e){e.stopPropagation()}function WW(e){return{padding:e.spacing(1)}}function WU(e){return{id:e.value,label:e.display}}function WG(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g,v=(0,c.c)(31);v[0]!==e?({value:s,onChange:n,timeZoneOptions:o,variant:i,heightPx:t,...r}=e,v[0]=e,v[1]=t,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=s):(t=v[1],n=v[2],r=v[3],i=v[4],o=v[5],s=v[6]);let y=void 0===i?"standard":i;v[7]!==o?(a=o??jU(),v[7]=o,v[8]=a):a=v[8];let b=a;v[9]!==t?(t&&(u="number"==typeof t?`${t}px`:t),v[9]=t,v[10]=u):u=v[10],v[11]!==n||v[12]!==b?(h=e=>{let t=b.find(t=>t.value===e);t&&n&&n(t)},v[11]=n,v[12]=b,v[13]=h):h=v[13];let x=h,w="compact"===y?"80px":"150px";v[14]!==u?(d=u&&{lineHeight:u,paddingY:0},v[14]=u,v[15]=d):d=v[15],v[16]!==r.sx||v[17]!==w||v[18]!==d?(p={minWidth:w,...d,...r.sx},v[16]=r.sx,v[17]=w,v[18]=d,v[19]=p):p=v[19];let S=p;v[20]!==x?(f=(e,t)=>{x(e.target.value)},v[20]=x,v[21]=f):f=v[21];let A="compact"===y?"small":"medium";return v[22]!==b?(m=b.map(Wq),v[22]=b,v[23]=m):m=v[23],v[24]!==r||v[25]!==S||v[26]!==f||v[27]!==A||v[28]!==m||v[29]!==s?(g=(0,l.jsx)(lC.A,{...r,value:s,onChange:f,sx:S,size:A,children:m}),v[24]=r,v[25]=S,v[26]=f,v[27]=A,v[28]=m,v[29]=s,v[30]=g):g=v[30],g}function Wq(e){return(0,l.jsx)(lA.A,{value:e.value,children:e.display},e.value)}function WX(e){let t,n,r,i=(0,c.c)(7),{markerColor:o,sx:s}=e;return i[0]!==s?(t=nw({display:"inline-block",width:"11px",height:"11px",borderRadius:"2px",marginRight:1,verticalAlign:"top"},s),i[0]=s,i[1]=t):t=i[1],i[2]!==o?(n={backgroundColor:o},i[2]=o,i[3]=n):n=i[3],i[4]!==t||i[5]!==n?(r=(0,l.jsx)(e7.A,{sx:t,style:n}),i[4]=t,i[5]=n,i[6]=r):r=i[6],r}function WY(e){let t,n,r,i,o,s,a,u,h,d=(0,c.c)(19),{formattedY:p,markerColor:f,metricName:m,metricLabels:g}=e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(t={marginTop:.25},d[0]=t):t=d[0],d[1]!==f?(n=(0,l.jsx)(WX,{markerColor:f,sx:t}),d[1]=f,d[2]=n):n=d[2],d[3]!==p?(r=(0,l.jsx)(e7.A,{component:"span",sx:W0,children:p}),d[3]=p,d[4]=r):r=d[4],d[5]!==m||d[6]!==r?(i=(0,l.jsxs)(e7.A,{component:"span",children:[m,r]}),d[5]=m,d[6]=r,d[7]=i):i=d[7],d[8]!==n||d[9]!==i?(o=(0,l.jsxs)(e7.A,{sx:W1,children:[n,i]}),d[8]=n,d[9]=i,d[10]=o):o=d[10],d[11]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(c4,{sx:WJ}),d[11]=s):s=d[11],d[12]!==g?(a=g.map(WK),d[12]=g,d[13]=a):a=d[13],d[14]!==a?(u=(0,l.jsx)(e7.A,{sx:WZ,children:a}),d[14]=a,d[15]=u):u=d[15],d[16]!==o||d[17]!==u?(h=(0,l.jsxs)(eb,{spacing:.5,children:[o,s,u]}),d[16]=o,d[17]=u,d[18]=h):h=d[18],h}function WK(e){if(e){let[t,n]=e.split("="),r=void 0!==n?`${t}: `:t,i=void 0!==n?n.replace(/(^"|"$)/g,""):n;return(0,l.jsxs)(e7.A,{sx:{display:"flex",gap:"4px"},children:[(0,l.jsx)(nc.A,{sx:{fontSize:"11px"},children:r}),(0,l.jsx)(nc.A,{sx:WQ,children:i})]},e)}}function WQ(e){return{color:e.palette.common.white,fontWeight:700,fontSize:"11px"}}function WZ(e){return{color:e.palette.common.white}}function WJ(e){return{borderColor:e.palette.grey["500"]}}function W0(e){return{color:e.palette.common.white,fontWeight:700,paddingLeft:"2px"}}function W1(e){return{display:"flex",height:"16px",flexDirection:"row",alignItems:"center",justifyContent:"left",color:e.palette.common.white,fontSize:"11px"}}function W2(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g=(0,c.c)(35),{seriesName:v,formattedY:y,markerColor:b,totalSeries:x,emphasizeText:w,wrapLabels:S}=e,A=void 0!==w&&w,C=void 0===S||S;g[0]!==v?(t=v.split("{"),g[0]=v,g[1]=t):t=g[1];let k=t,M=k[1]??v;g[2]!==M?(n=M.replace(/[{}]/g,"").split(","),g[2]=M,g[3]=n):n=g[3];let O=n;if(1===x&&O.length>1){let e,t=k[0]?`${k[0]}:`:"value:";return g[4]!==y||g[5]!==b||g[6]!==t||g[7]!==O?(e=(0,l.jsx)(WY,{formattedY:y,metricName:t,metricLabels:O,markerColor:b}),g[4]=y,g[5]=b,g[6]=t,g[7]=O,g[8]=e):e=g[8],e}if(g[9]!==v){let e;g[11]===Symbol.for("react.memo_cache_sentinel")?(e=/[,]/g,g[11]=e):e=g[11],r=v.replace(e,", "),g[9]=v,g[10]=r}else r=g[10];let T=r;g[12]===Symbol.for("react.memo_cache_sentinel")?(i={display:"table-row",paddingTop:.5},g[12]=i):i=g[12],g[13]===Symbol.for("react.memo_cache_sentinel")?(o={display:"table-cell",maxWidth:"520px"},g[13]=o):o=g[13],g[14]===Symbol.for("react.memo_cache_sentinel")?(s={marginTop:.5},g[14]=s):s=g[14],g[15]!==b?(a=(0,l.jsx)(WX,{markerColor:b,sx:s}),g[15]=b,g[16]=a):a=g[16],g[17]!==A||g[18]!==C?(u=e=>({display:"inline-block",width:"calc(100% - 20px)",minWidth:150,maxWidth:500,overflow:"hidden",color:e.palette.common.white,fontWeight:A?e.typography.fontWeightBold:e.typography.fontWeightRegular,textOverflow:"ellipsis",whiteSpace:C?"normal":"nowrap"}),g[17]=A,g[18]=C,g[19]=u):u=g[19];let _=A?fw:fx;return g[20]!==T||g[21]!==_||g[22]!==u?(h=(0,l.jsx)(e7.A,{component:"span",sx:u,"aria-label":_,children:T}),g[20]=T,g[21]=_,g[22]=u,g[23]=h):h=g[23],g[24]!==h||g[25]!==a?(d=(0,l.jsxs)(e7.A,{sx:o,children:[a,h]}),g[24]=h,g[25]=a,g[26]=d):d=g[26],g[27]!==A?(p=e=>({display:"table-cell",paddingLeft:1.5,textAlign:"right",verticalAlign:"top",fontWeight:A?e.typography.fontWeightBold:e.typography.fontWeightRegular}),g[27]=A,g[28]=p):p=g[28],g[29]!==y||g[30]!==p?(f=(0,l.jsx)(e7.A,{sx:p,children:y}),g[29]=y,g[30]=p,g[31]=f):f=g[31],g[32]!==d||g[33]!==f?(m=(0,l.jsxs)(e7.A,{sx:i,children:[d,f]}),g[32]=d,g[33]=f,g[34]=m):m=g[34],m}let W5="Pinned Crosshair",W3={name:W5,type:"line",markLine:{data:[],lineStyle:{type:"dashed",width:2},emphasis:{lineStyle:{width:2,opacity:1}},blur:{lineStyle:{width:2,opacity:1}}}};function W4(e){let t=e._model;void 0!==t&&void 0!==t.option.toolbox&&t.option.toolbox.length>0&&"normal"===t.option.toolbox[0].feature.dataZoom.iconStatus.zoom&&e.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:!0})}function W6(e){e.dispatchAction({type:"restore"})}function W9(e){void 0!==e.dispatchAction&&(e.dispatchAction({type:"unselect"}),e.dispatchAction({type:"downplay"}))}function W8(e,t,n){if(void 0===n)return null;let r=[e,t];return n.containPixel("grid",r)?n.convertFromPixel("grid",r):null}function W7(e,t,n,r,i,o){let s=o.length>0?o[o.length-1]:i[i.length-1];void 0!==s&&e.dispatchAction({type:"select",seriesIndex:s.seriesIndex,dataIndex:s.dataIndex,escapeConnect:!0}),e.dispatchAction({type:"downplay"}),r.length>0&&e.dispatchAction({type:"downplay",seriesIndex:r}),n.length>0?e.dispatchAction({type:"highlight",seriesIndex:n,notBlur:!1,escapeConnect:!0}):(e.dispatchAction({type:"highlight",seriesIndex:t,notBlur:!0,escapeConnect:!0}),e.dispatchAction({type:"toggleSelect"}))}function Ue(e){return e[e.length-1]?.name===W5}function Ut(e,t){if(void 0===e||void 0===t)return null;let n=null,r=1/0;for(let[i]of e){let e=Math.abs(i-t);e<r&&(n=i,r=e)}return n}function Un(e,t){if(void 0===t)return null;let n=e.length,r=null;for(let i=0;i<n;i++){let o=n>0?e[i]:null;if(!o)break;r=Ut(o.values,t)}return r}function Ur(e,t,n,r,i,o,s,a,l){let c=n[0]??null,u=n[1]??null;if(null===c||null===u||void 0===i.dispatchAction||!Array.isArray(e))return fk;let h=Ut(e[0]?.values,c);if(null===h)return fk;let d=null;if(void 0!==a){let e=i.convertToPixel("grid",[0,u]),t=i.convertToPixel("grid",[0,u+r]);e&&t&&void 0!==e[1]&&void 0!==t[1]&&(d=Math.abs(t[1]-e[1]))}let p=l??fR(h,i),f=function(e,t,n,r,i,o,s,a,l){let c=[],u=e.length,h=new Map,d=[],p=e[0]?.values;if(p&&p.length>0){let e=new Set;for(let[t]of p)e.has(t)||(e.add(t),d.push(t));d=d.toSorted((e,t)=>e-t)}let f=[];for(let e=0;e<u;e++)(t[e]?.type??"line")==="bar"&&f.push(e);let m=null,g=null;f.length>0&&null!==i&&(m=fP(n,d,l),g=fR(n,l));for(let d=0;d<u;d++){let u,p=t[d];if(!p)continue;let v=e[d];if(!v)continue;let y=v.values;if(!y||!Array.isArray(y))continue;let b=p.type??"line",x=p.name?p.name.toString():"",w=p.id?p.id.toString():"",S=(p.color??"#000").toString(),A=-1,C=0;for(let e=0;e<y.length;e++){let t=y[e];if(t&&t[0]===n){A=e,C=t[0],u=t[1];break}}if(-1===A||null==u)continue;let k=!1,M=u,O=1/0;if("line"===b)if(M=fE(d,u,t,h),void 0!==o&&null!==a)try{let e=l.convertToPixel({seriesIndex:d},[A,M]);if(e&&void 0!==e[1]){let t=Math.abs(o-e[1]);k=t<=a,O=t}else{let e=Math.abs(M-r);k=e<=s,O=e}}catch{let e=Math.abs(M-r);k=e<=s,O=e}else{let e=Math.abs(M-r);k=e<=s,O=e}else if("bar"===b){if(null===i||null===m||null===g)continue;let e=f.indexOf(d);if(-1===e)continue;let n=fL(e,m,g,f.length);if(!(i>=n.left&&i<=n.right))continue;let o=p.stack,s=!0;if(o){let e=o.toString(),n=fN(h.get(e)??0,M=fE(d,u,t,h),l);if(n){let e=l.convertToPixel("grid",[0,r]);e&&void 0!==e[1]&&(s=e[1]>=n.top&&e[1]<=n.bottom)}}else M=u;if(!s)continue;O=Math.abs(i-(n.left+n.right)/2),k=!0}k&&c.push({seriesIdx:d,datumIdx:A,seriesId:w,seriesName:x,date:n,markerColor:S,x:C,y:u,visualY:M,distance:O})}return c}(e,t,h,u,p,a,r,d,i),m=function(e){if(0===e.length)return null;let t=null;for(let n of e)(null===t||n.distance<t.distance)&&(t=n);return t}(f),g=new Set;for(let e of f)g.add(e.seriesIdx);let v=[];for(let t=0;t<e.length;t++)g.has(t)||v.push(t);return function(e,t,n,r,i,o){let s=[],a=[],l=[...o],c=[],u=[],h=new Map,d=[];for(let i of e){let e=r?.get(i.seriesId)??n,o=i.y,p=fo(o,e),f=null!==t&&i.seriesIdx===t.seriesIdx;if(f){a.push(i.seriesIdx);let e=h.get(o)??0;h.set(o,e+1),e>0&&u.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o}),c.push({seriesIndex:i.seriesIdx,dataIndex:i.datumIdx,seriesName:i.seriesName,yValue:o})}else l.push(i.seriesIdx);d.push({seriesIdx:i.seriesIdx,datumIdx:i.datumIdx,seriesName:i.seriesName,date:i.date,x:i.x,y:o,formattedY:p,markerColor:i.markerColor,isClosestToCursor:f}),s.push(i.seriesIdx)}return W7(i,s,a,l,c,u),d}(f,m,o,s,i,v)}function Ui(e,t,n,r,i){let o=[],s=t[0]??null,a=t[1]??null;if(null===s||null===a)return o;let l=[],c=[],u=[],h=e.timeSeries.length;if(Array.isArray(e.xAxis)&&Array.isArray(e.timeSeries))for(let t=0;t<h;t++){let d=e.timeSeries[t];if(void 0===d||o.length>=1e3)break;let p=d.name?d.name.toString():"",f=d.color??"#000";if(Array.isArray(d.data))for(let m=0;m<d.data.length;m++){let g=e.xAxis[m]??0,v=d.data[m];if(null!=v&&s===m&&"-"!==v&&a<=v+n&&a>=v-n){let e=Us({valueToCheck:a,baseValue:v,percentage:Math.max(h>5?2:5,100/h)});e?c.push(t):(u.push(t),r?.dispatchAction!==void 0&&r.dispatchAction({type:"downplay",seriesIndex:t}));let n=g>0x174876e7ff?g:1e3*g,s=fo(v,i);o.push({seriesIdx:t,datumIdx:m,seriesName:p,date:n,x:g,y:v,formattedY:s,markerColor:f.toString(),isClosestToCursor:e}),l.push(t)}}}return r?.dispatchAction!==void 0&&(r.dispatchAction({type:"downplay",seriesIndex:u}),c.length>0?r.dispatchAction({type:"highlight",seriesIndex:c,notBlur:!1,escapeConnect:!0}):r.dispatchAction({type:"highlight",seriesIndex:l,notBlur:!0,escapeConnect:!0})),o}function Uo({mousePos:e,pinnedPos:t,data:n,seriesMapping:r,chart:i,format:o,seriesFormatMap:s,showAllSeries:a=!1}){if(void 0===i||null===e)return fk;let l=!1;if(null!==e.target){let t=e.target.parentElement;if(null!==t){let e=t.parentElement;null!==e&&i.getDom()===e&&(l=!0)}}if(null!==t&&(e=t,l=!0),!1===l||null===n||void 0===i._model||void 0===e.plotCanvas.x||void 0===e.plotCanvas.y)return fk;let c=e.plotCanvas.y,u=e.plotCanvas.x,h=W8(u,c,i);if(null!==h){let e=i._model.getComponent("yAxis").axis.scale,t="log"===e.type,l=e._interval;if(t&&e.base){let t=e.base,n=e._extent,r=t**n[0];l=(t**n[1]-r)/100}let d=Ua({yInterval:l,totalSeries:n.length,showAllSeries:a}),p=r.some(e=>void 0!==e.yAxisIndex&&e.yAxisIndex>0);return Ur(n,r,h,d,i,o,s,p?c:void 0,u)}return fk}function Us({valueToCheck:e,baseValue:t,percentage:n}){let r=n/100*t;return e>=t-r&&e<=t+r}function Ua({yInterval:e,totalSeries:t,showAllSeries:n=!1}){if(n)return 10*e;let r=.3*e;return t>5?Math.max(r,30*e/t):Math.max(r,5.5*e)}function Ul(e){let t,n,r,i=(0,c.c)(10),{series:o,wrapLabels:s}=e;t:{let e;if(null===o){t=null;break t}i[0]!==o?(e=o.toSorted(Uu),i[0]=o,i[1]=e):e=i[1],t=e}let a=t;if(null===o||null===a)return null;if(i[2]!==a||i[3]!==s){let e;i[5]!==a.length||i[6]!==s?(e=e=>{let{datumIdx:t,seriesIdx:n,seriesName:r,y:i,formattedY:o,markerColor:c,isClosestToCursor:u}=e;if(null===t||null===n)return null;let h=n.toString()+t.toString();return(0,l.jsx)(W2,{seriesName:r,y:i,formattedY:o,markerColor:c,totalSeries:a.length,wrapLabels:s,emphasizeText:u},h)},i[5]=a.length,i[6]=s,i[7]=e):e=i[7],n=a.map(e),i[2]=a,i[3]=s,i[4]=n}else n=i[4];return i[8]!==n?(r=(0,l.jsx)(e7.A,{sx:Uc,children:n}),i[8]=n,i[9]=r):r=i[9],r}function Uc(e){return{display:"table",padding:e.spacing(.5,2)}}function Uu(e,t){return e.y>t.y?-1:1}var Uh=n("hA");let Ud=(0,u.memo)(function(e){let t,n,r,i,o,s,a,u,h,d,p=(0,c.c)(25),{nearbySeries:f,totalSeries:m,isTooltipPinned:g,showAllSeries:v,enablePinning:y,onShowAllClick:b,onUnpinClick:x}=e,w=void 0===y||y,{formatWithUserTimeZone:S}=dQ(),A=f[0]?.date??null;if(null===A)return null;p[0]!==S?(t=e=>{let t=new Date(e),n=S(t,"MMM dd, yyyy - "),r=S(t,"HH:mm:ss");return(0,l.jsxs)(e7.A,{children:[(0,l.jsx)(nc.A,{variant:"caption",sx:Up,children:n}),(0,l.jsx)(nc.A,{variant:"caption",children:(0,l.jsx)("strong",{children:r})})]})},p[0]=S,p[1]=t):t=p[1];let C=t,k=w&&m>5,M=g?f_:fT;return p[2]===Symbol.for("react.memo_cache_sentinel")?(n={width:"100%",display:"flex",justifyContent:"start",alignItems:"center",paddingBottom:.5},p[2]=n):n=p[2],p[3]!==C||p[4]!==A?(r=C(A),p[3]=C,p[4]=A,p[5]=r):r=p[5],p[6]===Symbol.for("react.memo_cache_sentinel")?(i={marginLeft:"auto"},p[6]=i):i=p[6],p[7]!==b||p[8]!==v||p[9]!==k?(o=k&&(0,l.jsxs)(eb,{direction:"row",gap:.5,alignItems:"center",sx:{textAlign:"right"},children:[(0,l.jsx)(nc.A,{sx:{fontSize:11},children:"Show All"}),(0,l.jsx)(Uh.A,{checked:v,size:"small",onChange:(e,t)=>{if(void 0!==b)return b(t)},sx:Um})]}),p[7]=b,p[8]=v,p[9]=k,p[10]=o):o=p[10],p[11]!==w||p[12]!==g||p[13]!==x||p[14]!==M?(s=w&&(0,l.jsxs)(eb,{direction:"row",alignItems:"center",children:[(0,l.jsx)(nc.A,{sx:{marginRight:.5,fontSize:11,verticalAlign:"middle"},children:M}),g?(0,l.jsx)(dT,{onClick:()=>{void 0!==x&&x()},sx:{fontSize:16,cursor:"pointer"}}):(0,l.jsx)(d_,{sx:{fontSize:16}})]}),p[11]=w,p[12]=g,p[13]=x,p[14]=M,p[15]=s):s=p[15],p[16]!==o||p[17]!==s?(a=(0,l.jsxs)(eb,{direction:"row",gap:1,sx:i,children:[o,s]}),p[16]=o,p[17]=s,p[18]=a):a=p[18],p[19]!==r||p[20]!==a?(u=(0,l.jsxs)(e7.A,{sx:n,children:[r,a]}),p[19]=r,p[20]=a,p[21]=u):u=p[21],p[22]===Symbol.for("react.memo_cache_sentinel")?(h=(0,l.jsx)(c4,{sx:Ug}),p[22]=h):h=p[22],p[23]!==u?(d=(0,l.jsxs)(e7.A,{sx:Uf,children:[u,h]}),p[23]=u,p[24]=d):d=p[24],d});function Up(e){return{color:e.palette.common.white}}function Uf(e){return{width:"100%",maxWidth:650,padding:e.spacing(1.5,2,.5,2),backgroundColor:e.palette.designSystem?.grey[800]??fS,position:"sticky",top:0,left:0}}function Um(e){return{"& .MuiSwitch-switchBase":{color:e.palette.common.white},"& .MuiSwitch-track":{backgroundColor:e.palette.common.white}}}function Ug(e){return{width:"100%",borderColor:e.palette.grey["500"]}}let Uv=(0,u.memo)(function(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b,x=(0,c.c)(54),{containerId:w,chartRef:S,data:A,seriesMapping:C,enablePinning:k,wrapLabels:M,format:O,seriesFormatMap:T,onUnpinClick:_,pinnedPos:I}=e,D=void 0===k||k,[R,E]=(0,u.useState)(!1);x[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],x[0]=t):t=x[0];let[P,L]=(0,u.useState)(t),N=(0,u.useRef)(null),B=fM(),{height:j,width:z,ref:$}=dD(),F=null!==I&&D;x[1]!==$?(n=e=>{N.current=e,$(e)},x[1]=$,x[2]=n):n=x[2];let V=n;x[3]!==w?(r=w?document.querySelector(w):void 0,x[3]=w,x[4]=r):r=x[4];let H=r;if(x[5]!==S||x[6]!==A||x[7]!==O||x[8]!==B||x[9]!==I||x[10]!==T||x[11]!==C||x[12]!==R?(i=()=>{L(Uo({mousePos:B,data:A,seriesMapping:C,pinnedPos:I,chart:S.current,format:O,seriesFormatMap:T,showAllSeries:R}))},o=[S,B,A,C,I,O,T,R],x[5]=S,x[6]=A,x[7]=O,x[8]=B,x[9]=I,x[10]=T,x[11]=C,x[12]=R,x[13]=i,x[14]=o):(i=x[13],o=x[14]),(0,u.useLayoutEffect)(i,o),x[15]!==H||x[16]!==B||x[17]!==I?(s=()=>{if(null===B)return;let e=N.current;if(!e)return;let t=e.getBoundingClientRect();if(0===t.height||0===t.width)return;let n=fI(B,I,t.height,t.width,H);n&&n!==e.style.transform&&(e.style.transform=n)},x[15]=H,x[16]=B,x[17]=I,x[18]=s):s=x[18],(0,u.useLayoutEffect)(s),null===B||null===B.target||null===A||null===I&&"CANVAS"!==B.target.tagName)return null;x[19]!==H?(a=H?H.getBoundingClientRect().height:void 0,x[19]=H,x[20]=a):a=x[20];let W=a,U=j??0,G=z??0;x[21]!==H||x[22]!==B||x[23]!==I||x[24]!==G||x[25]!==U?(h=fI(B,I,U,G,H),x[21]=H,x[22]=B,x[23]=I,x[24]=G,x[25]=U,x[26]=h):h=x[26];let q=h;if(0===P.length)return null;let X=A.length;return x[27]!==W||x[28]!==I?(d=e=>fD(e,I,W),x[27]=W,x[28]=I,x[29]=d):d=x[29],x[30]!==q?(p={transform:q},x[30]=q,x[31]=p):p=x[31],x[32]===Symbol.for("react.memo_cache_sentinel")?(f=e=>E(e),x[32]=f):f=x[32],x[33]!==D||x[34]!==F||x[35]!==P||x[36]!==_||x[37]!==R||x[38]!==X?(m=(0,l.jsx)(Ud,{nearbySeries:P,totalSeries:X,enablePinning:D,isTooltipPinned:F,showAllSeries:R,onShowAllClick:f,onUnpinClick:_}),x[33]=D,x[34]=F,x[35]=P,x[36]=_,x[37]=R,x[38]=X,x[39]=m):m=x[39],x[40]!==P||x[41]!==M?(g=(0,l.jsx)(Ul,{series:P,wrapLabels:M}),x[40]=P,x[41]=M,x[42]=g):g=x[42],x[43]!==m||x[44]!==g?(v=(0,l.jsxs)(eb,{spacing:.5,children:[m,g]}),x[43]=m,x[44]=g,x[45]=v):v=x[45],x[46]!==V||x[47]!==d||x[48]!==p||x[49]!==v?(y=(0,l.jsx)(e7.A,{ref:V,sx:d,style:p,children:v}),x[46]=V,x[47]=d,x[48]=p,x[49]=v,x[50]=y):y=x[50],x[51]!==H||x[52]!==y?(b=(0,l.jsx)(ho.A,{container:H,children:y}),x[51]=H,x[52]=y,x[53]=b):b=x[53],b}),Uy=(0,y.A)(G)(({theme:e})=>({padding:e.spacing(.5),minWidth:"auto"})),Ub=(0,u.forwardRef)(function(e,t){let n,r=(0,c.c)(3);return r[0]!==e||r[1]!==t?(n=(0,l.jsx)(Uy,{ref:t,variant:"outlined",color:"secondary",...e}),r[0]=e,r[1]=t,r[2]=n):n=r[2],n}),Ux=Object.entries(fi).map(([e,t])=>({...t,id:e,group:t.group||"Decimal"})).filter(e=>!e.disableSelectorOption);function Uw(e){let t,n,r,i,o,s,a,u,h=(0,c.c)(19);h[0]!==e?({value:i,onChange:t,disabled:r,...n}=e,h[0]=e,h[1]=t,h[2]=n,h[3]=r,h[4]=i):(t=h[1],n=h[2],r=h[3],i=h[4]);let d=void 0!==r&&r,p=fi[i?.unit||"decimal"];h[5]!==t?(o=(e,n)=>{null===n?t(void 0):t({unit:n.id})},h[5]=t,h[6]=o):o=h[6];let f=o,m=i?.unit||"decimal";return h[7]!==m||h[8]!==p?(s={id:m,...p},h[7]=m,h[8]=p,h[9]=s):s=h[9],h[10]!==d||h[11]!==t?(a=e=>{let{InputProps:n,...r}=e;return(0,l.jsx)(ex.A,{...r,slotProps:{input:{...n,endAdornment:(0,l.jsxs)(l.Fragment,{children:[n.endAdornment,(0,l.jsx)(uo,{position:"end",children:(0,l.jsx)(er,{size:"small","aria-label":"clear unit",onClick:()=>t(void 0),disabled:d,tabIndex:-1,children:(0,l.jsx)(hM,{fontSize:"small"})})})]})}}})},h[10]=d,h[11]=t,h[12]=a):a=h[12],h[13]!==d||h[14]!==f||h[15]!==n||h[16]!==s||h[17]!==a?(u=(0,l.jsx)(mP,{value:s,options:Ux,groupBy:US,onChange:f,disabled:d,disableClearable:!0,renderInput:a,...n}),h[13]=d,h[14]=f,h[15]=n,h[16]=s,h[17]=a,h[18]=u):u=h[18],u}function US(e){return e.group??"Decimal"}let UA=[{id:"default",label:"Default",decimalPlaces:void 0},{id:"0",label:"0",decimalPlaces:0},{id:"1",label:"1",decimalPlaces:1},{id:"2",label:"2",decimalPlaces:2},{id:"3",label:"3",decimalPlaces:3},{id:"4",label:"4",decimalPlaces:4}];function UC(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g,v,y=(0,c.c)(49),{value:b,onChange:x,disabled:w}=e,S=void 0!==w&&w;y[0]!==b?(t=ff(b),y[0]=b,y[1]=t):t=y[1];let A=t;y[2]!==b?(n=fm(b),y[2]=b,y[3]=n):n=y[3];let C=n;y[4]!==x||y[5]!==b.customLabel?(r=e=>{let t=e||{unit:"decimal"};b.customLabel?.trim()&&pz(t.unit)?x({...t,customLabel:b.customLabel}):x(t)},y[4]=x,y[5]=b.customLabel,y[6]=r):r=y[6];let k=r;y[7]!==b.unit?(i=pz(b.unit),y[7]=b.unit,y[8]=i):i=y[8];let M=i;y[9]!==A||y[10]!==x||y[11]!==b?(o=e=>{let{decimalPlaces:t}=e;A&&x({...b,decimalPlaces:t})},y[9]=A,y[10]=x,y[11]=b,y[12]=o):o=y[12];let O=o;y[13]!==C||y[14]!==x||y[15]!==b?(s=(e,t)=>{C&&x({...b,shortValues:t})},y[13]=C,y[14]=x,y[15]=b,y[16]=s):s=y[16];let T=s;y[17]!==x||y[18]!==b?(a=e=>{if(""===e){let{customLabel:e,...t}=b;x(t);return}x({...b,customLabel:e})},y[17]=x,y[18]=b,y[19]=a):a=y[19];let _=a;y[20]!==C||y[21]!==b.shortValues?(u=!!C&&pS(b.shortValues),y[20]=C,y[21]=b.shortValues,y[22]=u):u=y[22];let I=!C;if(y[23]!==T||y[24]!==I||y[25]!==u?(h=(0,l.jsx)(f0,{label:"Short values",control:(0,l.jsx)(Uh.A,{checked:u,onChange:T,disabled:I})}),y[23]=T,y[24]=I,y[25]=u,y[26]=h):h=y[26],y[27]!==S||y[28]!==k||y[29]!==b?(d=(0,l.jsx)(f0,{label:"Unit",control:(0,l.jsx)(Uw,{value:b,onChange:k,disabled:S})}),y[27]=S,y[28]=k,y[29]=b,y[30]=d):d=y[30],y[31]!==S||y[32]!==_||y[33]!==M||y[34]!==b.customLabel?(p=M&&(0,l.jsx)(f0,{label:"Custom label",control:(0,l.jsx)(ex.A,{size:"small",fullWidth:!0,value:b.customLabel??"",onChange:e=>_(e.target.value),placeholder:"Optional display override (e.g. pnr/mn)",disabled:S,inputProps:{"aria-label":"custom unit label",maxLength:32}})}),y[31]=S,y[32]=_,y[33]=M,y[34]=b.customLabel,y[35]=p):p=y[35],y[36]!==b.decimalPlaces){var D;D=b.decimalPlaces,f=UA.find(e=>e.decimalPlaces===D),y[36]=b.decimalPlaces,y[37]=f}else f=y[37];y[38]!==O?(m=(e,t)=>O(t),y[38]=O,y[39]=m):m=y[39];let R=!A;return y[40]!==f||y[41]!==m||y[42]!==R?(g=(0,l.jsx)(f0,{label:"Decimals",control:(0,l.jsx)(mP,{value:f,options:UA,getOptionLabel:Uk,onChange:m,disabled:R,disableClearable:!0})}),y[40]=f,y[41]=m,y[42]=R,y[43]=g):g=y[43],y[44]!==h||y[45]!==d||y[46]!==p||y[47]!==g?(v=(0,l.jsxs)(l.Fragment,{children:[h,d,p,g]}),y[44]=h,y[45]=d,y[46]=p,y[47]=g,y[48]=v):v=y[48],v}function Uk(e){return e.label}function UM(e){let t,n,r,i,o,s=(0,c.c)(10),{name:a,height:u}=e,h=`calc(${u}px / 2)`;return s[0]!==u||s[1]!==h?(t={maxWidth:u,top:h},s[0]=u,s[1]=h,s[2]=t):t=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(n={display:"inline-block",position:"absolute",transform:"translateX(-50%) rotate(-90deg)",transformOrigin:"top",textAlign:"center",zIndex:1},s[3]=n):n=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(r={whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},s[4]=r):r=s[4],s[5]!==a?(i=(0,l.jsx)(nc.A,{variant:"body1","aria-label":"y axis label",sx:r,children:a}),s[5]=a,s[6]=i):i=s[6],s[7]!==t||s[8]!==i?(o=(0,l.jsx)(e7.A,{style:t,sx:n,children:i}),s[7]=t,s[8]=i,s[9]=o):o=s[9],o}let UO=(0,u.createContext)(void 0);function UT(e){let t,n,r,i,o,s=(0,c.c)(8),{children:a}=e;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,s[0]=t):t=s[0];let[h,d]=(0,u.useState)(t);s[1]===Symbol.for("react.memo_cache_sentinel")?(n=(e,t,n)=>{d(r=>{let i=new Map(r),o=i.get(e)||{loading:!1};if(void 0!==n){let r=new Map(o.itemStatuses||new Map),s=r.get(n)||{loading:!1};r.set(n,{...s,...t}),i.set(e,{...o,itemStatuses:r})}else i.set(e,{...o,...t});return i})},s[1]=n):n=s[1];let p=n;s[2]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{d(t=>{if(void 0===e)return new Map;if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},s[2]=r):r=s[2];let f=r;s[3]!==h?(i={actionStatuses:h,setActionStatus:p,clearActionStatus:f},s[3]=h,s[4]=i):i=s[4];let m=i;return s[5]!==a||s[6]!==m?(o=(0,l.jsx)(UO.Provider,{value:m,children:a}),s[5]=a,s[6]=m,s[7]=o):o=s[7],o}let U_=()=>{},UI={actionStatuses:new Map,setActionStatus:U_,clearActionStatus:U_,hasContext:!1};function UD(){let e,t=(0,c.c)(2),n=(0,u.useContext)(UO);t:{let r;if(!n){e=UI;break t}t[0]!==n?(r={...n,hasContext:!0},t[0]=n,t[1]=r):r=t[1],e=r}return e}let UR=(0,u.createContext)(void 0),UE=(e,t)=>t;function UP(e){let t,n,r,i,o,s,a,h,d,p=(0,c.c)(14),{children:f}=e;p[0]===Symbol.for("react.memo_cache_sentinel")?(t=new Map,p[0]=t):t=p[0];let[m,g]=(0,u.useState)(t),v=(0,u.useRef)(UE);p[1]===Symbol.for("react.memo_cache_sentinel")?(n=e=>{v.current=e},p[1]=n):n=p[1];let y=n;p[2]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{let t=new Map;e.forEach(e=>{let{item:n,id:r}=e;return t.set(r,n)}),g(t)},p[2]=r):r=p[2];let b=r;p[3]===Symbol.for("react.memo_cache_sentinel")?(i=(e,t)=>{g(n=>{let r=new Map(n);return r.has(t)?r.delete(t):r.set(t,e),r})},p[3]=i):i=p[3];let x=i;p[4]===Symbol.for("react.memo_cache_sentinel")?(o=e=>{g(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},p[4]=o):o=p[4];let w=o;p[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>g(new Map),p[5]=s):s=p[5];let S=s;p[6]!==m?(a=(e,t)=>m.has(v.current(e,t)),p[6]=m,p[7]=a):a=p[7];let A=a;p[8]!==A||p[9]!==m?(h={selectionMap:m,setSelection:b,toggleSelection:x,removeFromSelection:w,clearSelection:S,isSelected:A,registerGetId:y},p[8]=A,p[9]=m,p[10]=h):h=p[10];let C=h;return p[11]!==f||p[12]!==C?(d=(0,l.jsx)(UR.Provider,{value:C,children:f}),p[11]=f,p[12]=C,p[13]=d):d=p[13],d}let UL=()=>{},UN={selectionMap:new Map,setSelection:UL,toggleSelection:UL,removeFromSelection:UL,clearSelection:UL,isSelected:()=>!1,hasContext:!1};function UB(e){let t,n,r,i=(0,c.c)(10),o=(0,u.useContext)(UR);i[0]!==o||i[1]!==e?(t=()=>{o&&e?.getId&&o.registerGetId(e.getId)},i[0]=o,i[1]=e,i[2]=t):t=i[2];let s=e?.getId;i[3]!==o||i[4]!==s?(n=[o,s],i[3]=o,i[4]=s,i[5]=n):n=i[5],(0,u.useEffect)(t,n);t:{let e,t;if(!o){r=UN;break t}if(i[6]!==o){let{registerGetId:t,...n}=o;e=n,i[6]=o,i[7]=e}else e=i[7];i[8]!==e?(t={...e,hasContext:!0},i[8]=e,i[9]=t):t=i[9],r=t}return r}var Uj=function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(n=0;n<t.length;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r);else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(r&&(r+=" "),r+=t);return r};let Uz={data:""},U$=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,UF=/\/\*[^]*?\*\/| +/g,UV=/\n+/g,UH=(e,t)=>{let n="",r="",i="";for(let o in e){let s=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+s+";":r+="f"==o[1]?UH(s,o):o+"{"+UH(s,"k"==o[1]?"":t)+"}":"object"==typeof s?r+=UH(s,t?t.replace(/([^,])+/g,e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):o):null!=s&&(o="-"==o[1]?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=UH.p?UH.p(o,s):o+":"+s+";")}return n+(t&&i?t+"{"+i+"}":i)+r},UW={},UU=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+UU(e[n]);return t}return e};function UG(e){let t,n,r=this||{},i=e.call?e(r.p):e;return((e,t,n,r,i)=>{var o;let s=UU(e),a=UW[s]||(UW[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!UW[a]){let t=s!==e?e:(e=>{let t,n,r=[{}];for(;t=U$.exec(e.replace(UF,""));)t[4]?r.shift():t[3]?(n=t[3].replace(UV," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(UV," ").trim();return r[0]})(e);UW[a]=UH(i?{["@keyframes "+a]:t}:t,n?"":"."+a)}let l=n&&UW.g;return n&&(UW.g=UW[a]),o=UW[a],l?t.data=t.data.replace(l,o):-1===t.data.indexOf(o)&&(t.data=r?o+t.data:t.data+o),a})(i.unshift?i.raw?(t=[].slice.call(arguments,1),n=r.p,i.reduce((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":UH(e,""):!1===e?"":e}return e+r+(null==o?"":o)},"")):i.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):i,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Uz})(r.target),r.g,r.o,r.k)}function Uq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function UX(e,t,n){return t&&Uq(e.prototype,t),n&&Uq(e,n),e}function UY(){return(UY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function UK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function UQ(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function UZ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}UG.bind({g:1}),UG.bind({k:1});var UJ=function(){return""},U0=u.createContext({enqueueSnackbar:UJ,closeSnackbar:UJ}),U1="@media (max-width:599.95px)",U2="@media (min-width:600px)",U5=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},U3=function(e){return""+U5(e.vertical)+U5(e.horizontal)},U4=function(e){return!!e||0===e},U6="unmounted",U9="exited",U8="entering",U7="entered",Ge="exiting",Gt=function(e){function t(t){var n,r=e.call(this,t)||this,i=t.appear;return r.appearStatus=null,t.in?i?(n=U9,r.appearStatus=U8):n=U7:n=t.unmountOnExit||t.mountOnEnter?U6:U9,r.state={status:n},r.nextCallback=null,r}UK(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===U6?{status:U9}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==U8&&n!==U7&&(t=U8):(n===U8||n===U7)&&(t=Ge)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===U8?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===U9&&this.setState({status:U6})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,e),this.safeSetState({status:U8},function(){t.props.onEntering&&t.props.onEntering(t.node,e),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:U7},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})})})):this.safeSetState({status:U7},function(){t.props.onEntered&&t.props.onEntered(t.node,e)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:Ge},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:U9},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:U9},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;!this.node||n?setTimeout(this.nextCallback,0):(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e))},n.render=function(){var e=this.state.status;if(e===U6)return null;var t=this.props;return(0,t.children)(e,UQ(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},UX(t,[{key:"node",get:function(){var e,t=null==(e=this.props.nodeRef)?void 0:e.current;if(!t)throw Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(u.Component);function Gn(){}function Gr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Gi(e,t){return(0,u.useMemo)(function(){return null==e&&null==t?null:function(n){Gr(e,n),Gr(t,n)}},[e,t])}function Go(e){var t=e.timeout,n=e.style,r=void 0===n?{}:n,i=e.mode;return{duration:"object"==typeof t?t[i]||0:t,easing:r.transitionTimingFunction,delay:r.transitionDelay}}Gt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Gn,onEntering:Gn,onEntered:Gn,onExit:Gn,onExiting:Gn,onExited:Gn};var Gs=function(e){e.scrollTop=e.scrollTop},Ga=function(e){return Math.round(e)+"ms"};function Gl(e,t){void 0===e&&(e=["all"]);var n=t||{},r=n.duration,i=void 0===r?300:r,o=n.easing,s=void 0===o?"cubic-bezier(0.4, 0, 0.2, 1)":o,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){return e+" "+("string"==typeof i?i:Ga(i))+" "+s+" "+("string"==typeof l?l:Ga(l))}).join(",")}function Gc(e){return(e&&e.ownerDocument||document).defaultView||window}function Gu(e,t){if(t){var n=function(e,t){var n,r=t.getBoundingClientRect(),i=Gc(t);if(t.fakeTransform)n=t.fakeTransform;else{var o=i.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var s=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");s=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(i.innerWidth+s-r.left)+"px)";case"right":return"translateX(-"+(r.left+r.width-s)+"px)";case"up":return"translateY("+(i.innerHeight+a-r.top)+"px)";default:return"translateY(-"+(r.top+r.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var Gh=(0,u.forwardRef)(function(e,t){var n=e.children,r=e.direction,i=void 0===r?"down":r,o=e.in,s=e.style,a=e.timeout,l=void 0===a?0:a,c=e.onEnter,h=e.onEntered,d=e.onExit,p=e.onExited,f=UQ(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),m=(0,u.useRef)(null),g=Gi(n.ref,m),v=Gi(g,t),y=(0,u.useCallback)(function(){m.current&&Gu(i,m.current)},[i]);return(0,u.useEffect)(function(){if(!o&&"down"!==i&&"right"!==i){var e=function(e,t){var n;function r(){for(var r=this,i=arguments.length,o=Array(i),s=0;s<i;s++)o[s]=arguments[s];clearTimeout(n),n=setTimeout(function(){e.apply(r,o)},t)}return void 0===t&&(t=166),r.clear=function(){clearTimeout(n)},r}(function(){m.current&&Gu(i,m.current)}),t=Gc(m.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[i,o]),(0,u.useEffect)(function(){o||y()},[o,y]),(0,u.createElement)(Gt,Object.assign({appear:!0,nodeRef:m,onEnter:function(e,t){Gu(i,e),Gs(e),c&&c(e,t)},onEntered:h,onEntering:function(e){var t=(null==s?void 0:s.transitionTimingFunction)||"cubic-bezier(0.0, 0, 0.2, 1)",n=Go({timeout:l,mode:"enter",style:UY({},s,{transitionTimingFunction:t})});e.style.webkitTransition=Gl("-webkit-transform",n),e.style.transition=Gl("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==s?void 0:s.transitionTimingFunction)||"cubic-bezier(0.4, 0, 0.6, 1)",n=Go({timeout:l,mode:"exit",style:UY({},s,{transitionTimingFunction:t})});e.style.webkitTransition=Gl("-webkit-transform",n),e.style.transition=Gl("transform",n),Gu(i,e),d&&d(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",p&&p(e)},in:o,timeout:l},f),function(e,t){return(0,u.cloneElement)(n,UY({ref:v,style:UY({visibility:"exited"!==e||o?void 0:"hidden"},s,{},n.props.style)},t))})});Gh.displayName="Slide";var Gd=function(e){return u.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},Gp={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:u.createElement(function(){return u.createElement(Gd,null,u.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},null),warning:u.createElement(function(){return u.createElement(Gd,null,u.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},null),error:u.createElement(function(){return u.createElement(Gd,null,u.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},null),info:u.createElement(function(){return u.createElement(Gd,null,u.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:Gh,transitionDuration:{enter:225,exit:195}},Gf=function(e,t){var n=function(e){return"number"==typeof e||null===e};return n(e)?e:n(t)?t:Gp.autoHideDuration},Gm=function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?UY({},Gp.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?UY({},Gp.transitionDuration,{},t):Gp.transitionDuration};function Gg(e){return Object.entries(e).reduce(function(e,t){var n,r=t[0],i=t[1];return UY({},e,((n={})[r]=UG(i),n))},{})}var Gv="notistack-CollapseWrapper",Gy=Gg({root:{height:0},entered:{height:"auto"}}),Gb=(0,u.forwardRef)(function(e,t){var n=e.children,r=e.in,i=e.onExited,o=(0,u.useRef)(null),s=(0,u.useRef)(null),a=Gi(t,s),l=function(){return o.current?o.current.clientHeight:0};return(0,u.createElement)(Gt,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height="0px"},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=l(),n=Go({timeout:175,mode:"enter"}),r=n.duration,i=n.easing;e.style.transitionDuration="string"==typeof r?r:r+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=i||""},onExit:function(e){e.style.height=l()+"px"},onExited:i,onExiting:function(e){Gs(e);var t=Go({timeout:175,mode:"exit"}),n=t.duration,r=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height="0px",e.style.transitionTimingFunction=r||""},nodeRef:s,timeout:175},function(e,t){return(0,u.createElement)("div",Object.assign({ref:a,className:Uj(Gy.root,"entered"===e&&Gy.entered),style:UY({pointerEvents:"all",overflow:"hidden",minHeight:"0px",transition:Gl("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),(0,u.createElement)("div",{ref:o,className:Gv,style:{display:"flex",width:"100%"}},n))})});Gb.displayName="Collapse";var Gx={right:"left",left:"right",bottom:"up",top:"down"},Gw=function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var r;return UY({},t,((r={})[n]=e[n],r))},{})},GS=function(){};function GA(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=[].concat(i);t&&-1===s.indexOf(t)&&s.push(t),e.apply(this,s),n.apply(this,s)}},GS)}var GC="u">typeof window?u.useLayoutEffect:u.useEffect;function Gk(e){var t=(0,u.useRef)(e);return GC(function(){t.current=e}),(0,u.useCallback)(function(){return t.current.apply(void 0,arguments)},[])}var GM=(0,u.forwardRef)(function(e,t){var n=e.children,r=e.className,i=e.autoHideDuration,o=e.disableWindowBlurListener,s=void 0!==o&&o,a=e.onClose,l=e.id,c=e.open,h=e.SnackbarProps,d=void 0===h?{}:h,p=(0,u.useRef)(),f=Gk(function(){a&&a.apply(void 0,arguments)}),m=Gk(function(e){a&&null!=e&&(p.current&&clearTimeout(p.current),p.current=setTimeout(function(){f(null,"timeout",l)},e))});(0,u.useEffect)(function(){return c&&m(i),function(){p.current&&clearTimeout(p.current)}},[c,i,m]);var g=function(){p.current&&clearTimeout(p.current)},v=(0,u.useCallback)(function(){null!=i&&m(.5*i)},[i,m]);return(0,u.useEffect)(function(){if(!s&&c)return window.addEventListener("focus",v),window.addEventListener("blur",g),function(){window.removeEventListener("focus",v),window.removeEventListener("blur",g)}},[s,v,c]),(0,u.createElement)("div",Object.assign({ref:t},d,{className:Uj("notistack-Snackbar",r),onMouseEnter:function(e){d.onMouseEnter&&d.onMouseEnter(e),g()},onMouseLeave:function(e){d.onMouseLeave&&d.onMouseLeave(e),v()}}),n)});GM.displayName="Snackbar";var GO=Gg({root:((XZ={display:"flex",flexWrap:"wrap",flexGrow:1})[U2]={flexGrow:"initial",minWidth:"288px"},XZ)}),GT=(0,u.forwardRef)(function(e,t){var n=e.className,r=UQ(e,["className"]);return u.createElement("div",Object.assign({ref:t,className:Uj(GO.root,n)},r))});GT.displayName="SnackbarContent";var G_=Gg({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),GI="notistack-snackbar",GD=(0,u.forwardRef)(function(e,t){var n=e.id,r=e.message,i=e.action,o=e.iconVariant,s=e.variant,a=e.hideIconVariant,l=e.style,c=e.className,h=o[s],d=i;return"function"==typeof d&&(d=d(n)),u.createElement(GT,{ref:t,role:"alert","aria-describedby":GI,style:l,className:Uj("notistack-MuiContent","notistack-MuiContent-"+s,G_.root,G_[s],c,!a&&h&&G_.lessPadding)},u.createElement("div",{id:GI,className:G_.message},a?null:h,r),d&&u.createElement("div",{className:G_.action},d))});GD.displayName="MaterialDesignContent";var GR=(0,u.memo)(GD),GE=Gg({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),GP=function(e){var t,n=(0,u.useRef)(),r=(0,u.useState)(!0),i=r[0],o=r[1],s=GA([e.snack.onClose,e.onClose]),a=(0,u.useCallback)(function(){n.current=setTimeout(function(){o(function(e){return!e})},125)},[]);(0,u.useEffect)(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var l=e.snack,c=e.classes,h=e.Component,d=(0,u.useMemo)(function(){return Gw(c)},[c]),p=l.open,f=l.SnackbarProps,m=l.TransitionComponent,g=l.TransitionProps,v=l.transitionDuration,y=l.disableWindowBlurListener,b=l.content,x=UQ(l,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),w=UY({direction:"center"!==(t=x.anchorOrigin).horizontal?Gx[t.horizontal]:Gx[t.vertical],timeout:v},g),S=b;"function"==typeof S&&(S=S(x.id,x.message));var A=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var r;return UY({},t,((r={})[n]=GA([e.snack[n],e[n]],x.id),r))},{});return u.createElement(Gb,{in:i,onExited:A.onExited},u.createElement(GM,{open:p,id:x.id,disableWindowBlurListener:y,autoHideDuration:x.autoHideDuration,className:Uj(GE.wrappedRoot,d.root,d["anchorOrigin"+U3(x.anchorOrigin)]),SnackbarProps:f,onClose:s},u.createElement(m,Object.assign({},w,{appear:!0,in:p,onExit:A.onExit,onExited:a,onEnter:A.onEnter,onEntered:GA([A.onEntered,function(){e.snack.requestClose&&s(null,"instructed",e.snack.id)}],x.id)}),S||u.createElement(void 0===h?GR:h,Object.assign({},x)))))},GL=20,GN=6,GB=2,Gj="."+Gv,Gz=Gg({root:((XJ={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:Gl(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"})[Gj]={padding:GN+"px 0px",transition:"padding 300ms ease 0ms"},XJ.maxWidth="calc(100% - "+2*GL+"px)",XJ[U1]={width:"100%",maxWidth:"calc(100% - 32px)"},XJ),rootDense:((X0={})[Gj]={padding:GB+"px 0px"},X0),top:{top:GL-GN+"px",flexDirection:"column"},bottom:{bottom:GL-GN+"px",flexDirection:"column-reverse"},left:((X1={left:GL+"px"})[U2]={alignItems:"flex-start"},X1[U1]={left:"16px"},X1),right:((X2={right:GL+"px"})[U2]={alignItems:"flex-end"},X2[U1]={right:"16px"},X2),center:((X5={left:"50%",transform:"translateX(-50%)"})[U2]={alignItems:"center"},X5)}),G$=(0,u.memo)(function(e){var t=e.classes,n=void 0===t?{}:t,r=e.anchorOrigin,i=e.dense,o=e.children,s=Uj("notistack-SnackbarContainer",Gz[r.vertical],Gz[r.horizontal],Gz.root,n.containerRoot,n["containerAnchorOrigin"+U3(r)],i&&Gz.rootDense);return u.createElement("div",{className:s},o)}),GF=function(e){return!("string"==typeof e||(0,u.isValidElement)(e))},GV=function(e){function t(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw Error("enqueueSnackbar called with invalid argument");var r,i=GF(e)?e:t,o=GF(e)?e.message:e,s=i.key,a=i.preventDuplicate,l=UQ(i,["key","preventDuplicate"]),c=U4(s),u=c?s:new Date().getTime()+Math.random(),h=(r=n.props,function(e,t){return(void 0===t&&(t=!1),t)?UY({},Gp[e],{},r[e],{},l[e]):"autoHideDuration"===e?Gf(l.autoHideDuration,r.autoHideDuration):"transitionDuration"===e?Gm(l.transitionDuration,r.transitionDuration):l[e]||r[e]||Gp[e]}),d=UY({id:u},l,{message:o,open:!0,entered:!1,requestClose:!1,persist:h("persist"),action:h("action"),content:h("content"),variant:h("variant"),anchorOrigin:h("anchorOrigin"),disableWindowBlurListener:h("disableWindowBlurListener"),autoHideDuration:h("autoHideDuration"),hideIconVariant:h("hideIconVariant"),TransitionComponent:h("TransitionComponent"),transitionDuration:h("transitionDuration"),TransitionProps:h("TransitionProps",!0),iconVariant:h("iconVariant",!0),style:h("style",!0),SnackbarProps:h("SnackbarProps",!0),className:Uj(n.props.className,l.className)});return d.persist&&(d.autoHideDuration=void 0),n.setState(function(e){if(void 0===a&&n.props.preventDuplicate||a){var t=function(e){return c?e.id===u:e.message===o},r=e.queue.findIndex(t)>-1,i=e.snacks.findIndex(t)>-1;if(r||i)return e}return n.handleDisplaySnack(UY({},e,{queue:[].concat(e.queue,[d])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?UY({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,r=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&(r=!0);var i=e.snacks.map(function(e){return t||e.persist&&!r?UY({},e):(t=!0,e.entered)?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),UY({},e,{open:!1})):UY({},e,{requestClose:!0})});return UY({},e,{snacks:i})},n.handleEnteredSnack=function(e,t,r){if(!U4(r))throw Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===r?UY({},e,{entered:!0}):UY({},e)})}})},n.handleCloseSnack=function(e,t,r){n.props.onClose&&n.props.onClose(e,t,r);var i=void 0===r;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return i||e.id===r?e.entered?UY({},e,{open:!1}):UY({},e,{requestClose:!0}):UY({},e)}),queue:n.filter(function(e){return e.id!==r})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});U4(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!U4(t))throw Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var r=n.processQueue(UY({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===r.queue.length?r:n.handleDismissOldest(r)})},n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(UZ(n)),closeSnackbar:n.closeSnackbar.bind(UZ(n))}},n}return UK(t,e),t.prototype.render=function(){var e=this,t=this.state.contextValue,n=this.props,r=n.domRoot,i=n.children,o=n.dense,s=void 0!==o&&o,a=n.Components,l=void 0===a?{}:a,c=n.classes,h=this.state.snacks.reduce(function(e,t){var n,r=U3(t.anchorOrigin),i=e[r]||[];return UY({},e,((n={})[r]=[].concat(i,[t]),n))},{}),d=Object.keys(h).map(function(t){var n=h[t],r=n[0];return u.createElement(G$,{key:t,dense:s,anchorOrigin:r.anchorOrigin,classes:c},n.map(function(t){return u.createElement(GP,{key:t.id,snack:t,classes:c,Component:l[t.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:GA([e.handleExitedSnack,e.props.onExited],t.id),onEntered:GA([e.handleEnteredSnack,e.props.onEntered],t.id)})}))});return u.createElement(U0.Provider,{value:t},i,r?(0,nO.createPortal)(d,r):d)},UX(t,[{key:"maxSnack",get:function(){return this.props.maxSnack||Gp.maxSnack}}]),t}(u.Component);function GH(e){let t,n,r,i,o=(0,c.c)(7);return o[0]!==e?({children:t,...n}=e,o[0]=e,o[1]=t,o[2]=n):(t=o[1],n=o[2]),o[3]===Symbol.for("react.memo_cache_sentinel")?(r={error:(0,y.A)(GR)(GW)},o[3]=r):r=o[3],o[4]!==t||o[5]!==n?(i=(0,l.jsx)(GV,{...n,Components:r,children:t}),o[4]=t,o[5]=n,o[6]=i):i=o[6],i}function GW(){return{"&.notistack-MuiContent-error":{whiteSpace:"pre-wrap"}}}function GU(){let e,t,n=(0,c.c)(10),{enqueueSnackbar:r,closeSnackbar:i}=(0,u.useContext)(U0),o=GG(r,"error"),s=GG(r,"info"),a=GG(r,"warning"),l=GG(r,"success");n[0]!==o?(e=(e,t)=>o(e instanceof Error?e.message:`An unexpected error occurred: ${e}`,t),n[0]=o,n[1]=e):e=n[1];let h=e;return n[2]!==i||n[3]!==r||n[4]!==o||n[5]!==h||n[6]!==s||n[7]!==l||n[8]!==a?(t={enqueueSnackbar:r,closeSnackbar:i,errorSnackbar:o,infoSnackbar:s,warningSnackbar:a,successSnackbar:l,exceptionSnackbar:h},n[2]=i,n[3]=r,n[4]=o,n[5]=h,n[6]=s,n[7]=l,n[8]=a,n[9]=t):t=n[9],t}function GG(e,t){let n,r=(0,c.c)(3);return r[0]!==e||r[1]!==t?(n=(n,r)=>e(n,{...r,variant:t}),r[0]=e,r[1]=t,r[2]=n):n=r[2],n}var Gq=n("zu");function GX(e,t){return[Gq({type:"value",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>fo(e,t)}},e)]}function GY(e,t,n,r){let i=[],o=Gq({type:"value",position:"left",boundaryGap:[0,"10%"],axisLabel:{formatter:e=>fo(e,t),overflow:"truncate"}},e);i.push(o);let s=0;return n.forEach((t,n)=>{let o,a,l={type:"value",position:"right",offset:s,boundaryGap:[0,"10%"],axisLabel:{formatter:e=>fo(e,t)},splitLine:{show:!1},show:e?.show};i.push(l),r&&(s+=(o=fo(r[n]??1e3,t),((a=document.createElement("canvas").getContext("2d"))?(a.font="12px sans-serif",a.measureText(o).width):6*o.length)+10))}),i}function GK(e,t){let n,r=(0,c.c)(3),{value:i,setValueAndStore:o}=function(e,t,n){let r,i,o,s=(0,c.c)(10);s[0]!==n||s[1]!==t||s[2]!==e?(r=()=>{try{let n=e.getItem(t);if(null!==n)return JSON.parse(n)}catch{}return e.setItem(t,JSON.stringify(n)),n},s[0]=n,s[1]=t,s[2]=e,s[3]=r):r=s[3];let[a,l]=(0,u.useState)(r);s[4]!==t||s[5]!==e?(i=n=>{l(n),e.setItem(t,JSON.stringify(n))},s[4]=t,s[5]=e,s[6]=i):i=s[6];let h=i;return s[7]!==h||s[8]!==a?(o={value:a,setValue:l,setValueAndStore:h},s[7]=h,s[8]=a,s[9]=o):o=s[9],o}(window.localStorage,e,t);return r[0]!==o||r[1]!==i?(n=[i,o],r[0]=o,r[1]=i,r[2]=n):n=r[2],n}function GQ(e){return!!e?.startsWith("/")}function GZ(e){if(!e)throw Error("Input string cannot be empty");if(!GQ(e))return RegExp(`^${e}$`);let t=e.match(/^\/(.+)\/([gimy]*)$/);if(!t)throw Error(`Invalid regular expression format: ${e}`);let[,n="",r=""]=t;try{return new RegExp(n,r)}catch(e){throw Error(`Failed to create RegExp ${e}`,{cause:e})}}function GJ(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=cg(i,t);return n}function G0(e,t){let n={};for(let[r,i]of Object.entries(e))Array.isArray(i)?n[r]=i.map(e=>cg(e,t)):n[r]=function e(t,n){if(Array.isArray(t))return t.map(t=>e(t,n));for(let[e,r]of cm(t)){let i,o=n[e];if(!o)continue;let s=o.options??[],a=s.map(e=>e.value),l=Array.isArray(o.value),c=void 0!==o.customAllValue;if(l)i=o.value;else if(c)try{let e=GZ(o.customAllValue),t=s.filter(t=>e.test(t.value)).map(e=>e.value);i=t.length>0?t:a}catch{i=a}if(i&&(!r||r===cc.QUERYPARAM)){let o="$"+e,s=r?"${"+e+":"+r+"}":"${"+e+"}";return i.map(e=>{let r=t;return cg(r=(r=r.replaceAll(s,e)).replaceAll(o,e),n)})}}return cg(t,n)}(i,t);return n}function G1(e,t,n,r,i){let o=cM(e,t,{index:n,count:r}),s=o.text,a=[];return o.errors&&a.push(...o.errors.map(e=>e.replace("in data","in selection data"))),i&&(s=cg(s,i)),{text:s,errors:a.length>0?a:void 0}}function G2(e,t,n){let r=cO(e,t),i=r.text,o=[];return r.errors&&o.push(...r.errors.map(e=>e.replace("in data","in selection data"))),n&&(i=cg(i,n)),{text:i,errors:o.length>0?o:void 0}}function G5(e,t){let n=e.palette.text?.primary??"#222";return Gq({echartsTheme:{title:{show:!1},textStyle:{color:n,fontFamily:e.typography.fontFamily,fontSize:12},grid:{top:5,right:20,bottom:0,left:20,containLabel:!0},color:["#56B4E9","#009E73","#0072B2","#CC79A7","#F0E442","#E69F00","#D55E00"],categoryAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},timeAxis:{show:!0,axisLabel:{show:!0,color:n,margin:15},axisTick:{show:!1,length:6,lineStyle:{color:e.palette.grey[600]}},axisLine:{show:!0,lineStyle:{color:e.palette.grey[600]}},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.4}},splitArea:{show:!1,areaStyle:{color:[e.palette.grey[300]]}}},valueAxis:{show:!0,axisLabel:{color:n,margin:12},axisLine:{show:!1},splitLine:{show:!0,lineStyle:{width:.5,color:e.palette.grey[300],opacity:.6}}},legend:{orient:"horizontal",textStyle:{color:n},pageTextStyle:{color:e.palette.grey[600]},pageIconColor:e?.palette?.action?.active,pageIconInactiveColor:e?.palette?.action?.disabled},toolbox:{show:!0,top:10,right:10,iconStyle:{borderColor:n}},tooltip:{backgroundColor:e.palette.designSystem?.grey[800],borderColor:e.palette.designSystem?.grey[800],textStyle:{color:"#fff",fontSize:11}},axisPointer:{lineStyle:{color:e.palette.grey[500]}},markLine:{symbol:"none",symbolSize:0,itemStyle:{color:e.palette.grey[500]},lineStyle:{type:"dashed",width:1}},line:{showSymbol:!1,symbol:"circle",symbolSize:4,smooth:!1,lineStyle:{width:1},emphasis:{lineStyle:{width:1.5}}},bar:{barMaxWidth:150,itemStyle:{borderWidth:0,borderRadius:0,borderColor:e.palette.grey[300]},label:{show:!1,color:n}},gauge:{detail:{fontSize:18,fontWeight:600,valueAnimation:!1},splitLine:{distance:0,length:4,lineStyle:{width:1}},splitNumber:12}},noDataOption:{title:{show:!0,textStyle:{color:n,fontSize:16,fontWeight:400},text:"No data",left:"center",top:"center"},xAxis:{show:!1},yAxis:{show:!1}},sparkline:{width:2,color:"#1976d2"},container:{padding:{default:parseInt(e.spacing(1.5),10)}},thresholds:{defaultColor:e.palette.success.main,palette:["#FFCC00",e.palette.warning.main,e.palette.error.main]}},t)}function G3(e,t=[]){if(!t.length)return{value:e};let n={value:e};return t.forEach(t=>{switch(t.kind){case"Value":{let r=t.spec;String(r.value)===String(e)&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Range":{let r=t.spec;if(void 0===r.from&&void 0===r.to)break;let i=void 0!==r.from?r.from:-1/0,o=void 0!==r.to?r.to:1/0;e>=i&&e<=o&&(n.value=r.result.value||n.value,n.color=r.result.color);break}case"Regex":{let r=t.spec,i=e.toString();if(!r.pattern)break;let o=GZ(r.pattern);i.match(o)&&null!==r.result.value&&(n.value=i.replace(o,r.result.value.toString()||"")||n.value,n.color=r.result.color);break}case"Misc":{let r=t.spec;(function(e,t){switch(e){case"empty":return""===t;case"null":return null==t;case"NaN":return Number.isNaN(t);case"true":return!0===t;case"false":return!1===t;default:return!1}})(r.value,e)&&(n.value=r.result.value||n.value,n.color=r.result.color)}}}),n}function G4(e,t){if(0===t.length)return e;let n={};for(let r of e){let e=Object.keys(r).filter(e=>t.includes(e)).map(e=>r[e]).join("|"),i=n[e];i?n[e]={...i,...r}:n[e]={...r}}return Object.values(n)}function G6(e,t,n){let r=[];for(let i of e){let e=Object.keys(i).filter(e=>t.includes(e)),o={};for(let t of e)o[t]=i[t],delete i[t];for(let t of e)r.push({...i,[n]:o[t]});0===e.length&&r.push(i)}return r}function G9(e,t){let n=[];for(let r of e){let e=Object.keys(r).filter(e=>RegExp("^(("+t+" #\\d+)|("+t+"))$").test(e)),i={};for(let t of e)i[t]=r[t],delete r[t];for(let o of e)n.push({...r,[t]:i[o]});0===e.length&&n.push(r)}return n}function G8(e){let t=[...e],n=Array.from(new Set(e.flatMap(Object.keys).map(e=>e.replace(/ #\d+/,"")).filter(e=>"value"!==e)));for(let e of n)t=G9(t,e);return G4(t,n)}function G7(e,t){return e?.trim()||t}function qe(e,t){return Object.hasOwn(e,t)?t:Object.keys(e).find(e=>e===t||e.startsWith(t+" #")||e.startsWith(t+"#"))}function qt(e,t,n="timestamp",r="value",i){if(!t||0===e.length)return e;let o=G7(n,"timestamp"),s=G7(r,"value"),a=G7(i,o),l=new Set,c=new Map;for(let n of e){let e=qe(n,o),r=qe(n,t),i=qe(n,s);if(void 0===e||void 0===r)continue;let u=n[e],h=n[r];if(null==u||null==h)continue;let d=String(h).trim();if(!d)continue;d===a&&(d=`${d} (value)`),l.add(d);let p=String(u),f=c.get(p);f||(f={[a]:u},c.set(p,f)),void 0!==i&&(f[d]=n[i])}let u=[...l];u.sort((e,t)=>e.localeCompare(t));let h=[...c.entries()];return h.sort((e,t)=>{let n=e[1][a],r=t[1][a];return"number"==typeof n&&"number"==typeof r?r-n:String(r).localeCompare(String(n))}),h.map(([,e])=>{let t={[a]:e[a]};for(let n of u)Object.hasOwn(e,n)&&(t[n]=e[n]);return t})}function qn(e,t){let n,r=e;for(let e of t??[])if(!e.spec.disabled)switch(n=e.kind,e.kind){case"JoinByColumnValue":e.spec.columns&&e.spec.columns.length>0&&(r=G4(r,e.spec.columns));break;case"MergeIndexedColumns":e.spec.column&&(r=G9(r,e.spec.column));break;case"MergeColumns":e.spec.columns&&e.spec.columns.length>0&&e.spec.name&&(r=G6(r,e.spec.columns,e.spec.name));break;case"MergeSeries":r=G8(r);break;case"PivotByLabel":e.spec.columnLabel&&(r=qt(r,e.spec.columnLabel,G7(e.spec.rowField,"timestamp"),G7(e.spec.valueField,"value"),e.spec.rowColumnName))}return"PivotByLabel"===n?r:r=r.map(e=>Object.keys(e).toSorted().reduce((t,n)=>(t[n]=e[n],t),{}))}function qr(e){return"number"==typeof e}function qi(e){return!!e&&"object"==typeof e&&"function"==typeof e.constructor&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function qo(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function qs(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function qa(e){return e&&!0===e.constructor.prototype.isUnit||!1}function ql(e){return"string"==typeof e}var qc=Array.isArray;function qu(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function qh(e){return Array.isArray(e)||qu(e)}function qd(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function qp(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function qf(e){return e&&!0===e.constructor.prototype.isRange||!1}function qm(e){return e&&!0===e.constructor.prototype.isIndex||!1}function qg(e){return"boolean"==typeof e}function qv(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function qy(e){return e&&!0===e.constructor.prototype.isHelp||!1}function qb(e){return"function"==typeof e}function qx(e){return e instanceof Date}function qw(e){return e instanceof RegExp}function qS(e){return!!(e&&"object"==typeof e&&e.constructor===Object&&!qo(e)&&!qs(e))}function qA(e){return null===e}function qC(e){return void 0===e}function qk(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function qM(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function qO(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function qT(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function q_(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function qI(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function qD(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function qR(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function qE(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function qP(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function qL(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function qN(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function qB(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function qj(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function qz(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function q$(e){return e&&!0===e.constructor.prototype.isChain||!1}function qF(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":qi(e)?"BigNumber":qo(e)?"Complex":qs(e)?"Fraction":qu(e)?"Matrix":qa(e)?"Unit":qm(e)?"Index":qf(e)?"Range":qv(e)?"ResultSet":qP(e)?e.type:q$(e)?"Chain":qy(e)?"Help":"Object":"function"===t?"Function":t}function qV(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(function(e){return qV(e)});if(e instanceof Date)return new Date(e.valueOf());if(qi(e))return e;if(e instanceof RegExp)throw TypeError("Cannot clone "+e);return qH(e,qV)}function qH(e,t){var n={};for(var r in e)qG(e,r)&&(n[r]=t(e[r]));return n}function qW(e,t){var n,r,i;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,i=e.length;r<i;r++)if(!qW(e[r],t[r]))return!1;return!0}if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!qW(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}function qU(e,t,n){var r,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(r=n(),i=!1),r},set:function(e){r=e,i=!1},configurable:!0,enumerable:!0})}function qG(e,t){return e&&Object.hasOwnProperty.call(e,t)}function qq(e){return Object.keys(e).map(t=>e[t])}var qX=n("KcQ");function qY(e,t,n,r){function i(r){var i=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}(r,t.map(qQ));return function(e,t,n){if(!t.filter(e=>{var t;return!((t=e)&&"?"===t[0])}).every(e=>void 0!==n[e])){var r=t.filter(e=>void 0===n[e]);throw Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(r.map(e=>'"'.concat(e,'"')).join(", "),"."))}}(e,t,r),n(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function qK(e){return"function"==typeof e&&"string"==typeof e.fn&&Array.isArray(e.dependencies)}function qQ(e){return e&&"?"===e[0]?e.slice(1):e}function qZ(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}function qJ(e,t,n){var r="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!qZ(n))throw Error("size must be an integer");if(e>2**(n-1)-1||e<-(2**(n-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!qZ(e))throw Error("Value must be an integer");e<0&&(e+=2**n),r="i".concat(n)}var i="";return e<0&&(e=-e,i="-"),"".concat(i).concat({2:"0b",8:"0o",16:"0x"}[t]).concat(e.toString(t)).concat(r)}function q0(e,t){if("function"==typeof t)return t(e);if(1/0===e)return"Infinity";if(-1/0===e)return"-Infinity";if(isNaN(e))return"NaN";var n,r,i="auto";if(t&&(t.notation&&(i=t.notation),qr(t)?n=t:qr(t.precision)&&(n=t.precision),t.wordSize)&&"number"!=typeof(r=t.wordSize))throw Error('Option "wordSize" must be a number');switch(i){case"fixed":return q2(e,n);case"exponential":return q5(e,n);case"engineering":return function(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=q3(q1(e),t),r=n.exponent,i=n.coefficients,o=r%3==0?r:r<0?r-3-r%3:r-r%3;if(qr(t))for(;t>i.length||r-o+1>i.length;)i.push(0);else for(var s=Math.abs(r-o)-(i.length-1),a=0;a<s;a++)i.push(0);for(var l=Math.abs(r-o),c=1;l>0;)c++,l--;var u=i.slice(c).join(""),h=qr(t)&&u.length||u.match(/[1-9]/)?"."+u:"",d=i.slice(0,c).join("")+h+"e"+(r>=0?"+":"")+o.toString();return n.sign+d}(e,n);case"bin":return qJ(e,2,r);case"oct":return qJ(e,8,r);case"hex":return qJ(e,16,r);case"auto":return(function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=n&&void 0!==n.upperExp?n.upperExp:5,o=q1(e),s=t?q3(o,t):o;if(s.exponent<r||s.exponent>=i)return q5(e,t);var a=s.coefficients,l=s.exponent;a.length<t&&(a=a.concat(q4(t-a.length))),a=a.concat(q4(l-a.length+1+(a.length<t?t-a.length:0))),a=q4(-l).concat(a);var c=l>0?l:0;return c<a.length-1&&a.splice(c+1,0,"."),s.sign+a.join("")})(e,n,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function q1(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw SyntaxError("Invalid number "+e);var n=t[1],r=t[2],i=parseFloat(t[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var s=r.replace(".","").replace(/^0*/,function(e){return i-=e.length,""}).replace(/0*$/,"").split("").map(function(e){return parseInt(e)});return 0===s.length&&(s.push(0),i++),{sign:n,coefficients:s,exponent:i}}function q2(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=q1(e),r="number"==typeof t?q3(n,n.exponent+1+t):n,i=r.coefficients,o=r.exponent+1,s=o+(t||0);return i.length<s&&(i=i.concat(q4(s-i.length))),o<0&&(i=q4(-o+1).concat(i),o=1),o<i.length&&i.splice(o,0,0===o?"0.":"."),r.sign+i.join("")}function q5(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=q1(e),r=t?q3(n,t):n,i=r.coefficients,o=r.exponent;i.length<t&&(i=i.concat(q4(t-i.length)));var s=i.shift();return r.sign+s+(i.length>0?"."+i.join(""):"")+"e"+(o>=0?"+":"")+o}function q3(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&r.splice(t,r.length-t)[0]>=5){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}return n}function q4(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}var q6=Number.EPSILON||2220446049250313e-31;function q9(e,t,n){if(null==n)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<q6||r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function q8(e,t,n){var r=new e.constructor(2),i="";if(n){if(n<1)throw Error("size must be in greater than 0");if(!qZ(n))throw Error("size must be an integer");if(e.greaterThan(r.pow(n-1).sub(1))||e.lessThan(r.pow(n-1).mul(-1)))throw Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw Error("Value must be an integer");e.lessThan(0)&&(e=e.add(r.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw Error("Base ".concat(t," not supported "))}}function q7(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function Xe(e,t){var n=function(e,t){var n;if("number"==typeof e)return q0(e,t);if(qi(e))return function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto";if(void 0!==t&&(t.notation&&(n=t.notation),"number"==typeof t?h=t:t.precision&&(h=t.precision),t.wordSize)&&"number"!=typeof(d=t.wordSize))throw Error('Option "wordSize" must be a number');switch(n){case"fixed":return r=e,i=h,r.toFixed(i);case"exponential":return q7(e,h);case"engineering":return o=e,s=h,l=(a=o.e)%3==0?a:a<0?a-3-a%3:a-a%3,-1!==(u=(c=o.mul(Math.pow(10,-l))).toPrecision(s)).indexOf("e")&&(u=c.toString()),u+"e"+(a>=0?"+":"")+l.toString();case"bin":return q8(e,2,d);case"oct":return q8(e,8,d);case"hex":return q8(e,16,d);case"auto":var r,i,o,s,a,l,c,u,h,d,p=t&&void 0!==t.lowerExp?t.lowerExp:-3,f=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var m=e.toSignificantDigits(h),g=m.e;return(g>=p&&g<f?m.toFixed():q7(e,h)).replace(/((\.\d*?)(0+))($|e)/,function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t});default:throw Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(e,t);if((n=e)&&"object"==typeof n&&"number"==typeof n.s&&"number"==typeof n.n&&"number"==typeof n.d)if(!t||"decimal"!==t.fraction)return e.s*e.n+"/"+e.d;else return e.toString();if(Array.isArray(e))return function e(t,n){if(!Array.isArray(t))return Xe(t,n);for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}(e,t);if(ql(e))return'"'+e+'"';if("function"==typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"==typeof e)if("function"==typeof e.format)return e.format(t);else return e&&e.toString(t)!==({}).toString()?e.toString(t):"{"+Object.keys(e).map(n=>'"'+n+'": '+Xe(e[n],t)).join(", ")+"}";return String(e)}(e,t);return t&&"object"==typeof t&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function Xt(e,t,n){if(!(this instanceof Xt))throw SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=Error().stack}function Xn(e,t,n){if(!(this instanceof Xn))throw SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=Error().stack}function Xr(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function Xi(e,t){if(0===t.length){if(Array.isArray(e))throw new Xt(e.length,0)}else!function e(t,n,r){var i,o=t.length;if(o!==n[r])throw new Xt(o,n[r]);if(r<n.length-1){var s=r+1;for(i=0;i<o;i++){if(!Array.isArray(t[i]))throw new Xt(n.length-1,n.length,"<");e(t[i],n,s)}}else for(i=0;i<o;i++)if(Array.isArray(t[i]))throw new Xt(n.length+1,n.length,">")}(e,t,0)}function Xo(e,t){if(!qr(e)||!qZ(e))throw TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&e>=t)throw new Xn(e,t)}function Xs(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw Error("Resizing to scalar is not supported");return t.forEach(function(e){if(!qr(e)||!qZ(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+Xe(t)+")")}),function e(t,n,r,i){var o,s,a=t.length,l=n[r],c=Math.min(a,l);if(t.length=l,r<n.length-1){var u=r+1;for(o=0;o<c;o++)Array.isArray(s=t[o])||(s=[s],t[o]=s),e(s,n,u,i);for(o=c;o<l;o++)s=[],t[o]=s,e(s,n,u,i)}else{for(o=0;o<c;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=c;o<l;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function Xa(e,t){var n=Xl(e),r=e.slice(),i=e.indexOf(-1);if(e.indexOf(-1,i+1)>=0)throw Error("More than one wildcard in sizes");if(i>=0)if(t%n==0)r[i]=-t/n;else throw Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function Xl(e){return e.reduce((e,t)=>e*t,1)}function Xc(e,t,n,r){var i=r||Xr(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var s=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,s)}else for(var a=r;a<n;a++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function Xu(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],s=Array.isArray(o);if(0===i&&s&&(r=o.length),s&&o.length!==r)return;var a=s?Xu(o,t):t(o);if(void 0===n)n=a;else if(n!==a)return"mixed"}return n}function Xh(e,t){return -1!==e.indexOf(t)}function Xd(e,t,n,r){if(!(this instanceof Xd))throw SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(null!=r?"-"+r:"")+" expected)",this.stack=Error().stack}Xt.prototype=RangeError(),Xt.prototype.constructor=RangeError,Xt.prototype.name="DimensionError",Xt.prototype.isDimensionError=!0,Xn.prototype=RangeError(),Xn.prototype.constructor=RangeError,Xn.prototype.name="IndexError",Xn.prototype.isIndexError=!0,Xd.prototype=Error(),Xd.prototype.constructor=Error,Xd.prototype.name="ArgumentsError",Xd.prototype.isArgumentsError=!0;var Xp={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null},Xf=["Matrix","Array"],Xm=["number","BigNumber","Fraction"];function Xg(e,t,n){var r;void 0!==e[t]&&(r=e[t],-1===n.indexOf(r))&&console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+n.map(e=>JSON.stringify(e)).join(", ")+".")}function Xv(e,t){var n,r,i,o=(0,PN.A)({},Xp,t);if("function"!=typeof Object.create)throw Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var s=((n={isNumber:qr,isComplex:qo,isBigNumber:qi,isFraction:qs,isUnit:qa,isString:ql,isArray:qc,isMatrix:qu,isCollection:qh,isDenseMatrix:qd,isSparseMatrix:qp,isRange:qf,isIndex:qm,isBoolean:qg,isResultSet:qv,isHelp:qy,isFunction:qb,isDate:qx,isRegExp:qw,isObject:qS,isNull:qA,isUndefined:qC,isAccessorNode:qk,isArrayNode:qM,isAssignmentNode:qO,isBlockNode:qT,isConditionalNode:q_,isConstantNode:qI,isFunctionAssignmentNode:qD,isFunctionNode:qR,isIndexNode:qE,isNode:qP,isObjectNode:qL,isOperatorNode:qN,isParenthesisNode:qB,isRangeNode:qj,isSymbolNode:qz,isChain:q$}).on=(r=new qX).on.bind(r),n.off=r.off.bind(r),n.once=r.once.bind(r),n.emit=r.emit.bind(r),n);s.config=function(e,t){function n(n){if(!n)return qH(e,qV);var r=qH(e,qV);Xg(n,"matrix",Xf),Xg(n,"number",Xm),function e(t,n){if(Array.isArray(n))throw TypeError("Arrays are not supported by deepExtend");for(var r in n)if(qG(n,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r]&&t[r].constructor===Object?e(t[r],n[r]):t[r]=n[r];else if(Array.isArray(n[r]))throw TypeError("Arrays are not supported by deepExtend");else t[r]=n[r];return t}(e,n);var i=qH(e,qV);return t("config",i,r,qH(n,qV)),i}return n.MATRIX_OPTIONS=Xf,n.NUMBER_OPTIONS=Xm,Object.keys(Xp).forEach(t=>{Object.defineProperty(n,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),n}(o,s.emit),s.expression={transform:{},mathWithTransform:{config:s.config}};var a={},l=function(e,t,n){function r(e,n){n&&"function"==typeof n.transform?(t.expression.transform[e]=n.transform,qG(l,e)||(t.expression.mathWithTransform[e]=n.transform)):(delete t.expression.transform[e],qG(l,e)||(t.expression.mathWithTransform[e]=n))}function i(e){delete t.expression.transform[e],qG(l,e)?delete t.expression.mathWithTransform[e]:t.expression.mathWithTransform[e]=t[e]}function o(e){return"function"==typeof e&&"object"==typeof e.signatures}function s(e){return -1===e.fn.indexOf(".")&&!qG(l,e.fn)&&(!e.meta||!e.meta.isClass)}function a(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction}var l={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function(l,c){var u=arguments.length;if(1!==u&&2!==u)throw new Xd("import",u,1,2);c||(c={});var h={};for(var d in!function e(t,n,r){if(Array.isArray(n))n.forEach(n=>e(t,n));else if("object"==typeof n)for(var i in n)qG(n,i)&&e(t,n[i],i);else if(qK(n)||void 0!==r){var o=qK(n)?a(n)?n.fn+".transform":n.fn:r;if(qG(t,o)&&t[o]!==n&&!c.silent)throw Error('Cannot import "'+o+'" twice');t[o]=n}else if(!c.silent)throw TypeError("Factory, Object, or Array expected")}(h,l),h)if(qG(h,d)){var p,f=h[d];if(qK(f))!function(r,l){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.fn;if(Xh(c,"."))throw Error("Factory name should not contain a nested path. Name: "+JSON.stringify(c));var u=a(r)?t.expression.transform:t,h=c in t.expression.transform,d=qG(u,c)?u[c]:void 0,p=function(){var n={};r.dependencies.map(qQ).forEach(e=>{if(Xh(e,"."))throw Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?n.math=t:"mathWithTransform"===e?n.mathWithTransform=t.expression.mathWithTransform:"classes"===e?n.classes=t:n[e]=t[e]});var i=r(n);if(i&&"function"==typeof i.transform)throw Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===d||l.override)return i;if(o(d)&&o(i))return e(d,i);if(l.silent)return d;throw Error('Cannot import "'+c+'": already exists')};r.meta&&!1===r.meta.lazy?(u[c]=p(),d&&h?i(c):(a(r)||s(r))&&qU(t.expression.mathWithTransform,c,()=>u[c])):(qU(u,c,p),d&&h?i(c):(a(r)||s(r))&&qU(t.expression.mathWithTransform,c,()=>u[c])),n[c]=r,t.emit("import",c,p)}(f,c);else{if("function"==typeof(p=f)||"number"==typeof p||"string"==typeof p||"boolean"==typeof p||null===p||qa(p)||qo(p)||qi(p)||qs(p)||qu(p)||Array.isArray(p))!function(i,s,a){var l;if(a.wrap&&"function"==typeof s&&(s=function(e){var n=function(){for(var n=[],r=0,i=arguments.length;r<i;r++){var o=arguments[r];n[r]=o&&o.valueOf()}return e.apply(t,n)};return e.transform&&(n.transform=e.transform),n}(s)),"function"==typeof(l=s)&&"string"==typeof l.signature&&(s=e(i,{[s.signature]:s})),o(t[i])&&o(s)){s=a.override?e(i,s.signatures):e(t[i],s),t[i]=s,delete n[i],r(i,s),t.emit("import",i,function(){return s});return}if(void 0===t[i]||a.override){t[i]=s,delete n[i],r(i,s),t.emit("import",i,function(){return s});return}if(!a.silent)throw Error('Cannot import "'+i+'": already exists')}(d,f,c);else if(!c.silent)throw TypeError("Factory, Object, or Array expected")}}}}(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return s.typed.apply(s.typed,t)},s,a);return s.import=l,s.on("config",()=>{qq(a).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&l(e,{override:!0})})}),s.create=Xv.bind(null,e),s.factory=qY,s.import(qq((function e(t,n){for(var r in t)if(qG(t,r)){var i=t[r];"object"==typeof i&&null!==i?e(i,n):n[r]=i}}(e,i={}),i))),s.ArgumentsError=Xd,s.DimensionError=Xt,s.IndexError=Xn,s}var Xy,Xb,Xx,Xw,XS,XA,XC,Xk,XM,XO,XT,X_,XI,XD,XR,XE,XP,XL,XN,XB,Xj,Xz,X$,XF,XV,XH,XW,XU,XG,Xq,XX,XY,XK,XQ,XZ,XJ,X0,X1,X2,X5,X3,X4,X6="0123456789abcdef",X9="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",X8="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",X7={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},Ye=!0,Yt="[DecimalError] ",Yn=Yt+"Invalid argument: ",Yr=Yt+"Precision limit exceeded",Yi=Yt+"crypto unavailable",Yo="[object Decimal]",Ys=Math.floor,Ya=Math.pow,Yl=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Yc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Yu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Yh=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yd=X9.length-1,Yp=X8.length-1,Yf={toStringTag:Yo};function Ym(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=YM(n)),o+=r;(n=7-(r=(s=e[t])+"").length)&&(o+=YM(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function Yg(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Yn+e)}function Yv(e,t,n,r){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Ya(10,7-t),a=e[i]%o|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Ya(10,t-2)-1||(a==o/2||0==a)&&(e[i+1]/o/100|0)==0:t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),s=(r||n<4)&&9999==a||!r&&n>3&&4999==a):s=((r||n<4)&&a+1==o||!r&&n>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Ya(10,t-3)-1,s}function Yy(e,t,n){for(var r,i,o=[0],s=0,a=e.length;s<a;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=X6.indexOf(e.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Yf.absoluteValue=Yf.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Yx(e)},Yf.ceil=function(){return Yx(new this.constructor(this),this.e+1,2)},Yf.clampedTo=Yf.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(0/0);if(e.gt(t))throw Error(Yn+t);return 0>this.cmp(e)?e:this.cmp(t)>0?t:new n(this)},Yf.comparedTo=Yf.cmp=function(e){var t,n,r,i,o=this.d,s=(e=new this.constructor(e)).d,a=this.s,l=e.s;if(!o||!s)return a&&l?a!==l?a:o===s?0:!o^a<0?1:-1:0/0;if(!o[0]||!s[0])return o[0]?a:s[0]?-l:0;if(a!==l)return a;if(this.e!==e.e)return this.e>e.e^a<0?1:-1;for(r=o.length,t=0,n=r<(i=s.length)?r:i;t<n;++t)if(o[t]!==s[t])return o[t]>s[t]^a<0?1:-1;return r===i?0:r>i^a<0?1:-1},Yf.cosine=Yf.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/YL(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10"),e.precision+=n,t=YP(e,1,t.times(i),new e(1));for(var o=n;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=n,t}(r,YN(r,n)),r.precision=e,r.rounding=t,Yx(2==X4||3==X4?n.neg():n,e,t,!0)):new r(1):new r(0/0)},Yf.cubeRoot=Yf.cbrt=function(){var e,t,n,r,i,o,s,a,l,c,u=this.constructor;if(!this.isFinite()||this.isZero())return new u(this);for(Ye=!1,(o=this.s*Ya(this.s*this,1/3))&&1/0!=Math.abs(o)?r=new u(o.toString()):(n=Ym(this.d),(o=((e=this.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Ya(n,1/3),e=Ys((e+1)/3)-(e%3==(e<0?-1:2)),(r=new u(n=1/0==o?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=this.s),s=(e=u.precision)+3;;)if(r=Yb((c=(l=(a=r).times(a).times(a)).plus(this)).plus(this).times(a),c.plus(l),s+2,1),Ym(a.d).slice(0,s)===(n=Ym(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(Yx(r,e+1,1),t=!r.times(r).times(r).eq(this));break}if(!i&&(Yx(a,e+1,0),a.times(a).times(a).eq(this))){r=a;break}s+=4,i=1}return Ye=!0,Yx(r,e,u.rounding,t)},Yf.decimalPlaces=Yf.dp=function(){var e,t=this.d,n=0/0;if(t){if(n=((e=t.length-1)-Ys(this.e/7))*7,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},Yf.dividedBy=Yf.div=function(e){return Yb(this,new this.constructor(e))},Yf.dividedToIntegerBy=Yf.divToInt=function(e){var t=this.constructor;return Yx(Yb(this,new t(e),0,1,1),t.precision,t.rounding)},Yf.equals=Yf.eq=function(e){return 0===this.cmp(e)},Yf.floor=function(){return Yx(new this.constructor(this),this.e+1,3)},Yf.greaterThan=Yf.gt=function(e){return this.cmp(e)>0},Yf.greaterThanOrEqualTo=Yf.gte=function(e){var t=this.cmp(e);return 1==t||0===t},Yf.hyperbolicCosine=Yf.cosh=function(){var e,t,n,r,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:0/0);if(o.isZero())return a;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?t=(1/YL(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=YP(s,1,o.times(t),new s(1),!0);for(var l,c=e,u=new s(8);c--;)l=o.times(o),o=a.minus(l.times(u.minus(l.times(u))));return Yx(o,s.precision=n,s.rounding=r,!0)},Yf.hyperbolicSine=Yf.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=YP(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=YP(o,2,i=i.times(1/YL(5,e)),i,!0);for(var s,a=new o(5),l=new o(16),c=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(c))))}return o.precision=t,o.rounding=n,Yx(i,t,n,!0)},Yf.hyperbolicTangent=Yf.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,Yb(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},Yf.inverseCosine=Yf.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return -1!==n?0===n?e.isNeg()?YC(t,r,i):new t(0):new t(0/0):e.isZero()?YC(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=i,e.times(2))},Yf.inverseHyperbolicCosine=Yf.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:0/0):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Ye=!1,n=n.times(n).minus(1).sqrt().plus(n),Ye=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},Yf.inverseHyperbolicSine=Yf.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Ye=!1,n=n.times(n).plus(1).sqrt().plus(n),Ye=!0,r.precision=e,r.rounding=t,n.ln())},Yf.inverseHyperbolicTangent=Yf.atanh=function(){var e,t,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:0/0):(e=o.precision,t=o.rounding,Math.max(r=i.sd(),e)<-(2*i.e)-1)?Yx(new o(i),e,t,!0):(o.precision=n=r-i.e,i=Yb(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5)):new o(0/0)},Yf.inverseSine=Yf.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t)?0===t?((e=YC(o,n+4,r).times(.5)).s=i.s,e):new o(0/0):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2))},Yf.inverseTangent=Yf.atan=function(){var e,t,n,r,i,o,s,a,l,c=this,u=c.constructor,h=u.precision,d=u.rounding;if(c.isFinite()){if(c.isZero())return new u(c);else if(c.abs().eq(1)&&h+4<=Yp)return(s=YC(u,h+4,d).times(.25)).s=c.s,s}else{if(!c.s)return new u(0/0);if(h+4<=Yp)return(s=YC(u,h+4,d).times(.5)).s=c.s,s}for(u.precision=a=h+10,u.rounding=1,e=n=Math.min(28,a/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Ye=!1,t=Math.ceil(a/7),r=1,l=c.times(c),s=new u(c),i=c;-1!==e;)if(i=i.times(l),o=s.minus(i.div(r+=2)),i=i.times(l),void 0!==(s=o.plus(i.div(r+=2))).d[t])for(e=t;s.d[e]===o.d[e]&&e--;);return n&&(s=s.times(2<<n-1)),Ye=!0,Yx(s,u.precision=h,u.rounding=d,!0)},Yf.isFinite=function(){return!!this.d},Yf.isInteger=Yf.isInt=function(){return!!this.d&&Ys(this.e/7)>this.d.length-2},Yf.isNaN=function(){return!this.s},Yf.isNegative=Yf.isNeg=function(){return this.s<0},Yf.isPositive=Yf.isPos=function(){return this.s>0},Yf.isZero=function(){return!!this.d&&0===this.d[0]},Yf.lessThan=Yf.lt=function(e){return 0>this.cmp(e)},Yf.lessThanOrEqualTo=Yf.lte=function(e){return 1>this.cmp(e)},Yf.logarithm=Yf.log=function(e){var t,n,r,i,o,s,a,l=this.constructor,c=l.precision,u=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(0/0);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new l(n&&!n[0]?-1/0:1!=this.s?0/0:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(r=n[0];r%10==0;)r/=10;i=1!==r}if(Ye=!1,Yv((a=Yb(o=YD(this,s=c+5),t?YA(l,s+10):YD(e,s),s,1)).d,r=c,u))do if(s+=10,a=Yb(o=YD(this,s),t?YA(l,s+10):YD(e,s),s,1),!i){+Ym(a.d).slice(r+1,r+15)+1==1e14&&(a=Yx(a,c+1,0));break}while(Yv(a.d,r+=10,u))return Ye=!0,Yx(a,c,u)},Yf.minus=Yf.sub=function(e){var t,n,r,i,o,s,a,l,c,u,h,d,p=this.constructor;if(e=new p(e),!this.d||!e.d)return this.s&&e.s?this.d?e.s=-e.s:e=new p(e.d||this.s!==e.s?this:0/0):e=new p(0/0),e;if(this.s!=e.s)return e.s=-e.s,this.plus(e);if(c=this.d,d=e.d,a=p.precision,l=p.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else{if(!c[0])return new p(3===l?-0:0);e=new p(this)}return Ye?Yx(e,a,l):e}if(n=Ys(e.e/7),u=Ys(this.e/7),c=c.slice(),o=u-n){for((h=o<0)?(t=c,o=-o,s=d.length):(t=d,n=u,s=c.length),o>(r=Math.max(Math.ceil(a/7),s)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((h=(r=c.length)<(s=d.length))&&(s=r),r=0;r<s;r++)if(c[r]!=d[r]){h=c[r]<d[r];break}o=0}for(h&&(t=c,c=d,d=t,e.s=-e.s),s=c.length,r=d.length-s;r>0;--r)c[s++]=0;for(r=d.length;r>o;){if(c[--r]<d[r]){for(i=r;i&&0===c[--i];)c[i]=1e7-1;--c[i],c[r]+=1e7}c[r]-=d[r]}for(;0===c[--s];)c.pop();for(;0===c[0];c.shift())--n;return c[0]?(e.d=c,e.e=YS(c,n),Ye?Yx(e,a,l):e):new p(3===l?-0:0)},Yf.modulo=Yf.mod=function(e){var t,n=this.constructor;return(e=new n(e),this.d&&e.s&&(!e.d||e.d[0]))?e.d&&(!this.d||this.d[0])?(Ye=!1,9==n.modulo?(t=Yb(this,e.abs(),0,3,1),t.s*=e.s):t=Yb(this,e,0,n.modulo,1),t=t.times(e),Ye=!0,this.minus(t)):Yx(new n(this),n.precision,n.rounding):new n(0/0)},Yf.naturalExponential=Yf.exp=function(){return YI(this)},Yf.naturalLogarithm=Yf.ln=function(){return YD(this)},Yf.negated=Yf.neg=function(){var e=new this.constructor(this);return e.s=-e.s,Yx(e)},Yf.plus=Yf.add=function(e){var t,n,r,i,o,s,a,l,c,u,h=this.constructor;if(e=new h(e),!this.d||!e.d)return this.s&&e.s?this.d||(e=new h(e.d||this.s===e.s?this:0/0)):e=new h(0/0),e;if(this.s!=e.s)return e.s=-e.s,this.minus(e);if(c=this.d,u=e.d,a=h.precision,l=h.rounding,!c[0]||!u[0])return u[0]||(e=new h(this)),Ye?Yx(e,a,l):e;if(o=Ys(this.e/7),r=Ys(e.e/7),c=c.slice(),i=o-r){for(i<0?(n=c,i=-i,s=u.length):(n=u,r=o,s=c.length),i>(s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((s=c.length)-(i=u.length)<0&&(i=s,n=u,u=c,c=n),t=0;i;)t=(c[--i]=c[i]+u[i]+t)/1e7|0,c[i]%=1e7;for(t&&(c.unshift(t),++r),s=c.length;0==c[--s];)c.pop();return e.d=c,e.e=YS(c,r),Ye?Yx(e,a,l):e},Yf.precision=Yf.sd=function(e){var t;if(void 0!==e&&!!e!==e&&1!==e&&0!==e)throw Error(Yn+e);return this.d?(t=Yk(this.d),e&&this.e+1>t&&(t=this.e+1)):t=0/0,t},Yf.round=function(){var e=this.constructor;return Yx(new e(this),this.e+1,e.rounding)},Yf.sine=Yf.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:YP(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=YP(e,2,t=t.times(1/YL(5,n)),t);for(var i,o=new e(5),s=new e(16),a=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}(r,YN(r,n)),r.precision=e,r.rounding=t,Yx(X4>2?n.neg():n,e,t,!0)):new r(0/0)},Yf.squareRoot=Yf.sqrt=function(){var e,t,n,r,i,o,s=this.d,a=this.e,l=this.s,c=this.constructor;if(1!==l||!s||!s[0])return new c(!l||l<0&&(!s||s[0])?0/0:s?this:1/0);for(Ye=!1,0==(l=Math.sqrt(+this))||1/0==l?(((t=Ym(s)).length+a)%2==0&&(t+="0"),l=Math.sqrt(t),a=Ys((a+1)/2)-(a<0||a%2),r=new c(t=1/0==l?"5e"+a:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new c(l.toString()),n=(a=c.precision)+3;;)if(r=(o=r).plus(Yb(this,o,n+2,1)).times(.5),Ym(o.d).slice(0,n)===(t=Ym(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(Yx(r,a+1,1),e=!r.times(r).eq(this));break}if(!i&&(Yx(o,a+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return Ye=!0,Yx(r,a,c.rounding,e)},Yf.tangent=Yf.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=Yb(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,Yx(2==X4||4==X4?n.neg():n,e,t,!0)):new r(0/0)},Yf.times=Yf.mul=function(e){var t,n,r,i,o,s,a,l,c,u=this.constructor,h=this.d,d=(e=new u(e)).d;if(e.s*=this.s,!h||!h[0]||!d||!d[0])return new u(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?0/0:!h||!d?e.s/0:0*e.s);for(n=Ys(this.e/7)+Ys(e.e/7),(l=h.length)<(c=d.length)&&(o=h,h=d,d=o,s=l,l=c,c=s),o=[],r=s=l+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)a=o[i]+d[r]*h[i-r-1]+t,o[i--]=a%1e7|0,t=a/1e7|0;o[i]=(o[i]+t)%1e7|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=YS(o,n),Ye?Yx(e,u.precision,u.rounding):e},Yf.toBinary=function(e,t){return YB(this,2,e,t)},Yf.toDecimalPlaces=Yf.toDP=function(e,t){var n=this,r=n.constructor;return(n=new r(n),void 0===e)?n:(Yg(e,0,1e9),void 0===t?t=r.rounding:Yg(t,0,8),Yx(n,e+n.e+1,t))},Yf.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Yw(r,!0):(Yg(e,0,1e9),void 0===t?t=i.rounding:Yg(t,0,8),n=Yw(r=Yx(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Yf.toFixed=function(e,t){var n,r,i=this.constructor;return void 0===e?n=Yw(this):(Yg(e,0,1e9),void 0===t?t=i.rounding:Yg(t,0,8),n=Yw(r=Yx(new i(this),e+this.e+1,t),!1,e+r.e+1)),this.isNeg()&&!this.isZero()?"-"+n:n},Yf.toFraction=function(e){var t,n,r,i,o,s,a,l,c,u,h,d,p=this.d,f=this.constructor;if(!p)return new f(this);if(c=n=new f(1),r=l=new f(0),s=(o=(t=new f(r)).e=Yk(p)-this.e-1)%7,t.d[0]=Ya(10,s<0?7+s:s),null==e)e=o>0?t:c;else{if(!(a=new f(e)).isInt()||a.lt(c))throw Error(Yn+a);e=a.gt(t)?o>0?t:c:a}for(Ye=!1,a=new f(Ym(p)),u=f.precision,f.precision=o=7*p.length*2;h=Yb(a,t,0,1,1),1!=(i=n.plus(h.times(r))).cmp(e);)n=r,r=i,i=c,c=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=Yb(e.minus(n),r,0,1,1),l=l.plus(i.times(c)),n=n.plus(i.times(r)),l.s=c.s=this.s,d=1>Yb(c,r,o,1).minus(this).abs().cmp(Yb(l,n,o,1).minus(this).abs())?[c,r]:[l,n],f.precision=u,Ye=!0,d},Yf.toHexadecimal=Yf.toHex=function(e,t){return YB(this,16,e,t)},Yf.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:Yg(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Ye=!1,n=Yb(n,e,0,t,1).times(e),Ye=!0,Yx(n)):(e.s=n.s,n=e),n},Yf.toNumber=function(){return+this},Yf.toOctal=function(e,t){return YB(this,8,e,t)},Yf.toPower=Yf.pow=function(e){var t,n,r,i,o,s,a=this,l=a.constructor,c=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Ya(+a,c));if((a=new l(a)).eq(1))return a;if(r=l.precision,o=l.rounding,e.eq(1))return Yx(a,r,o);if((t=Ys(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=0x1fffffffffffff)return i=YO(l,a,n,r),e.s<0?new l(1).div(i):Yx(i,r,o);if((s=a.s)<0){if(t<e.d.length-1)return new l(0/0);if((1&e.d[t])==0&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(t=0!=(n=Ya(+a,c))&&isFinite(n)?new l(n+"").e:Ys(c*(Math.log("0."+Ym(a.d))/Math.LN10+a.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?s/0:0):(Ye=!1,l.rounding=a.s=1,n=Math.min(12,(t+"").length),(i=YI(e.times(YD(a,r+n)),r)).d&&Yv((i=Yx(i,r+5,1)).d,r,o)&&(t=r+10,+Ym((i=Yx(YI(e.times(YD(a,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=Yx(i,r+1,0))),i.s=s,Ye=!0,l.rounding=o,Yx(i,r,o))},Yf.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=Yw(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Yg(e,1,1e9),void 0===t?t=i.rounding:Yg(t,0,8),n=Yw(r=Yx(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},Yf.toSignificantDigits=Yf.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(Yg(e,1,1e9),void 0===t?t=n.rounding:Yg(t,0,8)),Yx(new n(this),e,t)},Yf.toString=function(){var e=this.constructor,t=Yw(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+t:t},Yf.truncated=Yf.trunc=function(){return Yx(new this.constructor(this),this.e+1,1)},Yf.valueOf=Yf.toJSON=function(){var e=this.constructor,t=Yw(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+t:t};var Yb=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=+(e[n]<t[n]),e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s,a,l){var c,u,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O,T,_=r.constructor,I=r.s==i.s?1:-1,D=r.d,R=i.d;if(!D||!D[0]||!R||!R[0])return new _(!r.s||!i.s||(D?R&&D[0]==R[0]:!R)?0/0:D&&0==D[0]||!R?0*I:I/0);for(l?(p=1,u=r.e-i.e):(l=1e7,p=7,u=Ys(r.e/p)-Ys(i.e/p)),O=R.length,k=D.length,y=(v=new _(I)).d=[],h=0;R[h]==(D[h]||0);h++);if(R[h]>(D[h]||0)&&u--,null==o?(S=o=_.precision,s=_.rounding):S=a?o+(r.e-i.e)+1:o,S<0)y.push(1),f=!0;else{if(S=S/p+2|0,h=0,1==O){for(d=0,R=R[0],S++;(h<k||d)&&S--;h++)A=d*l+(D[h]||0),y[h]=A/R|0,d=A%R|0;f=d||h<k}else{for((d=l/(R[0]+1)|0)>1&&(R=e(R,d,l),D=e(D,d,l),O=R.length,k=D.length),C=O,x=(b=D.slice(0,O)).length;x<O;)b[x++]=0;(T=R.slice()).unshift(0),M=R[0],R[1]>=l/2&&++M;do d=0,(c=t(R,b,O,x))<0?(w=b[0],O!=x&&(w=w*l+(b[1]||0)),(d=w/M|0)>1?(d>=l&&(d=l-1),g=(m=e(R,d,l)).length,x=b.length,1==(c=t(m,b,g,x))&&(d--,n(m,O<g?T:R,g,l))):(0==d&&(c=d=1),m=R.slice()),(g=m.length)<x&&m.unshift(0),n(b,m,x,l),-1==c&&(x=b.length,(c=t(R,b,O,x))<1&&(d++,n(b,O<x?T:R,x,l))),x=b.length):0===c&&(d++,b=[0]),y[h++]=d,c&&b[0]?b[x++]=D[C]||0:(b=[D[C]],x=1);while((C++<k||void 0!==b[0])&&S--)f=void 0!==b[0]}y[0]||y.shift()}if(1==p)v.e=u,X3=f;else{for(h=1,d=y[0];d>=10;d/=10)h++;v.e=h+u*p-1,Yx(v,a?o+v.e+1:o,s,f)}return v}}();function Yx(e,t,n,r){var i,o,s,a,l,c,u,h,d,p=e.constructor;n:if(null!=t){if(!(h=e.d))return e;for(i=1,a=h[0];a>=10;a/=10)i++;if((o=t-i)<0)o+=7,s=t,l=(u=h[d=0])/Ya(10,i-s-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(a=h.length))if(r){for(;a++<=d;)h.push(0);u=l=0,i=1,o%=7,s=o-7+1}else break n;else{for(u=a=h[d],i=1;a>=10;a/=10)i++;o%=7,l=(s=o-7+i)<0?0:u/Ya(10,i-s-1)%10|0}if(r=r||t<0||void 0!==h[d+1]||(s<0?u:u%Ya(10,i-s-1)),c=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?s>0?u/Ya(10,i-s):0:h[d-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,c?(t-=e.e+1,h[0]=Ya(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=d,a=1,d--):(h.length=d+1,a=Ya(10,7-o),h[d]=s>0?(u/Ya(10,i-s)%Ya(10,s)|0)*a:0),c)for(;;)if(0==d){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,1e7==h[0]&&(h[0]=1));break}else{if(h[d]+=a,1e7!=h[d])break;h[d--]=0,a=1}for(o=h.length;0===h[--o];)h.pop()}return Ye&&(e.e>p.maxE?(e.d=null,e.e=0/0):e.e<p.minE&&(e.e=0,e.d=[0])),e}function Yw(e,t,n){if(!e.isFinite())return YR(e);var r,i=e.e,o=Ym(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+YM(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+YM(-i-1)+o,n&&(r=n-s)>0&&(o+=YM(r))):i>=s?(o+=YM(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+YM(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=YM(r))),o}function YS(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function YA(e,t,n){if(t>Yd)throw Ye=!0,n&&(e.precision=n),Error(Yr);return Yx(new e(X9),t,1,!0)}function YC(e,t,n){if(t>Yp)throw Error(Yr);return Yx(new e(X8),t,n,!0)}function Yk(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function YM(e){for(var t="";e--;)t+="0";return t}function YO(e,t,n,r){var i,o=new e(1),s=Math.ceil(r/7+4);for(Ye=!1;;){if(n%2&&Yj((o=o.times(t)).d,s)&&(i=!0),0===(n=Ys(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}Yj((t=t.times(t)).d,s)}return Ye=!0,o}function YT(e){return 1&e.d[e.d.length-1]}function Y_(e,t,n){for(var r,i,o=new e(t[0]),s=0;++s<t.length;){if(!(i=new e(t[s])).s){o=i;break}((r=o.cmp(i))===n||0===r&&o.s===n)&&(o=i)}return o}function YI(e,t){var n,r,i,o,s,a,l,c=0,u=0,h=0,d=e.constructor,p=d.rounding,f=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?!e.d[0]?1:e.s<0?0:1/0:e.s?e.s<0?0:e:0/0);for(null==t?(Ye=!1,l=f):l=t,a=new d(.03125);e.e>-2;)e=e.times(a),h+=5;for(l+=r=Math.log(Ya(2,h))/Math.LN10*2+5|0,n=o=s=new d(1),d.precision=l;;){if(o=Yx(o.times(e),l,1),n=n.times(++u),Ym((a=s.plus(Yb(o,n,l,1))).d).slice(0,l)===Ym(s.d).slice(0,l)){for(i=h;i--;)s=Yx(s.times(s),l,1);if(null!=t)return d.precision=f,s;if(!(c<3&&Yv(s.d,l-r,p,c)))return Yx(s,d.precision=f,p,Ye=!0);d.precision=l+=10,n=o=a=new d(1),u=0,c++}s=a}}function YD(e,t){var n,r,i,o,s,a,l,c,u,h,d,p=1,f=e,m=f.d,g=f.constructor,v=g.rounding,y=g.precision;if(f.s<0||!m||!m[0]||!f.e&&1==m[0]&&1==m.length)return new g(m&&!m[0]?-1/0:1!=f.s?0/0:m?0:f);if(null==t?(Ye=!1,u=y):u=t,g.precision=u+=10,r=(n=Ym(m)).charAt(0),!(15e14>Math.abs(o=f.e)))return c=YA(g,u+2,y).times(o+""),f=YD(new g(r+"."+n.slice(1)),u-10).plus(c),g.precision=y,null==t?Yx(f,y,v,Ye=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Ym((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new g("0."+n),o++):f=new g(r+"."+n.slice(1)),h=f,l=s=f=Yb(f.minus(1),f.plus(1),u,1),d=Yx(f.times(f),u,1),i=3;;){if(s=Yx(s.times(d),u,1),Ym((c=l.plus(Yb(s,new g(i),u,1))).d).slice(0,u)===Ym(l.d).slice(0,u)){if(l=l.times(2),0!==o&&(l=l.plus(YA(g,u+2,y).times(o+""))),l=Yb(l,new g(p),u,1),null!=t)return g.precision=y,l;if(!Yv(l.d,u-10,v,a))return Yx(l,g.precision=y,v,Ye=!0);g.precision=u+=10,c=s=f=Yb(h.minus(1),h.plus(1),u,1),d=Yx(f.times(f),u,1),i=a=1}l=c,i+=2}}function YR(e){return String(e.s*e.s/0)}function YE(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),Ye&&(e.e>e.constructor.maxE?(e.d=null,e.e=0/0):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function YP(e,t,n,r,i){var o,s,a,l,c=e.precision,u=Math.ceil(c/7);for(Ye=!1,l=n.times(n),a=new e(r);;){if(s=Yb(a.times(l),new e(t++*t++),c,1),a=i?r.plus(s):r.minus(s),r=Yb(s.times(l),new e(t++*t++),c,1),void 0!==(s=a.plus(r)).d[u]){for(o=u;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=r,r=s,s=o}return Ye=!0,s.d.length=u+1,s}function YL(e,t){for(var n=e;--t;)n*=e;return n}function YN(e,t){var n,r=t.s<0,i=YC(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return X4=r?4:1,t;if((n=t.divToInt(i)).isZero())X4=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return X4=YT(n)?r?2:3:r?4:1,t;X4=YT(n)?r?1:4:r?3:2}return t.minus(i).abs()}function YB(e,t,n,r){var i,o,s,a,l,c,u,h,d,p=e.constructor,f=void 0!==n;if(f?(Yg(n,1,1e9),void 0===r?r=p.rounding:Yg(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(s=(u=Yw(e)).indexOf("."),f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,s>=0&&(u=u.replace(".",""),(d=new p(1)).e=u.length-s,d.d=Yy(Yw(d),10,i),d.e=d.d.length),o=l=(h=Yy(u,10,i)).length;0==h[--l];)h.pop();if(h[0]){if(s<0?o--:((e=new p(e)).d=h,e.e=o,h=(e=Yb(e,d,n,r,0,i)).d,o=e.e,c=X3),s=h[n],a=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==s||c)&&(0===r||r===(e.s<0?3:2)):s>a||s===a&&(4===r||c||6===r&&1&h[n-1]||r===(e.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,u="";s<l;s++)u+=X6.charAt(h[s]);if(f){if(l>1)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)u+="0";for(l=(h=Yy(u,i,t)).length;!h[l-1];--l);for(s=1,u="1.";s<l;s++)u+=X6.charAt(h[s])}else u=u.charAt(0)+"."+u.slice(1);u=u+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)u="0"+u;u="0."+u}else if(++o>l)for(o-=l;o--;)u+="0";else o<l&&(u=u.slice(0,o)+"."+u.slice(o))}else u=f?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=YR(e);return e.s<0?"-"+u:u}function Yj(e,t){if(e.length>t)return e.length=t,!0}function Yz(e){return new this(e).abs()}function Y$(e){return new this(e).acos()}function YF(e){return new this(e).acosh()}function YV(e,t){return new this(e).plus(t)}function YH(e){return new this(e).asin()}function YW(e){return new this(e).asinh()}function YU(e){return new this(e).atan()}function YG(e){return new this(e).atanh()}function Yq(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?YC(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=YC(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(Yb(e,t,o,1)),t=YC(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(Yb(e,t,o,1)):(n=YC(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(0/0),n}function YX(e){return new this(e).cbrt()}function YY(e){return Yx(e=new this(e),e.e+1,2)}function YK(e,t,n){return new this(e).clamp(t,n)}function YQ(e){if(!e||"object"!=typeof e)throw Error(Yt+"Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],i&&(this[n]=X7[n]),void 0!==(r=e[n]))if(Ys(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(Yn+n+": "+r);if(n="crypto",i&&(this[n]=X7[n]),void 0!==(r=e[n]))if(!0===r||!1===r||0===r||1===r)if(r)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(Yi);else this[n]=!1;else throw Error(Yn+n+": "+r);return this}function YZ(e){return new this(e).cos()}function YJ(e){return new this(e).cosh()}function Y0(e,t){return new this(e).div(t)}function Y1(e){return new this(e).exp()}function Y2(e){return Yx(e=new this(e),e.e+1,3)}function Y5(){var e,t,n=new this(0);for(e=0,Ye=!1;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return Ye=!0,new this(1/0);n=t}return Ye=!0,n.sqrt()}function Y3(e){return e instanceof Km||e&&e.toStringTag===Yo||!1}function Y4(e){return new this(e).ln()}function Y6(e,t){return new this(e).log(t)}function Y9(e){return new this(e).log(2)}function Y8(e){return new this(e).log(10)}function Y7(){return Y_(this,arguments,-1)}function Ke(){return Y_(this,arguments,1)}function Kt(e,t){return new this(e).mod(t)}function Kn(e,t){return new this(e).mul(t)}function Kr(e,t){return new this(e).pow(t)}function Ki(e){var t,n,r,i,o=0,s=new this(1),a=[];if(void 0===e?e=this.precision:Yg(e,1,1e9),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=t[o])>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o<r;)(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=r/4}else throw Error(Yi);else for(;o<r;)a[o++]=1e7*Math.random()|0;for(r=a[--o],e%=7,r&&e&&(i=Ya(10,7-e),a[o]=(r/i|0)*i);0===a[o];o--)a.pop();if(o<0)n=0,a=[0];else{for(n=-1;0===a[0];n-=7)a.shift();for(r=1,i=a[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return s.e=n,s.d=a,s}function Ko(e){return Yx(e=new this(e),e.e+1,this.rounding)}function Ks(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||0/0}function Ka(e){return new this(e).sin()}function Kl(e){return new this(e).sinh()}function Kc(e){return new this(e).sqrt()}function Ku(e,t){return new this(e).sub(t)}function Kh(){var e=0,t=arguments,n=new this(t[0]);for(Ye=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return Ye=!0,Yx(n,this.precision,this.rounding)}function Kd(e){return new this(e).tan()}function Kp(e){return new this(e).tanh()}function Kf(e){return Yx(e=new this(e),e.e+1,1)}Yf[Symbol.for("nodejs.util.inspect.custom")]=Yf.toString,Yf[Symbol.toStringTag]="Decimal";var Km=Yf.constructor=function e(t){var n,r,i;function o(e){var t,n,r;if(!(this instanceof o))return new o(e);if(this.constructor=o,Y3(e)){this.s=e.s,Ye?!e.d||e.e>o.maxE?(this.e=0/0,this.d=null):e.e<o.minE?(this.e=0,this.d=[0]):(this.e=e.e,this.d=e.d.slice()):(this.e=e.e,this.d=e.d?e.d.slice():e.d);return}if("number"==(r=typeof e)){if(0===e){this.s=1/e<0?-1:1,this.e=0,this.d=[0];return}if(e<0?(e=-e,this.s=-1):this.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;Ye?t>o.maxE?(this.e=0/0,this.d=null):t<o.minE?(this.e=0,this.d=[0]):(this.e=t,this.d=[e]):(this.e=t,this.d=[e]);return}if(0*e!=0){e||(this.s=0/0),this.e=0/0,this.d=null;return}return YE(this,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),this.s=-1):(43===n&&(e=e.slice(1)),this.s=1),Yh.test(e)?YE(this,e):function(e,t){var n,r,i,o,s,a,l,c,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Yh.test(t))return YE(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=0/0),e.e=0/0,e.d=null,e;if(Yc.test(t))n=16,t=t.toLowerCase();else if(Yl.test(t))n=2;else if(Yu.test(t))n=8;else throw Error(Yn+t);for((o=t.search(/p/i))>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,r=e.constructor,s&&(o=(a=(t=t.replace(".","")).length)-o,i=YO(r,new r(n),o,2*o)),o=u=(c=Yy(t,n,1e7)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=YS(c,u),e.d=c,Ye=!1,s&&(e=Yb(e,i,4*a)),l&&(e=e.times(54>Math.abs(l)?Ya(2,l):Km.pow(2,l))),Ye=!0,e)}(this,e);if("bigint"===r)return e<0?(e=-e,this.s=-1):this.s=1,YE(this,e.toString());throw Error(Yn+e)}if(o.prototype=Yf,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=YQ,o.clone=e,o.isDecimal=Y3,o.abs=Yz,o.acos=Y$,o.acosh=YF,o.add=YV,o.asin=YH,o.asinh=YW,o.atan=YU,o.atanh=YG,o.atan2=Yq,o.cbrt=YX,o.ceil=YY,o.clamp=YK,o.cos=YZ,o.cosh=YJ,o.div=Y0,o.exp=Y1,o.floor=Y2,o.hypot=Y5,o.ln=Y4,o.log=Y6,o.log10=Y8,o.log2=Y9,o.max=Y7,o.min=Ke,o.mod=Kt,o.mul=Kn,o.pow=Kr,o.random=Ki,o.round=Ko,o.sign=Ks,o.sin=Ka,o.sinh=Kl,o.sqrt=Kc,o.sub=Ku,o.sum=Kh,o.tan=Kd,o.tanh=Kp,o.trunc=Kf,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=0,i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"];n<i.length;)t.hasOwnProperty(r=i[n++])||(t[r]=this[r]);return o.config(t),o}(X7);X9=new Km(X9),X8=new Km(X8);var Kg={createBigNumberClass:qY("BigNumber",["?on","config"],e=>{var{on:t,config:n}=e,r=Km.clone({precision:n.precision,modulo:Km.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(e){return new r(e.value)},t&&t("config",function(e,t){e.precision!==t.precision&&r.config({precision:e.precision})}),r},{isClass:!0})},Kv={createMatrixClass:qY("Matrix",[],()=>{function e(){if(!(this instanceof e))throw SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0})},Ky={MatrixDependencies:Kv,createDenseMatrixClass:qY("DenseMatrix",["Matrix"],e=>{var{Matrix:t}=e;function n(e,t){if(!(this instanceof n))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ql(t))throw Error("Invalid datatype: "+t);if(qu(e))"DenseMatrix"===e.type?(this._data=qV(e._data),this._size=qV(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=t||e._datatype;else if(e&&qc(e.data)&&qc(e.size))this._data=e.data,this._size=e.size,Xi(this._data,this._size),this._datatype=t||e.datatype;else if(qc(e))this._data=function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];qc(i)?t[n]=e(i):i&&!0===i.isMatrix&&(t[n]=e(i.valueOf()))}return t}(e),this._size=Xr(this._data),Xi(this._data,this._size),this._datatype=t;else if(e)throw TypeError("Unsupported type of data ("+qF(e)+")");else this._data=[],this._size=[0],this._datatype=t}function r(e,t,n){if(0===t.length){for(var r=e._data;qc(r);)r=r[0];return r}return e._size=t.slice(0),e._data=Xs(e._data,e._size,n),e}function i(e,t,n){for(var i=e._size.slice(0),o=!1;i.length<t.length;)i.push(0),o=!0;for(var s=0,a=t.length;s<a;s++)t[s]>i[s]&&(i[s]=t[s],o=!0);o&&r(e,i,n)}return n.prototype=new t,n.prototype.createDenseMatrix=function(e,t){return new n(e,t)},n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Xu(this._data,qF)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(e,t){return new n(e,t)},n.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return function(e,t){if(!qm(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var r=t.size();if(r.length!==e._size.length)throw new Xt(r.length,e._size.length);for(var i=t.min(),o=t.max(),s=0,a=e._size.length;s<a;s++)Xo(i[s],e._size[s]),Xo(o[s],e._size[s]);return new n(function e(t,n,r,i){var o=i===r-1,s=n.dimension(i);return o?s.map(function(e){return Xo(e,t.length),t[e]}).valueOf():s.map(function(o){return Xo(o,t.length),e(t[o],n,r,i+1)}).valueOf()}(e._data,t,r.length,0),e._datatype)}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var o,s=t.size(),a=t.isScalar();if(qu(n)?(o=n.size(),n=n.valueOf()):o=Xr(n),a){if(0!==o.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(s.length<e._size.length)throw new Xt(s.length,e._size.length,"<");if(o.length<s.length){for(var l=0,c=0;1===s[l]&&1===o[l];)l++;for(;1===s[l];)c++,l++;n=Xc(n,s.length,c,o)}if(!qW(s,o))throw new Xt(s,o,">");i(e,t.max().map(function(e){return e+1}),r);var u=s.length;!function e(t,n,r,i,o){var s=o===i-1,a=n.dimension(o);s?a.forEach(function(e,n){Xo(e),t[e]=r[n[0]]}):a.forEach(function(s,a){Xo(s),e(t[s],n,r[a[0]],i,o+1)})}(e._data,t,n,u,0)}return e}(this,e,t,r);default:throw SyntaxError("Wrong number of arguments")}},n.prototype.get=function(e){if(!qc(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new Xt(e.length,this._size.length);for(var t=0;t<e.length;t++)Xo(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var o=e[r];Xo(o,n.length),n=n[o]}return n},n.prototype.set=function(e,t,n){if(!qc(e))throw TypeError("Array expected");if(e.length<this._size.length)throw new Xt(e.length,this._size.length,"<");i(this,e.map(function(e){return e+1}),n);var r,o,s,a=this._data;for(r=0,o=e.length-1;r<o;r++)Xo(s=e[r],a.length),a=a[s];return Xo(s=e[e.length-1],a.length),a[s]=t,this},n.prototype.resize=function(e,t,n){if(!qh(e))throw TypeError("Array or Matrix expected");var i=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);return r(n?this.clone():this,i,t)},n.prototype.reshape=function(e,t){var n=t?this.clone():this;n._data=function(e,t){var n=function(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function e(n){Array.isArray(n)?n.forEach(e):t.push(n)}),t}(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw TypeError("Array expected");if(0===t.length)throw new Xt(0,r,"!=");var i=Xl(t=Xa(t,r));if(r!==i)throw new Xt(i,r,"!=");try{return function(e,t){for(var n,r=e,i=t.length-1;i>0;i--){var o=t[i];n=[];for(var s=r.length/o,a=0;a<s;a++)n.push(r.slice(a*o,(a+1)*o));r=n}return r}(n,t)}catch(e){if(e instanceof Xt)throw new Xt(i,r,"!=");throw e}}(n._data,e);var r=n._size.reduce((e,t)=>e*t);return n._size=Xa(e,r),n},n.prototype.clone=function(){return new n({data:qV(this._data),size:qV(this._size),datatype:this._datatype})},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(e){var t=this,r=function n(r,i){return qc(r)?r.map(function(e,t){return n(e,i.concat(t))}):e(r,i,t)}(this._data,[]),i=void 0!==this._datatype?Xu(r,qF):void 0;return new n(r,i)},n.prototype.forEach=function(e){var t=this;!function n(r,i){qc(r)?r.forEach(function(e,t){n(e,i.concat(t))}):e(r,i,t)}(this._data,[])},n.prototype[Symbol.iterator]=function*(){yield*function* e(t,n){if(qc(t))for(var r=0;r<t.length;r++)yield*e(t[r],n.concat(r));else yield{value:t,index:n}}(this._data,[])},n.prototype.rows=function(){var e=[];if(2!==this.size().length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var t of this._data)e.push(new n([t],this._datatype));return e},n.prototype.columns=function(){var e=this,t=[],r=this.size();if(2!==r.length)throw TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=function(r){var o=i.map(e=>[e[r]]);t.push(new n(o,e._datatype))},s=0;s<r[1];s++)o(s);return t},n.prototype.toArray=function(){return qV(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(e){return Xe(this._data,e)},n.prototype.toString=function(){return Xe(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(e){if(e){if(qi(e)&&(e=e.toNumber()),!qr(e)||!qZ(e))throw TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,r=e<0?-e:0,i=Math.min(this._size[0]-r,this._size[1]-t),o=[],s=0;s<i;s++)o[s]=this._data[s+r][s+t];return new n({data:o,size:[i],datatype:this._datatype})},n.diagonal=function(e,t,r,i){if(!qc(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(qi(e)&&(e=e.toNumber()),!qr(e)||!qZ(e)||e<1)throw Error("Size values must be positive integers");return e}),r){if(qi(r)&&(r=r.toNumber()),!qr(r)||!qZ(r))throw TypeError("The parameter k must be an integer number")}else r=0;var o,s=r>0?r:0,a=r<0?-r:0,l=e[0],c=e[1],u=Math.min(l-a,c-s);if(qc(t)){if(t.length!==u)throw Error("Invalid value array length");o=function(e){return t[e]}}else if(qu(t)){var h=t.size();if(1!==h.length||h[0]!==u)throw Error("Invalid matrix length");o=function(e){return t.get([e])}}else o=function(){return t};i||(i=qi(o(0))?o(0).mul(0):0);var d=[];if(e.length>0){d=Xs(d,e,i);for(var p=0;p<u;p++)d[p+a][p+s]=o(p)}return new n({data:d,size:[l,c]})},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(e,t){if(!qr(e)||!qZ(e)||!qr(t)||!qZ(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return Xo(e,this._size[0]),Xo(t,this._size[0]),n._swapRows(e,t,this._data),this},n._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},n},{isClass:!0})};let Kb=Math.cosh||function(e){return 1e-9>Math.abs(e)?1-e:(Math.exp(e)+Math.exp(-e))*.5},Kx=Math.sinh||function(e){return 1e-9>Math.abs(e)?e:(Math.exp(e)-Math.exp(-e))*.5},Kw=function(e,t){return((e=Math.abs(e))<(t=Math.abs(t))&&([e,t]=[t,e]),e<1e8)?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},KS=function(){throw SyntaxError("Invalid Param")};function KA(e,t){let n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):.5*Math.log((e*=.5)*e+(t*=.5)*t)+Math.LN2}let KC={re:0,im:0},Kk=function(e,t){if(null==e)KC.re=KC.im=0;else if(void 0!==t)KC.re=e,KC.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)KC.re=e.re,KC.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return KM.INFINITY;KC.re=e.abs*Math.cos(e.arg),KC.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return KM.INFINITY;KC.re=e.r*Math.cos(e.phi),KC.im=e.r*Math.sin(e.phi)}else 2===e.length?(KC.re=e[0],KC.im=e[1]):KS();break;case"string":KC.im=KC.re=0;let n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),r=1,i=0;null===n&&KS();for(let e=0;e<n.length;e++){let t=n[e];" "===t||" "===t||"\n"===t||("+"===t?r++:"-"===t?i++:("i"===t||"I"===t?(r+i===0&&KS()," "===n[e+1]||isNaN(n[e+1])?KC.im+=parseFloat((i%2?"-":"")+"1"):(KC.im+=parseFloat((i%2?"-":"")+n[e+1]),e++)):((r+i===0||isNaN(t))&&KS(),"i"===n[e+1]||"I"===n[e+1]?(KC.im+=parseFloat((i%2?"-":"")+t),e++):KC.re+=parseFloat((i%2?"-":"")+t)),r=i=0))}r+i>0&&KS();break;case"number":KC.im=0,KC.re=e;break;default:KS()}return isNaN(KC.re)||isNaN(KC.im),KC};function KM(e,t){if(!(this instanceof KM))return new KM(e,t);let n=Kk(e,t);this.re=n.re,this.im=n.im}KM.prototype={re:0,im:0,sign:function(){let e=Kw(this.re,this.im);return new KM(this.re/e,this.im/e)},add:function(e,t){let n=Kk(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?KM.NAN:KM.INFINITY:new KM(this.re+n.re,this.im+n.im)},sub:function(e,t){let n=Kk(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im));return r||i?r&&i?KM.NAN:KM.INFINITY:new KM(this.re-n.re,this.im-n.im)},mul:function(e,t){let n=Kk(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,s=0===n.re&&0===n.im;return r&&s||i&&o?KM.NAN:r||i?KM.INFINITY:0===n.im&&0===this.im?new KM(this.re*n.re,0):new KM(this.re*n.re-this.im*n.im,this.re*n.im+this.im*n.re)},div:function(e,t){let n=Kk(e,t),r=this.isInfinite(),i=!(isFinite(n.re)&&isFinite(n.im)),o=0===this.re&&0===this.im,s=0===n.re&&0===n.im;if(o&&s||r&&i)return KM.NAN;if(s||r)return KM.INFINITY;if(o||i)return KM.ZERO;if(0===n.im)return new KM(this.re/n.re,this.im/n.re);if(Math.abs(n.re)<Math.abs(n.im)){let e=n.re/n.im,t=n.re*e+n.im;return new KM((this.re*e+this.im)/t,(this.im*e-this.re)/t)}{let e=n.im/n.re,t=n.im*e+n.re;return new KM((this.re+this.im*e)/t,(this.im-this.re*e)/t)}},pow:function(e,t){let n=Kk(e,t),r=0===this.re&&0===this.im;if(0===n.re&&0===n.im)return KM.ONE;if(0===n.im){if(0===this.im&&this.re>0)return new KM(Math.pow(this.re,n.re),0);else if(0===this.re)switch((n.re%4+4)%4){case 0:return new KM(Math.pow(this.im,n.re),0);case 1:return new KM(0,Math.pow(this.im,n.re));case 2:return new KM(-Math.pow(this.im,n.re),0);case 3:return new KM(0,-Math.pow(this.im,n.re))}}if(r&&n.re>0)return KM.ZERO;let i=Math.atan2(this.im,this.re),o=KA(this.re,this.im),s=Math.exp(n.re*o-n.im*i),a=n.im*o+n.re*i;return new KM(s*Math.cos(a),s*Math.sin(a))},sqrt:function(){let e=this.re,t=this.im;if(0===t)if(e>=0)return new KM(Math.sqrt(e),0);else return new KM(0,Math.sqrt(-e));let n=Math.sqrt(.5*(Kw(e,t)+Math.abs(e))),r=Math.abs(t)/(2*n);return e>=0?new KM(n,t<0?-r:r):new KM(r,t<0?-n:n)},exp:function(){let e=Math.exp(this.re);return 0===this.im?new KM(e,0):new KM(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){let e,t=this.re,n=this.im;return new KM(Math.expm1(t)*Math.cos(n)+-2*(e=Math.sin(.5*n))*e,Math.exp(t)*Math.sin(n))},log:function(){let e=this.re,t=this.im;return 0===t&&e>0?new KM(Math.log(e),0):new KM(KA(e,t),Math.atan2(t,e))},abs:function(){return Kw(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){let e=this.re,t=this.im;return new KM(Math.sin(e)*Kb(t),Math.cos(e)*Kx(t))},cos:function(){let e=this.re,t=this.im;return new KM(Math.cos(e)*Kb(t),-Math.sin(e)*Kx(t))},tan:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)+Kb(t);return new KM(Math.sin(e)/n,Kx(t)/n)},cot:function(){let e=2*this.re,t=2*this.im,n=Math.cos(e)-Kb(t);return new KM(-Math.sin(e)/n,Kx(t)/n)},sec:function(){let e=this.re,t=this.im,n=.5*Kb(2*t)+.5*Math.cos(2*e);return new KM(Math.cos(e)*Kb(t)/n,Math.sin(e)*Kx(t)/n)},csc:function(){let e=this.re,t=this.im,n=.5*Kb(2*t)-.5*Math.cos(2*e);return new KM(Math.sin(e)*Kb(t)/n,-Math.cos(e)*Kx(t)/n)},asin:function(){let e=this.re,t=this.im,n=new KM(t*t-e*e+1,-2*e*t).sqrt(),r=new KM(n.re-t,n.im+e).log();return new KM(r.im,-r.re)},acos:function(){let e=this.re,t=this.im,n=new KM(t*t-e*e+1,-2*e*t).sqrt(),r=new KM(n.re-t,n.im+e).log();return new KM(Math.PI/2-r.im,r.re)},atan:function(){let e=this.re,t=this.im;if(0===e){if(1===t)return new KM(0,1/0);if(-1===t)return new KM(0,-1/0)}let n=e*e+(1-t)*(1-t),r=new KM((1-t*t-e*e)/n,-2*e/n).log();return new KM(-.5*r.im,.5*r.re)},acot:function(){let e=this.re,t=this.im;if(0===t)return new KM(Math.atan2(1,e),0);let n=e*e+t*t;return 0!==n?new KM(e/n,-t/n).atan():new KM(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new KM(0,1/0);let n=e*e+t*t;return 0!==n?new KM(e/n,-t/n).acos():new KM(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new KM(Math.PI/2,1/0);let n=e*e+t*t;return 0!==n?new KM(e/n,-t/n).asin():new KM(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){let e=this.re,t=this.im;return new KM(Kx(e)*Math.cos(t),Kb(e)*Math.sin(t))},cosh:function(){let e=this.re,t=this.im;return new KM(Kb(e)*Math.cos(t),Kx(e)*Math.sin(t))},tanh:function(){let e=2*this.re,t=2*this.im,n=Kb(e)+Math.cos(t);return new KM(Kx(e)/n,Math.sin(t)/n)},coth:function(){let e=2*this.re,t=2*this.im,n=Kb(e)-Math.cos(t);return new KM(Kx(e)/n,-Math.sin(t)/n)},csch:function(){let e=this.re,t=this.im,n=Math.cos(2*t)-Kb(2*e);return new KM(-2*Kx(e)*Math.cos(t)/n,2*Kb(e)*Math.sin(t)/n)},sech:function(){let e=this.re,t=this.im,n=Math.cos(2*t)+Kb(2*e);return new KM(2*Kb(e)*Math.cos(t)/n,-2*Kx(e)*Math.sin(t)/n)},asinh:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new KM(0,0);let t=Math.abs(e),n=Math.log(t+Math.sqrt(t*t+1));return new KM(e<0?-n:n,0)}let n=new KM(e*e-t*t+1,2*e*t).sqrt();return new KM(e+n.re,t+n.im).log()},acosh:function(){let e=this.re,t=this.im;if(0===t){if(e>1)return new KM(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){let t=Math.sqrt(e*e-1);return new KM(Math.log(-e+t),Math.PI)}return new KM(0,Math.acos(e))}let n=new KM(e-1,t).sqrt(),r=new KM(e+1,t).sqrt();return new KM(e+n.re*r.re-n.im*r.im,t+n.re*r.im+n.im*r.re).log()},atanh:function(){let e=this.re,t=this.im;if(0===t)return 0===e?new KM(0,0):1===e?new KM(1/0,0):-1===e?new KM(-1/0,0):-1<e&&e<1?new KM(.5*Math.log((1+e)/(1-e)),0):e>1?new KM(.5*Math.log((e+1)/(e-1)),-Math.PI/2):new KM(.5*Math.log(-((1+e)/(1-e))),Math.PI/2);let n=1-e,r=1+e,i=n*n+t*t;if(0===i)return new KM(-1!==e?e/0:0,0!==t?t/0:0);let o=(r*n-t*t)/i,s=(t*n+r*t)/i;return new KM(KA(o,s)/2,Math.atan2(s,o)/2)},acoth:function(){let e=this.re,t=this.im;if(0===e&&0===t)return new KM(0,Math.PI/2);let n=e*e+t*t;return 0!==n?new KM(e/n,-t/n).atanh():new KM(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){let e=this.re,t=this.im;if(0===t){if(0===e)return new KM(1/0,0);let t=1/e;return new KM(Math.log(t+Math.sqrt(t*t+1)),0)}let n=e*e+t*t;return 0!==n?new KM(e/n,-t/n).asinh():new KM(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){let e=this.re,t=this.im;if(this.isZero())return KM.INFINITY;let n=e*e+t*t;return 0!==n?new KM(e/n,-t/n).acosh():new KM(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return KM.INFINITY;if(this.isInfinite())return KM.ZERO;let e=this.re,t=this.im,n=e*e+t*t;return new KM(e/n,-t/n)},conjugate:function(){return new KM(this.re,-this.im)},neg:function(){return new KM(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new KM(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new KM(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new KM(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){let n=Kk(e,t);return Math.abs(n.re-this.re)<=KM.EPSILON&&Math.abs(n.im-this.im)<=KM.EPSILON},clone:function(){return new KM(this.re,this.im)},toString:function(){let e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<KM.EPSILON&&(e=0),Math.abs(t)<KM.EPSILON&&(t=0),0===t)?n+e:(0!==e?(n+=e,n+=" ",t<0?(t=-t,n+="-"):n+="+",n+=" "):t<0&&(t=-t,n+="-"),1!==t&&(n+=t),n+"i")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}},KM.ZERO=new KM(0,0),KM.ONE=new KM(1,0),KM.I=new KM(0,1),KM.PI=new KM(Math.PI,0),KM.E=new KM(Math.E,0),KM.INFINITY=new KM(1/0,1/0),KM.NAN=new KM(0/0,0/0),KM.EPSILON=1e-15;var KO=qY("Complex",[],()=>(KM.prototype.type="Complex",KM.prototype.isComplex=!0,KM.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},KM.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},KM.prototype.format=function(e){var t=this.im,n=this.re,r=q0(this.re,e),i=q0(this.im,e),o=qr(e)?e:e?e.precision:null;if(null!==o){var s=Math.pow(10,-o);Math.abs(n/t)<s&&(n=0),Math.abs(t/n)<s&&(t=0)}return 0===t?r:0===n?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?r+" - i":r+" - "+i.substring(1)+"i":1===t?r+" + i":r+" + "+i+"i"},KM.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"==typeof t)return KM(t);throw TypeError("Input has to be an object with r and phi keys.");case 2:var n=arguments[0],r=arguments[1];if(qr(n)){if(qa(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),qr(r))return new KM({r:n,phi:r});throw TypeError("Phi is not a number nor an angle unit.")}throw TypeError("Radius r is not a number.");default:throw SyntaxError("Wrong number of arguments in function fromPolar")}},KM.prototype.valueOf=KM.prototype.toString,KM.fromJSON=function(e){return new KM(e)},KM.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},KM),{isClass:!0}),KT={s:1,n:0,d:1};function K_(e,t){if(isNaN(e=parseInt(e,10)))throw KN();return e*t}function KI(e,t){if(0===t)throw KL();var n=Object.create(KP.prototype);n.s=e<0?-1:1;var r=KE(e=e<0?-e:e,t);return n.n=e/r,n.d=t/r,n}function KD(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r==0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?n>1&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}var KR=function(e,t){var n,r=0,i=1,o=1,s=0,a=0,l=0,c=1,u=1,h=0,d=1,p=1,f=1;if(null==e);else if(void 0!==t){if(o=(r=e)*(i=t),r%1!=0||i%1!=0)throw KB()}else switch(typeof e){case"object":if("d"in e&&"n"in e)r=e.n,i=e.d,"s"in e&&(r*=e.s);else if(0 in e)r=e[0],1 in e&&(i=e[1]);else throw KN();o=r*i;break;case"number":if(e<0&&(o=e,e=-e),e%1==0)r=e;else if(e>0){for(e>=1&&(u=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=u);d<=1e7&&f<=1e7;){if(e===(n=(h+p)/(d+f))){d+f<=1e7?(r=h+p,i=d+f):f>d?(r=p,i=f):(r=h,i=d);break}e>n?(h+=p,d+=f):(p+=h,f+=d),d>1e7?(r=p,i=f):(r=h,i=d)}r*=u}else(isNaN(e)||isNaN(t))&&(i=r=0/0);break;case"string":if(null===(d=e.match(/\d+|./g)))throw KN();if("-"===d[h]?(o=-1,h++):"+"===d[h]&&h++,d.length===h+1?a=K_(d[h++],o):"."===d[h+1]||"."===d[h]?("."!==d[h]&&(s=K_(d[h++],o)),(++h+1===d.length||"("===d[h+1]&&")"===d[h+3]||"'"===d[h+1]&&"'"===d[h+3])&&(a=K_(d[h],o),c=Math.pow(10,d[h].length),h++),("("===d[h]&&")"===d[h+2]||"'"===d[h]&&"'"===d[h+2])&&(l=K_(d[h+1],o),u=Math.pow(10,d[h+1].length)-1,h+=3)):"/"===d[h+1]||":"===d[h+1]?(a=K_(d[h],o),c=K_(d[h+2],1),h+=3):"/"===d[h+3]&&" "===d[h+1]&&(s=K_(d[h],o),a=K_(d[h+2],o),c=K_(d[h+4],1),h+=5),d.length<=h){o=r=l+(i=c*u)*s+u*a;break}default:throw KN()}if(0===i)throw KL();KT.s=o<0?-1:1,KT.n=Math.abs(r),KT.d=Math.abs(i)};function KE(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function KP(e,t){if(KR(e,t),!(this instanceof KP))return KI(KT.s*KT.n,KT.d);e=KE(KT.d,KT.n),this.s=KT.s,this.n=KT.n/e,this.d=KT.d/e}var KL=function(){return Error("Division by Zero")},KN=function(){return Error("Invalid argument")},KB=function(){return Error("Parameters must be integer")};KP.prototype={s:1,n:0,d:1,abs:function(){return KI(this.n,this.d)},neg:function(){return KI(-this.s*this.n,this.d)},add:function(e,t){return KR(e,t),KI(this.s*this.n*KT.d+KT.s*this.d*KT.n,this.d*KT.d)},sub:function(e,t){return KR(e,t),KI(this.s*this.n*KT.d-KT.s*this.d*KT.n,this.d*KT.d)},mul:function(e,t){return KR(e,t),KI(this.s*KT.s*this.n*KT.n,this.d*KT.d)},div:function(e,t){return KR(e,t),KI(this.s*KT.s*this.n*KT.d,this.d*KT.n)},clone:function(){return KI(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new KP(0/0);if(void 0===e)return KI(this.s*this.n%this.d,1);if(KR(e,t),0===KT.n&&0===this.d)throw KL();return KI(this.s*(KT.d*this.n)%(KT.n*this.d),KT.d*this.d)},gcd:function(e,t){return KR(e,t),KI(KE(KT.n,this.n)*KE(KT.d,this.d),KT.d*this.d)},lcm:function(e,t){return(KR(e,t),0===KT.n&&0===this.n)?KI(0,1):KI(KT.n*this.n,KE(KT.n,this.n)*KE(KT.d,this.d))},ceil:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new KP(0/0):KI(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new KP(0/0):KI(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return(e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d))?new KP(0/0):KI(Math.round(e*this.s*this.n/this.d),e)},roundTo:function(e,t){return KR(e,t),KI(this.s*Math.round(this.n*KT.d/(this.d*KT.n))*KT.n,KT.d)},inverse:function(){return KI(this.s*this.d,this.n)},pow:function(e,t){if(KR(e,t),1===KT.d)if(KT.s<0)return KI(Math.pow(this.s*this.d,KT.n),Math.pow(this.n,KT.n));else return KI(Math.pow(this.s*this.n,KT.n),Math.pow(this.d,KT.n));if(this.s<0)return null;var n=KD(this.n),r=KD(this.d),i=1,o=1;for(var s in n)if("1"!==s){if("0"===s){i=0;break}if(n[s]*=KT.n,n[s]%KT.d!=0)return null;n[s]/=KT.d,i*=Math.pow(s,n[s])}for(var s in r)if("1"!==s){if(r[s]*=KT.n,r[s]%KT.d!=0)return null;r[s]/=KT.d,o*=Math.pow(s,r[s])}return KT.s<0?KI(o,i):KI(i,o)},equals:function(e,t){return KR(e,t),this.s*this.n*KT.d==KT.s*KT.n*this.d},compare:function(e,t){KR(e,t);var n=this.s*this.n*KT.d-KT.s*KT.n*this.d;return(0<n)-(n<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;e=e||.001;for(var t=this.abs(),n=t.toContinued(),r=1;r<n.length;r++){for(var i=KI(n[r-1],1),o=r-2;o>=0;o--)i=i.inverse().add(n[o]);if(Math.abs(i.sub(t).valueOf())<e)return i.mul(this.s)}return this},divisible:function(e,t){return KR(e,t),!(!(KT.n*this.d)||this.n*KT.d%(KT.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,n+=" ",r%=i),n+=r,n+="/",n+=i),n},toLatex:function(e){var t,n="",r=this.n,i=this.d;return this.s<0&&(n+="-"),1===i?n+=r:(e&&(t=Math.floor(r/i))>0&&(n+=t,r%=i),n+="\\frac{",n+=r,n+="}{",n+=i,n+="}"),n},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(isNaN(t)||isNaN(n))return r;do r.push(Math.floor(t/n)),e=t%n,t=n,n=e;while(1!==t)return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var t=10%e,n=1;1!==t;n++)if(t=10*t%e,n>2e3)return 0;return n}(n),i=function(e,t){for(var n=1,r=function(e,t,n){for(var r=1;t>0;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,t,e),i=0;i<300;i++){if(n===r)return i;n=10*n%e,r=10*r%e}return 0}(n,r),o=this.s<0?"-":"";if(o+=t/n|0,t%=n,(t*=10)&&(o+="."),r){for(var s=i;s--;)o+=t/n|0,t%=n,t*=10;o+="(";for(var s=r;s--;)o+=t/n|0,t%=n,t*=10;o+=")"}else for(var s=e;t&&s--;)o+=t/n|0,t%=n,t*=10;return o}};var Kj=qY("Fraction",[],()=>(KP.prototype.type="Fraction",KP.prototype.isFraction=!0,KP.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},KP.fromJSON=function(e){return new KP(e)},KP),{isClass:!0}),Kz=n("io");function K$(e,t){return!!e&&"object"==typeof e&&(!!qG(KV,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function KF(e){return"object"==typeof e&&e&&e.constructor===Object}var KV={length:!0,name:!0},KH={toString:!0,valueOf:!0,toLocaleString:!0};class KW{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){var t,n,r=this.wrappedObject;if(KF(r)&&K$(r,e))return r[e];if("function"==typeof r[e]&&(t=r,n=e,!(null==t||"function"!=typeof t[n]||qG(t,n)&&Object.getPrototypeOf&&n in Object.getPrototypeOf(t))&&(qG(KH,n)||!(n in Object.prototype)&&!(n in Function.prototype))))throw Error('Cannot access method "'+e+'" as a property');throw Error('No access to property "'+e+'"')}set(e,t){return!function(e,t,n){if(KF(e)&&K$(e,t))return e[t]=n;throw Error('No access to property "'+t+'"')}(this.wrappedObject,e,t),this}has(e){return e in this.wrappedObject}}function KU(e){return!!e&&(e instanceof Map||e instanceof KW||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}var KG=function(){return KG=Kz.create,Kz};function Kq(e){throw Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function KX(e){throw Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function KY(e){throw Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var KK={BigNumberDependencies:Kg,ComplexDependencies:{createComplexClass:KO},DenseMatrixDependencies:Ky,FractionDependencies:{createFractionClass:Kj},createTyped:qY("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,o=KG();return o.types=[{name:"number",test:qr},{name:"Complex",test:qo},{name:"BigNumber",test:qi},{name:"Fraction",test:qs},{name:"Unit",test:qa},{name:"string",test:ql},{name:"Chain",test:q$},{name:"Array",test:qc},{name:"Matrix",test:qu},{name:"DenseMatrix",test:qd},{name:"SparseMatrix",test:qp},{name:"Range",test:qf},{name:"Index",test:qm},{name:"boolean",test:qg},{name:"ResultSet",test:qv},{name:"Help",test:qy},{name:"function",test:qb},{name:"Date",test:qx},{name:"RegExp",test:qw},{name:"null",test:qA},{name:"undefined",test:qC},{name:"AccessorNode",test:qk},{name:"ArrayNode",test:qM},{name:"AssignmentNode",test:qO},{name:"BlockNode",test:qT},{name:"ConditionalNode",test:q_},{name:"ConstantNode",test:qI},{name:"FunctionNode",test:qR},{name:"FunctionAssignmentNode",test:qD},{name:"IndexNode",test:qE},{name:"Node",test:qP},{name:"ObjectNode",test:qL},{name:"OperatorNode",test:qN},{name:"ParenthesisNode",test:qB},{name:"RangeNode",test:qj},{name:"SymbolNode",test:qz},{name:"Map",test:KU},{name:"Object",test:qS}],o.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||Kq(e),e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length>15)throw TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||KX(e),new n(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return n||KX(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||KX(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||KY(e);var t=new i(e);if(t.valueOf()!==e)throw TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||Kq(e);try{return new t(e)}catch(t){throw Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||KY(e);try{return new i(e)}catch(t){throw Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||KX(e);try{return new n(e)}catch(t){throw Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||Kq(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||KY(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return r||function(){throw Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}(),new r(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],o})},KQ="equalScalar",KZ=qY(KQ,["typed","config"],e=>{var{typed:t,config:n}=e;return t(KQ,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return q9(e,t,n.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||function(e,t,n){if(null==n)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var r=e.minus(t).abs();if(r.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return r.lte(i.times(n))}return!1}(e,t,n.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){var r;return r=n.epsilon,q9(e.re,t.re,r)&&q9(e.im,t.im,r)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw Error("Cannot compare units with different base");return this(e.value,t.value)}})});qY(KQ,["typed","config"],e=>{var{typed:t,config:n}=e;return t(KQ,{"number, number":function(e,t){return q9(e,t,n.epsilon)}})});var KJ={typedDependencies:KK,createEqualScalar:KZ},K0=qY("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:r}=e;function i(e,t){if(!(this instanceof i))throw SyntaxError("Constructor must be called with the new operator");if(t&&!ql(t))throw Error("Invalid datatype: "+t);if(qu(e)){var n,r,s;n=this,r=e,s=t,"SparseMatrix"===r.type?(n._values=r._values?qV(r._values):void 0,n._index=qV(r._index),n._ptr=qV(r._ptr),n._size=qV(r._size),n._datatype=s||r._datatype):o(n,r.valueOf(),s||r._datatype)}else if(e&&qc(e.index)&&qc(e.ptr)&&qc(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(qc(e))o(this,e,t);else if(e)throw TypeError("Unsupported type of data ("+qF(e)+")");else this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}function o(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,s=0,a=n,l=0;if(ql(i)&&(a=t.find(n,[i,i])||n,l=t.convert(0,i)),o>0){var c=0;do{e._ptr.push(e._index.length);for(var u=0;u<o;u++){var h=r[u];if(qc(h)){if(0===c&&s<h.length&&(s=h.length),c<h.length){var d=h[c];a(d,l)||(e._values.push(d),e._index.push(u))}}else 0===c&&s<1&&(s=1),a(h,l)||(e._values.push(h),e._index.push(u))}c++}while(c<s)}e._ptr.push(e._index.length),e._size=[o,s]}function s(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function a(e,t,n,r,i,o,s){i.splice(e,0,r),o.splice(e,0,t);for(var a=n+1;a<s.length;a++)s[a]++}function l(e,r,i,o){var s,a,l,c=o||0,u=n,h=0;ql(e._datatype)&&(u=t.find(n,[e._datatype,e._datatype])||n,h=t.convert(0,e._datatype),c=t.convert(c,e._datatype));var d=!u(c,h),p=e._size[0],f=e._size[1];if(i>f){for(a=f;a<i;a++)if(e._ptr[a]=e._values.length,d)for(s=0;s<p;s++)e._values.push(c),e._index.push(s);e._ptr[i]=e._values.length}else i<f&&(e._ptr.splice(i+1,f-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(f=i,r>p){if(d){var m=0;for(a=0;a<f;a++){e._ptr[a]=e._ptr[a]+m,l=e._ptr[a+1]+m;var g=0;for(s=p;s<r;s++,g++)e._values.splice(l+g,0,c),e._index.splice(l+g,0,s),m++}e._ptr[f]=e._values.length}}else if(r<p){var v=0;for(a=0;a<f;a++){e._ptr[a]=e._ptr[a]-v;var y=e._ptr[a],b=e._ptr[a+1]-v;for(l=y;l<b;l++)(s=e._index[l])>r-1&&(e._values.splice(l,1),e._index.splice(l,1),v++)}e._ptr[a]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function c(e,t,n,r,i){var o,s,a=r[0],l=r[1],c=[];for(o=0;o<a;o++)for(c[o]=[],s=0;s<l;s++)c[o][s]=0;for(s=0;s<l;s++)for(var u=n[s],h=n[s+1],d=u;d<h;d++)c[o=t[d]][s]=e?i?qV(e[d]):e[d]:1;return c}return i.prototype=new r,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return Xu(this._values,qF)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,n){if(!this._values)throw Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return function(e,t){if(!qm(t))throw TypeError("Invalid index");if(t.isScalar())return e.get(t.min());var n,r,o,s,a=t.size();if(a.length!==e._size.length)throw new Xt(a.length,e._size.length);var l=t.min(),c=t.max();for(n=0,r=e._size.length;n<r;n++)Xo(l[n],e._size[n]),Xo(c[n],e._size[n]);var u=e._values,h=e._index,d=e._ptr,p=t.dimension(0),f=t.dimension(1),m=[],g=[];p.forEach(function(e,t){g[e]=t[0],m[e]=!0});var v=u?[]:void 0,y=[],b=[];return f.forEach(function(e){for(b.push(y.length),o=d[e],s=d[e+1];o<s;o++)!0===m[n=h[o]]&&(y.push(g[n]),v&&v.push(u[o]))}),b.push(y.length),new i({values:v,index:y,ptr:b,size:a,datatype:e._datatype})}(this,e);case 2:case 3:return function(e,t,n,r){if(!t||!0!==t.isIndex)throw TypeError("Invalid index");var i,o=t.size(),s=t.isScalar();if(qu(n)?(i=n.size(),n=n.toArray()):i=Xr(n),s){if(0!==i.length)throw TypeError("Scalar expected");e.set(t.min(),n,r)}else{if(1!==o.length&&2!==o.length)throw new Xt(o.length,e._size.length,"<");if(i.length<o.length){for(var a=0,l=0;1===o[a]&&1===i[a];)a++;for(;1===o[a];)l++,a++;n=Xc(n,o.length,l,i)}if(!qW(o,i))throw new Xt(o,i,">");if(1===o.length)t.dimension(0).forEach(function(t,i){Xo(t),e.set([t,0],n[i[0]],r)});else{var c=t.dimension(0),u=t.dimension(1);c.forEach(function(t,i){Xo(t),u.forEach(function(o,s){Xo(o),e.set([t,o],n[i[0]][s[0]],r)})})}}return e}(this,e,t,n);default:throw SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!qc(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new Xt(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke get on a Pattern only matrix");var t=e[0],n=e[1];Xo(t,this._size[0]),Xo(n,this._size[1]);var r=s(t,this._ptr[n],this._ptr[n+1],this._index);return r<this._ptr[n+1]&&this._index[r]===t?this._values[r]:0},i.prototype.set=function(e,r,i){if(!qc(e))throw TypeError("Array expected");if(e.length!==this._size.length)throw new Xt(e.length,this._size.length);if(!this._values)throw Error("Cannot invoke set on a Pattern only matrix");var o=e[0],c=e[1],u=this._size[0],h=this._size[1],d=n,p=0;ql(this._datatype)&&(d=t.find(n,[this._datatype,this._datatype])||n,p=t.convert(0,this._datatype)),(o>u-1||c>h-1)&&(l(this,Math.max(o+1,u),Math.max(c+1,h),i),u=this._size[0],h=this._size[1]),Xo(o,u),Xo(c,h);var f=s(o,this._ptr[c],this._ptr[c+1],this._index);return f<this._ptr[c+1]&&this._index[f]===o?d(r,p)?function(e,t,n,r,i){n.splice(e,1),r.splice(e,1);for(var o=t+1;o<i.length;o++)i[o]--}(f,c,this._values,this._index,this._ptr):this._values[f]=r:a(f,o,c,r,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,n){if(!qh(e))throw TypeError("Array or Matrix expected");var r=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw Error("Only two dimensions matrix are supported");return r.forEach(function(e){if(!qr(e)||!qZ(e)||e<0)throw TypeError("Invalid size, must contain positive integers (size: "+Xe(r)+")")}),l(n?this.clone():this,r[0],r[1],t)},i.prototype.reshape=function(e,t){if(!qc(e))throw TypeError("Array expected");if(2!==e.length)throw Error("Sparse matrices can only be reshaped in two dimensions");e.forEach(function(t){if(!qr(t)||!qZ(t)||t<=-2||0===t)throw TypeError("Invalid size, must contain positive integers or -1 (size: "+Xe(e)+")")});var n=this._size[0]*this._size[1],r=(e=Xa(e,n))[0]*e[1];if(n!==r)throw Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var o=[],l=0;l<i._ptr.length;l++)for(var c=0;c<i._ptr[l+1]-i._ptr[l];c++)o.push(l);for(var u=i._values.slice(),h=i._index.slice(),d=0;d<i._index.length;d++){var p=h[d],f=o[d],m=p*i._size[1]+f;o[d]=m%e[1],h[d]=Math.floor(m/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var g=0;g<i._ptr.length;g++)i._ptr[g]=0;for(var v=0;v<u.length;v++){var y=h[v],b=o[v],x=u[v];a(s(y,i._ptr[b],i._ptr[b+1],i._index),y,b,x,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){return new i({values:this._values?qV(this._values):void 0,index:qV(this._index),ptr:qV(this._ptr),size:qV(this._size),datatype:this._datatype})},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,r){if(!this._values)throw Error("Cannot invoke map on a Pattern only matrix");var o=this;return function(e,r,o,s,a){var l=[],c=[],u=[],h=n,d=0;ql(e._datatype)&&(h=t.find(n,[e._datatype,e._datatype])||n,d=t.convert(0,e._datatype));for(var p=function(e,t,n){e=s(e,t,n),h(e,d)||(l.push(e),c.push(t))},f=0;f<=o;f++){u.push(l.length);var m=e._ptr[f],g=e._ptr[f+1];if(a)for(var v=m;v<g;v++){var y=e._index[v];y>=0&&y<=r&&p(e._values[v],y-0,f-0)}else{for(var b={},x=m;x<g;x++)b[e._index[x]]=e._values[x];for(var w=0;w<=r;w++)p(w in b?b[w]:0,w-0,f-0)}}return u.push(l.length),new i({values:l,index:c,ptr:u,size:[r-0+1,o-0+1]})}(this,this._size[0]-1,this._size[1]-1,function(t,n,r){return e(t,[n,r],o)},r)},i.prototype.forEach=function(e,t){if(!this._values)throw Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],s=this._ptr[i+1];if(t)for(var a=o;a<s;a++){var l=this._index[a];e(this._values[a],[l,i],this)}else{for(var c={},u=o;u<s;u++)c[this._index[u]]=this._values[u];for(var h=0;h<n;h++)e(h in c?c[h]:0,[h,i],this)}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var o=this._index[i];yield{value:this._values[i],index:[o,t]}}},i.prototype.toArray=function(){return c(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return c(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+Xe(t,e)+" x "+Xe(n,e)+"] density: "+Xe(r,e)+"\n",o=0;o<n;o++)for(var s=this._ptr[o],a=this._ptr[o+1],l=s;l<a;l++)i+="\n ("+Xe(this._index[l],e)+", "+Xe(o,e)+") ==> "+(this._values?Xe(this._values[l],e):"X");return i},i.prototype.toString=function(){return Xe(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(qi(e)&&(e=e.toNumber()),!qr(e)||!qZ(e))throw TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,n=e<0?-e:0,r=this._size[0],o=this._size[1],s=Math.min(r-n,o-t),a=[],l=[],c=[];c[0]=0;for(var u=t;u<o&&a.length<s;u++)for(var h=this._ptr[u],d=this._ptr[u+1],p=h;p<d;p++){var f=this._index[p];if(f===u-t+n){a.push(this._values[p]),l[a.length-1]=f-n;break}}return c.push(a.length),new i({values:a,index:l,ptr:c,size:[s,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,r,o,s,a){if(!qc(e))throw TypeError("Array expected, size parameter");if(2!==e.length)throw Error("Only two dimensions matrix are supported");if(e=e.map(function(e){if(qi(e)&&(e=e.toNumber()),!qr(e)||!qZ(e)||e<1)throw Error("Size values must be positive integers");return e}),o){if(qi(o)&&(o=o.toNumber()),!qr(o)||!qZ(o))throw TypeError("The parameter k must be an integer number")}else o=0;var l,c=n,u=0;ql(a)&&(c=t.find(n,[a,a])||n,u=t.convert(0,a));var h=o>0?o:0,d=o<0?-o:0,p=e[0],f=e[1],m=Math.min(p-d,f-h);if(qc(r)){if(r.length!==m)throw Error("Invalid value array length");l=function(e){return r[e]}}else if(qu(r)){var g=r.size();if(1!==g.length||g[0]!==m)throw Error("Invalid matrix length");l=function(e){return r.get([e])}}else l=function(){return r};for(var v=[],y=[],b=[],x=0;x<f;x++){b.push(v.length);var w=x-h;if(w>=0&&w<m){var S=l(w);c(S,u)||(y.push(w+d),v.push(S))}}return b.push(v.length),new i({values:v,index:y,ptr:b,size:[p,f]})},i.prototype.swapRows=function(e,t){if(!qr(e)||!qZ(e)||!qr(t)||!qZ(t))throw Error("Row index must be positive integers");if(2!==this._size.length)throw Error("Only two dimensional matrix is supported");return Xo(e,this._size[0]),Xo(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,n,r,i){for(var o=r[e],s=r[e+1],a=o;a<s;a++)i(n[a],t[a])},i._swapRows=function(e,t,n,r,i,o){for(var a=0;a<n;a++){var l=o[a],c=o[a+1],u=s(e,l,c,i),h=s(t,l,c,i);if(u<c&&h<c&&i[u]===e&&i[h]===t){if(r){var d=r[u];r[u]=r[h],r[h]=d}continue}if(u<c&&i[u]===e&&(h>=c||i[h]!==t)){var p=r?r[u]:void 0;i.splice(h,0,t),r&&r.splice(h,0,p),i.splice(h<=u?u+1:u,1),r&&r.splice(h<=u?u+1:u,1);continue}if(h<c&&i[h]===t&&(u>=c||i[u]!==e)){var f=r?r[h]:void 0;i.splice(u,0,e),r&&r.splice(u,0,f),i.splice(u<=h?h+1:h,1),r&&r.splice(u<=h?h+1:h,1)}}},i},{isClass:!0}),K1="matrix",K2={DenseMatrixDependencies:Ky,MatrixDependencies:Kv,SparseMatrixDependencies:{MatrixDependencies:Kv,equalScalarDependencies:KJ,typedDependencies:KK,createSparseMatrixClass:K0},typedDependencies:KK,createMatrix:qY(K1,["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:t,Matrix:n,DenseMatrix:r,SparseMatrix:i}=e;return t(K1,{"":function(){return o([])},string:function(e){return o([],e)},"string, string":function(e,t){return o([],e,t)},Array:function(e){return o(e)},Matrix:function(e){return o(e,e.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});function o(e,t,n){if("dense"===t||"default"===t||void 0===t)return new r(e,n);if("sparse"===t)return new i(e,n);throw TypeError("Unknown matrix type "+JSON.stringify(t)+".")}})},K5="zeros",K3=qY(K5,["typed","config","matrix","BigNumber"],e=>{var{typed:t,config:n,matrix:r,BigNumber:i}=e;return t(K5,{"":function(){return"Array"===n.matrix?o([]):o([],"default")},"...number | BigNumber | string":function(e){if("string"==typeof e[e.length-1]){var t=e.pop();return o(e,t)}return"Array"===n.matrix?o(e):o(e,"default")},Array:o,Matrix:function(e){var t=e.storage();return o(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return o(e.valueOf(),t)}});function o(e,t){var n,o=(n=!1,e.forEach(function(e,t,r){qi(e)&&(n=!0,r[t]=e.toNumber())}),n)?new i(0):0;if(e.forEach(function(e){if("number"!=typeof e||!qZ(e)||e<0)throw Error("Parameters in function zeros must be positive integers")}),t){var s=r(t);return e.length>0?s.resize(e,o):s}var a=[];return e.length>0?Xs(a,e,o):a}}),K4=qY("algorithm11",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var s,a=e._values,l=e._index,c=e._ptr,u=e._size,h=e._datatype;if(!a)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=u[0],p=u[1],f=n,m=0,g=i;"string"==typeof h&&(s=h,f=t.find(n,[s,s]),m=t.convert(0,s),r=t.convert(r,s),g=t.find(i,[s,s]));for(var v=[],y=[],b=[],x=0;x<p;x++){b[x]=y.length;for(var w=c[x],S=c[x+1],A=w;A<S;A++){var C=l[A],k=o?g(r,a[A]):g(a[A],r);f(k,m)||(y.push(C),v.push(k))}}return b[p]=y.length,e.createSparseMatrix({values:v,index:y,ptr:b,size:[d,p],datatype:s})}}),K6=qY("algorithm12",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var s,a=e._values,l=e._index,c=e._ptr,u=e._size,h=e._datatype;if(!a)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=u[0],p=u[1],f=i;"string"==typeof h&&(s=h,r=t.convert(r,s),f=t.find(i,[s,s]));for(var m=[],g=[],v=[],y=0;y<p;y++){for(var b=y+1,x=c[y],w=c[y+1],S=x;S<w;S++){var A=l[S];g[A]=a[S],v[A]=b}for(var C=0;C<d;C++)0===y&&(m[C]=[]),v[C]===b?m[C][y]=o?f(r,g[C]):f(g[C],r):m[C][y]=o?f(r,0):f(0,r)}return new n({data:m,size:[d,p],datatype:s})}}),K9=qY("algorithm14",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,s=e._data,a=e._size,l=e._datatype,c=r;"string"==typeof l&&(o=l,n=t.convert(n,o),c=t.find(r,[o,o]));var u=a.length>0?function e(t,n,r,i,o,s,a){var l=[];if(n===r.length-1)for(var c=0;c<i;c++)l[c]=a?t(s,o[c]):t(o[c],s);else for(var u=0;u<i;u++)l[u]=e(t,n+1,r,r[n+1],o[u],s,a);return l}(c,0,a,a[0],s,n,i):[];return e.createDenseMatrix({data:u,size:qV(a),datatype:o})}});function K8(e,t){var n;if(!qZ(e)||!qZ(t))throw Error("Parameters in function gcd must be integer numbers");for(;0!==t;)n=e%t,e=t,t=n;return e<0?-e:e}function K7(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!qZ(t)||t<0||t>15)throw Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(q2(e,t))}K8.signature="number, number";var Qe="Number of decimals in function round must be an integer",Qt="round",Qn=qY(Qt,["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,zeros:i,BigNumber:o,DenseMatrix:s}=e,a=K4({typed:t,equalScalar:r}),l=K6({typed:t,DenseMatrix:s}),c=K9({typed:t});return t(Qt,{number:K7,"number, number":K7,"number, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(Qe);return new o(e).toDecimalPlaces(t.toNumber())},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw TypeError(Qe);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(Qe);var n=t.toNumber();return e.round(n)},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(Qe);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw TypeError(Qe);return e.round(t)},"Fraction, BigNumber":function(e,t){if(!t.isInteger())throw TypeError(Qe);return e.round(t.toNumber())},"Array | Matrix":function(e){return function e(t,n,r){return t&&"function"==typeof t.map?t.map(function(t){return e(t,n,r)}):n(t)}(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return a(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"Array, number | BigNumber":function(e,t){return c(n(e),t,this,!1).valueOf()},"number | Complex | BigNumber | Fraction, SparseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"number | Complex | BigNumber | Fraction, DenseMatrix":function(e,t){return r(e,0)?i(t.size(),t.storage()):c(t,e,this,!0)},"number | Complex | BigNumber | Fraction, Array":function(e,t){return c(n(t),e,this,!0).valueOf()}})}),Qr=qY("algorithm01",["typed"],e=>{var{typed:t}=e;return function(e,n,r,i){var o,s,a=e._data,l=e._size,c=e._datatype,u=n._values,h=n._index,d=n._ptr,p=n._size,f=n._datatype;if(l.length!==p.length)throw new Xt(l.length,p.length);if(l[0]!==p[0]||l[1]!==p[1])throw RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+p+")");if(!u)throw Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var m=l[0],g=l[1],v="string"==typeof c&&c===f?c:void 0,y=v?t.find(r,[v,v]):r,b=[];for(o=0;o<m;o++)b[o]=[];var x=[],w=[];for(s=0;s<g;s++){for(var S=s+1,A=d[s],C=d[s+1],k=A;k<C;k++)x[o=h[k]]=i?y(u[k],a[o][s]):y(a[o][s],u[k]),w[o]=S;for(o=0;o<m;o++)w[o]===S?b[o][s]=x[o]:b[o][s]=a[o][s]}return e.createDenseMatrix({data:b,size:[m,g],datatype:v})}}),Qi=qY("algorithm04",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o,s,a,l,c,u,h=e._values,d=e._index,p=e._ptr,f=e._size,m=e._datatype,g=r._values,v=r._index,y=r._ptr,b=r._size,x=r._datatype;if(f.length!==b.length)throw new Xt(f.length,b.length);if(f[0]!==b[0]||f[1]!==b[1])throw RangeError("Dimension mismatch. Matrix A ("+f+") must match Matrix B ("+b+")");var w=f[0],S=f[1],A=n,C=0,k=i;"string"==typeof m&&m===x&&(o=m,A=t.find(n,[o,o]),C=t.convert(0,o),k=t.find(i,[o,o]));var M=h&&g?[]:void 0,O=[],T=[],_=h&&g?[]:void 0,I=h&&g?[]:void 0,D=[],R=[];for(a=0;a<S;a++){T[a]=O.length;var E=a+1;for(c=p[a],u=p[a+1],l=c;l<u;l++)s=d[l],O.push(s),D[s]=E,_&&(_[s]=h[l]);for(c=y[a],u=y[a+1],l=c;l<u;l++)if(D[s=v[l]]===E){if(_){var P=k(_[s],g[l]);A(P,C)?D[s]=null:_[s]=P}}else O.push(s),R[s]=E,I&&(I[s]=g[l]);if(_&&I)for(l=T[a];l<O.length;)D[s=O[l]]===E?(M[l]=_[s],l++):R[s]===E?(M[l]=I[s],l++):O.splice(l,1)}return T[S]=O.length,e.createSparseMatrix({values:M,index:O,ptr:T,size:[w,S],datatype:o})}}),Qo=qY("algorithm10",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var s,a=e._values,l=e._index,c=e._ptr,u=e._size,h=e._datatype;if(!a)throw Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=u[0],p=u[1],f=i;"string"==typeof h&&(s=h,r=t.convert(r,s),f=t.find(i,[s,s]));for(var m=[],g=[],v=[],y=0;y<p;y++){for(var b=y+1,x=c[y],w=c[y+1],S=x;S<w;S++){var A=l[S];g[A]=a[S],v[A]=b}for(var C=0;C<d;C++)0===y&&(m[C]=[]),v[C]===b?m[C][y]=o?f(r,g[C]):f(g[C],r):m[C][y]=r}return new n({data:m,size:[d,p],datatype:s})}}),Qs=qY("algorithm13",["typed"],e=>{var{typed:t}=e;return function(e,n,r){var i,o=e._data,s=e._size,a=e._datatype,l=n._data,c=n._size,u=n._datatype,h=[];if(s.length!==c.length)throw new Xt(s.length,c.length);for(var d=0;d<s.length;d++){if(s[d]!==c[d])throw RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+c+")");h[d]=s[d]}var p=r;"string"==typeof a&&a===u&&(i=a,p=t.find(r,[i,i]));var f=h.length>0?function e(t,n,r,i,o,s){var a=[];if(n===r.length-1)for(var l=0;l<i;l++)a[l]=t(o[l],s[l]);else for(var c=0;c<i;c++)a[c]=e(t,n+1,r,r[n+1],o[c],s[c]);return a}(p,0,h,h[0],o,l):[];return e.createDenseMatrix({data:f,size:h,datatype:i})}}),Qa=qY("gcd",["typed","matrix","equalScalar","BigNumber","DenseMatrix"],e=>{var{typed:t,matrix:n,equalScalar:r,BigNumber:i,DenseMatrix:o}=e,s=Qr({typed:t}),a=Qi({typed:t,equalScalar:r}),l=Qo({typed:t,DenseMatrix:o}),c=Qs({typed:t}),u=K9({typed:t});return t("gcd",{"number, number":K8,"BigNumber, BigNumber":function(e,t){if(!e.isInt()||!t.isInt())throw Error("Parameters in function gcd must be integer numbers");for(var n=new i(0);!t.isZero();){var r=e.mod(t);e=t,t=r}return e.lt(n)?e.neg():e},"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return l(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return u(n(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return u(n(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,n){for(var r=this(e,t),i=0;i<n.length;i++)r=this(r,n[i]);return r}})});let{round:Ql}=Xv({roundDependencies:{BigNumberDependencies:Kg,DenseMatrixDependencies:Ky,equalScalarDependencies:KJ,matrixDependencies:K2,typedDependencies:KK,zerosDependencies:{BigNumberDependencies:Kg,matrixDependencies:K2,typedDependencies:KK,createZeros:K3},createRound:Qn}}),{gcd:Qc}=Xv({gcdDependencies:{BigNumberDependencies:Kg,DenseMatrixDependencies:Ky,equalScalarDependencies:KJ,matrixDependencies:K2,typedDependencies:KK,createGcd:Qa}});function Qu(e,t){let n=t.startMs,r=e.values,i=[];for(let e of r){for(;n<e[0];)i.push([n,null]),n+=t.stepMs;i.push([n,e[1]]),n+=t.stepMs}for(;n<=t.endMs;)i.push([n,null]),n+=t.stepMs;return i}function Qh(e){let t,n,r=[];for(let t of e)if(t&&"timeRange"in t){if(void 0===t||void 0===t.timeRange||void 0===t.stepMs)continue;if(r.push(t.stepMs),void 0===n){n={...t.timeRange};continue}t.timeRange.start<n.start&&(n.start=t.timeRange.start),t.timeRange.end>n.end&&(n.end=t.timeRange.end)}else if(t&&"values"in t){for(let e=0;e<t.values.length;e++){let r=t.values[e];if(void 0===r)continue;let[i]=r,o=new Date(i),s=new Date(i);if(void 0===n){n={start:o,end:s};continue}o<n.start&&(n.start=o),s>n.end&&(n.end=s)}if(void 0===n)return;let e=n.start.valueOf(),r=n.end.valueOf(),i=r-e;return{startMs:e,endMs:r,rangeMs:i,stepMs:10}}if(void 0===n)return;if(1===r.length)t=r[0];else{let e=Qc(...r);t=e<10?10:e}let i=n.start.valueOf(),o=n.end.valueOf();return{startMs:i,endMs:o,stepMs:t,rangeMs:o-i}}function Qd(e){return/^[0-9a-fA-F]+$/.test(e)}function Qp(e){if("object"!=typeof e||null===e||!("display"in e))return;let{display:t}=e;if("object"==typeof t&&null!==t&&"name"in t)return"string"==typeof t.name&&t.name?t.name:void 0}function Qf(e){return Qp("object"==typeof e&&null!==e&&"spec"in e?e.spec:void 0)??Qp(e)}function Qm(e){return Qf(e.spec)??e.metadata.name}function Qg(e){let t=Qf(e.spec);return t?`${t} (ID: ${e.metadata.name})`:e.metadata.name}function Qv(e){return{value:{pastDuration:e},display:`Last ${(0,dH.formatDuration)(jF(e),{delimiter:", "})}`}}function Qy(e,t){return"read"===e?"View":t&&"create"===e?"Add":t||"create"!==e?"update"===e?"Edit":"":"Create"}function Qb(e,t){return t&&"create"===e?"Add":t&&"update"===e?"Apply":t?"":"Save"}let Qx={JoinByColumnValue:"Join by column value",MergeColumns:"Merge columns",MergeIndexedColumns:"Merge indexed columns",MergeSeries:"Merge series",ExtractColumnFields:"Extract column fields",PivotByLabel:"Pivot by label"};var Qw=n("cl");let QS=G5((0,Qw.A)({}),{echartsTheme:{textStyle:{fontFamily:"Lato"},categoryAxis:{splitLine:{show:!1}},timeAxis:{splitLine:{show:!1}},bar:{barCategoryGap:2}}}),QA={chartsTheme:QS,enablePinning:!1,enableSyncGrouping:!0,lastTooltipPinnedCoords:null,setLastTooltipPinnedCoords:()=>null},QC={defaultProps:{variant:"standard",severity:"success"},styleOverrides:{standardError:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.error.dark,color:e.palette.error.light,[`& .${C2.icon}`]:{color:e.palette.error.main}}:{...e.typography.body1,backgroundColor:e.palette.error.light,color:e.palette.error.dark,[`& .${C2.icon}`]:{color:e.palette.error.main}},standardInfo:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.info.dark,color:e.palette.info.light,[`& .${C2.icon}`]:{color:e.palette.info.main}}:{...e.typography.body1,backgroundColor:e.palette.info.light,color:e.palette.info.dark,[`& .${C2.icon}`]:{color:e.palette.info.main}},standardSuccess:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.success.dark,color:e.palette.success.light,[`& .${C2.icon}`]:{color:e.palette.success.main}}:{...e.typography.body1,backgroundColor:e.palette.success.light,color:e.palette.success.dark,[`& .${C2.icon}`]:{color:e.palette.success.main}},standardWarning:({theme:e})=>"dark"===e.palette.mode?{...e.typography.body1,backgroundColor:e.palette.warning.dark,color:e.palette.warning.light,[`& .${C2.icon}`]:{color:e.palette.warning.main}}:{...e.typography.body1,backgroundColor:e.palette.warning.light,color:e.palette.warning.dark,[`& .${C2.icon}`]:{color:e.palette.warning.main}},root:{["& ."+ci.root]:{textDecoration:"underline"}}}},Qk={styleOverrides:{root:({theme:e})=>({backgroundColor:e.palette.background.default})}},QM={50:"#E7F1FC",100:"#D0E3FA",150:"#B8D5F7",200:"#A1C7F5",300:"#72ABF0",400:"#438FEB",500:"#1473E6",600:"#105CB8",700:"#0C458A",800:"#082E5C",850:"#062345",900:"#04172E",950:"#020C17"},QO="#FFFFFF",QT={50:"#F0F1F6",100:"#E1E3ED",150:"#D2D5E4",200:"#C3C7DB",300:"#A4ACC8",400:"#8690B6",500:"#717CA4",600:"#535D83",700:"#3E4662",800:"#2A2E42",850:"#1F2331",900:"#151721",950:"#0A0C10"},Q_={50:"#EAF9F1",100:"#D5F2E3",150:"#C1ECD4",200:"#ACE5C6",300:"#82D9AA",400:"#59CC8D",500:"#2FBF71",600:"#26995A",700:"#1C7344",800:"#134C2D",850:"#0E3922",900:"#092617",950:"#05130B"},QI={50:"#FFF5E8",100:"#FFECD2",150:"#FFE2BB",200:"#FFD9A4",300:"#FFC577",400:"#FFB249",500:"#FF9F1C",600:"#CC7F16",700:"#995F11",800:"#66400B",850:"#4D3008",900:"#332006",950:"#1A1003"},QD={50:"#EFE9FD",100:"#E0D2FC",150:"#D0BCFA",200:"#C1A6F8",300:"#A179F5",400:"#824DF1",500:"#6320EE",600:"#4F1ABE",700:"#3B138F",800:"#280D5F",850:"#1E0A47",900:"#140630",950:"#0A0318"},QR={50:"#FDEDED",100:"#FBDADA",150:"#F9C8C8",200:"#F7B5B5",300:"#F29191",400:"#EE6C6C",500:"#EA4747",600:"#BD3939",700:"#902B2B",800:"#621D1D",850:"#4C1616",900:"#350F0F",950:"#1F0808"},QE=e=>"light"===e?{main:QM["500"],dark:QM["600"],light:QM["50"]}:{main:QM["400"],dark:QM["800"],light:QM["200"]},QP={fontFamily:'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontSize:"1.5rem",fontWeight:600,lineHeight:"32px"},h2:{fontSize:"1.25rem",fontWeight:600,lineHeight:"28px"},h3:{fontSize:"1rem",fontWeight:600,lineHeight:"24px"},h4:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px"},h5:void 0,h6:void 0,body1:{fontSize:"0.875rem",fontWeight:400,lineHeight:"20px"},body2:{fontSize:"0.75rem",fontWeight:400,lineHeight:"18px"},subtitle1:{fontSize:"1rem",fontWeight:400,lineHeight:"24px",letterSpacing:"0.02rem"},subtitle2:{fontSize:"0.875rem",fontWeight:600,lineHeight:"22px",letterSpacing:"0.03rem",textTransform:"uppercase"},button:{fontSize:"0.875rem",fontWeight:600,lineHeight:"1.25rem",textTransform:"none",letterSpacing:"0.03rem"},caption:{fontSize:"0.6875rem",fontWeight:400,lineHeight:"16px"}},QL=({theme:e})=>({..."light"===e.palette.mode?{}:{backgroundImage:"unset",backgroundColor:e.palette.designSystem.grey[800]}});function QN(e,t={},n=!1){var r,i;let o;return(0,Qw.A)({palette:function(e){let t,n,r,i;return{mode:e,primary:QE(e),secondary:"light"===e?{main:QT["600"],dark:QT["900"],light:QT["100"]}:{main:QO,dark:QO,light:QO},grey:"light"===e?{50:QT["50"],100:QT["100"],200:QT["200"],300:QT["300"],400:QT["400"],500:QT["500"],600:QT["600"],700:QT["700"],800:QT["800"],900:QT["900"],950:QT["950"]}:{50:QT["950"],100:QT["900"],200:QT["800"],300:QT["700"],400:QT["600"],500:QT["500"],600:QT["400"],700:QT["300"],800:QT["200"],900:QT["100"],950:QT["50"]},background:(t=QM["150"],n="rgba(21, 23, 33, 0.75)","light"===e?{navigation:t,overlay:n,default:QO,paper:QT["50"],code:QT["50"],tooltip:QT["100"],lighter:QT["50"],border:QT["100"]}:{navigation:t,overlay:n,default:QT["900"],paper:QT["850"],code:QT["800"],tooltip:QT["600"],lighter:QT["700"],border:QT["600"]}),text:(r=QT["800"],i=QT["300"],"light"===e?{navigation:r,accent:i,primary:QT["800"],secondary:QT["700"],disabled:QT["300"],link:QM["500"],linkHover:QM["600"]}:{navigation:r,accent:i,primary:QO,secondary:QT["50"],disabled:QT["600"],link:QM["400"],linkHover:QM["500"]}),error:"light"===e?{main:QR["500"],dark:QR["600"],light:QR["50"]}:{main:QR["400"],dark:QR["800"],light:QR["300"]},warning:"light"===e?{main:QI["500"],dark:QI["700"],light:QI["50"]}:{main:QI["400"],dark:QI["800"],light:QI["300"]},info:QE(e),success:"light"===e?{main:Q_["500"],dark:Q_["700"],light:Q_["50"]}:{main:Q_["400"],dark:Q_["800"],light:Q_["300"]},common:{white:QO,black:"#000000"},designSystem:{blue:QM,green:Q_,grey:QT,orange:QI,purple:QD,red:QR}}}(e),typography:QP,mixins:{},components:(r=e,i=n,o={MuiAlert:QC,MuiFormControl:{defaultProps:{size:"small"}},MuiPaper:Qk,MuiTextField:{defaultProps:{size:"small"}},MuiDrawer:{styleOverrides:{paper:QL}},MuiDialog:{styleOverrides:{paper:QL}},MuiPopover:{styleOverrides:{paper:QL}}},i?o:{MuiCssBaseline:{styleOverrides:{body:{colorScheme:r}}},...o}),...t})}var QB=n("jh"),Qj=n("aU"),Qz=n("EB"),Q$=n("lm");function QF(e){let t,n,r,i,o,s,a,u,h=(0,c.c)(20),{value:d,onChange:p}=e;h[0]===Symbol.for("react.memo_cache_sentinel")?(t={width:"100%"},n=[],h[0]=t,h[1]=n):(t=h[0],n=h[1]),h[2]!==d.spec.columns?(r=d.spec.columns??[],h[2]=d.spec.columns,h[3]=r):r=h[3],h[4]!==p||h[5]!==d?(i=(e,t)=>{p({...d,spec:{...d.spec,columns:t}})},h[4]=p,h[5]=d,h[6]=i):i=h[6],h[7]!==r||h[8]!==i?(o=(0,l.jsx)(mR,{freeSolo:!0,multiple:!0,id:"join-columns",sx:t,options:n,value:r,renderInput:QV,onChange:i}),h[7]=r,h[8]=i,h[9]=o):o=h[9];let f=!d.spec.disabled,m=!d.spec.disabled;return h[10]!==p||h[11]!==d?(s=e=>p({...d,spec:{...d.spec,disabled:!e.target.checked}}),h[10]=p,h[11]=d,h[12]=s):s=h[12],h[13]!==f||h[14]!==m||h[15]!==s?(a=(0,l.jsx)(B2.A,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(Uh.A,{value:f,checked:m,onChange:s})}),h[13]=f,h[14]=m,h[15]=s,h[16]=a):a=h[16],h[17]!==o||h[18]!==a?(u=(0,l.jsxs)(eb,{direction:"row",children:[o,a]}),h[17]=o,h[18]=a,h[19]=u):u=h[19],u}function QV(e){return(0,l.jsx)(ex.A,{...e,variant:"outlined",label:"Columns",required:!0})}function QH(e){let t,n,r,i,o,s,a,u,h,d,p,f=(0,c.c)(28),{value:m,onChange:g}=e;f[0]===Symbol.for("react.memo_cache_sentinel")?(t={width:"100%"},n=[],f[0]=t,f[1]=n):(t=f[0],n=f[1]),f[2]!==m.spec.columns?(r=m.spec.columns??[],f[2]=m.spec.columns,f[3]=r):r=f[3],f[4]!==g||f[5]!==m?(i=(e,t)=>{g({...m,spec:{...m.spec,columns:t}})},f[4]=g,f[5]=m,f[6]=i):i=f[6],f[7]!==r||f[8]!==i?(o=(0,l.jsx)(mR,{freeSolo:!0,multiple:!0,id:"merge-columns-columns",sx:t,options:n,value:r,renderInput:QW,onChange:i}),f[7]=r,f[8]=i,f[9]=o):o=f[9];let v=m.spec.name??"";f[10]===Symbol.for("react.memo_cache_sentinel")?(s={width:"100%"},f[10]=s):s=f[10],f[11]!==g||f[12]!==m?(a=e=>{g({...m,spec:{...m.spec,name:e}})},f[11]=g,f[12]=m,f[13]=a):a=f[13],f[14]!==v||f[15]!==a?(u=(0,l.jsx)(hR,{id:"merge-columns-name",variant:"outlined",label:"Output Name",value:v,sx:s,onChange:a,required:!0}),f[14]=v,f[15]=a,f[16]=u):u=f[16];let y=!m.spec.disabled,b=!m.spec.disabled;return f[17]!==g||f[18]!==m?(h=e=>g({...m,spec:{...m.spec,disabled:!e.target.checked}}),f[17]=g,f[18]=m,f[19]=h):h=f[19],f[20]!==y||f[21]!==b||f[22]!==h?(d=(0,l.jsx)(B2.A,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(Uh.A,{value:y,checked:b,onChange:h})}),f[20]=y,f[21]=b,f[22]=h,f[23]=d):d=f[23],f[24]!==d||f[25]!==o||f[26]!==u?(p=(0,l.jsxs)(eb,{direction:"row",gap:1,alignItems:"center",children:[o,u,d]}),f[24]=d,f[25]=o,f[26]=u,f[27]=p):p=f[27],p}function QW(e){return(0,l.jsx)(ex.A,{...e,variant:"outlined",label:"Columns",required:!0})}function QU(e){let t,n,r,i,o,s,a=(0,c.c)(17),{value:u,onChange:h}=e,d=u.spec.column??"";a[0]===Symbol.for("react.memo_cache_sentinel")?(t={width:"100%"},a[0]=t):t=a[0],a[1]!==h||a[2]!==u?(n=e=>{h({...u,spec:{...u.spec,column:e}})},a[1]=h,a[2]=u,a[3]=n):n=a[3],a[4]!==d||a[5]!==n?(r=(0,l.jsx)(hR,{id:"merge-indexed-columns",variant:"outlined",label:"Column",placeholder:"Example: 'value' for merging 'value #1', 'value #2' and 'value #...'",value:d,sx:t,onChange:n,required:!0}),a[4]=d,a[5]=n,a[6]=r):r=a[6];let p=!u.spec.disabled,f=!u.spec.disabled;return a[7]!==h||a[8]!==u?(i=e=>h({...u,spec:{...u.spec,disabled:!e.target.checked}}),a[7]=h,a[8]=u,a[9]=i):i=a[9],a[10]!==p||a[11]!==f||a[12]!==i?(o=(0,l.jsx)(B2.A,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(Uh.A,{value:p,checked:f,onChange:i})}),a[10]=p,a[11]=f,a[12]=i,a[13]=o):o=a[13],a[14]!==r||a[15]!==o?(s=(0,l.jsxs)(eb,{direction:"row",children:[r,o]}),a[14]=r,a[15]=o,a[16]=s):s=a[16],s}function QG(e){let t,n,r=(0,c.c)(7),{value:i,onChange:o}=e,s=!i.spec.disabled,a=!i.spec.disabled;return r[0]!==o||r[1]!==i?(t=e=>o({...i,spec:{...i.spec,disabled:!e.target.checked}}),r[0]=o,r[1]=i,r[2]=t):t=r[2],r[3]!==s||r[4]!==a||r[5]!==t?(n=(0,l.jsx)(eb,{direction:"row",children:(0,l.jsx)(B2.A,{label:"Enabled",labelPlacement:"start",control:(0,l.jsx)(Uh.A,{value:s,checked:a,onChange:t})})}),r[3]=s,r[4]=a,r[5]=t,r[6]=n):n=r[6],n}function Qq(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g,v,y,b,x=(0,c.c)(39);return x[0]!==e?({value:r,onChange:t,...n}=e,x[0]=e,x[1]=t,x[2]=n,x[3]=r):(t=x[1],n=x[2],r=x[3]),x[4]===Symbol.for("react.memo_cache_sentinel")?(i={width:"100%"},x[4]=i):i=x[4],x[5]!==t||x[6]!==r?(o=e=>t({...r,kind:e}),x[5]=t,x[6]=r,x[7]=o):o=x[7],x[8]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(lA.A,{value:"JoinByColumnValue",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Join by column value"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Regroup rows with equal cell value in a column"})]})}),x[8]=s):s=x[8],x[9]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.jsx)(lA.A,{value:"MergeColumns",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Merge columns"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Multiple columns are merged to one column"})]})}),x[9]=a):a=x[9],x[10]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)(lA.A,{value:"MergeIndexedColumns",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Merge indexed columns"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Indexed columns are merged to one column"})]})}),x[10]=u):u=x[10],x[11]===Symbol.for("react.memo_cache_sentinel")?(h=(0,l.jsx)(lA.A,{value:"MergeSeries",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Merge series"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Series will be merged by their labels"})]})}),x[11]=h):h=x[11],x[12]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(lA.A,{value:"PivotByLabel",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Pivot by label"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Time × label matrix (rows = time, columns = label values)"})]})}),x[12]=d):d=x[12],x[13]!==o||x[14]!==r.kind?(p=(0,l.jsxs)(hR,{select:!0,label:"Kind",value:r.kind,onChange:o,children:[s,a,u,h,d]}),x[13]=o,x[14]=r.kind,x[15]=p):p=x[15],x[16]!==t||x[17]!==r?(f="JoinByColumnValue"===r.kind&&(0,l.jsx)(QF,{value:r,onChange:t}),x[16]=t,x[17]=r,x[18]=f):f=x[18],x[19]!==t||x[20]!==r?(m="MergeColumns"===r.kind&&(0,l.jsx)(QH,{value:r,onChange:t}),x[19]=t,x[20]=r,x[21]=m):m=x[21],x[22]!==t||x[23]!==r?(g="MergeIndexedColumns"===r.kind&&(0,l.jsx)(QU,{value:r,onChange:t}),x[22]=t,x[23]=r,x[24]=g):g=x[24],x[25]!==t||x[26]!==r?(v="MergeSeries"===r.kind&&(0,l.jsx)(QG,{value:r,onChange:t}),x[25]=t,x[26]=r,x[27]=v):v=x[27],x[28]!==t||x[29]!==r?(y="PivotByLabel"===r.kind&&(0,l.jsx)(QX,{value:r,onChange:t}),x[28]=t,x[29]=r,x[30]=y):y=x[30],x[31]!==n||x[32]!==m||x[33]!==g||x[34]!==v||x[35]!==y||x[36]!==p||x[37]!==f?(b=(0,l.jsxs)(eb,{gap:2,sx:i,mt:1,...n,children:[p,f,m,g,v,y]}),x[31]=n,x[32]=m,x[33]=g,x[34]=v,x[35]=y,x[36]=p,x[37]=f,x[38]=b):b=x[38],b}function QX(e){let t,n,r,i,o,s,a,u,h,d,p,f=(0,c.c)(36),{value:m,onChange:g}=e,v=m.spec.columnLabel??"";f[0]!==g||f[1]!==m?(t=e=>g({...m,spec:{...m.spec,columnLabel:e.target.value}}),f[0]=g,f[1]=m,f[2]=t):t=f[2],f[3]!==v||f[4]!==t?(n=(0,l.jsx)(ex.A,{label:"Column label",fullWidth:!0,value:v,onChange:t,helperText:"Label that becomes dynamic column headers (e.g. farm_short)"}),f[3]=v,f[4]=t,f[5]=n):n=f[5];let y=m.spec.rowField??"timestamp";f[6]!==g||f[7]!==m?(r=e=>g({...m,spec:{...m.spec,rowField:e.target.value}}),f[6]=g,f[7]=m,f[8]=r):r=f[8],f[9]!==y||f[10]!==r?(i=(0,l.jsx)(ex.A,{label:"Row field",fullWidth:!0,value:y,onChange:r,helperText:"Field used for row identity (default: timestamp)"}),f[9]=y,f[10]=r,f[11]=i):i=f[11];let b=m.spec.valueField??"value";f[12]!==g||f[13]!==m?(o=e=>g({...m,spec:{...m.spec,valueField:e.target.value}}),f[12]=g,f[13]=m,f[14]=o):o=f[14],f[15]!==b||f[16]!==o?(s=(0,l.jsx)(ex.A,{label:"Value field",fullWidth:!0,value:b,onChange:o}),f[15]=b,f[16]=o,f[17]=s):s=f[17];let x=m.spec.rowColumnName??"";f[18]!==g||f[19]!==m?(a=e=>g({...m,spec:{...m.spec,rowColumnName:e.target.value||void 0}}),f[18]=g,f[19]=m,f[20]=a):a=f[20],f[21]!==x||f[22]!==a?(u=(0,l.jsx)(ex.A,{label:"Row column name",fullWidth:!0,value:x,onChange:a,helperText:"Optional display name for the row column (default: row field)"}),f[21]=x,f[22]=a,f[23]=u):u=f[23];let w=!!m.spec.disabled;return f[24]!==g||f[25]!==m?(h=(e,t)=>g({...m,spec:{...m.spec,disabled:t}}),f[24]=g,f[25]=m,f[26]=h):h=f[26],f[27]!==w||f[28]!==h?(d=(0,l.jsx)(B2.A,{control:(0,l.jsx)(Uh.A,{checked:w,onChange:h}),label:"Disabled"}),f[27]=w,f[28]=h,f[29]=d):d=f[29],f[30]!==u||f[31]!==d||f[32]!==n||f[33]!==i||f[34]!==s?(p=(0,l.jsxs)(eb,{gap:2,children:[n,i,s,u,d]}),f[30]=u,f[31]=d,f[32]=n,f[33]=i,f[34]=s,f[35]=p):p=f[35],p}function QY(e){let t,n,r,i,o,s,a,u,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k=(0,c.c)(48);k[0]!==e?({index:t,value:a,isCollapsed:n,onChange:r,onCollapse:i,onDelete:o,...s}=e,k[0]=e,k[1]=t,k[2]=n,k[3]=r,k[4]=i,k[5]=o,k[6]=s,k[7]=a):(t=k[1],n=k[2],r=k[3],i=k[4],o=k[5],s=k[6],a=k[7]),k[8]!==r||k[9]!==a?(u=function(){r({...a,spec:{...a.spec,disabled:!a.spec?.disabled}})},k[8]=r,k[9]=a,k[10]=u):u=k[10];let M=u,O=`transform-toggle#${t}`;return k[11]!==n||k[12]!==i?(h=()=>i(!n),k[11]=n,k[12]=i,k[13]=h):h=k[13],k[14]!==n?(d=n?(0,l.jsx)(Qj,{}):(0,l.jsx)(QB,{}),k[14]=n,k[15]=d):d=k[15],k[16]!==O||k[17]!==h||k[18]!==d?(p=(0,l.jsx)(er,{"data-testid":O,size:"small",onClick:h,children:d}),k[16]=O,k[17]=h,k[18]=d,k[19]=p):p=k[19],k[20]===Symbol.for("react.memo_cache_sentinel")?(f={textTransform:"none"},k[20]=f):f=k[20],k[21]!==a.kind?(m=(0,l.jsx)(nc.A,{variant:"overline",component:"h4",sx:f,children:a.kind?(0,l.jsx)("span",{children:(0,l.jsx)("strong",{children:Qx[a.kind]})}):(0,l.jsx)("strong",{children:"Select a transformation kind"})}),k[21]=a.kind,k[22]=m):m=k[22],k[23]!==p||k[24]!==m?(g=(0,l.jsxs)(eb,{direction:"row",gap:1,children:[p,m]}),k[23]=p,k[24]=m,k[25]=g):g=k[25],k[26]!==M||k[27]!==n||k[28]!==a.spec?.disabled?(v=n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(hC,{title:a.spec?.disabled?"Enable transformation":"Disable transformation",placement:"top",children:(0,l.jsx)(er,{size:"small",sx:{marginLeft:"auto"},onClick:M,children:a.spec?.disabled?(0,l.jsx)(Qz,{}):(0,l.jsx)(Q$,{})})}),(0,l.jsx)(c4,{flexItem:!0,orientation:"vertical",variant:"middle"})]}),k[26]=M,k[27]=n,k[28]=a.spec?.disabled,k[29]=v):v=k[29],k[30]===Symbol.for("react.memo_cache_sentinel")?(y={marginLeft:"auto"},k[30]=y):y=k[30],k[31]===Symbol.for("react.memo_cache_sentinel")?(b=(0,l.jsx)(jP,{}),k[31]=b):b=k[31],k[32]!==o?(x=(0,l.jsx)(hC,{title:"Remove transformation",placement:"top",children:(0,l.jsx)(er,{size:"small",sx:y,onClick:o,children:b})}),k[32]=o,k[33]=x):x=k[33],k[34]!==x||k[35]!==v?(w=(0,l.jsxs)(eb,{direction:"row",gap:1,children:[v,x]}),k[34]=x,k[35]=v,k[36]=w):w=k[36],k[37]!==w||k[38]!==g?(S=(0,l.jsxs)(eb,{direction:"row",alignItems:"center",borderBottom:1,borderColor:QK,justifyContent:"space-between",gap:4,children:[g,w]}),k[37]=w,k[38]=g,k[39]=S):S=k[39],k[40]!==n||k[41]!==r||k[42]!==a?(A=!n&&(0,l.jsx)(Qq,{value:a,onChange:r}),k[40]=n,k[41]=r,k[42]=a,k[43]=A):A=k[43],k[44]!==s||k[45]!==S||k[46]!==A?(C=(0,l.jsxs)(eb,{...s,children:[S,A]}),k[44]=s,k[45]=S,k[46]=A,k[47]=C):C=k[47],C}function QK(e){return e.palette.divider}function QQ(e){let t,n,r,i,o,s,a,h,d,p,f,m,g,v=(0,c.c)(33);v[0]!==e?({value:r,onChange:t,...n}=e,v[0]=e,v[1]=t,v[2]=n,v[3]=r):(t=v[1],n=v[2],r=v[3]),v[4]!==r?(i=r.map(QJ),v[4]=r,v[5]=i):i=v[5];let[y,b]=(0,u.useState)(i);v[6]!==t||v[7]!==r?(o=function(e,n){let i=[...r];i[e]=n,t(i)},v[6]=t,v[7]=r,v[8]=o):o=v[8];let x=o;v[9]!==t||v[10]!==r?(s=function(){let e=[...r];e.push({kind:"",spec:{}}),t(e),b(QZ)},v[9]=t,v[10]=r,v[11]=s):s=v[11];let w=s;v[12]!==t||v[13]!==r?(a=function(e){let n=[...r];n.splice(e,1),t(n),b(t=>(t.splice(e,1),[...t]))},v[12]=t,v[13]=r,v[14]=a):a=v[14];let S=a;v[15]===Symbol.for("react.memo_cache_sentinel")?(h=function(e,t){b(n=>(n[e]=t,[...n]))},v[15]=h):h=v[15];let A=h;if(v[16]!==x||v[17]!==S||v[18]!==y||v[19]!==r){let e;v[21]!==x||v[22]!==S||v[23]!==y?(e=(e,t)=>(0,l.jsx)(QY,{index:t,value:e,isCollapsed:y[t]??!0,onChange:e=>x(t,e),onDelete:()=>S(t),onCollapse:e=>A(t,e)},t),v[21]=x,v[22]=S,v[23]=y,v[24]=e):e=v[24],d=r.map(e),v[16]=x,v[17]=S,v[18]=y,v[19]=r,v[20]=d}else d=v[20];return v[25]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(jE,{}),f={marginTop:1},v[25]=p,v[26]=f):(p=v[25],f=v[26]),v[27]!==w?(m=(0,l.jsx)(G,{variant:"contained",startIcon:p,sx:f,onClick:w,children:"Add Transformation"}),v[27]=w,v[28]=m):m=v[28],v[29]!==n||v[30]!==d||v[31]!==m?(g=(0,l.jsxs)(eb,{gap:1,...n,children:[d,m]}),v[29]=n,v[30]=d,v[31]=m,v[32]=g):g=v[32],g}function QZ(e){return e.push(!1),[...e]}function QJ(){return!0}function Q0(e){let t,n,r,i,o,s,a=(0,c.c)(17),{value:u,onChange:h,timeOptions:d,height:p}=e;t:{if(u&&!d.some(e=>e.value.pastDuration===u)){let e;a[0]!==u?(e=(0,l.jsx)(lA.A,{value:u,children:u}),a[0]=u,a[1]=e):e=a[1],t=e;break t}t=void 0}let f=t;a[2]!==h?(n=e=>{h(e.target.value)},a[2]=h,a[3]=n):n=a[3];let m=`Select refresh interval. Currently set to ${u}`;return a[4]!==m?(r={"aria-label":m},a[4]=m,a[5]=r):r=a[5],a[6]!==p?(i={".MuiSelect-select":p?{lineHeight:p,paddingY:0}:{}},a[6]=p,a[7]=i):i=a[7],a[8]!==d?(o=d.map(Q1),a[8]=d,a[9]=o):o=a[9],a[10]!==f||a[11]!==n||a[12]!==r||a[13]!==i||a[14]!==o||a[15]!==u?(s=(0,l.jsx)(fq.A,{children:(0,l.jsx)(e7.A,{children:(0,l.jsxs)(lC.A,{id:"refreshInterval",value:u,onChange:n,inputProps:r,sx:i,children:[o,f]})})}),a[10]=f,a[11]=n,a[12]=r,a[13]=i,a[14]=o,a[15]=u,a[16]=s):s=a[16],s}function Q1(e,t){return(0,l.jsx)(lA.A,{value:e.value.pastDuration,children:e.display},t)}function Q2(e){let t,n,r,i,o,s,a,u=(0,c.c)(27),{repeatItems:h,maxPer:d,gap:p,renderItem:f,containerSx:m,rowSx:g}=e,v=Math.max(1,d);if(u[0]!==v||u[1]!==h){t=[];for(let e=0;e<h.length;e+=v)t.push(h.slice(e,e+v));u[0]=v,u[1]=h,u[2]=t}else t=u[2];u[3]!==v||u[4]!==t?(n={rows:t,perRow:v},u[3]=v,u[4]=t,u[5]=n):n=u[5];let{rows:y,perRow:b}=n,x=`${p}px`;if(u[6]!==x?(r={display:"flex",flexDirection:"column",width:"100%",height:"100%",gap:x},u[6]=x,u[7]=r):r=u[7],u[8]!==m?(i=Array.isArray(m)?m:[m],u[8]=m,u[9]=i):i=u[9],u[10]!==r||u[11]!==i?(o=[r,...i],u[10]=r,u[11]=i,u[12]=o):o=u[12],u[13]!==p||u[14]!==b||u[15]!==f||u[16]!==g||u[17]!==y){let e;u[19]!==p||u[20]!==b||u[21]!==f||u[22]!==g?(e=(e,t)=>(0,l.jsx)(e7.A,{sx:[{display:"flex",gap:`${p}px`},...Array.isArray(g)?g:[g]],children:e.map((e,n)=>(0,l.jsx)(e7.A,{sx:{width:`calc((100% - ${p*(b-1)}px) / ${b})`,overflow:"hidden"},children:f(e,{rowIndex:t,colIndex:n})},`${t}-${n}`))},t),u[19]=p,u[20]=b,u[21]=f,u[22]=g,u[23]=e):e=u[23],s=y.map(e),u[13]=p,u[14]=b,u[15]=f,u[16]=g,u[17]=y,u[18]=s}else s=u[18];return u[24]!==o||u[25]!==s?(a=(0,l.jsx)(e7.A,{sx:o,children:s}),u[24]=o,u[25]=s,u[26]=a):a=u[26],a}var Q5=n("Xs");let Q3=(e,t,n)=>{let r=e.keys[0];if(Array.isArray(t))t.forEach((t,r)=>{n((t,n)=>{r<=e.keys.length-1&&(0===r?Object.assign(t,n):t[e.up(e.keys[r])]=n)},t)});else if(t&&"object"==typeof t){let i,o;(Object.keys(t).length>e.keys.length?e.keys:(i=e.keys,o=Object.keys(t),i.filter(e=>o.includes(e)))).forEach(i=>{if(e.keys.includes(i)){let o=t[i];void 0!==o&&n((t,n)=>{r===i?Object.assign(t,n):t[e.up(i)]=n},o)}})}else("number"==typeof t||"string"==typeof t)&&n((e,t)=>{Object.assign(e,t)},t)};function Q4(e){return`--Grid-${e}Spacing`}function Q6(e){return`--Grid-parent-${e}Spacing`}let Q9="--Grid-columns",Q8="--Grid-parent-columns",Q7=({theme:e,ownerState:t})=>{let n={};return Q3(e.breakpoints,t.size,(e,t)=>{let r={};"grow"===t&&(r={flexBasis:0,flexGrow:1,maxWidth:"100%"}),"auto"===t&&(r={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),"number"==typeof t&&(r={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${t} / var(${Q8}) - (var(${Q8}) - ${t}) * (var(${Q6("column")}) / var(${Q8})))`}),e(n,r)}),n},Ze=({theme:e,ownerState:t})=>{let n={};return Q3(e.breakpoints,t.offset,(e,t)=>{let r={};"auto"===t&&(r={marginLeft:"auto"}),"number"==typeof t&&(r={marginLeft:0===t?"0px":`calc(100% * ${t} / var(${Q8}) + var(${Q6("column")}) * ${t} / var(${Q8}))`}),e(n,r)}),n},Zt=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={[Q9]:12};return Q3(e.breakpoints,t.columns,(e,t)=>{let r=t??12;e(n,{[Q9]:r,"> *":{[Q8]:r}})}),n},Zn=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Q3(e.breakpoints,t.rowSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[Q4("row")]:i,"> *":{[Q6("row")]:i}})}),n},Zr=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Q3(e.breakpoints,t.columnSpacing,(t,r)=>{let i="string"==typeof r?r:e.spacing?.(r);t(n,{[Q4("column")]:i,"> *":{[Q6("column")]:i}})}),n},Zi=({theme:e,ownerState:t})=>{if(!t.container)return{};let n={};return Q3(e.breakpoints,t.direction,(e,t)=>{e(n,{flexDirection:t})}),n},Zo=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&"wrap"!==e.wrap&&{flexWrap:e.wrap},gap:`var(${Q4("row")}) var(${Q4("column")})`}}),Zs=(0,eh.A)(),Za=es("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function Zl(e){return ec({props:e,name:"MuiGrid",defaultTheme:Zs})}let Zc=function(e={}){let{createStyledComponent:t=Za,useThemeProps:n=Zl,useTheme:r=el.A,componentName:i="MuiGrid"}=e;function o(e,t,n=()=>!0){let r={};return null===e||(Array.isArray(e)?e.forEach((e,i)=>{null!==e&&n(e)&&t.keys[i]&&(r[t.keys[i]]=e)}):"object"==typeof e?Object.keys(e).forEach(t=>{let i=e[t];null!=i&&n(i)&&(r[t]=i)}):r[t.keys[0]]=e),r}let s=t(Zt,Zr,Zn,Q7,Zi,Zo,Ze),a=u.forwardRef(function(e,t){var a;let c,h=r(),p=n(e),m=(0,eu.A)(p);a=h.breakpoints,c=[],void 0!==m.item&&(delete m.item,c.push("item")),void 0!==m.zeroMinWidth&&(delete m.zeroMinWidth,c.push("zeroMinWidth")),a.keys.forEach(e=>{void 0!==m[e]&&(c.push(e),delete m[e])});let{className:g,children:v,columns:y=12,container:b=!1,component:x="div",direction:w="row",wrap:S="wrap",size:A={},offset:C={},spacing:k=0,rowSpacing:O=k,columnSpacing:T=k,unstable_level:_=0,...I}=m,D=o(A,h.breakpoints,e=>!1!==e),R=o(C,h.breakpoints),E=e.columns??(_?void 0:y),P=e.spacing??(_?void 0:k),L=e.rowSpacing??e.spacing??(_?void 0:O),N=e.columnSpacing??e.spacing??(_?void 0:T),B={...m,level:_,columns:E,container:b,direction:w,wrap:S,spacing:P,rowSpacing:L,columnSpacing:N,size:D,offset:R},j=((e,t)=>{let n,{container:r,direction:o,spacing:s,wrap:a,size:l}=e,c={root:["root",r&&"container","wrap"!==a&&`wrap-xs-${String(a)}`,...void 0===o?[]:"object"==typeof o?Object.entries(o).map(([e,t])=>`direction-${e}-${t}`):[`direction-xs-${String(o)}`],...(n=[],Object.entries(l).forEach(([e,t])=>{!1!==t&&void 0!==t&&n.push(`grid-${e}-${String(t)}`)}),n),...r?((e,t="xs")=>{function n(e){return void 0!==e&&("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e&&e>0)}if(n(e))return[`spacing-${t}-${String(e)}`];if("object"==typeof e&&!Array.isArray(e)){let t=[];return Object.entries(e).forEach(([e,r])=>{n(r)&&t.push(`spacing-${e}-${String(r)}`)}),t}return[]})(s,t.breakpoints.keys[0]):[]]};return(0,f.A)(c,e=>(0,M.Ay)(i,e),{})})(B,h);return(0,l.jsx)(s,{ref:t,as:x,ownerState:B,className:(0,d.A)(j.root,g),...I,children:u.Children.map(v,e=>u.isValidElement(e)&&(0,Q5.A)(e,["Grid"])&&b&&e.props.container?u.cloneElement(e,{unstable_level:e.props?.unstable_level??_+1}):e)})});return a.muiName="Grid",a}({createStyledComponent:(0,y.A)("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.container&&t.container]}}),componentName:"MuiGrid2",useThemeProps:e=>(0,x.b)({props:e,name:"MuiGrid2"}),useTheme:e8.A}),Zu=e=>{let t,n,r,i=(0,c.c)(53);switch(i[0]!==e?({mapping:t,onChange:n,...r}=e,i[0]=e,i[1]=t,i[2]=n,i[3]=r):(t=i[1],n=i[2],r=i[3]),t.kind){case"Value":{let e,o,s,a=t.spec?.value??"";return i[4]!==t||i[5]!==n?(e=e=>n({...t,spec:{...t.spec,value:e.target.value}}),i[4]=t,i[5]=n,i[6]=e):e=i[6],i[7]!==a||i[8]!==e?(o=(0,l.jsx)(ex.A,{label:"Value",placeholder:"Exact value",value:a,onChange:e,fullWidth:!0}),i[7]=a,i[8]=e,i[9]=o):o=i[9],i[10]!==r||i[11]!==o?(s=(0,l.jsx)(eb,{gap:1,direction:"row",...r,children:o}),i[10]=r,i[11]=o,i[12]=s):s=i[12],s}case"Range":{let e,o,s,a,c,u=t.spec?.from??"";i[13]!==t||i[14]!==n?(e=e=>n({...t,spec:{...t.spec,from:""===e.target.value?void 0:+e.target.value}}),i[13]=t,i[14]=n,i[15]=e):e=i[15],i[16]!==u||i[17]!==e?(o=(0,l.jsx)(ex.A,{label:"From",placeholder:"Start of range",value:u,onChange:e,fullWidth:!0}),i[16]=u,i[17]=e,i[18]=o):o=i[18];let h=t.spec?.to??"";return i[19]!==t||i[20]!==n?(s=e=>n({...t,spec:{...t.spec,to:""===e.target.value?void 0:+e.target.value}}),i[19]=t,i[20]=n,i[21]=s):s=i[21],i[22]!==h||i[23]!==s?(a=(0,l.jsx)(ex.A,{label:"To",placeholder:"End of range (inclusive)",value:h,onChange:s,fullWidth:!0}),i[22]=h,i[23]=s,i[24]=a):a=i[24],i[25]!==r||i[26]!==o||i[27]!==a?(c=(0,l.jsxs)(eb,{gap:1,direction:"row",...r,children:[o,a]}),i[25]=r,i[26]=o,i[27]=a,i[28]=c):c=i[28],c}case"Regex":{let e,o,s,a=t.spec?.pattern??"";return i[29]!==t||i[30]!==n?(e=e=>n({...t,spec:{...t.spec,pattern:e.target.value}}),i[29]=t,i[30]=n,i[31]=e):e=i[31],i[32]!==a||i[33]!==e?(o=(0,l.jsx)(ex.A,{label:"Regular Expression",placeholder:"JavaScript regular expression",value:a,onChange:e,fullWidth:!0}),i[32]=a,i[33]=e,i[34]=o):o=i[34],i[35]!==r||i[36]!==o?(s=(0,l.jsx)(eb,{gap:1,direction:"row",...r,children:o}),i[35]=r,i[36]=o,i[37]=s):s=i[37],s}case"Misc":{let e,o,s,a,c,u,h,d,p,f=t.spec?.value??"";return i[38]!==t||i[39]!==n?(e=e=>n({...t,spec:{value:e.target.value}}),i[38]=t,i[39]=n,i[40]=e):e=i[40],i[41]===Symbol.for("react.memo_cache_sentinel")?(o={renderValue:Zd},i[41]=o):o=i[41],i[42]===Symbol.for("react.memo_cache_sentinel")?(s=(0,l.jsx)(lA.A,{value:"empty",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Empty"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Matches empty string"})]})}),i[42]=s):s=i[42],i[43]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.jsx)(lA.A,{value:"null",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"Null"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Matches null or undefined"})]})}),i[43]=a):a=i[43],i[44]===Symbol.for("react.memo_cache_sentinel")?(c=(0,l.jsx)(lA.A,{value:"NaN",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"NaN"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Matches Not a Number value"})]})}),i[44]=c):c=i[44],i[45]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)(lA.A,{value:"true",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"True"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Matches true boolean"})]})}),i[45]=u):u=i[45],i[46]===Symbol.for("react.memo_cache_sentinel")?(h=(0,l.jsx)(lA.A,{value:"false",children:(0,l.jsxs)(eb,{children:[(0,l.jsx)(nc.A,{children:"False"}),(0,l.jsx)(nc.A,{variant:"caption",children:"Matches false boolean"})]})}),i[46]=h):h=i[46],i[47]!==f||i[48]!==e?(d=(0,l.jsxs)(ex.A,{select:!0,label:"Value",value:f,onChange:e,SelectProps:o,fullWidth:!0,children:[s,a,c,u,h]}),i[47]=f,i[48]=e,i[49]=d):d=i[49],i[50]!==r||i[51]!==d?(p=(0,l.jsx)(eb,{gap:1,direction:"row",...r,children:d}),i[50]=r,i[51]=d,i[52]=p):p=i[52],p}default:return null}},Zh=e=>{let t,n,r,i,o,s,a,u,h,d,p,f,m,g,v,y,b,x,w,S,A,C,k,M,O,T,_,I,D,R,E,P,L,N,B=(0,c.c)(71);B[0]!==e?({mapping:t,onChange:n,onDelete:r,...i}=e,B[0]=e,B[1]=t,B[2]=n,B[3]=r,B[4]=i):(t=B[1],n=B[2],r=B[3],i=B[4]),B[5]!==t||B[6]!==n?(o=e=>{n({...t,spec:{...t.spec,result:{...t.spec.result,color:e}}})},B[5]=t,B[6]=n,B[7]=o):o=B[7];let j=o;B[8]===Symbol.for("react.memo_cache_sentinel")?(s={xs:5},B[8]=s):s=B[8],B[9]!==t||B[10]!==n?(a=e=>n({...t,kind:e.target.value}),B[9]=t,B[10]=n,B[11]=a):a=B[11],B[12]===Symbol.for("react.memo_cache_sentinel")?(u={width:"120px"},B[12]=u):u=B[12],B[13]===Symbol.for("react.memo_cache_sentinel")?(h=(0,l.jsx)(nc.A,{children:"Value"}),B[13]=h):h=B[13],B[14]!==t.kind?(d="Value"!==t.kind&&(0,l.jsx)(nc.A,{variant:"caption",children:"Matches an exact text value"}),B[14]=t.kind,B[15]=d):d=B[15],B[16]!==d?(p=(0,l.jsx)(lA.A,{value:"Value",children:(0,l.jsxs)(eb,{children:[h,d]})}),B[16]=d,B[17]=p):p=B[17],B[18]===Symbol.for("react.memo_cache_sentinel")?(f=(0,l.jsx)(nc.A,{children:"Range"}),B[18]=f):f=B[18],B[19]!==t.kind?(m="Range"!==t.kind&&(0,l.jsx)(nc.A,{variant:"caption",children:"Matches against a numerical range"}),B[19]=t.kind,B[20]=m):m=B[20],B[21]!==m?(g=(0,l.jsx)(lA.A,{value:"Range",children:(0,l.jsxs)(eb,{children:[f,m]})}),B[21]=m,B[22]=g):g=B[22],B[23]===Symbol.for("react.memo_cache_sentinel")?(v=(0,l.jsx)(nc.A,{children:"Regex"}),B[23]=v):v=B[23],B[24]!==t.kind?(y="Regex"!==t.kind&&(0,l.jsx)(nc.A,{variant:"caption",children:"Matches against a regular expression"}),B[24]=t.kind,B[25]=y):y=B[25],B[26]!==y?(b=(0,l.jsx)(lA.A,{value:"Regex",children:(0,l.jsxs)(eb,{children:[v,y]})}),B[26]=y,B[27]=b):b=B[27],B[28]===Symbol.for("react.memo_cache_sentinel")?(x=(0,l.jsx)(nc.A,{children:"Misc"}),B[28]=x):x=B[28],B[29]!==t.kind?(w="Misc"!==t.kind&&(0,l.jsx)(nc.A,{variant:"caption",children:"Matches against empty, null and NaN values"}),B[29]=t.kind,B[30]=w):w=B[30],B[31]!==w?(S=(0,l.jsx)(lA.A,{value:"Misc",children:(0,l.jsxs)(eb,{children:[x,w]})}),B[31]=w,B[32]=S):S=B[32],B[33]!==t.kind||B[34]!==g||B[35]!==b||B[36]!==S||B[37]!==a||B[38]!==p?(A=(0,l.jsxs)(ex.A,{select:!0,label:"Type",value:t.kind,onChange:a,required:!0,sx:u,children:[p,g,b,S]}),B[33]=t.kind,B[34]=g,B[35]=b,B[36]=S,B[37]=a,B[38]=p,B[39]=A):A=B[39],B[40]!==t||B[41]!==n?(C=e=>n({...t,...e}),B[40]=t,B[41]=n,B[42]=C):C=B[42],B[43]!==t||B[44]!==C?(k=(0,l.jsx)(Zu,{width:"100%",mapping:t,onChange:C}),B[43]=t,B[44]=C,B[45]=k):k=B[45],B[46]!==A||B[47]!==k?(M=(0,l.jsx)(Zc,{size:s,children:(0,l.jsxs)(eb,{direction:"row",gap:1,width:"100%",children:[A,k]})}),B[46]=A,B[47]=k,B[48]=M):M=B[48],B[49]===Symbol.for("react.memo_cache_sentinel")?(O={xs:4},B[49]=O):O=B[49];let z=t.spec?.result?.value??"";return B[50]!==t||B[51]!==n?(T=e=>n({...t,spec:{...t.spec,result:{...t.spec?.result,value:e.target.value}}}),B[50]=t,B[51]=n,B[52]=T):T=B[52],B[53]!==z||B[54]!==T?(_=(0,l.jsx)(Zc,{size:O,children:(0,l.jsx)(ex.A,{label:"Display text",value:z,onChange:T,fullWidth:!0})}),B[53]=z,B[54]=T,B[55]=_):_=B[55],B[56]===Symbol.for("react.memo_cache_sentinel")?(I={xs:1},B[56]=I):I=B[56],B[57]!==j||B[58]!==t.spec.result?(D=(0,l.jsx)(Zc,{size:I,children:(0,l.jsx)(eb,{direction:"row",justifyContent:"center",gap:1,children:t.spec?.result?.color?(0,l.jsx)(e4,{label:"Color",color:t.spec.result.color??"#000",onColorChange:j,onClear:()=>j(void 0)}):(0,l.jsx)(er,{onClick:()=>j("#000"),children:(0,l.jsx)(jE,{})})})}),B[57]=j,B[58]=t.spec.result,B[59]=D):D=B[59],B[60]===Symbol.for("react.memo_cache_sentinel")?(R={xs:1},B[60]=R):R=B[60],B[61]===Symbol.for("react.memo_cache_sentinel")?(E={marginLeft:"auto"},B[61]=E):E=B[61],B[62]===Symbol.for("react.memo_cache_sentinel")?(P=(0,l.jsx)(jP,{}),B[62]=P):P=B[62],B[63]!==r?(L=(0,l.jsx)(Zc,{size:R,textAlign:"end",children:(0,l.jsx)(hC,{title:"Remove mapping settings",placement:"top",children:(0,l.jsx)(er,{size:"small",sx:E,onClick:r,children:P})})}),B[63]=r,B[64]=L):L=B[64],B[65]!==i||B[66]!==M||B[67]!==_||B[68]!==D||B[69]!==L?(N=(0,l.jsxs)(Zc,{container:!0,spacing:2,...i,children:[M,_,D,L]}),B[65]=i,B[66]=M,B[67]=_,B[68]=D,B[69]=L,B[70]=N):N=B[70],N};function Zd(e){switch(e){case"empty":return"Empty";case"null":return"Null";case"NaN":return"NaN";case"true":return"True";case"false":return"False";default:return String(e)}}let Zp=e=>{let t,n,r,i,o,s,a,h,d,p,f,m,g,v,y,b=(0,c.c)(31),{mappings:x,onChange:w}=e,[S,A]=(0,u.useState)(x);b[0]!==w||b[1]!==S?(t=function(e,t){let n=[...S];n[e]=t,A(n),w(n)},b[0]=w,b[1]=S,b[2]=t):t=b[2];let C=t;b[3]!==w||b[4]!==S?(n=function(){let e=[...S];e.push({kind:"Value",spec:{result:{value:""}}}),A(e),w(e)},b[3]=w,b[4]=S,b[5]=n):n=b[5];let k=n;b[6]!==w||b[7]!==S?(r=function(e){let t=[...S];t.splice(e,1),A(t),w(t)},b[6]=w,b[7]=S,b[8]=r):r=b[8];let M=r;if(b[9]===Symbol.for("react.memo_cache_sentinel")?(i=(0,l.jsx)(Zc,{size:{xs:5},children:(0,l.jsx)(nc.A,{variant:"subtitle1",children:"Condition"})}),b[9]=i):i=b[9],b[10]===Symbol.for("react.memo_cache_sentinel")?(o=(0,l.jsx)(Zc,{size:{xs:4},children:(0,l.jsx)(nc.A,{variant:"subtitle1",children:"Display Text"})}),b[10]=o):o=b[10],b[11]===Symbol.for("react.memo_cache_sentinel")?(s={xs:1},b[11]=s):s=b[11],b[12]===Symbol.for("react.memo_cache_sentinel")?(a=(0,l.jsx)(Zc,{size:s,textAlign:"center",children:(0,l.jsx)(nc.A,{variant:"subtitle1",children:"Color"})}),b[12]=a):a=b[12],b[13]===Symbol.for("react.memo_cache_sentinel")?(h=(0,l.jsxs)(Zc,{container:!0,spacing:2,children:[i,o,a,(0,l.jsx)(Zc,{size:{xs:1}})]}),b[13]=h):h=b[13],b[14]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(c4,{flexItem:!0,orientation:"horizontal"}),b[14]=d):d=b[14],b[15]!==C||b[16]!==M||b[17]!==S){let e;b[19]!==C||b[20]!==M?(e=(e,t)=>(0,l.jsx)(Zh,{mapping:e,onChange:e=>C(t,e),onDelete:()=>M(t)},t),b[19]=C,b[20]=M,b[21]=e):e=b[21],p=S.map(e),b[15]=C,b[16]=M,b[17]=S,b[18]=p}else p=b[18];return b[22]!==p?(f=(0,l.jsx)(eb,{gap:1.5,divider:d,children:p}),b[22]=p,b[23]=f):f=b[23],b[24]===Symbol.for("react.memo_cache_sentinel")?(m=(0,l.jsx)(jE,{}),g={marginTop:1},b[24]=m,b[25]=g):(m=b[24],g=b[25]),b[26]!==k?(v=(0,l.jsx)(G,{variant:"contained",startIcon:m,sx:g,onClick:k,children:"Add value mappings"}),b[26]=k,b[27]=v):v=b[27],b[28]!==f||b[29]!==v?(y=(0,l.jsxs)(eb,{spacing:1,children:[h,f,v]}),b[28]=f,b[29]=v,b[30]=y):y=b[30],y};class Zf{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}}function Zm(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(Zv(t)||-1==t)return n}}function Zg(e){return 32==e||9==e}function Zv(e){return 10==e||13==e}function Zy(e){var t;return e<0||Zg(t=e)||Zv(t)}Zf.top=new Zf(null,-1,0);let Zb=new class{constructor(e){this.start=e.start,this.shift=e.shift||k6,this.reduce=e.reduce||k6,this.reuse=e.reuse||k6,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}({start:Zf.top,reduce:(e,t)=>3==e.type&&(20==t||34==t)?e.parent:e,shift(e,t,n,r){if(3==t)return new Zf(e,Zm(r,r.pos),1);if(65==t||5==t)return new Zf(e,Zm(r,r.pos),2);if(63==t)return e.parent;if(19==t||33==t)return new Zf(e,0,3);if(13==t&&4==e.type)return e.parent;if(47==t){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new Zf(e,e.depth+ +t[0],4)}return e},hash:e=>e.hash});function Zx(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Zy(e.peek(n+3))}let Zw=new kY((e,t)=>{if(-1==e.next&&t.canShift(64))return e.acceptToken(64);let n=e.peek(-1);if((Zv(n)||n<0)&&3!=t.context.type){if(Zx(e,45))if(!t.canShift(63))return e.acceptToken(1,3);else e.acceptToken(63);if(Zx(e,46))if(!t.canShift(63))return e.acceptToken(2,3);else e.acceptToken(63);let n=0;for(;32==e.next;)n++,e.advance();!(n<t.context.depth)&&(n!=t.context.depth||1!=t.context.type||45==e.next&&Zy(e.peek(1)))||-1==e.next||Zv(e.next)||35==e.next||e.acceptToken(63,-n)}},{contextual:!0}),ZS=new kY((e,t)=>{if(3==t.context.type){63==e.next&&(e.advance(),Zy(e.next)&&e.acceptToken(7));return}if(45==e.next)e.advance(),Zy(e.next)&&e.acceptToken(1==t.context.type&&t.context.depth==Zm(e,e.pos-1)?4:3);else if(63==e.next)e.advance(),Zy(e.next)&&e.acceptToken(2==t.context.type&&t.context.depth==Zm(e,e.pos-1)?6:5);else{let n=e.pos;for(;;)if(Zg(e.next)){if(e.pos==n)return;e.advance()}else if(33==e.next)Zk(e);else if(38==e.next)ZM(e);else if(42==e.next){ZM(e);break}else if(39==e.next||34==e.next){if(ZO(e,!0))break;return}else if(91==e.next||123==e.next){if(!function(e){for(let t=[],n=e.pos+1024;;)if(91==e.next||123==e.next)t.push(e.next),e.advance();else if(39==e.next||34==e.next){if(!ZO(e,!0))return!1}else if(93==e.next||125==e.next){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else{if(e.next<0||e.pos>n||Zv(e.next))return!1;e.advance()}}(e))return;break}else{ZI(e,!0,!1,0);break}for(;Zg(e.next);)e.advance();if(58==e.next){if(e.pos==n&&t.canShift(29))return;Zy(e.peek(1))&&e.acceptTokenTo(2==t.context.type&&t.context.depth==Zm(e,n)?66:65,n)}}},{contextual:!0});function ZA(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function ZC(e,t){var n;return 37==e.next?(e.advance(),ZA(e.next)&&e.advance(),ZA(e.next)&&e.advance(),!0):(!!((n=e.next)>32)&&!!(n<127)&&34!=n&&37!=n&&44!=n&&60!=n&&62!=n&&92!=n&&94!=n&&96!=n&&123!=n&&124!=n&&125!=n||!!t&&44==e.next)&&(e.advance(),!0)}function Zk(e){if(e.advance(),60==e.next){for(e.advance();;)if(!ZC(e,!0)){62==e.next&&e.advance();break}}else for(;ZC(e,!1););}function ZM(e){for(e.advance();!Zy(e.next)&&"f"!=ZT(e.next);)e.advance()}function ZO(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let o=e.next;if(o<0)break;if(e.advance(),o==n)if(39==o)if(39==e.next)e.advance();else break;else break;else if(92==o&&34==n)e.next>=0&&e.advance();else if(Zv(o)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function ZT(e){return e<33?"u":e>125?"s":"iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif"[e-33]}function Z_(e,t){let n=ZT(e);return"u"!=n&&!(t&&"f"==n)}function ZI(e,t,n,r){if(!("s"==ZT(e.next)||(63==e.next||58==e.next||45==e.next)&&Z_(e.peek(1),n)))return!1;e.advance();let i=e.pos;for(;;){var o;let s=e.next,a=0,l=r+1;for(;Zg(o=s)||Zv(o);){if(Zv(s)){if(t)return!1;l=0}else l++;s=e.peek(++a)}if(!(s>=0&&(58==s?Z_(e.peek(a+1),n):35==s?32!=e.peek(a-1):Z_(s,n)))||!n&&l<=r||0==l&&!n&&(Zx(e,45,a)||Zx(e,46,a)))break;if(t&&"f"==ZT(s))return!1;for(let t=a;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}let ZD=new kY((e,t)=>{if(33==e.next)Zk(e),e.acceptToken(12);else if(38==e.next||42==e.next){let t=38==e.next?10:11;ZM(e),e.acceptToken(t)}else 39==e.next||34==e.next?(ZO(e,!1),e.acceptToken(9)):ZI(e,!1,3==t.context.type,t.context.depth)&&e.acceptToken(8)}),ZR=new kY((e,t)=>{let n=4==t.context.type?t.context.depth:-1,r=e.pos;r:for(;;){let i=0,o=e.next;for(;32==o;)o=e.peek(++i);if(!i&&(Zx(e,45,i)||Zx(e,46,i))||!Zv(o)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break r;let t=Zv(e.next);if(e.advance(),t)continue r;r=e.pos}}e.acceptTokenTo(13,r)}),ZE=Mi({DirectiveName:MC.keyword,DirectiveContent:MC.attributeValue,"DirectiveEnd DocEnd":MC.meta,QuotedLiteral:MC.string,BlockLiteralHeader:MC.special(MC.string),BlockLiteralContent:MC.content,Literal:MC.content,"Key/Literal Key/QuotedLiteral":MC.definition(MC.propertyName),"Anchor Alias":MC.labelName,Tag:MC.typeName,Comment:MC.lineComment,": , -":MC.separator,"?":MC.punctuation,"[ ]":MC.squareBracket,"{ }":MC.brace}),ZP=k9.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:Zb,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[ZE],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Zw,ZS,ZD,ZR,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),ZL=R0.define({name:"yaml",parser:ZP.configure({props:[El.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if("BlockLiteralContent"==t.name&&t.from<t.to)return e.baseIndentFor(t);if("BlockLiteral"==t.name)return e.baseIndentFor(t)+e.unit;if("BlockSequence"==t.name||"BlockMapping"==t.name)return e.column(t.firstChild.from,1);if("QuotedLiteral"==t.name)break;if("Literal"==t.name){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)break}}return null},FlowMapping:Ed({closing:"}"}),FlowSequence:Ed({closing:"]"})}),Eg.add({"FlowMapping FlowSequence":Ev,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});MC.meta;let ZN=Symbol.for("yaml.alias"),ZB=Symbol.for("yaml.document"),Zj=Symbol.for("yaml.map"),Zz=Symbol.for("yaml.pair"),Z$=Symbol.for("yaml.scalar"),ZF=Symbol.for("yaml.seq"),ZV=Symbol.for("yaml.node.type"),ZH=e=>!!e&&"object"==typeof e&&e[ZV]===ZN,ZW=e=>!!e&&"object"==typeof e&&e[ZV]===ZB,ZU=e=>!!e&&"object"==typeof e&&e[ZV]===Zj,ZG=e=>!!e&&"object"==typeof e&&e[ZV]===Zz,Zq=e=>!!e&&"object"==typeof e&&e[ZV]===Z$,ZX=e=>!!e&&"object"==typeof e&&e[ZV]===ZF;function ZY(e){if(e&&"object"==typeof e)switch(e[ZV]){case Zj:case ZF:return!0}return!1}function ZK(e){if(e&&"object"==typeof e)switch(e[ZV]){case ZN:case Zj:case Z$:case ZF:return!0}return!1}let ZQ=e=>(Zq(e)||ZY(e))&&!!e.anchor,ZZ=Symbol("break visit"),ZJ=Symbol("skip children"),Z0=Symbol("remove node");function Z1(e,t){let n=Z4(t);ZW(e)?Z2(null,e.contents,n,Object.freeze([e]))===Z0&&(e.contents=null):Z2(null,e,n,Object.freeze([]))}function Z2(e,t,n,r){let i=Z6(e,t,n,r);if(ZK(i)||ZG(i))return Z9(e,r,i),Z2(e,i,n,r);if("symbol"!=typeof i){if(ZY(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Z2(e,t.items[e],n,r);if("number"==typeof i)e=i-1;else{if(i===ZZ)return ZZ;i===Z0&&(t.items.splice(e,1),e-=1)}}}else if(ZG(t)){r=Object.freeze(r.concat(t));let e=Z2("key",t.key,n,r);if(e===ZZ)return ZZ;e===Z0&&(t.key=null);let i=Z2("value",t.value,n,r);if(i===ZZ)return ZZ;i===Z0&&(t.value=null)}}return i}async function Z5(e,t){let n=Z4(t);ZW(e)?await Z3(null,e.contents,n,Object.freeze([e]))===Z0&&(e.contents=null):await Z3(null,e,n,Object.freeze([]))}async function Z3(e,t,n,r){let i=await Z6(e,t,n,r);if(ZK(i)||ZG(i))return Z9(e,r,i),Z3(e,i,n,r);if("symbol"!=typeof i){if(ZY(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await Z3(e,t.items[e],n,r);if("number"==typeof i)e=i-1;else{if(i===ZZ)return ZZ;i===Z0&&(t.items.splice(e,1),e-=1)}}}else if(ZG(t)){r=Object.freeze(r.concat(t));let e=await Z3("key",t.key,n,r);if(e===ZZ)return ZZ;e===Z0&&(t.key=null);let i=await Z3("value",t.value,n,r);if(i===ZZ)return ZZ;i===Z0&&(t.value=null)}}return i}function Z4(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Z6(e,t,n,r){return"function"==typeof n?n(e,t,r):ZU(t)?n.Map?.(e,t,r):ZX(t)?n.Seq?.(e,t,r):ZG(t)?n.Pair?.(e,t,r):Zq(t)?n.Scalar?.(e,t,r):ZH(t)?n.Alias?.(e,t,r):void 0}function Z9(e,t,n){let r=t[t.length-1];if(ZY(r))r.items[e]=n;else if(ZG(r))"key"===e?r.key=n:r.value=n;else if(ZW(r))r.contents=n;else{let e=ZH(r)?"alias":"scalar";throw Error(`Cannot replace node with ${e} parent`)}}Z1.BREAK=ZZ,Z1.SKIP=ZJ,Z1.REMOVE=Z0,Z5.BREAK=ZZ,Z5.SKIP=ZJ,Z5.REMOVE=Z0;let Z8={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Z7=e=>e.replace(/[!,[\]{}]/g,e=>Z8[e]);class Je{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Je.defaultYaml,e),this.tags=Object.assign({},Je.defaultTags,t)}clone(){let e=new Je(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new Je(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Je.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Je.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Je.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Je.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),r=n.shift();switch(r){case"%TAG":{if(2!==n.length&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[e,r]=n;return this.tags[e]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==n.length)return t(0,"%YAML directive should contain exactly one part"),!1;let[e]=n;if("1.1"===e||"1.2"===e)return this.yaml.version=e,!0;{let n=/^\d+\.\d+$/.test(e);return t(6,`Unsupported YAML version ${e}`,n),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){let n=e.slice(2,-1);return"!"===n||"!!"===n?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return"!"===n?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Z7(e.substring(n.length));return"!"===e[0]?e:`!<${e}>`}toString(e){let t,n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);if(e&&r.length>0&&ZK(e.contents)){let n={};Z1(e.contents,(e,t)=>{ZK(t)&&t.tag&&(n[t.tag]=!0)}),t=Object.keys(n)}else t=[];for(let[i,o]of r)("!!"!==i||"tag:yaml.org,2002:"!==o)&&(!e||t.some(e=>e.startsWith(o)))&&n.push(`%TAG ${i} ${o}`);return n.join("\n")}}function Jt(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=JSON.stringify(e);throw Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function Jn(e){let t=new Set;return Z1(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Jr(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Ji(e,t,n,r){if(r&&"object"==typeof r)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Ji(e,r,String(t),n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Ji(e,r,t,n);void 0===i?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Ji(e,r,t,t);void 0===n?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Ji(e,r,t,n);void 0===i?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function Jo(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Jo(e,String(t),n));if(e&&"function"==typeof e.toJSON){if(!n||!ZQ(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return"bigint"!=typeof e||n?.keep?e:Number(e)}Je.defaultYaml={explicit:!1,version:"1.2"},Je.defaultTags={"!!":"tag:yaml.org,2002:"};class Js{constructor(e){Object.defineProperty(this,ZV,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!ZW(e))throw TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},s=Jo(this,"",o);if("function"==typeof r)for(let{count:e,res:t}of o.anchors.values())r(t,e);return"function"==typeof i?Ji(i,{"":s},"",s):s}}class Ja extends Js{constructor(e){super(ZN),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(e,t){let n,r;if(t?.maxAliasCount===0)throw ReferenceError("Alias resolution is disabled");for(let i of(t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Z1(e,{Node:(e,t)=>{(ZH(t)||ZQ(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n)),n)){if(i===this)break;i.anchor===this.source&&(r=i)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,o=e.get(r);if(o||(Jo(r,null,t),o=e.get(r)),o?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(o.count+=1,0===o.aliasCount&&(o.aliasCount=function e(t,n,r){if(ZH(n)){let e=n.resolve(t),i=r&&e&&r.get(e);return i?i.count*i.aliasCount:0}if(ZY(n)){let i=0;for(let o of n.items){let n=e(t,o,r);n>i&&(i=n)}return i}return ZG(n)?Math.max(e(t,n.key,r),e(t,n.value,r)):1}(n,r,e)),o.count*o.aliasCount>i))throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n)throw ReferenceError(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Jt(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source))throw Error(`Unresolved alias (the anchor must be set before the alias): ${this.source}`);if(e.implicitKey)return`${r} `}return r}}let Jl=e=>!e||"function"!=typeof e&&"object"!=typeof e;class Jc extends Js{constructor(e){super(Z$),this.value=e}toJSON(e,t){return t?.keep?this.value:Jo(this.value,e,t)}toString(){return String(this.value)}}function Ju(e,t,n){let r;if(ZW(e)&&(e=e.contents),ZK(e))return e;if(ZG(e)){let t=n.schema[Zj].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"u">typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:o,onTagObj:s,schema:a,sourceObjects:l}=n;if(i&&e&&"object"==typeof e){if(r=l.get(e))return r.anchor??(r.anchor=o(e)),new Ja(r.anchor);r={anchor:null,node:null},l.set(e,r)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let c=function(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}(e,t,a.tags);if(!c){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){let t=new Jc(e);return r&&(r.node=t),t}c=e instanceof Map?a[Zj]:Symbol.iterator in Object(e)?a[ZF]:a[Zj]}s&&(s(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,e,n):"function"==typeof c?.nodeClass?.from?c.nodeClass.from(n.schema,e,n):new Jc(e);return t?u.tag=t:c.default||(u.tag=c.tag),r&&(r.node=u),u}function Jh(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if("number"==typeof n&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Ju(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}Jc.BLOCK_FOLDED="BLOCK_FOLDED",Jc.BLOCK_LITERAL="BLOCK_LITERAL",Jc.PLAIN="PLAIN",Jc.QUOTE_DOUBLE="QUOTE_DOUBLE",Jc.QUOTE_SINGLE="QUOTE_SINGLE";let Jd=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class Jp extends Js{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ZK(t)||ZG(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Jd(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(ZY(i))i.addIn(r,t);else if(void 0===i&&this.schema)this.set(n,Jh(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(0===n.length)return this.delete(t);let r=this.get(t,!0);if(ZY(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return 0===r.length?!t&&Zq(i)?i.value:i:ZY(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ZG(t))return!1;let n=t.value;return null==n||e&&Zq(n)&&null==n.value&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(0===n.length)return this.has(t);let r=this.get(t,!0);return!!ZY(r)&&r.hasIn(n)}setIn(e,t){let[n,...r]=e;if(0===r.length)this.set(n,t);else{let e=this.get(n,!0);if(ZY(e))e.setIn(r,t);else if(void 0===e&&this.schema)this.set(n,Jh(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}}let Jf=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Jm(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}let Jg=(e,t,n)=>e.endsWith("\n")?Jm(n,t):n.includes("\n")?"\n"+Jm(n,t):(e.endsWith(" ")?"":" ")+n,Jv="block",Jy="quoted";function Jb(e,t,n="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){let l,c,u;if(!i||i<0)return e;i<o&&(o=0);let h=Math.max(1+o,1+i-t.length);if(e.length<=h)return e;let d=[],p={},f=i-t.length;"number"==typeof r&&(r>i-Math.max(2,o)?d.push(0):f=i-r);let m=!1,g=-1,v=-1,y=-1;for(n===Jv&&-1!==(g=Jx(e,g,t.length))&&(f=g+h);u=e[g+=1];){if(n===Jy&&"\\"===u){switch(v=g,e[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}y=g}if("\n"===u)n===Jv&&(g=Jx(e,g,t.length)),f=g+t.length+h,l=void 0;else{if(" "===u&&c&&" "!==c&&"\n"!==c&&" "!==c){let t=e[g+1];t&&" "!==t&&"\n"!==t&&" "!==t&&(l=g)}if(g>=f)if(l)d.push(l),f=l+h,l=void 0;else if(n===Jy){for(;" "===c||" "===c;)c=u,u=e[g+=1],m=!0;let t=g>y+1?g-2:v-1;if(p[t])return e;d.push(t),p[t]=!0,f=t+h,l=void 0}else m=!0}c=u}if(m&&a&&a(),0===d.length)return e;s&&s();let b=e.slice(0,d[0]);for(let r=0;r<d.length;++r){let i=d[r],o=d[r+1]||e.length;0===i?b=`
|
|
69
|
+
${t}${e.slice(0,o)}`:(n===Jy&&p[i]&&(b+=`${e[i]}\\`),b+=`
|
|
70
|
+
${t}${e.slice(i+1,o)}`)}return b}function Jx(e,t,n){let r=t,i=t+1,o=e[i];for(;" "===o||" "===o;)if(t<i+n)o=e[++t];else{do o=e[++t];while(o&&"\n"!==o)r=t,o=e[i=t+1]}return r}let Jw=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});function JS(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),s="",a=0;for(let e=0,t=n[e];t;t=n[++e])if(" "===t&&"\\"===n[e+1]&&"n"===n[e+2]&&(s+=n.slice(a,e)+"\\ ",e+=1,a=e,t="\\"),"\\"===t)switch(n[e+1]){case"u":{s+=n.slice(a,e);let t=n.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=n.substr(e,6)}e+=5,a=e+1}break;case"n":if(r||'"'===n[e+2]||n.length<i)e+=1;else{for(s+=n.slice(a,e)+"\n\n";"\\"===n[e+2]&&"n"===n[e+3]&&'"'!==n[e+4];)s+="\n",e+=2;s+=o," "===n[e+2]&&(s+="\\"),e+=1,a=e+1}break;default:e+=1}return s=a?s+n.slice(a):n,r?s:Jb(s,o,"quoted",Jw(t,!1))}function JA(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return JS(e,t);let n=t.indent||(/^(%|---|\.\.\.)/m.test(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
71
|
+
${n}`)+"'";return t.implicitKey?r:Jb(r,n,"flow",Jw(t,!1))}function JC(e,t){let n,{singleQuote:r}=t.options;if(!1===r)n=JS;else{let t=e.includes('"'),i=e.includes("'");n=t&&!i?JA:i&&!t?JS:r?JA:JS}return n(e,t)}try{s=RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{s=/\n+(?!\n|$)/g}function Jk({comment:e,type:t,value:n},r,i,o){let a,l,c,u,{blockQuote:h,commentString:d,lineWidth:p}=r.options;if(!h||/\n[\t ]+$/.test(n))return JC(n,r);let f=r.indent||(r.forceBlockIndent||(u=n,/^(%|---|\.\.\.)/m.test(u))?" ":""),m="literal"===h||"folded"!==h&&t!==Jc.BLOCK_FOLDED&&(t===Jc.BLOCK_LITERAL||!function(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if("\n"===e[t]){if(t-n>r)return!0;if(i-(n=t+1)<=r)return!1}return!0}(n,p,f.length));if(!n)return m?"|\n":">\n";for(l=n.length;l>0;--l){let e=n[l-1];if("\n"!==e&&" "!==e&&" "!==e)break}let g=n.substring(l),v=g.indexOf("\n");-1===v?a="-":n===g||v!==g.length-1?(a="+",o&&o()):a="",g&&(n=n.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(s,`$&${f}`));let y=!1,b=-1;for(c=0;c<n.length;++c){let e=n[c];if(" "===e)y=!0;else if("\n"===e)b=c;else break}let x=n.substring(0,b<c?b+1:c);x&&(n=n.substring(x.length),x=x.replace(/\n+/g,`$&${f}`));let w=f?"2":"1",S=(y?w:"")+a;if(e&&(S+=" "+d(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!m){let e=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${f}`),i=!1,o=Jw(r,!0);"folded"!==h&&t!==Jc.BLOCK_FOLDED&&(o.onOverflow=()=>{i=!0});let s=Jb(`${x}${e}${g}`,f,"block",o);if(!i)return`>${S}
|
|
72
|
+
${f}${s}`}return n=n.replace(/\n+/g,`$&${f}`),`|${S}
|
|
73
|
+
${f}${x}${n}${g}`}function JM(e,t,n,r){let{implicitKey:i,inFlow:o}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==Jc.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=Jc.QUOTE_DOUBLE);let l=e=>{switch(e){case Jc.BLOCK_FOLDED:case Jc.BLOCK_LITERAL:return i||o?JC(s.value,t):Jk(s,t,n,r);case Jc.QUOTE_DOUBLE:return JS(s.value,t);case Jc.QUOTE_SINGLE:return JA(s.value,t);case Jc.PLAIN:return function(e,t,n,r){let{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:c,inFlow:u}=t;if(a&&o.includes("\n")||u&&/[[\]{},]/.test(o))return JC(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||u||!o.includes("\n")?JC(o,t):Jk(e,t,n,r);if(!a&&!u&&i!==Jc.PLAIN&&o.includes("\n"))return Jk(e,t,n,r);if(/^(%|---|\.\.\.)/m.test(o)){if(""===l)return t.forceBlockIndent=!0,Jk(e,t,n,r);else if(a&&l===c)return JC(o,t)}let h=o.replace(/\n+/g,`$&
|
|
74
|
+
${l}`);if(s){let e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(h),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return JC(o,t)}return a?h:Jb(h,l,"flow",Jw(t,!1))}(s,t,n,r);default:return null}},c=l(a);if(null===c){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(null===(c=l(r)))throw Error(`Unsupported default string type ${r}`)}return c}function JO(e,t){let n,r=Object.assign({blockQuote:!0,commentString:Jf,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function JT(e,t,n,r){let i;if(ZG(e))return e.toString(t,n,r);if(ZH(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let o=ZK(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=function(e,t){let n,r;if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}if(Zq(t)){n=t.value;let i=e.filter(e=>e.identify?.(n));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r){let e=n?.constructor?.name??(null===n?"null":typeof n);throw Error(`Tag not resolved for ${e} value`)}return r}(t.doc.schema.tags,o));let s=function(e,t,{anchors:n,doc:r}){if(!r.directives)return"";let i=[],o=(Zq(e)||ZY(e))&&e.anchor;o&&Jt(o)&&(n.add(o),i.push(`&${o}`));let s=e.tag??(t.default?null:t.tag);return s&&i.push(r.directives.tagString(s)),i.join(" ")}(o,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let a="function"==typeof i.stringify?i.stringify(o,t,n,r):Zq(o)?JM(o,t,n,r):o.toString(t,n,r);return s?Zq(o)||"{"===a[0]||"["===a[0]?`${s} ${a}`:`${s}
|
|
75
|
+
${t.indent}${a}`:a}let J_={identify:e=>"<<"===e||"symbol"==typeof e&&"<<"===e.description,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Jc(Symbol("<<")),{addToJSMap:JI}),stringify:()=>"<<"};function JI(e,t,n){let r=JR(e,n);if(ZX(r))for(let n of r.items)JD(e,t,n);else if(Array.isArray(r))for(let n of r)JD(e,t,n);else JD(e,t,r)}function JD(e,t,n){let r=JR(e,n);if(!ZU(r))throw Error("Merge sources must be maps or map aliases");for(let[n,i]of r.toJSON(null,e,Map))t instanceof Map?t.has(n)||t.set(n,i):t instanceof Set?t.add(n):Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{value:i,writable:!0,enumerable:!0,configurable:!0});return t}function JR(e,t){return e&&ZH(t)?t.resolve(e.doc,e):t}function JE(e,t,{key:n,value:r}){if(ZK(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if((J_.identify(n)||Zq(n)&&(!n.type||n.type===Jc.PLAIN)&&J_.identify(n.value))&&e?.doc.schema.tags.some(e=>e.tag===J_.tag&&e.default))JI(e,t,r);else{let i=Jo(n,"",e);if(t instanceof Map)t.set(i,Jo(r,i,e));else if(t instanceof Set)t.add(i);else{let o=function(e,t,n){if(null===t)return"";if("object"!=typeof t)return String(t);if(ZK(e)&&n?.doc){let t=JO(n.doc,{});for(let e of(t.anchors=new Set,n.anchors.keys()))t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let o=e.toString(t);if(!n.mapKeyWarned){var r,i;let e=JSON.stringify(o);e.length>40&&(e=e.substring(0,36)+'..."'),r=n.doc.options.logLevel,i=`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`,("debug"===r||"warn"===r)&&console.warn(i),n.mapKeyWarned=!0}return o}return JSON.stringify(t)}(n,i,e),s=Jo(r,o,e);o in t?Object.defineProperty(t,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[o]=s}}return t}function JP(e,t,n){return new JL(Ju(e,void 0,n),Ju(t,void 0,n))}class JL{constructor(e,t=null){Object.defineProperty(this,ZV,{value:Zz}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return ZK(t)&&(t=t.clone(e)),ZK(n)&&(n=n.clone(e)),new JL(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return JE(t,n,this)}toString(e,t,n){return e?.doc?function({key:e,value:t},n,r,i){let o,s,a,{allNullValues:l,doc:c,indent:u,indentStep:h,options:{commentString:d,indentSeq:p,simpleKeys:f}}=n,m=ZK(e)&&e.comment||null;if(f){if(m)throw Error("With simple keys, key nodes cannot have comments");if(ZY(e)||!ZK(e)&&"object"==typeof e)throw Error("With simple keys, collection cannot be used as a key value")}let g=!f&&(!e||m&&null==t&&!n.inFlow||ZY(e)||(Zq(e)?e.type===Jc.BLOCK_FOLDED||e.type===Jc.BLOCK_LITERAL:"object"==typeof e));n=Object.assign({},n,{allNullValues:!1,implicitKey:!g&&(f||!l),indent:u+h});let v=!1,y=!1,b=JT(e,n,()=>v=!0,()=>y=!0);if(!g&&!n.inFlow&&b.length>1024){if(f)throw Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(n.inFlow){if(l||null==t)return v&&r&&r(),""===b?"?":g?`? ${b}`:b}else if(l&&!f||null==t&&g)return b=`? ${b}`,m&&!v?b+=Jg(b,n.indent,d(m)):y&&i&&i(),b;v&&(m=null),g?(m&&(b+=Jg(b,n.indent,d(m))),b=`? ${b}
|
|
76
|
+
${u}:`):(b=`${b}:`,m&&(b+=Jg(b,n.indent,d(m)))),ZK(t)?(o=!!t.spaceBefore,s=t.commentBefore,a=t.comment):(o=!1,s=null,a=null,t&&"object"==typeof t&&(t=c.createNode(t))),n.implicitKey=!1,!g&&!m&&Zq(t)&&(n.indentAtStart=b.length+1),y=!1,!(!p&&h.length>=2&&!n.inFlow&&!g&&ZX(t))||t.flow||t.tag||t.anchor||(n.indent=n.indent.substring(2));let x=!1,w=JT(t,n,()=>x=!0,()=>y=!0),S=" ";if(m||o||s){if(S=o?"\n":"",s){let e=d(s);S+=`
|
|
77
|
+
${Jm(e,n.indent)}`}""!==w||n.inFlow?S+=`
|
|
78
|
+
${n.indent}`:"\n"===S&&a&&(S="\n\n")}else if(!g&&ZY(t)){let e=w[0],r=w.indexOf("\n"),i=-1!==r,o=n.inFlow??t.flow??0===t.items.length;if(i||!o){let t=!1;if(i&&("&"===e||"!"===e)){let n=w.indexOf(" ");"&"===e&&-1!==n&&n<r&&"!"===w[n+1]&&(n=w.indexOf(" ",n+1)),(-1===n||r<n)&&(t=!0)}t||(S=`
|
|
79
|
+
${n.indent}`)}}else(""===w||"\n"===w[0])&&(S="");return b+=S+w,n.inFlow?x&&r&&r():a&&!x?b+=Jg(b,n.indent,d(a)):y&&i&&i(),b}(this,e,t,n):JSON.stringify(this)}}function JN(e,t,n){return(t.inFlow??e.flow?function({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=t,l=Object.assign({},t,{indent:r+=o,inFlow:!0,type:null}),c=!1,u=0,h=[];for(let n=0;n<e.length;++n){let i=e[n],o=null;if(ZK(i))i.spaceBefore&&h.push(""),JB(t,h,i.commentBefore,!1),i.comment&&(o=i.comment);else if(ZG(i)){let e=ZK(i.key)?i.key:null;e&&(e.spaceBefore&&h.push(""),JB(t,h,e.commentBefore,!1),e.comment&&(c=!0));let n=ZK(i.value)?i.value:null;n?(n.comment&&(o=n.comment),n.commentBefore&&(c=!0)):null==i.value&&e?.comment&&(o=e.comment)}o&&(c=!0);let s=JT(i,l,()=>o=null);c||(c=h.length>u||s.includes("\n")),n<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=h.reduce((e,t)=>e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),c&&(s+=",")),o&&(s+=Jg(s,r,a(o))),h.push(s),u=h.length}let{start:d,end:p}=n;if(0===h.length)return d+p;if(!c){let e=h.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(!c)return`${d}${s}${h.join(" ")}${s}${p}`;{let e=d;for(let t of h)e+=t?`
|
|
80
|
+
${o}${i}${t}`:"\n";return`${e}
|
|
81
|
+
${i}${p}`}}:function({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let l,{indent:c,options:{commentString:u}}=n,h=Object.assign({},n,{indent:o,type:null}),d=!1,p=[];for(let e=0;e<t.length;++e){let i=t[e],s=null;if(ZK(i))!d&&i.spaceBefore&&p.push(""),JB(n,p,i.commentBefore,d),i.comment&&(s=i.comment);else if(ZG(i)){let e=ZK(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&p.push(""),JB(n,p,e.commentBefore,d))}d=!1;let a=JT(i,h,()=>s=null,()=>d=!0);s&&(a+=Jg(a,o,u(s))),d&&s&&(d=!1),p.push(r+a)}if(0===p.length)l=i.start+i.end;else{l=p[0];for(let e=1;e<p.length;++e){let t=p[e];l+=t?`
|
|
82
|
+
${c}${t}`:"\n"}}return e?(l+="\n"+Jm(u(e),c),a&&a()):d&&s&&s(),l})(e,t,n)}function JB({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let i=Jm(t(r),e);n.push(i.trimStart())}}function Jj(e,t){let n=Zq(t)?t.value:t;for(let r of e)if(ZG(r)&&(r.key===t||r.key===n||Zq(r.key)&&r.key.value===n))return r}class Jz extends Jp{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Zj,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,o=new this(e),s=(e,s)=>{if("function"==typeof i)s=i.call(t,e,s);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==s||r)&&o.items.push(JP(e,s,n))};if(t instanceof Map)for(let[e,n]of t)s(e,n);else if(t&&"object"==typeof t)for(let e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;n=ZG(e)?e:e&&"object"==typeof e&&"key"in e?new JL(e.key,e.value):new JL(e,e?.value);let r=Jj(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);Zq(r.value)&&Jl(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>0>i(n,e));-1===e?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=Jj(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){let n=Jj(this.items,e),r=n?.value;return(!t&&Zq(r)?r.value:r)??void 0}has(e){return!!Jj(this.items,e)}set(e,t){this.add(new JL(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};for(let e of(t?.onCreate&&t.onCreate(r),this.items))JE(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!ZG(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),JN(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}let J$={collection:"map",default:!0,nodeClass:Jz,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(ZU(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,n)=>Jz.from(e,t,n)};class JF extends Jp{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ZF,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=JV(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){let n=JV(e);if("number"!=typeof n)return;let r=this.items[n];return!t&&Zq(r)?r.value:r}has(e){let t=JV(e);return"number"==typeof t&&t<this.items.length}set(e,t){let n=JV(e);if("number"!=typeof n)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Zq(r)&&Jl(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(Jo(e,String(r++),t));return n}toString(e,t,n){return e?JN(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let o of t){if("function"==typeof r){let n=t instanceof Set?o:String(e++);o=r.call(t,n,o)}i.items.push(Ju(o,void 0,n))}}return i}}function JV(e){let t=Zq(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}let JH={collection:"seq",default:!0,nodeClass:JF,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(ZX(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,n)=>JF.from(e,t,n)},JW={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,n,r)=>JM(e,t=Object.assign({actualString:!0},t),n,r)},JU={identify:e=>null==e,createNode:()=>new Jc(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Jc(null),stringify:({source:e},t)=>"string"==typeof e&&JU.test.test(e)?e:t.options.nullStr},JG={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Jc("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},n)=>e&&JG.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?n.options.trueStr:n.options.falseStr};function Jq({format:e,minFractionDigits:t,tag:n,value:r}){if("bigint"==typeof r)return String(r);let i="number"==typeof r?r:Number(r);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&t&&(!n||"tag:yaml.org,2002:float"===n)&&/^-?\d/.test(o)&&!o.includes("e")){let e=o.indexOf(".");e<0&&(e=o.length,o+=".");let n=t-(o.length-e-1);for(;n-- >0;)o+="0"}return o}let JX={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?0/0:"-"===e[0]?-1/0:1/0,stringify:Jq},JY={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Jq(e)}},JK={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new Jc(parseFloat(e)),n=e.indexOf(".");return -1!==n&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-n-1),t},stringify:Jq},JQ=e=>"bigint"==typeof e||Number.isInteger(e),JZ=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function JJ(e,t,n){let{value:r}=e;return JQ(r)&&r>=0?n+r.toString(t):Jq(e)}let J0={identify:e=>JQ(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>JZ(e,2,8,n),stringify:e=>JJ(e,8,"0o")},J1={identify:JQ,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>JZ(e,0,10,n),stringify:Jq},J2={identify:e=>JQ(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>JZ(e,2,16,n),stringify:e=>JJ(e,16,"0x")},J5=[J$,JH,JW,JU,JG,J0,J1,J2,JX,JY,JK];function J3(e){return"bigint"==typeof e||Number.isInteger(e)}let J4=({value:e})=>JSON.stringify(e),J6=[J$,JH].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:J4},{identify:e=>null==e,createNode:()=>new Jc(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:J4},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:J4},{identify:J3,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>J3(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:J4}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),J9={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"!=typeof atob)return t("This environment does not support reading binary tags; either Buffer or atob is required"),e;{let t=atob(e.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}},stringify({comment:e,type:t,value:n},r,i,o){let s;if(!n)return"";if("function"==typeof btoa){let e="";for(let t=0;t<n.length;++t)e+=String.fromCharCode(n[t]);s=btoa(e)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Jc.BLOCK_LITERAL),t!==Jc.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===Jc.BLOCK_LITERAL?"\n":" ")}return JM({comment:e,type:t,value:s},r,i,o)}};function J8(e,t){if(ZX(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!ZG(r)){if(ZU(r)){r.items.length>1&&t("Each pair must have its own sequence indicator");let e=r.items[0]||new JL(new Jc(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}
|
|
83
|
+
${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}
|
|
84
|
+
${t.comment}`:r.comment}r=e}e.items[n]=ZG(r)?r:new JL(r)}}else t("Expected a sequence for this tag");return e}function J7(e,t,n){let{replacer:r}=n,i=new JF(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,a;if("function"==typeof r&&(e=r.call(t,String(o++),e)),Array.isArray(e))if(2===e.length)s=e[0],a=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(1===t.length)a=e[s=t[0]];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else s=e;i.items.push(JP(s,a,n))}return i}let eee={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:J8,createNode:J7};class eet extends JF{constructor(){super(),this.add=Jz.prototype.add.bind(this),this.delete=Jz.prototype.delete.bind(this),this.get=Jz.prototype.get.bind(this),this.has=Jz.prototype.has.bind(this),this.set=Jz.prototype.set.bind(this),this.tag=eet.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;for(let e of(t?.onCreate&&t.onCreate(n),this.items)){let r,i;if(ZG(e)?(r=Jo(e.key,"",t),i=Jo(e.value,r,t)):r=Jo(e,"",t),n.has(r))throw Error("Ordered maps must not include duplicate keys");n.set(r,i)}return n}static from(e,t,n){let r=J7(e,t,n),i=new this;return i.items=r.items,i}}eet.tag="tag:yaml.org,2002:omap";let een={collection:"seq",identify:e=>e instanceof Map,nodeClass:eet,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=J8(e,t),r=[];for(let{key:e}of n.items)Zq(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new eet,n)},createNode:(e,t,n)=>eet.from(e,t,n)};function eer({value:e,source:t},n){return t&&(e?eei:eeo).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}let eei={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Jc(!0),stringify:eer},eeo={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Jc(!1),stringify:eer},ees=e=>"bigint"==typeof e||Number.isInteger(e);function eea(e,t,n,{intAsBigInt:r}){let i=e[0];if(("-"===i||"+"===i)&&(t+=1),e=e.substring(t).replace(/_/g,""),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return"-"===i?BigInt(-1)*t:t}let o=parseInt(e,n);return"-"===i?-1*o:o}function eel(e,t,n){let{value:r}=e;if(ees(r)){let e=r.toString(t);return r<0?"-"+n+e.substr(1):n+e}return Jq(e)}class eec extends Jz{constructor(e){super(e),this.tag=eec.tag}add(e){let t;t=ZG(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new JL(e.key,null):new JL(e,null),Jj(this.items,t.key)||this.items.push(t)}get(e,t){let n=Jj(this.items,e);return!t&&ZG(n)?Zq(n.key)?n.key.value:n.key:n}set(e,t){if("boolean"!=typeof t)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Jj(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new JL(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error("Set items must all have null values")}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof r&&(e=r.call(t,e,e)),i.items.push(JP(e,null,n));return i}}eec.tag="tag:yaml.org,2002:set";let eeu={collection:"map",identify:e=>e instanceof Set,nodeClass:eec,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>eec.from(e,t,n),resolve(e,t){if(ZU(e))if(e.hasAllNullValues(!0))return Object.assign(new eec,e);else t("Set items must all have null values");else t("Expected a mapping for this tag");return e}};function eeh(e,t){let n=e[0],r="-"===n||"+"===n?e.substring(1):e,i=e=>t?BigInt(e):Number(e),o=r.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===n?i(-1)*o:o}function eed(e){let{value:t}=e,n=e=>e;if("bigint"==typeof t)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Jq(e);let r="";t<0&&(r="-",t*=n(-1));let i=n(60),o=[t%i];return t<60?o.unshift(0):(t=(t-o[0])/i,o.unshift(t%i),t>=60&&(t=(t-o[0])/i,o.unshift(t))),r+o.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}let eep={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>eeh(e,n),stringify:eed},eef={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>eeh(e,!1),stringify:eed},eem={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(eem.test);if(!t)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,r,i,o,s,a]=t.map(Number),l=Date.UTC(n,r-1,i,o||0,s||0,a||0,t[7]?Number((t[7]+"00").substr(1,3)):0),c=t[8];if(c&&"Z"!==c){let e=eeh(c,!1);30>Math.abs(e)&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},eeg=[J$,JH,JW,JU,eei,eeo,{identify:ees,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>eea(e,2,2,n),stringify:e=>eel(e,2,"0b")},{identify:ees,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>eea(e,1,8,n),stringify:e=>eel(e,8,"0")},{identify:ees,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>eea(e,0,10,n),stringify:Jq},{identify:ees,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>eea(e,2,16,n),stringify:e=>eel(e,16,"0x")},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?0/0:"-"===e[0]?-1/0:1/0,stringify:Jq},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Jq(e)}},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new Jc(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(-1!==n){let r=e.substring(n+1).replace(/_/g,"");"0"===r[r.length-1]&&(t.minFractionDigits=r.length)}return t},stringify:Jq},J9,J_,een,eee,eeu,eep,eef,eem],eev=new Map([["core",J5],["failsafe",[J$,JH,JW]],["json",J6],["yaml11",eeg],["yaml-1.1",eeg]]),eey={binary:J9,bool:JG,float:JK,floatExp:JY,floatNaN:JX,floatTime:eef,int:J1,intHex:J2,intOct:J0,intTime:eep,map:J$,merge:J_,null:JU,omap:een,pairs:eee,seq:JH,set:eeu,timestamp:eem},eeb={"tag:yaml.org,2002:binary":J9,"tag:yaml.org,2002:merge":J_,"tag:yaml.org,2002:omap":een,"tag:yaml.org,2002:pairs":eee,"tag:yaml.org,2002:set":eeu,"tag:yaml.org,2002:timestamp":eem};function eex(e,t,n){let r=eev.get(t);if(r&&!e)return n&&!r.includes(J_)?r.concat(J_):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(eev.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return n&&(i=i.concat(J_)),i.reduce((e,t)=>{let n="string"==typeof t?eey[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(eey).map(e=>JSON.stringify(e)).join(", ");throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}let eew=(e,t)=>e.key<t.key?-1:+(e.key>t.key);class eeS{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:o,toStringDefaults:s}){this.compat=Array.isArray(e)?eex(e,"compat"):e?eex(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=r?eeb:{},this.tags=eex(t,this.name,n),this.toStringOptions=s??null,Object.defineProperty(this,Zj,{value:J$}),Object.defineProperty(this,Z$,{value:JW}),Object.defineProperty(this,ZF,{value:JH}),this.sortMapEntries="function"==typeof o?o:!0===o?eew:null}clone(){let e=Object.create(eeS.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class eeA{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ZV,{value:ZB});let r=null;"function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:o}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Je({version:o}),this.setSchema(o,n),this.contents=void 0===e?null:this.createNode(e,r,n)}clone(){let e=Object.create(eeA.prototype,{[ZV]:{value:ZB}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=ZK(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){eeC(this.contents)&&this.contents.add(e)}addIn(e,t){eeC(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Jn(this);e.anchor=!t||n.has(t)?Jr(t||"a",n):t}return new Ja(e.anchor)}createNode(e,t,n){var r,i;let o,s,a,l;if("function"==typeof t)e=t.call({"":e},"",e),o=t;else if(Array.isArray(t)){let e=t.filter(e=>"number"==typeof e||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),o=t}else void 0===n&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:c,anchorPrefix:u,flow:h,keepUndefined:d,onTagObj:p,tag:f}=n??{},{onAnchor:m,setAnchors:g,sourceObjects:v}=(r=this,i=u||"a",s=[],a=new Map,l=null,{onAnchor:e=>{s.push(e),l??(l=Jn(r));let t=Jr(i,l);return l.add(t),t},setAnchors:()=>{for(let e of s){let t=a.get(e);if("object"==typeof t&&t.anchor&&(Zq(t.node)||ZY(t.node)))t.node.anchor=t.anchor;else{let t=Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}}},sourceObjects:a}),y={aliasDuplicateObjects:c??!0,keepUndefined:d??!1,onAnchor:m,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:v},b=Ju(e,f,y);return h&&ZY(b)&&(b.flow=!0),g(),b}createPair(e,t,n={}){return new JL(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return!!eeC(this.contents)&&this.contents.delete(e)}deleteIn(e){return Jd(e)?null!=this.contents&&(this.contents=null,!0):!!eeC(this.contents)&&this.contents.deleteIn(e)}get(e,t){return ZY(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Jd(e)?!t&&Zq(this.contents)?this.contents.value:this.contents:ZY(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!ZY(this.contents)&&this.contents.has(e)}hasIn(e){return Jd(e)?void 0!==this.contents:!!ZY(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=Jh(this.schema,[e],t):eeC(this.contents)&&this.contents.set(e,t)}setIn(e,t){Jd(e)?this.contents=t:null==this.contents?this.contents=Jh(this.schema,Array.from(e),t):eeC(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let n;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Je({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Je({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new eeS(Object.assign(n,t));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:o}={}){let s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===n,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},a=Jo(this.contents,t??"",s);if("function"==typeof i)for(let{count:e,res:t}of s.anchors.values())i(t,e);return"function"==typeof o?Ji(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||0>=Number(e.indent))){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){let n=[],r=!0===t.directives;if(!1!==t.directives&&e.directives){let t=e.directives.toString(e);t?(n.push(t),r=!0):e.directives.docStart&&(r=!0)}r&&n.push("---");let i=JO(e,t),{commentString:o}=i.options;if(e.commentBefore){1!==n.length&&n.unshift("");let t=o(e.commentBefore);n.unshift(Jm(t,""))}let s=!1,a=null;if(e.contents){if(ZK(e.contents)){if(e.contents.spaceBefore&&r&&n.push(""),e.contents.commentBefore){let t=o(e.contents.commentBefore);n.push(Jm(t,""))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}let t=a?void 0:()=>s=!0,l=JT(e.contents,i,()=>a=null,t);a&&(l+=Jg(l,"",o(a))),("|"===l[0]||">"===l[0])&&"---"===n[n.length-1]?n[n.length-1]=`--- ${l}`:n.push(l)}else n.push(JT(e.contents,i));if(e.directives?.docEnd)if(e.comment){let t=o(e.comment);t.includes("\n")?(n.push("..."),n.push(Jm(t,""))):n.push(`... ${t}`)}else n.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&((!s||a)&&""!==n[n.length-1]&&n.push(""),n.push(Jm(o(t),"")))}return n.join("\n")+"\n"}(this,e)}}function eeC(e){if(ZY(e))return!0;throw Error("Expected a YAML collection as document contents")}class eek extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}}class eeM extends eek{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class eeO extends eek{constructor(e,t,n){super("YAMLWarning",e,t,n)}}let eeT=(e,t)=>n=>{if(-1===n.pos[0])return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let o=i-1,s=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&s.length>80){let e=Math.min(o-39,s.length-79);s="…"+s.substring(e),o-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),r>1&&/^ *$/.test(s.substring(0,o))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+"…\n"),s=n+s}if(/[^ ]/.test(s)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-o)));let a=" ".repeat(o)+"^".repeat(e);n.message+=`:
|
|
85
|
+
|
|
86
|
+
${s}
|
|
87
|
+
${a}
|
|
88
|
+
`}};function ee_(e,{flow:t,indicator:n,next:r,offset:i,onError:o,parentIndent:s,startOnNewline:a}){let l=!1,c=a,u=a,h="",d="",p=!1,f=!1,m=null,g=null,v=null,y=null,b=null,x=null,w=null;for(let i of e)switch(f&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f=!1),m&&(c&&"comment"!==i.type&&"newline"!==i.type&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),m=null),i.type){case"space":!t&&("doc-start"!==n||r?.type!=="flow-collection")&&i.source.includes(" ")&&(m=i),u=!0;break;case"comment":{u||o(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let e=i.source.substring(1)||" ";h?h+=d+e:h=e,d="",c=!1;break}case"newline":c?h?h+=i.source:x&&"seq-item-ind"===n||(l=!0):d+=i.source,c=!0,p=!0,(g||v)&&(y=i),u=!0;break;case"anchor":g&&o(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&o(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=i,w??(w=i.offset),c=!1,u=!1,f=!0;break;case"tag":v&&o(i,"MULTIPLE_TAGS","A node can have at most one tag"),v=i,w??(w=i.offset),c=!1,u=!1,f=!0;break;case n:(g||v)&&o(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),x&&o(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),x=i,c="seq-item-ind"===n||"explicit-key-ind"===n,u=!1;break;case"comma":if(t){b&&o(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=i,c=!1,u=!1;break}default:o(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),c=!1,u=!1}let S=e[e.length-1],A=S?S.offset+S.source.length:i;return f&&r&&"space"!==r.type&&"newline"!==r.type&&"comma"!==r.type&&("scalar"!==r.type||""!==r.source)&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),m&&(c&&m.indent<=s||r?.type==="block-map"||r?.type==="block-seq")&&o(m,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:x,spaceBefore:l,comment:h,hasNewline:p,anchor:g,tag:v,newlineAfterProp:y,end:A,start:w??A}}function eeI(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end){for(let t of e.end)if("newline"===t.type)return!0}return!1;case"flow-collection":for(let t of e.items){for(let e of t.start)if("newline"===e.type)return!0;if(t.sep){for(let e of t.sep)if("newline"===e.type)return!0}if(eeI(t.key)||eeI(t.value))return!0}return!1;default:return!0}}function eeD(e,t,n){if(t?.type==="flow-collection"){let r=t.end[0];r.indent===e&&("]"===r.source||"}"===r.source)&&eeI(t)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function eeR(e,t,n){let{uniqueKeys:r}=e.options;if(!1===r)return!1;let i="function"==typeof r?r:(e,t)=>e===t||Zq(e)&&Zq(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}let eeE="All mapping items must start at the same column";function eeP(e,t,n,r){let i="";if(e){let o=!1,s="";for(let a of e){let{source:e,type:l}=a;switch(l){case"space":o=!0;break;case"comment":{n&&!o&&r(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),o=!0;break;default:r(a,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}let eeL="Block collections are not allowed within flow collections",eeN=e=>e&&("block-map"===e.type||"block-seq"===e.type);function eeB(e,t,n,r,i,o){let s="block-map"===n.type?function({composeNode:e,composeEmptyNode:t},n,r,i,o){let s=new(o?.nodeClass??Jz)(n.schema);n.atRoot&&(n.atRoot=!1);let a=r.offset,l=null;for(let o of r.items){let{start:c,key:u,sep:h,value:d}=o,p=ee_(c,{indicator:"explicit-key-ind",next:u??h?.[0],offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0}),f=!p.found;if(f){if(u&&("block-seq"===u.type?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in u&&u.indent!==r.indent&&i(a,"BAD_INDENT",eeE)),!p.anchor&&!p.tag&&!h){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||eeI(u))&&i(u??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==r.indent&&i(a,"BAD_INDENT",eeE);n.atKey=!0;let m=p.end,g=u?e(n,u,p,i):t(n,m,c,null,p,i);n.schema.compat&&eeD(r.indent,u,i),n.atKey=!1,eeR(n,s.items,g)&&i(m,"DUPLICATE_KEY","Map keys must be unique");let v=ee_(h??[],{indicator:"map-value-ind",next:d,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||"block-scalar"===u.type});if(a=v.end,v.found){f&&(d?.type!=="block-map"||v.hasNewline||i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&p.start<v.found.offset-1024&&i(g.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let l=d?e(n,d,v,i):t(n,a,h,null,v,i);n.schema.compat&&eeD(r.indent,d,i),a=l.range[2];let c=new JL(g,l);n.options.keepSourceTokens&&(c.srcToken=o),s.items.push(c)}else{f&&i(g.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(g.comment?g.comment+="\n"+v.comment:g.comment=v.comment);let e=new JL(g);n.options.keepSourceTokens&&(e.srcToken=o),s.items.push(e)}}return l&&l<a&&i(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[r.offset,a,l??a],s}(e,t,n,r,o):"block-seq"===n.type?function({composeNode:e,composeEmptyNode:t},n,r,i,o){let s=new(o?.nodeClass??JF)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let a=r.offset,l=null;for(let{start:o,value:c}of r.items){let u=ee_(o,{indicator:"seq-item-ind",next:c,offset:a,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||c)c?.type==="block-seq"?i(u.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{l=u.end,u.comment&&(s.comment=u.comment);continue}let h=c?e(n,c,u,i):t(n,u.end,o,null,u,i);n.schema.compat&&eeD(r.indent,c,i),a=h.range[2],s.items.push(h)}return s.range=[r.offset,a,l??a],s}(e,t,n,r,o):function({composeNode:e,composeEmptyNode:t},n,r,i,o){let s="{"===r.start.source,a=s?"flow map":"flow sequence",l=new(o?.nodeClass??(s?Jz:JF))(n.schema);l.flow=!0;let c=n.atRoot;c&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let u=r.offset+r.start.source.length;for(let o=0;o<r.items.length;++o){let c=r.items[o],{start:h,key:d,sep:p,value:f}=c,m=ee_(h,{flow:a,indicator:"explicit-key-ind",next:d??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!m.found){if(!m.anchor&&!m.tag&&!p&&!f){0===o&&m.comma?i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):o<r.items.length-1&&i(m.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),m.comment&&(l.comment?l.comment+="\n"+m.comment:l.comment=m.comment),u=m.end;continue}!s&&n.options.strict&&eeI(d)&&i(d,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===o)m.comma&&i(m.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(m.comma||i(m.start,"MISSING_CHAR",`Missing , between ${a} items`),m.comment){let e="";h:for(let t of h)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break h;default:break h}if(e){let t=l.items[l.items.length-1];ZG(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,m.comment=m.comment.substring(e.length+1)}}if(s||p||m.found){n.atKey=!0;let o=m.end,g=d?e(n,d,m,i):t(n,o,h,null,m,i);eeN(d)&&i(g.range,"BLOCK_IN_FLOW",eeL),n.atKey=!1;let v=ee_(p??[],{flow:a,indicator:"map-value-ind",next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(v.found){if(!s&&!m.found&&n.options.strict){if(p)for(let e of p){if(e===v.found)break;if("newline"===e.type){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}m.start<v.found.offset-1024&&i(v.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else f&&("source"in f&&f.source?.[0]===":"?i(f,"MISSING_CHAR",`Missing space after : in ${a}`):i(v.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let y=f?e(n,f,v,i):v.found?t(n,v.end,p,null,v,i):null;y?eeN(f)&&i(y.range,"BLOCK_IN_FLOW",eeL):v.comment&&(g.comment?g.comment+="\n"+v.comment:g.comment=v.comment);let b=new JL(g,y);if(n.options.keepSourceTokens&&(b.srcToken=c),s)eeR(n,l.items,g)&&i(o,"DUPLICATE_KEY","Map keys must be unique"),l.items.push(b);else{let e=new Jz(n.schema);e.flow=!0,e.items.push(b);let t=(y??g).range;e.range=[g.range[0],t[1],t[2]],l.items.push(e)}u=y?y.range[2]:v.end}else{let r=f?e(n,f,m,i):t(n,m.end,p,null,m,i);l.items.push(r),u=r.range[2],eeN(f)&&i(r.range,"BLOCK_IN_FLOW",eeL)}}let h=s?"}":"]",[d,...p]=r.end,f=u;if(d?.source===h)f=d.offset+d.source.length;else{let e=a[0].toUpperCase()+a.substring(1),t=c?`${e} must end with a ${h}`:`${e} in block collection must be sufficiently indented and end with a ${h}`;i(u,c?"MISSING_CHAR":"BAD_INDENT",t),d&&1!==d.source.length&&p.unshift(d)}if(p.length>0){let e=eeP(p,f,n.options.strict,i);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[r.offset,f,e.offset]}else l.range=[r.offset,f,f];return l}(e,t,n,r,o),a=s.constructor;return"!"===i||i===a.tagName?s.tag=a.tagName:i&&(s.tag=i),s}function eej(e){let t,n,r=/(.*?)\r?\n/sy,i=r.exec(e);if(!i)return e;try{t=RegExp("(?<![ ])[ ]+$"),n=RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{t=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let o=i[1].replace(t,""),s=" ",a=r.lastIndex;for(;i=r.exec(e);){let e=i[1].replace(n,"");""===e?"\n"===s?o+=s:s="\n":(o+=s+e,s=" "),a=r.lastIndex}let l=/[ \t]*(.*)/sy;return l.lastIndex=a,i=l.exec(e),o+s+(i?.[1]??"")}let eez={0:"\0",a:"\x07",b:"\b",e:"\x1b",f:"\f",n:"\n",r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function ee$(e,t,n,r){let i,o,{value:s,type:a,comment:l,range:c}="block-scalar"===t.type?function(e,t,n){let r=t.offset,i=function({offset:e,props:t},n,r){if("block-scalar-header"!==t[0].type)return r(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=t[0],o=i[0],s=0,a="",l=-1;for(let t=1;t<i.length;++t){let n=i[t];if(a||"-"!==n&&"+"!==n){let r=Number(n);!s&&r?s=r:-1===l&&(l=e+t)}else a=n}-1!==l&&r(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",h=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case"space":c=!0;case"newline":h+=i.source.length;break;case"comment":n&&!c&&r(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),h+=i.source.length,u=i.source.substring(1);break;case"error":r(i,"UNEXPECTED_TOKEN",i.message),h+=i.source.length;break;default:{let e=`Unexpected token in block scalar header: ${i.type}`;r(i,"UNEXPECTED_TOKEN",e);let t=i.source;t&&"string"==typeof t&&(h+=t.length)}}}return{mode:o,indent:s,chomp:a,comment:u,length:h}}(t,e.options.strict,n);if(!i)return{value:"",type:null,comment:"",range:[r,r,r]};let o=">"===i.mode?Jc.BLOCK_FOLDED:Jc.BLOCK_LITERAL,s=t.source?function(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[],a=s.length;for(let e=s.length-1;e>=0;--e){let t=s[e][1];if(""===t||"\r"===t)a=e;else break}if(0===a){let e="+"===i.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"",n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:o,comment:i.comment,range:[r,n,n]}}let l=t.indent+i.indent,c=t.offset+i.length,u=0;for(let t=0;t<a;++t){let[r,o]=s[t];if(""===o||"\r"===o)0===i.indent&&r.length>l&&(l=r.length);else{r.length<l&&n(c+r.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),0===i.indent&&(l=r.length),u=t,0!==l||e.atRoot||n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=r.length+o.length+1}for(let e=s.length-1;e>=a;--e)s[e][0].length>l&&(a=e+1);let h="",d="",p=!1;for(let e=0;e<u;++e)h+=s[e][0].slice(l)+"\n";for(let e=u;e<a;++e){let[t,r]=s[e];c+=t.length+r.length+1;let a="\r"===r[r.length-1];if(a&&(r=r.slice(0,-1)),r&&t.length<l){let e=i.indent?"explicit indentation indicator":"first line",o=`Block scalar lines must not be less indented than their ${e}`;n(c-r.length-(a?2:1),"BAD_INDENT",o),t=""}o===Jc.BLOCK_LITERAL?(h+=d+t.slice(l)+r,d="\n"):t.length>l||" "===r[0]?(" "===d?d="\n":p||"\n"!==d||(d="\n\n"),h+=d+t.slice(l)+r,d="\n",p=!0):""===r?"\n"===d?h+="\n":d="\n":(h+=d+r,d=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let e=a;e<s.length;++e)h+="\n"+s[e][0].slice(l);"\n"!==h[h.length-1]&&(h+="\n");break;default:h+="\n"}let f=r+i.length+t.source.length;return{value:h,type:o,comment:i.comment,range:[r,f,f]}}(e,t,r):function(e,t,n){let r,i,{offset:o,type:s,source:a,end:l}=e,c=(e,t,r)=>n(o+e,t,r);switch(s){case"scalar":r=Jc.PLAIN,i=function(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":n=`block scalar indicator ${e[0]}`;break;case"@":case"`":n=`reserved character ${e[0]}`}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),eej(e)}(a,c);break;case"single-quoted-scalar":var u,h;r=Jc.QUOTE_SINGLE,u=a,h=c,("'"!==u[u.length-1]||1===u.length)&&h(u.length,"MISSING_CHAR","Missing closing 'quote"),i=eej(u.slice(1,-1)).replace(/''/g,"'");break;case"double-quoted-scalar":r=Jc.QUOTE_DOUBLE,i=function(e,t){let n="";for(let r=1;r<e.length-1;++r){let i=e[r];if("\r"!==i||"\n"!==e[r+1])if("\n"===i){let{fold:t,offset:i}=function(e,t){let n="",r=e[t+1];for(;(" "===r||" "===r||"\n"===r||"\r"===r)&&("\r"!==r||"\n"===e[t+2]);)"\n"===r&&(n+="\n"),t+=1,r=e[t+1];return n||(n=" "),{fold:n,offset:t}}(e,r);n+=t,r=i}else if("\\"===i){let i=e[++r],o=eez[i];if(o)n+=o;else if("\n"===i)for(i=e[r+1];" "===i||" "===i;)i=e[++r+1];else if("\r"===i&&"\n"===e[r+1])for(i=e[++r+1];" "===i||" "===i;)i=e[++r+1];else if("x"===i||"u"===i||"U"===i){let o="x"===i?2:"u"===i?4:8;n+=function(e,t,n,r){let i=e.substr(t,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):0/0;try{return String.fromCodePoint(o)}catch{let i=e.substr(t-2,n+2);return r(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}(e,r+1,o,t),r+=o}else{let i=e.substr(r-1,2);t(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),n+=i}}else if(" "===i||" "===i){let t=r,o=e[r+1];for(;" "===o||" "===o;)o=e[++r+1];"\n"!==o&&("\r"!==o||"\n"!==e[r+2])&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return('"'!==e[e.length-1]||1===e.length)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}(a,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[o,o+a.length,o+a.length]}}let d=o+a.length,p=eeP(l,d,t,n);return{value:i,type:r,comment:p.comment,range:[o,d,p.offset]}}(t,e.options.strict,r),u=n?e.directives.tagName(n.source,e=>r(n,"TAG_RESOLVE_FAILED",e)):null;i=e.options.stringKeys&&e.atKey?e.schema[Z$]:u?function(e,t,n,r,i){if("!"===n)return e[Z$];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(!t.default||!t.test)return t;else o.push(t);for(let e of o)if(e.test?.test(t))return e;let s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,"tag:yaml.org,2002:str"!==n),e[Z$])}(e.schema,s,u,n,r):"scalar"===t.type?function({atKey:e,directives:t,schema:n},r,i,o){let s=n.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(r))||n[Z$];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[Z$];if(s.tag!==e.tag){let n=t.tagString(s.tag),r=t.tagString(e.tag);o(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${n} or ${r}`,!0)}}return s}(e,s,t,r):e.schema[Z$];try{let a=i.resolve(s,e=>r(n??t,"TAG_RESOLVE_FAILED",e),e.options);o=Zq(a)?a:new Jc(a)}catch(e){r(n??t,"TAG_RESOLVE_FAILED",e instanceof Error?e.message:String(e)),o=new Jc(s)}return o.range=c,o.source=s,a&&(o.type=a),u&&(o.tag=u),i.format&&(o.format=i.format),l&&(o.comment=l),o}let eeF={composeNode:eeV,composeEmptyNode:eeH};function eeV(e,t,n,r){let i,o=e.atKey,{spaceBefore:s,comment:a,anchor:l,tag:c}=n,u=!0;switch(t.type){case"alias":i=function({options:e},{offset:t,source:n,end:r},i){let o=new Ja(n.substring(1));""===o.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&i(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let s=t+n.length,a=eeP(r,s,e.strict,i);return o.range=[t,s,a.offset],a.comment&&(o.comment=a.comment),o}(e,t,r),(l||c)&&r(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":i=ee$(e,t,c,r),l&&(i.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{i=function(e,t,n,r,i){let o=r.tag,s=o?t.directives.tagName(o.source,e=>i(o,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===n.type){let{anchor:e,newlineAfterProp:t}=r,n=e&&o?e.offset>o.offset?e:o:e??o;n&&(!t||t.offset<n.offset)&&i(n,"MISSING_CHAR","Missing newline after block sequence props")}let a="block-map"===n.type?"map":"block-seq"===n.type?"seq":"{"===n.start.source?"map":"seq";if(!o||!s||"!"===s||s===Jz.tagName&&"map"===a||s===JF.tagName&&"seq"===a)return eeB(e,t,n,i,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===a);if(!l){let r=t.schema.knownTags[s];if(r?.collection!==a)return r?i(o,"BAD_COLLECTION_TYPE",`${r.tag} used for ${a} collection, but expects ${r.collection??"scalar"}`,!0):i(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),eeB(e,t,n,i,s);t.schema.tags.push(Object.assign({},r,{default:!1})),l=r}let c=eeB(e,t,n,i,s,l),u=l.resolve?.(c,e=>i(o,"TAG_RESOLVE_FAILED",e),t.options)??c,h=ZK(u)?u:new Jc(u);return h.range=c.range,h.tag=s,l?.format&&(h.format=l.format),h}(eeF,e,t,n,r),l&&(i.anchor=l.source.substring(1))}catch(e){r(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:{let e="error"===t.type?t.message:`Unsupported token (type: ${t.type})`;r(t,"UNEXPECTED_TOKEN",e),u=!1}}return i??(i=eeH(e,t.offset,void 0,null,n,r)),l&&""===i.anchor&&r(l,"BAD_ALIAS","Anchor cannot be an empty string"),o&&e.options.stringKeys&&(!Zq(i)||"string"!=typeof i.value||i.tag&&"tag:yaml.org,2002:str"!==i.tag)&&r(c??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),s&&(i.spaceBefore=!0),a&&("scalar"===t.type&&""===t.source?i.comment=a:i.commentBefore=a),e.options.keepSourceTokens&&u&&(i.srcToken=t),i}function eeH(e,t,n,r,{spaceBefore:i,comment:o,anchor:s,tag:a,end:l},c){let u=ee$(e,{type:"scalar",offset:function(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case"space":case"comment":case"newline":e-=n.source.length;continue}for(n=t[++r];n?.type==="space";)e+=n.source.length,n=t[++r];break}}return e}(t,n,r),indent:-1,source:""},a,c);return s&&(u.anchor=s.source.substring(1),""===u.anchor&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(u.spaceBefore=!0),o&&(u.comment=o,u.range[2]=l),u}function eeW(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+("string"==typeof n?n.length:1)]}function eeU(e){let t="",n=!1,r=!1;for(let i=0;i<e.length;++i){let o=e[i];switch(o[0]){case"#":t+=(""===t?"":r?"\n\n":"\n")+(o.substring(1)||" "),n=!0,r=!1;break;case"%":e[i+1]?.[0]!=="#"&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class eeG{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=eeW(e);r?this.warnings.push(new eeO(i,t,n)):this.errors.push(new eeM(i,t,n))},this.directives=new Je({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=eeU(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
89
|
+
${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(ZY(i)&&!i.flow&&i.items.length>0){let e=i.items[0];ZG(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}
|
|
90
|
+
${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}
|
|
91
|
+
${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:eeU(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,r)=>{let i=eeW(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=function(e,t,{offset:n,start:r,value:i,end:o},s){let a=new eeA(void 0,Object.assign({_directives:t},e)),l={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},c=ee_(r,{indicator:"doc-start",next:i??o?.[0],offset:n,onError:s,parentIndent:0,startOnNewline:!0});c.found&&(a.directives.docStart=!0,i&&("block-map"===i.type||"block-seq"===i.type)&&!c.hasNewline&&s(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?eeV(l,i,c,s):eeH(l,c.end,r,null,c,s);let u=a.contents.range[2],h=eeP(o,u,!1,s);return h.comment&&(a.comment=h.comment),a.range=[n,u,h.offset],a}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new eeM(eeW(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){this.errors.push(new eeM(eeW(e),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let t=eeP(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}
|
|
92
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new eeM(eeW(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new eeA(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),e.range=[0,t,t],this.decorate(e,!1),yield e}}}let eeq=Symbol("break visit"),eeX=Symbol("skip children"),eeY=Symbol("remove item");function eeK(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),function e(t,n,r){let i=r(n,t);if("symbol"==typeof i)return i;for(let o of["key","value"]){let s=n[o];if(s&&"items"in s){for(let n=0;n<s.items.length;++n){let i=e(Object.freeze(t.concat([[o,n]])),s.items[n],r);if("number"==typeof i)n=i-1;else{if(i===eeq)return eeq;i===eeY&&(s.items.splice(n,1),n-=1)}}"function"==typeof i&&"key"===o&&(i=i(n,t))}}return"function"==typeof i?i(n,t):i}(Object.freeze([]),e,t)}function eeQ(e){switch(e){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}eeK.BREAK=eeq,eeK.SKIP=eeX,eeK.REMOVE=eeY,eeK.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(!t||!("items"in t))return;n=t.items[r]}return n},eeK.parentCollection=(e,t)=>{let n=eeK.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&"items"in i)return i;throw Error("Parent collection not found")};let eeZ=new Set("0123456789ABCDEFabcdef"),eeJ=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ee0=new Set(",[]{}"),ee1=new Set(" ,[]{}\n\r "),ee2=e=>!e||ee1.has(e);class ee5{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||" "===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;" "===t;)t=this.buffer[++n+e];if("\r"===t){let t=this.buffer[n+e+1];if("\n"===t||!t&&!this.atEnd)return e+n+1}return"\n"!==t&&!(n>=this.indentNext)&&(t||this.atEnd)?-1:e+n}if("-"===t||"."===t){let t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&eeQ(this.buffer[e+3]))return -1}return e}getLine(){let e=this.lineEndPos;return(("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if("\uFEFF"===e[0]&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,n=e.indexOf("#");for(;-1!==n;){let r=e[n-1];if(" "===r||" "===r){t=n-1;break}n=e.indexOf("#",n+1)}for(;;){let n=e[t-1];if(" "===n||" "===n)t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield"\x02",yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let e=this.peek(3);if(("---"===e||"..."===e)&&eeQ(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!eeQ(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&eeQ(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ee2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do(e=yield*this.pushNewline())>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0)let r=this.getLine();if(null===r)return this.setNext("flow");if((-1!==n&&n<this.indentNext&&"#"!==r[0]||0===n&&(r.startsWith("---")||r.startsWith("..."))&&eeQ(r[3]))&&(n!==this.indentNext-1||1!==this.flowLevel||"]"!==r[0]&&"}"!==r[0]))return this.flowLevel=0,yield"\x18",yield*this.parseLineStart();let i=0;for(;","===r[i];)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r[i+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ee2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let e=this.charAt(1);if(this.flowKey||eeQ(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),r=n.indexOf("\n",this.pos);if(-1!==r){for(;-1!==r;){let e=this.continueScalar(r+1);if(-1===e)break;r=n.indexOf("\n",e)}-1!==r&&(t=r-("\r"===n[r-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>eeQ(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,n=0;h:for(let r=this.pos;e=this.buffer[r];++r)switch(e){case" ":n+=1;break;case"\n":t=r,n=0;break;case"\r":{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break h}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=n:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t)if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(e=this.buffer[r];" "===e;)e=this.buffer[++r];if(" "===e){for(;" "===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,r=this.buffer[e];"\r"===r&&(r=this.buffer[--e]);let i=e;for(;" "===r;)r=this.buffer[--e];if("\n"===r&&e>=this.pos&&e+1+n>i)t=e;else break}return yield"\x1f",yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e,t=this.flowLevel>0,n=this.pos-1,r=this.pos-1;for(;e=this.buffer[++r];)if(":"===e){let e=this.buffer[r+1];if(eeQ(e)||t&&ee0.has(e))break;n=r}else if(eeQ(e)){let i=this.buffer[r+1];if("\r"===e&&("\n"===i?(r+=1,e="\n",i=this.buffer[r+1]):n=r),"#"===i||t&&ee0.has(i))break;if("\n"===e){let e=this.continueScalar(r+1);if(-1===e)break;r=Math.max(r,e-2)}}else{if(t&&ee0.has(e))break;n=r}return e||this.atEnd?(yield"\x1f",yield*this.pushToIndex(n+1,!0),t?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){let e=0;for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue;case"&":e+=yield*this.pushUntil(ee2),e+=yield*this.pushSpaces(!0);continue;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(eeQ(n)||t&&ee0.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue}}}break}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!eeQ(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(eeJ.has(t))t=this.buffer[++e];else if("%"===t&&eeZ.has(this.buffer[e+1])&&eeZ.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,n=this.pos-1;do t=this.buffer[++n];while(" "===t||e&&" "===t)let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}function ee3(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function ee4(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return -1}function ee6(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function ee9(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function ee8(e){if(0===e.length)return[];let t=e.length;h:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break h}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function ee7(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function ete(e){if("flow-seq-start"===e.start.type)for(let t of e.items)!t.sep||t.value||ee3(t.start,"explicit-key-ind")||ee3(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,ee6(t.value)?t.value.end?ee7(t.value.end,t.sep):t.value.end=t.sep:ee7(t.start,t.sep),delete t.sep)}class ett{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new ee5,this.onNewLine=e}*parse(e,t=!1){for(let n of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(e,t)))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=function(e){switch(e){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if("doc-end"===this.type&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{let e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&ete(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if(("document"===e.type||"block-map"===e.type||"block-seq"===e.type)&&("block-map"===t.type||"block-seq"===t.type)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&-1===ee4(n.start)&&(0===t.indent||n.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":-1!==ee4(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){let t,n=ee8(ee9(this.peek(2)));e.end?((t=e.end).push(this.sourceToken),delete e.end):t=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:t}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;r?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r)){ee7(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case"newline":n.push(r);break;case"space":break;case"comment":i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":t.sep||t.explicitKey?r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ee3(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(ee6(t.key)&&!ee3(t.sep,"newline")){let e=ee8(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(ee3(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=ee8(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):ee3(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if("block-seq"===r.type){if(!t.explicitKey&&t.sep&&!ee3(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;r?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2],r=n?.value?.end;if(Array.isArray(r)){ee7(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ee3(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do yield*this.pop(),e=this.peek(1);while(e?.type==="flow-collection")}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if("block-map"!==t.type||("map-value-ind"!==this.type||t.indent!==e.indent)&&("newline"!==this.type||t.items[t.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==t.type){let n=ee8(ee9(t));ete(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e);else yield*this.pop(),yield*this.step()}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=ee8(ee9(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=ee8(ee9(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}class etn{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(0===t)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}}function etr(e,t,n){let r=Math.min(t.pos[0],e.length),i=Math.min(Math.max(t.pos[1],r),e.length);return{from:r,to:i,severity:n,message:t.message}}function eti(e){return void 0===e?"":"string"==typeof e?e:function(e,t,n){let r=null;if("function"==typeof t||Array.isArray(t)?r=t:void 0===n&&t&&(n=t),"string"==typeof n&&(n=n.length),"number"==typeof n){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){let{keepUndefined:e}=n??t??{};if(!e)return}return ZW(e)&&!r?e.toString(n):new eeA(e,r,n).toString(n)}(e,{schema:"yaml-1.1"})}let eto=[new Et(ZL),Pg(e=>(function(e){let t=[];for(let n of function(e,t={}){let n,{lineCounter:r,prettyErrors:i}=(n=!1!==t.prettyErrors,{lineCounter:t.lineCounter||n&&new etn||null,prettyErrors:n}),o=new ett(r?.addNewLine),s=new eeG(t),a=Array.from(s.compose(o.parse(e)));if(i&&r)for(let t of a)t.errors.forEach(eeT(e,r)),t.warnings.forEach(eeT(e,r));return a.length>0?a:Object.assign([],{empty:!0},s.streamInfo())}(e,{prettyErrors:!1}))t.push(...n.errors.map(t=>etr(e,t,"error"))),t.push(...n.warnings.map(t=>etr(e,t,"warning")));return t})(e.state.doc.toString())),PL()];function ets(e){let t,n=(0,c.c)(2);return n[0]!==e?(t=(0,l.jsx)(BZ,{...e,extensions:eto,serialize:eti}),n[0]=e,n[1]=t):t=n[1],t}}}]);
|