@nebula.js/sn-kpi
Version:
KPI supernova
15 lines (14 loc) • 409 kB
JavaScript
/*
* @nebula.js/sn-kpi v2.4.0
* Copyright (c) 2026 QlikTech International AB
* Released under the MIT license.
*/
System.register(["@nebula.js/stardust","react","react-dom"],(function(e,t){"use strict";var n,r,o,i,a,s,l,u,c,p,f,m,d,h,g,y,b,v,x,q,S,D,w,E,C,A,T,M,I;return{setters:[function(e){n=e.useState,r=e.useEffect,o=e.useMemo,i=e.useInteractionState,a=e.useTheme,s=e.useOptions,l=e.useElement,u=e.useLayout,c=e.useRect,p=e.useTranslator,f=e.useAppLayout,m=e.useApp,d=e.useEmbed,h=e.useModel,g=e.usePromise,y=e.useImperativeHandle,b=e.onTakeSnapshot},function(e){v=e.default,x=e.forwardRef,q=e.Suspense,S=e.lazy,D=e,w=e.useContext,E=e.useRef,C=e.useState,A=e.useEffect,T=e.createElement},function(e){M=e.default,I=e}],execute:function(){function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function k(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}e({_:lr,a:ur,b:gl,s:function(e){const{sense:t,flags:o}=e,v=t&&t.navigation;return{qae:Hd(e.translator,e.flags),component(){const[x,q]=n({}),[S,D]=n(),w=i(),E=a(),C=s(),A=l(),T=Tm(A),M=u(),I=c(),O=p(),k=f(),N=m(),F=d(),L=h(),P=wm({flags:o,layout:M,theme:E,model:L,translator:O,options:C,app:N,embed:F}),R=(e,t)=>{if(x[e]!==t){const n={...x};n[e]=t,q(n)}};r((()=>{const t=function(e,t,n,r,o){const i={},a={backendApi:{},options:{},props:i};let s;const l=()=>{n("showVerify",!1)},u=e.getBoundingClientRect();return a.props.mainValueStyle={},a.props.measureTitleStyle={},a.props.viz={},a.props.secondaryValues=[],a.props.secondaryLayouts=[],a.props.showSecondaryValues=!1,a.props.mainValue={formattedValue:"",value:null,style:null},n("showVerify",!1),i.onShowVerifyDialog=()=>{i.linkInteractionOn&&(n("showVerify",!0),i.updateVerifyDialogFontSize(),s=setTimeout(l,3e3))},i.linkToSheet=(e,t)=>{if(i.linkInteractionOn&&!i.sheetIsMissing&&i.renderState.showVerify){if(t&&o&&o.getUrlForSheet){const t=o.getUrlForSheet(e);window.open(t)}else o.goToSheet(e);clearTimeout(s),l()}},i.updateVerifyDialogFontSize=()=>{if(i.renderState.showVerify){const e=i.verifyDialogLayoutInfo.components[0];Pm.checkLayout(i.verifyDialogLayoutInfo),Pm.sizeComponent(e,i.verifyDialogLayoutInfo,i.verifyDialogLayoutInfo.boundingBox.width,i.verifyDialogLayoutInfo.boundingBox.height,Pm.TextScaleMode.SCALE,Pm.ElementScaleMode.NONE,r),i.verifyDialogStyle={fontSize:e.fontSizes.fontSize}}},a.props.baseLayoutInfo={direction:Pm.Direction.COLUMN,ratio:1e9,boundingBox:{width:u.width,height:u.height},components:[{size:{min:.5,treshold:{width:50,height:12}},getText:()=>i.measureTitle,fontSizes:{maxNrChars:15,min:{fontSize:10,height:12},max:{fontSize:40,height:80}},isVisible:()=>i.showMeasureTitle},{size:{min:.8,stretch:!0},ratio:1,components:[{size:{min:.5,stretch:!0},getText:()=>a.props.mainValue.formattedValue+(a.props.mainValue.glyph?a.props.mainValue.glyph:""),fontSizes:{maxNrChars:4,min:{fontSize:10,height:10},max:{fontSize:500,height:500}}},{size:.5,components:a.props.secondaryLayouts,isVisible:()=>a.props.secondaryLayouts.length>0}]}]},a.props.secondaryLayoutInfo={size:{min:1,treshold:{width:50,height:30}},direction:Pm.Direction.COLUMN,components:[{size:{min:.6,stretch:!0},fontSizes:{maxNrChars:8,min:{fontSize:10,height:20},max:{fontSize:500,height:500}}},{size:{min:.4},fontSizes:{maxNrChars:15,min:{fontSize:10,height:20},max:{fontSize:30,height:500}},isVisible:()=>!1!==i.showSecondMeasureTitle}]},a.props.verifyDialogLayoutInfo={size:{min:1,width:20,height:20},boundingBox:{width:0,height:0},components:[{size:{min:.2,treshold:{width:100,height:100}},getText:()=>t.get("properties.kpi.verifyToGoSheet"),fontSizes:{maxNrChars:16,min:{fontSize:10,height:20},max:{fontSize:13,height:50}}}]},a}(A,O,R,E,v);t.localeInfo=k.qLocaleInfo??M.snapshotData?.appLocaleInfo,t.inClient=!!e.anything?.sense,D(t)}),[A,k,E.name()]),r((()=>{t&&A&&S&&M&&function(e,t,n){t.cellEl?t.cellEl.removeEventListener("keydown",t.handleKeyDown):t.cellEl=e.closest(".qv-gridcell");t.handleKeyDown=e=>{const{key:r}=e;"Spacebar"!==r&&" "!==r&&"Enter"!==r||(t.props.renderState.showVerify?t.props.linkToSheet(n.sheetLink,n.openUrlInNewTab):t.props.onShowVerifyDialog())},t.cellEl&&t.cellEl.addEventListener("keydown",t.handleKeyDown)}(A,S,M)}),[A,S,M]),g((async()=>{S&&M&&(S.props.renderState=x,S.updateRenderState=R,S.navigation=w.active,S.options=C,S.maxFontState=function(e,t,n,r){const o=e.backendApi.isSnapshot&&r&&!n.freeResize;return o?r.snapshotData.isZoomed:n.isZoomed&&e.inClient}(S,0,C,M),S.formatters=function(e,t,n){let r;const o=new De(n,t.qHyperCube.qMeasureInfo);let i;const a=[];for(let n=0;n<e;n++)r=t.qHyperCube.qMeasureInfo[n],i=o.getMeasureFormatter(n),i&&"U"===i.type&&(i.pattern=i.createPatternFromRange(r.qMax,r.qMax,!0),Math.floor(Math.log(Math.abs(r.qMax))/Math.log(10))%3==2&&(i.pattern=i.pattern.substr(0,i.pattern.length-2),i.pattern+="A"),i.prepare()),a.push(i);return a}(M.qHyperCube.qMeasureInfo.length,M,S.localeInfo),function(e,t,n,r,o){if(!function(e){return!(!e||!e.qHyperCube||!e.qHyperCube.qMeasureInfo.length||e.qHyperCube.qMeasureInfo.some((e=>!!e.qError)))}(e))return!1;t.layout=e;const i=3.75,a=function(){const e=7,t=4,n=3,r=1.5;return{font:{baseFontSizeSmall:e,baseFontSizeMedium:t,baseFontSizeLarge:n},layout:{responsive:{S:e,M:t,L:n},relative:{S:e*r,M:t*r,L:n},fixed:{S:e*r,M:t*r,L:n}}}}(),s=e.qHyperCube.qDataPages[0].qMatrix[0],l=e.qHyperCube.qMeasureInfo.length,{inClient:u,formatters:c}=t,{styleModel:p}=o,f=l-1,{secondaryValues:m}=t.props;let d;const{secondaryLayouts:h}=t.props;let g,y,b,v,x;const q=t.props.sheet&&t.props.sheet.qMetaDef&&t.props.sheet.qMetaDef.title?t.props.sheet.qMetaDef.title:null,S=()=>b,D=()=>x;t.props.showMeasureTitle=p.query.firstMeasure.title.show(e.showMeasureTitle),t.props.showSecondMeasureTitle=p.query.secondMeasure.title.show(e.showSecondMeasureTitle),t.props.textAlign=p.query.textAlignment.getStyle(e.textAlign);const w=e.layoutBehavior||"responsive",E=t.props.baseLayoutInfo.components[0],C=t.props.baseLayoutInfo.components[1];"fixed"===w?(E.fontSizes.maxNrChars=a.layout[w][e.fontSize]*i,C.components[0].fontSizes.maxNrChars=a.layout[w][e.fontSize]):"relative"===w?(E.fontSizes.maxNrChars=a.font.baseFontSizeMedium*i,C.components[0].fontSizes.maxNrChars=a.layout[w][e.fontSize]):(E.fontSizes.maxNrChars=a.font.baseFontSizeMedium*i,C.components[0].fontSizes.maxNrChars=0);const A=7/3;C.components[0].fontSizes.scale="S"===e.fontSize?A:"L"===e.fontSize?1:Math.sqrt(A),t.props.useLink=e.useLink,!u||e.snapshotData||!t.props.useLink||!e.sheetLink||q&&e.sheetLink===q||function(e,t,n,r){n&&n.getObject(t).then((e=>e.getLayout())).then((t=>{const n=t?.labelExpression,r=t?.qMeta?.title;e.props.sheetLinkTitle=n??r??"",e.props.sheetIsMissing=!1})).catch((()=>{e.props.sheetLinkTitle=r.get("Bookmarks.SheetMissingDialogTitle"),e.props.sheetIsMissing=!0}))}(t,e.sheetLink,n,r);t.props.mainValue.value=e.qHyperCube.qDataPages[0].qMatrix[0][0].qNum,t.props.mainValue.formattedValue=c[0]&&"U"===c[0].type&&!Number.isNaN(+e.qHyperCube.qDataPages[0].qMatrix[0][0].qNum)?c[0].formatValue(t.props.mainValue.value):e.qHyperCube.qDataPages[0].qMatrix[0][0].qText,t.props.mainValue.formatter=c[0],o?.customTooltipService.isEnabled()&&(t.props.mainValue.customTooltipAttrExps=rd.getNode(t.layout,{measureIndex:0,d:e.qHyperCube.qDataPages[0].qMatrix[0][0]}));for(let n=0;n<f;n++){y=s[n+1].qText,v=s[n+1].qNum,b=!c[n+1]||"U"!==c[n+1].type||Number.isNaN(+v)?y:c[n+1].formatValue(v),x=e.qHyperCube.qMeasureInfo[n+1].qFallbackTitle,m[n]||(g=Ce(S,D,t.props.secondaryLayoutInfo),d={style:g.layoutInfo.components[0].fontSizes.value,titleStyle:g.layoutInfo.components[1].fontSizes.value},m.push(d),h.push(g.layoutInfo)),d=m[n],d.value=v,d.formattedValue=b,d.formatter=c[n+1],d.measureTitle=x,h[n].components[0].getText=S,h[n].components[1].getText=D;const r=h[n].components[0],o=h[n].components[1];"fixed"===w?(r.fontSizes.maxNrChars=2*a.layout[w][e.fontSize],o.fontSizes.maxNrChars=a.layout[w][e.fontSize]*i):(r.fontSizes.maxNrChars=2*a.layout[w][e.fontSize],o.fontSizes.maxNrChars=a.font.baseFontSizeMedium*i)}m.length>f&&(h.splice(f,m.length-f),m.splice(f,m.length-f));return t.props.measureTitle=e.qHyperCube.qMeasureInfo[0].qFallbackTitle,t.props.showSecondaryValues=m.length>0,!0}(M,S,N,O,P)&&(!function(e,t,n,r){if(!e.layout)return;const o=t.getBoundingClientRect(),i=e.layout,{inClient:a}=e,{styleModel:s}=r,{baseLayoutInfo:l}=e.props;let u,c;e.props.linkInteractionOn=a&&e.navigation&&e.layout.useLink&&!!e.layout.sheetLink,e.props.verifyDialogLayoutInfo.boundingBox.width=o.width,e.props.verifyDialogLayoutInfo.boundingBox.height=o.height,l.boundingBox=function(e,t){const n=e.layout&&e.layout.snapshotData&&!e.options.freeResize;if(n&&e.layout.snapshotData.elementRatio)return{width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.w*e.layout.snapshotData.elementRatio};const r=t.getBoundingClientRect();return{width:r.width,height:r.height}}(e,t),Pm.checkLayout(l),l.components.forEach((t=>{let r;r="fixed"===i.layoutBehavior?Pm.TextScaleMode.NONE:0===e.props.secondaryValues.length&&e.maxFontState?Pm.TextScaleMode.MAX:Pm.TextScaleMode.SCALE,Pm.sizeComponent(t,l,l.boundingBox.width,l.boundingBox.height,r,0===e.props.secondaryValues.length&&e.maxFontState?Pm.ElementScaleMode.ADJUSTTOTEXT:Pm.ElementScaleMode.NONE,n)})),c=td.getValueInfo(e.props.mainValue.value,0,i,n),e.props.mainValue.cssClass=jm.getIconClass(c.icon.icon),e.props.mainValue.icon=c.icon.icon,e.props.mainValue.iconContent=c.icon.iconContent;let p=c.useCondColor&&c?.icon?.icon?.length>0;e.props.mainValue.showGlyph=p;const f=s.query.firstMeasure.value.getStyle({baseLayoutInfo:l,showGlyph:p});e.props.mainValue.style={color:c.color,...f};const m=s.query.firstMeasure.title.getStyle({baseLayoutInfo:l,showGlyph:p});e.props.measureTitleStyle={...m};for(let t=0;t<i.qHyperCube.qMeasureInfo.length-1;t++){c=td.getValueInfo(e.props.secondaryValues[t].value,t+1,i,n),e.props.secondaryValues[t].cssClass=jm.getIconClass(c.icon.icon),e.props.secondaryValues[t].icon=c.icon.icon,e.props.secondaryValues[t].iconContent=c.icon.iconContent,p=c.useCondColor&&c?.icon?.icon?.length>0,e.props.secondaryValues[t].showGlyph=p;const r=s.query.secondMeasure.value.getStyle({baseLayoutInfo:l,showGlyph:p});e.props.secondaryValues[t].style={color:c.color,...r};const o=s.query.secondMeasure.title.getStyle({baseLayoutInfo:l,showGlyph:p});e.props.secondaryValues[t].titleStyle={...o},u=l.components[1].components[1].components[t].components[1],u.show||(e.props.secondaryValues[t].titleStyle.width=0)}e.props.updateVerifyDialogFontSize(),i.components?.find((e=>"general"===e.key))?.bgColor?e.props.backgroundStyle={backgroundColor:void 0}:e.props.backgroundStyle={backgroundColor:Vm(i,n)}}(S,A,E,P),await new Promise((e=>{!function(e,t){e.render(_.jsx(Lc,{...t}))}(T,{layout:M,...S.props,models:P,interactions:w,renderCallback:e})}))))}),[x,M,S,I,w,E.name(),C,P]),y((()=>({getPreferredSize(){const e=A.getBoundingClientRect();return Promise.resolve({w:e.width(),h:Pm.FixedMobileHeight})}}))),b((e=>{const t=A.getBoundingClientRect();e.snapshotData.isZoomed=S.maxFontState,e.snapshotData.elementRatio=t.height/t.width}))},ext:Vd(e)}}});var N,F,L={exports:{}},P={};var _=e("j",(F||(F=1,L.exports=function(){if(N)return P;N=1;var e=v,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},u=null,c=null;for(s in void 0!==a&&(u=""+a),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!i.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:o.current}}return P.Fragment=n,P.jsx=a,P.jsxs=a,P}()),L.exports));const R=x(((e,t)=>_.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:_.jsx("path",{d:"M9 1v1H2v12h12V7h1v7a1 1 0 0 1-.883.993L14 15H2a1 1 0 0 1-.993-.883L1 14V2a1 1 0 0 1 .883-.993L2 1zm7-1v5h-1V1.706l-4.5 4.501-.707-.707L14.292 1H11V0z"})})));var j,V;var $=function(){if(V)return j;V=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return j=function e(){var t,n,r,l,u,c,p=arguments[0],f=1,m=arguments.length,d=!1;for("boolean"==typeof p&&(d=p,p=arguments[1]||{},f=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});f<m;++f)if(null!=(t=arguments[f]))for(n in t)r=s(p,n),p!==(l=s(t,n))&&(d&&l&&(i(l)||(u=o(l)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},a(p,{name:n,newValue:e(d,c,l)})):void 0!==l&&a(p,{name:n,newValue:l}));return p},j}(),H=O($);
/**
* @preserve IntegraXor Web SCADA - JavaScript Number Formatter
* http://www.integraxor.com/
* author: KPL, KHL
* (c)2011 ecava
* Dual licensed under the MIT or GPL Version 2 licenses.
*/
function z(e,t){if(!e||isNaN(+t))return t;const n=(t="-"===e.charAt(0)?-t:+t)<0?t=-t:0,r=e.match(/[^\d\-\+#]/g),o=r?.[r.length-1]||".",i=r&&r[1]&&r[0]||",";e=e.split(o);t=""+ +(t=t.toFixed(e[1]?.length));const a=e[1]?.lastIndexOf("0"),s=t.split(".");(!s[1]||s[1]&&s[1].length<=a)&&(t=(+t).toFixed(a+1));const l=e[0].split(i);e[0]=l.join("");const u=e[0]?.indexOf("0");if(u>-1)for(;s[0].length<e[0].length-u;)s[0]=`0${s[0]}`;else 0==+s[0]&&(s[0]="");(t=t.split("."))[0]=s[0];const c=l[1]&&l[l.length-1].length;if(c){const e=t[0];let n="";const r=e.length%c;for(let t=0,o=e.length;t<o;t++)n+=e.charAt(t),!((t-r+1)%c)&&t<o-c&&(n+=i);t[0]=n}return t[1]=e[1]&&t[1]?o+t[1]:"",(n?"-":"")+t[0]+t[1]}const B=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),U={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},W=/%$/,G=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Y=/^\(oct\)/i,K=/^\(dec\)/i,X=/^\(hex\)/i,Z=/^\(bin\)/i,J=/^\(rom\)/i,Q=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i;function ee(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function te(e,t,n){let r;return G.test(t)?e=ee(e,Number(/\d{2}/.exec(t)[0]),t,n):Y.test(t)?e=ee(e,8,t,n):K.test(t)?e=ee(e,10,t,n):X.test(t)?e=ee(e,16,t,n):Z.test(t)?e=ee(e,2,t,n):J.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",o=Number(String(e).slice(-3));const i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;n++)r=`M${r}`;t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase());return r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}class ne{constructor(e,t,n,r,o){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=o||"numeric",this.abbreviations=function(e){if(!e||!e.qNumericalAbbreviation)return U;const t={};return e.qNumericalAbbreviation.split(";").forEach((e=>{const n=e.split(":");2===n.length&&(t[n[0]]=n[1])})),t}(e),this.prepare()}clone(){const e=new ne(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}};const r=this._prepared;e=e.split(";"),r.positive.pattern=e[0],r.negative.pattern=e[1],Q.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Q.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1;r.positive.isFunctional&&(!r.negative||r.negative&&r.negative.isFunctional)||(re(r.positive,t,n),r.negative&&re(r.negative,t,n))}formatValue(e){let t,n,r,o,i,a,s,l=this._prepared,u="",c="";if(Number.isNaN(+e))return e;if(!1===l.pattern)return e.toString();e<0&&l.negative?(l=l.negative,e=-e):l=l.positive;const p=l.d,f=l.t;if(l.isFunctional)e=te(e,l.pattern,p);else{if(l.percentage&&(e*=100),l.abbreviate){const t=this.abbreviations,r=Object.keys(t).map((e=>parseInt(e,10))).sort(((e,t)=>e>t?1:-1));let o,a,s=r[0];for(i=0,n=Number(Number(e).toExponential().split("e")[1]);s<=n&&i<r.length;)i++,s=r[i];i>0&&(o=r[i-1]),o&&n>0&&o>0?a=o:(n<0&&o<0||!o)&&(s<0&&s-n<=l.maxPrecision?a=s:o<=n&&!(s>0&&-n<=l.maxPrecision)&&(a=o)),a&&(u=t[a],e/=10**a)}if(r=Math.abs(e),t=l.temp,a=l.numericPattern,s=a.split(p)[1],"I"===this.type&&(e=Math.round(e)),o=e,s||"#"!==a.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number(e.toFixed(Math.min(20,s?s.length:0)).split(".")[0]);let n=a.split(p)[0];if(n+=p,e=z(n,t)||"0",s){const t=Math.max(0,Math.min(14,s.length)),n=s.replace(/#+$/,"").length;let o=(r%1+Number.EPSILON).toFixed(t);for(o=o.slice(2).replace(/0+$/,""),i=o.length;i<n;i++)o+="0";o&&(e+=p+o)}else 0===t&&(o=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),c=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",p));else{for(a+=p,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),i=0;i<t;i++)a+="#";e=z(a,e)}e=e.replace(l.numericRegex,(e=>e===f?l.groupTemp:e===p?l.decTemp:"")),o<0&&!/^-/.test(e)&&(e=`-${e}`)}return l.prefix+e+c+u+l.postfix}}function re(e,t,n){let r,o,i=e.pattern;i.indexOf("A")>=0&&(i=i.replace("A",""),e.abbreviate=!0);const a=function(e,t){t&&(t=B(t));e&&(e=B(e));return new RegExp(`(?:[#0]+${e})?[#0]+(?:${t}[#0]+)?`)}(t,n);let s=i.match(a);s=s?s[0]:"";const l=s?i.substr(0,i.indexOf(s)):i,u=s?i.substring(i.indexOf(s)+s.length):"";s||(s=i?"#":"##########"),t&&t===n&&(r=s.split(n),o=r.pop(),s=r.join("")+n+o,t="");const c=t;t=/,/.test(n)?"¤":",",c&&(s=s.replace(oe(c,"g"),t));const p=n;n=".",p&&(s=s.replace(oe(p,"g"),n));let f=s.match(/#/g);f=f?f.length:0;const m=i.split(p);let d;m[1]&&(d=m[1].match(/#|0/g)),e.prefix=l||"",e.postfix=u||"",e.pattern=i,e.maxPrecision=d?d.length:2,e.percentage=W.test(i),e.numericPattern=s||"",e.numericRegex=new RegExp(`${oe(t,null,!0)}|${oe(n,null,!0)}`,"g"),e.groupTemp=c,e.decTemp=p,e.t=t,e.d=n,e.temp=f}function oe(e,t,n){const r=B(e);return n?r:new RegExp(r||"",t)}ne.getStaticFormatter=function(){return{prepare(){},formatValue:e=>`${e}`}};const ie=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],se=["January","February","March","April","May","June","July","August","September","October","November","December"],le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ue(e,t){for(let n=e.length;n<t;n++)e=`0${e}`;return e}function ce(e){let t=e.toString().split(".");return t[1]?(t=Number(`0.${t[1]}`),t):0}function pe(e){const t=e,n=24*ce(t),r=60*ce(n),o=60*ce(r),i=1e3*ce(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}class fe{constructor(e,t){const n=e||{};n.qCalendarStrings||(n.qCalendarStrings={qLongDayNames:ie,qDayNames:ae,qLongMonthNames:se,qMonthNames:le}),this.localeInfo=n,this.locale_days=n.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=n.qCalendarStrings.qDayNames.slice(),this.locale_months=n.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=n.qCalendarStrings.qMonthNames.slice(),this.pattern=t}clone(){const e=new fe(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+\]|\[|\]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getHours(),r=e.getDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getFullYear(),month:e.getMonth(),day:r,date:e.getDate(),h:n,m:e.getMinutes(),s:e.getSeconds(),f:e.getMilliseconds(),t:e.getHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t=`-${t}`),r=function(e,t){const n=pe(e),r=n.d;let o=n.h,i=n.m,a=n.s;const s=n.f;let l,u=0;return/w+|t+/gi.test(t)&&(l=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),Number.isNaN(+l.getTime())&&(l=null)),/D+/gi.test(t)||(o+=24*r),/h+/gi.test(t)||(i+=60*o),/m+/gi.test(t)||(a+=60*i),/w+/gi.test(t)&&(u=l?l.getDay()-1:0,u<0&&(u=6)),{year:0,month:0,day:u,date:r,h:o,m:i,s:a,f:s,t:l?l.getHours()>=12?"pm":"am":""}}(e,t));const o=function(e,t){return{"Y+|y+":{Y:`${Number(`${t.year}`.slice(-2))}`,YY:ue(`${t.year}`.slice(-2),2),YYY:ue(`${t.year}`.slice(-3),3),def:e=>ue(`${t.year}`,e.length)},"M+":{M:t.month+1,MM:ue(`${t.month+1}`,2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:ue(`${t.day}`,2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>ue(`${t.date}`,e.length)},"h+|H+":{h:t.h,def:e=>ue(`${t.h}`,e.length)},"m+":{m:t.m,def:e=>ue(`${t.m}`,e.length)},"s+|S+":{s:t.s,def:e=>ue(`${t.s}`,e.length)},"f+|F+":{def(e){let n=`${t.f}`;const r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),i=[];for(const e in o)i.push(e);const a=new RegExp(i.join("|"),"g"),s=t.replace(a,(e=>{let t,n,r;for(n in o)if(t=new RegExp(n),t.test(e))break;if(!t)return"";for(const t in o[n])if(t===e||t.toLowerCase()===e){r=o[n][t],void 0===r&&(r=o[n][t.toLowerCase()]);break}return void 0===r&&(r=o[n].def),"function"==typeof r&&(r=r(e)),r}));return s}}fe.parseInterval=pe;const me="U",de="I",he="R",ge="F",ye="M",be="D",ve="T",xe="TS",qe="IV";class Se{constructor(e,t,n,r,o){const i=e||{};this.localeInfo=i,this.pattern=t||"",this.decimalDelimiter="string"==typeof r?r:"string"==typeof i.qDecimalSep?i.qDecimalSep:".",this.thousandDelimiter="string"==typeof n?n:"string"==typeof i.qThousandSep&&this.decimalDelimiter!==i.qThousandSep?i.qThousandSep:"",this.type=o||me,o===me&&(this.pattern=`#${this.decimalDelimiter}##A`),this._numberFormatter=new ne(e),this._dateFormatter=new fe(e),this.prepare()}clone(){return new Se(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type)}prepare(e,t,n){if(e||(e=this.pattern),!e)switch(this.type){case de:e="##############";break;case he:e=Array(this.localeInfo.qnDec||11).join("#");break;case ge:e=`#${this.localeInfo.qDecimalSep}`||`.${Array(this.localeInfo.qnDec||4).join("#")}`;break;case ye:e=this.localeInfo.qMoneyFmt,n||(n=this.localeInfo.qMoneyDecimalSep||"."),t||n===this.localeInfo.qMoneyThousandSep||(t=this.localeInfo.qMoneyThousandSep);break;case be:e=this.localeInfo.qDateFmt||"YYYY-MM-DD";break;case xe:e=this.localeInfo.qTimestampFmt||"YYYY-MM-DD hh:mm:ss";break;case ve:case qe:e=this.localeInfo.qTimeFmt||"hh:mm:ss";break;default:e="##########"}this._numberFormatter.pattern=this.pattern,this._dateFormatter.pattern=this.pattern,this._numberFormatter.thousandDelimiter=this.thousandDelimiter,this._numberFormatter.decimalDelimiter=this.decimalDelimiter,this._numberFormatter.type=this.type,this._numberFormatter.prepare(e,t,n),this._prepared={pattern:e,t:t,d:n}}formatValue(e,t){let n;const r=this._prepared;if("NaN"===e||"number"==typeof e&&Number.isNaN(+e))return"-";if(Number.isNaN(+e)||"number"!=typeof e)return`${e}`;switch(this.type){case be:case ve:case xe:return n=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),Number.isNaN(+n.getTime())?this._numberFormatter.format(e,"0",r.t,r.d):this._dateFormatter.format(n,t||r.pattern);case qe:return this._dateFormatter.format(e,r.pattern);default:return this._numberFormatter.formatValue(e)}}format(e,t,n,r){return"NaN"===e||"number"==typeof e&&Number.isNaN(+e)?"-":Number.isNaN(+e)||"number"!=typeof e?`${e}`:(this.prepare(t,n,r),this.formatValue(e))}createPatternFromRange(e,t,n){let r,o="";const i=Number(Number(e).toExponential().split("e")[1]),a=Number(Number(t).toExponential().split("e")[1]),s=Math.min(Math.abs(i),Math.abs(a)),l=Math.abs(t-e);let u;const c=Number(Number(l/50).toExponential().split("e")[1]);let p;if(p=Math.abs(c),0===l)return`0${this.decimalDelimiter}##${n?"A":""}`;if(c>=0?p=n?Math.max(2,s-c):0:(u=(n?s-s%3:0)*(a<0?1:-1),p-=u),this.thousandDelimiter?o+=`#${this.thousandDelimiter}##0`:o+="0",p)for(o+=this.decimalDelimiter,r=0;r<p;r++)o+="#";return o+(n?"A":"")}}class De{constructor(e,t){this.localeInfo=e;const n=this.getFormattersForMeasures(t);let r=H(!0,[],n);if(r&&1===r.length&&t[0].isCustomFormatted)r=null;else{let e=0;for(let n=0;n<r.length;n++)t[n].isCustomFormatted&&(r[n]=null,e++);e===r.length&&(r=null)}this.measureFormatters=r,this.combinedMeasuresFormatter=this.getFormatterFromFormatters(n)}createFormatter(){return new Se(this.localeInfo)}getLocaleInfo(){return this.localeInfo||{}}getFormatters(){return this.measureFormatters||[]}getMeasureFormatter(e){if(this.measureFormatters&&this.measureFormatters[e])return this.measureFormatters[e]}getCombinedMeasuresFormatter(){return this.combinedMeasuresFormatter}formatMeasure(e,t){const n=this.measureFormatters[t];return n?n.format(e):e}getFormatterFromFormatters(e){let t,n,r,o=0,i=0,a=0;const s=e?e.filter((e=>!!e.values&&!Number.isNaN(+e.values.range))):[];let l,u;return e&&e.length&&(e.forEach((e=>("U"===e.type||e.values&&Number.isNaN(+e.values.range)?i++:["D","T","TS","IV"].includes(e.type)?o=1:a=1,e.prepare(),e))),s.length&&(t=s.reduce(((e,t)=>Math.min(t.values.min,e)),s[0].values.min),n=s.reduce(((e,t)=>Math.max(t.values.max,e)),s[0].values.max),r=Math.abs(n-t)),o+a>1?(u=e.filter((e=>"datetime"!==e.type))[0]||{},l=new Se(this.localeInfo,u.pattern,u.thousandDelimiter,u.decimalDelimiter,"U"),Number.isNaN(+r)||(l.pattern=l.createPatternFromRange(t,n,!0))):o+a===1&&0===i?(u=e[0]||{},l=new Se(this.localeInfo,u.pattern,u.thousandDelimiter,u.decimalDelimiter,u.type)):(u=e.filter((e=>"U"!==e.type)),u=u.length?u[0]:e[0]||{},l=new Se(this.localeInfo,u.pattern,u.thousandDelimiter,u.decimalDelimiter,u.type),Number.isNaN(+r)||"U"!==u.type||(l.pattern=l.createPatternFromRange(t,n,!0))),l.prepare()),l||(l=new Se(this.localeInfo,"0")),l}getFormattersForMeasures(e,t){let n,r=[];return e&&e.length&&(n=t?e.filter(((e,n)=>t.indexOf(n)>=0)):e,r=n.map((function(e){const t=function(e){return!!e.qIsAutoFormat&&["M","D","T","TS","IV"].indexOf(e.qNumFormat.qType)<0}(e),n=new Se(this.localeInfo,e.qNumFormat.qFmt,e.qNumFormat.qThou,e.qNumFormat.qDec,t?"U":e.qNumFormat.qType),r=Math.abs(e.qMax-e.qMin),o=Number.isNaN(+r);return n.values={min:e.qMin,max:e.qMax,range:r},!o&&t&&(n.pattern=n.createPatternFromRange(e.qMin,e.qMax,!0)),n.prepare(),n}),this)),r}}function we(e,t){return!Number.isNaN(+e)&&"U"===t?.type}function Ee(e,t){if("U"===t.type){const n=t.clone();return n.pattern=function(e){let t="0";const n=e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0;if(n){t+=".";for(let e=0;e<n;e++)t+="0"}return`${t}A`}(e),n.prepare(),n}return t}function Ce(e,t,n){const r={...n};return r.components[0].getText=e,r.components[1].getText=t,{layoutInfo:r,text:e()}}const Ae=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),{useState:Te,useEffect:Me}=v,Ie=({endValue:e,duration:t,formatter:n})=>{const[r,o]=Te(e),[i,a]=Te(null),s=(e,n,r,i,l)=>{if(i-l>=t)return void a(Math.random());o(n=e+(1-(l+t-i)/t)*r),window.requestAnimationFrame((t=>{s(e,n,r,t,l)}))};return Me((()=>{if(r!==e){const t=performance.now();s(r,r,e-r,t,t)}}),[e]),Me((()=>{null!==i&&o(e)}),[i]),_.jsx(_.Fragment,{children:n.format(r)})},{entries:Oe,setPrototypeOf:ke,isFrozen:Ne,getPrototypeOf:Fe,getOwnPropertyDescriptor:Le}=Object;let{freeze:Pe,seal:_e,create:Re}=Object,{apply:je,construct:Ve}="undefined"!=typeof Reflect&&Reflect;Pe||(Pe=function(e){return e}),_e||(_e=function(e){return e}),je||(je=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Ve||(Ve=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const $e=nt(Array.prototype.forEach),He=nt(Array.prototype.lastIndexOf),ze=nt(Array.prototype.pop),Be=nt(Array.prototype.push),Ue=nt(Array.prototype.splice),We=nt(String.prototype.toLowerCase),Ge=nt(String.prototype.toString),Ye=nt(String.prototype.match),Ke=nt(String.prototype.replace),Xe=nt(String.prototype.indexOf),Ze=nt(String.prototype.trim),Je=nt(Object.prototype.hasOwnProperty),Qe=nt(RegExp.prototype.test),et=(tt=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ve(tt,t)});var tt;function nt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return je(e,t,r)}}function rt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:We;ke&&ke(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Ne(t)||(t[r]=e),o=e)}e[o]=!0}return e}function ot(e){for(let t=0;t<e.length;t++){Je(e,t)||(e[t]=null)}return e}function it(e){const t=Re(null);for(const[n,r]of Oe(e)){Je(e,n)&&(Array.isArray(r)?t[n]=ot(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=it(r):t[n]=r)}return t}function at(e,t){for(;null!==e;){const n=Le(e,t);if(n){if(n.get)return nt(n.get);if("function"==typeof n.value)return nt(n.value)}e=Fe(e)}return function(){return null}}const st=Pe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lt=Pe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ut=Pe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ct=Pe(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pt=Pe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ft=Pe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mt=Pe(["#text"]),dt=Pe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ht=Pe(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),gt=Pe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yt=Pe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bt=_e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vt=_e(/<%[\w\W]*|[\w\W]*%>/gm),xt=_e(/\$\{[\w\W]*/gm),qt=_e(/^data-[\-\w.\u00B7-\uFFFF]+$/),St=_e(/^aria-[\-\w]+$/),Dt=_e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wt=_e(/^(?:\w+script|data):/i),Et=_e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ct=_e(/^html$/i),At=_e(/^[a-z][.\w]*(-[.\w]+)+$/i);var Tt=Object.freeze({__proto__:null,ARIA_ATTR:St,ATTR_WHITESPACE:Et,CUSTOM_ELEMENT:At,DATA_ATTR:qt,DOCTYPE_NAME:Ct,ERB_EXPR:vt,IS_ALLOWED_URI:Dt,IS_SCRIPT_OR_DATA:wt,MUSTACHE_EXPR:bt,TMPLIT_EXPR:xt});const Mt=1,It=3,Ot=7,kt=8,Nt=9,Ft=function(){return"undefined"==typeof window?null:window};var Lt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ft();const n=t=>e(t);if(n.version="3.3.1",n.removed=[],!t||!t.document||t.document.nodeType!==Nt||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:c,NamedNodeMap:p=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:m,trustedTypes:d}=t,h=u.prototype,g=at(h,"cloneNode"),y=at(h,"remove"),b=at(h,"nextSibling"),v=at(h,"childNodes"),x=at(h,"parentNode");if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let q,S="";const{implementation:D,createNodeIterator:w,createDocumentFragment:E,getElementsByTagName:C}=r,{importNode:A}=o;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof Oe&&"function"==typeof x&&D&&void 0!==D.createHTMLDocument;const{MUSTACHE_EXPR:M,ERB_EXPR:I,TMPLIT_EXPR:O,DATA_ATTR:k,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:L,CUSTOM_ELEMENT:P}=Tt;let{IS_ALLOWED_URI:_}=Tt,R=null;const j=rt({},[...st,...lt,...ut,...pt,...mt]);let V=null;const $=rt({},[...dt,...ht,...gt,...yt]);let H=Object.seal(Re(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),z=null,B=null;const U=Object.seal(Re(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let W=!0,G=!0,Y=!1,K=!0,X=!1,Z=!0,J=!1,Q=!1,ee=!1,te=!1,ne=!1,re=!1,oe=!0,ie=!1,ae=!0,se=!1,le={},ue=null;const ce=rt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let pe=null;const fe=rt({},["audio","video","img","source","image","track"]);let me=null;const de=rt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let be=ye,ve=!1,xe=null;const qe=rt({},[he,ge,ye],Ge);let Se=rt({},["mi","mo","mn","ms","mtext"]),De=rt({},["annotation-xml"]);const we=rt({},["title","style","font","a","script"]);let Ee=null;const Ce=["application/xhtml+xml","text/html"];let Ae=null,Te=null;const Me=r.createElement("form"),Ie=function(e){return e instanceof RegExp||e instanceof Function},ke=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Te||Te!==e){if(e&&"object"==typeof e||(e={}),e=it(e),Ee=-1===Ce.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ae="application/xhtml+xml"===Ee?Ge:We,R=Je(e,"ALLOWED_TAGS")?rt({},e.ALLOWED_TAGS,Ae):j,V=Je(e,"ALLOWED_ATTR")?rt({},e.ALLOWED_ATTR,Ae):$,xe=Je(e,"ALLOWED_NAMESPACES")?rt({},e.ALLOWED_NAMESPACES,Ge):qe,me=Je(e,"ADD_URI_SAFE_ATTR")?rt(it(de),e.ADD_URI_SAFE_ATTR,Ae):de,pe=Je(e,"ADD_DATA_URI_TAGS")?rt(it(fe),e.ADD_DATA_URI_TAGS,Ae):fe,ue=Je(e,"FORBID_CONTENTS")?rt({},e.FORBID_CONTENTS,Ae):ce,z=Je(e,"FORBID_TAGS")?rt({},e.FORBID_TAGS,Ae):it({}),B=Je(e,"FORBID_ATTR")?rt({},e.FORBID_ATTR,Ae):it({}),le=!!Je(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,Y=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,Z=!1!==e.SAFE_FOR_XML,J=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,oe=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,se=e.IN_PLACE||!1,_=e.ALLOWED_URI_REGEXP||Dt,be=e.NAMESPACE||ye,Se=e.MATHML_TEXT_INTEGRATION_POINTS||Se,De=e.HTML_INTEGRATION_POINTS||De,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ie(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(G=!1),ne&&(te=!0),le&&(R=rt({},mt),V=[],!0===le.html&&(rt(R,st),rt(V,dt)),!0===le.svg&&(rt(R,lt),rt(V,ht),rt(V,yt)),!0===le.svgFilters&&(rt(R,ut),rt(V,ht),rt(V,yt)),!0===le.mathMl&&(rt(R,pt),rt(V,gt),rt(V,yt))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?U.tagCheck=e.ADD_TAGS:(R===j&&(R=it(R)),rt(R,e.ADD_TAGS,Ae))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?U.attributeCheck=e.ADD_ATTR:(V===$&&(V=it(V)),rt(V,e.ADD_ATTR,Ae))),e.ADD_URI_SAFE_ATTR&&rt(me,e.ADD_URI_SAFE_ATTR,Ae),e.FORBID_CONTENTS&&(ue===ce&&(ue=it(ue)),rt(ue,e.FORBID_CONTENTS,Ae)),e.ADD_FORBID_CONTENTS&&(ue===ce&&(ue=it(ue)),rt(ue,e.ADD_FORBID_CONTENTS,Ae)),ae&&(R["#text"]=!0),J&&rt(R,["html","head","body"]),R.table&&(rt(R,["tbody"]),delete z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=e.TRUSTED_TYPES_POLICY,S=q.createHTML("")}else void 0===q&&(q=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(d,i)),null!==q&&"string"==typeof S&&(S=q.createHTML(""));Pe&&Pe(e),Te=e}},Ne=rt({},[...lt,...ut,...ct]),Fe=rt({},[...pt,...ft]),Le=function(e){Be(n.removed,{element:e});try{x(e).removeChild(e)}catch(t){y(e)}},_e=function(e,t){try{Be(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Be(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},je=function(e){let t=null,n=null;if(ee)e="<remove></remove>"+e;else{const t=Ye(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ee&&be===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=q?q.createHTML(e):e;if(be===ye)try{t=(new m).parseFromString(o,Ee)}catch(e){}if(!t||!t.documentElement){t=D.createDocument(be,"template",null);try{t.documentElement.innerHTML=ve?S:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),be===ye?C.call(t,J?"html":"body")[0]:J?t.documentElement:i},Ve=function(e){return w.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},tt=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},nt=function(e){return"function"==typeof l&&e instanceof l};function ot(e,t,r){$e(e,(e=>{e.call(n,t,r,Te)}))}const bt=function(e){let t=null;if(ot(T.beforeSanitizeElements,e,null),tt(e))return Le(e),!0;const r=Ae(e.nodeName);if(ot(T.uponSanitizeElement,e,{tagName:r,allowedTags:R}),Z&&e.hasChildNodes()&&!nt(e.firstElementChild)&&Qe(/<[/\w!]/g,e.innerHTML)&&Qe(/<[/\w!]/g,e.textContent))return Le(e),!0;if(e.nodeType===Ot)return Le(e),!0;if(Z&&e.nodeType===kt&&Qe(/<[/\w]/g,e.data))return Le(e),!0;if(!(U.tagCheck instanceof Function&&U.tagCheck(r))&&(!R[r]||z[r])){if(!z[r]&&xt(r)){if(H.tagNameCheck instanceof RegExp&&Qe(H.tagNameCheck,r))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(r))return!1}if(ae&&!ue[r]){const t=x(e)||e.parentNode,n=v(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=g(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,b(e))}}}return Le(e),!0}return e instanceof u&&!function(e){let t=x(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=We(e.tagName),r=We(t.tagName);return!!xe[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===ye?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===r||Se[r]):Boolean(Ne[n]):e.namespaceURI===he?t.namespaceURI===ye?"math"===n:t.namespaceURI===ge?"math"===n&&De[r]:Boolean(Fe[n]):e.namespaceURI===ye?!(t.namespaceURI===ge&&!De[r])&&!(t.namespaceURI===he&&!Se[r])&&!Fe[n]&&(we[n]||!Ne[n]):!("application/xhtml+xml"!==Ee||!xe[e.namespaceURI]))}(e)?(Le(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!Qe(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&e.nodeType===It&&(t=e.textContent,$e([M,I,O],(e=>{t=Ke(t,e," ")})),e.textContent!==t&&(Be(n.removed,{element:e.cloneNode()}),e.textContent=t)),ot(T.afterSanitizeElements,e,null),!1):(Le(e),!0)},vt=function(e,t,n){if(oe&&("id"===t||"name"===t)&&(n in r||n in Me))return!1;if(G&&!B[t]&&Qe(k,t));else if(W&&Qe(N,t));else if(U.attributeCheck instanceof Function&&U.attributeCheck(t,e));else if(!V[t]||B[t]){if(!(xt(e)&&(H.tagNameCheck instanceof RegExp&&Qe(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&Qe(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t,e))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&Qe(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(me[t]);else if(Qe(_,Ke(n,L,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Xe(n,"data:")||!pe[e]){if(Y&&!Qe(F,Ke(n,L,"")));else if(n)return!1}else;return!0},xt=function(e){return"annotation-xml"!==e&&Ye(e,P)},qt=function(e){ot(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||tt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:s,value:l}=i,u=Ae(a),c=l;let p="value"===a?c:Ze(c);if(r.attrName=u,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,ot(T.uponSanitizeAttribute,e,r),p=r.attrValue,!ie||"id"!==u&&"name"!==u||(_e(a,e),p="user-content-"+p),Z&&Qe(/((--!?|])>)|<\/(style|title|textarea)/i,p)){_e(a,e);continue}if("attributename"===u&&Ye(p,"href")){_e(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){_e(a,e);continue}if(!K&&Qe(/\/>/i,p)){_e(a,e);continue}X&&$e([M,I,O],(e=>{p=Ke(p,e," ")}));const f=Ae(e.nodeName);if(vt(f,u,p)){if(q&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(s);else switch(d.getAttributeType(f,u)){case"TrustedHTML":p=q.createHTML(p);break;case"TrustedScriptURL":p=q.createScriptURL(p)}if(p!==c)try{s?e.setAttributeNS(s,a,p):e.setAttribute(a,p),tt(e)?Le(e):ze(n.removed)}catch(t){_e(a,e)}}else _e(a,e)}ot(T.afterSanitizeAttributes,e,null)},St=function e(t){let n=null;const r=Ve(t);for(ot(T.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)ot(T.uponSanitizeShadowNode,n,null),bt(n),qt(n),n.content instanceof a&&e(n.content);ot(T.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,u=null;if(ve=!e,ve&&(e="\x3c!--\x3e"),"string"!=typeof e&&!nt(e)){if("function"!=typeof e.toString)throw et("toString is not a function");if("string"!=typeof(e=e.toString()))throw et("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||ke(t),n.removed=[],"string"==typeof e&&(se=!1),se){if(e.nodeName){const t=Ae(e.nodeName);if(!R[t]||z[t])throw et("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)r=je("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.n