UNPKG

@nebula.js/sn-kpi

Version:

KPI supernova

15 lines (14 loc) 2.49 MB
/* * @nebula.js/sn-kpi v2.4.0 * Copyright (c) 2026 QlikTech International AB * Released under the MIT license. */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-kpi"]=t(e.stardust)}(this,(function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(c){if("default"!==c&&!(c in e)){var n=Object.getOwnPropertyDescriptor(t,c);Object.defineProperty(e,c,n.get?n:{enumerable:!0,get:function(){return t[c]}})}}))})),Object.freeze(e)}function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var c=function e(){var c=!1;try{c=this instanceof e}catch{}return c?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};c.prototype=t.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),c}var l,r,a={exports:{}},h={};function o(){if(l)return h;l=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),s=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),z=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,u={};function M(e,t,c){this.props=e,this.context=t,this.refs=u,this.updater=c||d}function H(){}function V(e,t,c){this.props=e,this.context=t,this.refs=u,this.updater=c||d}M.prototype.isReactComponent={},M.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},M.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},H.prototype=M.prototype;var f=V.prototype=new H;f.constructor=V,p(f,M.prototype),f.isPureReactComponent=!0;var E=Array.isArray,L=Object.prototype.hasOwnProperty,g={current:null},y={key:!0,ref:!0,__self:!0,__source:!0};function C(t,c,n){var l,r={},a=null,h=null;if(null!=c)for(l in void 0!==c.ref&&(h=c.ref),void 0!==c.key&&(a=""+c.key),c)L.call(c,l)&&!y.hasOwnProperty(l)&&(r[l]=c[l]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var i=Array(o),m=0;m<o;m++)i[m]=arguments[m+2];r.children=i}if(t&&t.defaultProps)for(l in o=t.defaultProps)void 0===r[l]&&(r[l]=o[l]);return{$$typeof:e,type:t,key:a,ref:h,props:r,_owner:g.current}}function S(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var b=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function w(c,n,l,r,a){var h=typeof c;"undefined"!==h&&"boolean"!==h||(c=null);var o=!1;if(null===c)o=!0;else switch(h){case"string":case"number":o=!0;break;case"object":switch(c.$$typeof){case e:case t:o=!0}}if(o)return a=a(o=c),c=""===r?"."+T(o,0):r,E(a)?(l="",null!=c&&(l=c.replace(b,"$&/")+"/"),w(a,n,l,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(t,c){return{$$typeof:e,type:t.type,key:c,ref:t.ref,props:t.props,_owner:t._owner}}(a,l+(!a.key||o&&o.key===a.key?"":(""+a.key).replace(b,"$&/")+"/")+c)),n.push(a)),1;if(o=0,r=""===r?".":r+":",E(c))for(var i=0;i<c.length;i++){var m=r+T(h=c[i],i);o+=w(h,n,l,m,a)}else if(m=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=z&&e[z]||e["@@iterator"])?e:null}(c),"function"==typeof m)for(c=m.call(c),i=0;!(h=c.next()).done;)o+=w(h=h.value,n,l,m=r+T(h,i++),a);else if("object"===h)throw n=String(c),Error("Objects are not valid as a React child (found: "+("[object Object]"===n?"object with keys {"+Object.keys(c).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return o}function x(e,t,c){if(null==e)return e;var n=[],l=0;return w(e,n,"","",(function(e){return t.call(c,e,l++)})),n}function O(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var F={current:null},R={transition:null},k={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:R,ReactCurrentOwner:g};function A(){throw Error("act(...) is not supported in production builds of React.")}return h.Children={map:x,forEach:function(e,t,c){x(e,(function(){t.apply(this,arguments)}),c)},count:function(e){var t=0;return x(e,(function(){t++})),t},toArray:function(e){return x(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},h.Component=M,h.Fragment=c,h.Profiler=r,h.PureComponent=V,h.StrictMode=n,h.Suspense=m,h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,h.act=A,h.cloneElement=function(t,c,n){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var l=p({},t.props),r=t.key,a=t.ref,h=t._owner;if(null!=c){if(void 0!==c.ref&&(a=c.ref,h=g.current),void 0!==c.key&&(r=""+c.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(i in c)L.call(c,i)&&!y.hasOwnProperty(i)&&(l[i]=void 0===c[i]&&void 0!==o?o[i]:c[i])}var i=arguments.length-2;if(1===i)l.children=n;else if(1<i){o=Array(i);for(var m=0;m<i;m++)o[m]=arguments[m+2];l.children=o}return{$$typeof:e,type:t.type,key:r,ref:a,props:l,_owner:h}},h.createContext=function(e){return(e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},h.createElement=C,h.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},h.createRef=function(){return{current:null}},h.forwardRef=function(e){return{$$typeof:i,render:e}},h.isValidElement=S,h.lazy=function(e){return{$$typeof:v,_payload:{_status:-1,_result:e},_init:O}},h.memo=function(e,t){return{$$typeof:s,type:e,compare:void 0===t?null:t}},h.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},h.unstable_act=A,h.useCallback=function(e,t){return F.current.useCallback(e,t)},h.useContext=function(e){return F.current.useContext(e)},h.useDebugValue=function(){},h.useDeferredValue=function(e){return F.current.useDeferredValue(e)},h.useEffect=function(e,t){return F.current.useEffect(e,t)},h.useId=function(){return F.current.useId()},h.useImperativeHandle=function(e,t,c){return F.current.useImperativeHandle(e,t,c)},h.useInsertionEffect=function(e,t){return F.current.useInsertionEffect(e,t)},h.useLayoutEffect=function(e,t){return F.current.useLayoutEffect(e,t)},h.useMemo=function(e,t){return F.current.useMemo(e,t)},h.useReducer=function(e,t,c){return F.current.useReducer(e,t,c)},h.useRef=function(e){return F.current.useRef(e)},h.useState=function(e){return F.current.useState(e)},h.useSyncExternalStore=function(e,t,c){return F.current.useSyncExternalStore(e,t,c)},h.useTransition=function(){return F.current.useTransition()},h.version="18.3.1",h}function i(){return r||(r=1,a.exports=o()),a.exports}var m,s,v=i(),z=c(v),d=t({__proto__:null,default:z},[v]),p={exports:{}},u={};var M=(s||(s=1,p.exports=function(){if(m)return u;m=1;var e=i(),t=Symbol.for("react.element"),c=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};function a(e,c,a){var h,o={},i=null,m=null;for(h in void 0!==a&&(i=""+a),void 0!==c.key&&(i=""+c.key),void 0!==c.ref&&(m=c.ref),c)n.call(c,h)&&!r.hasOwnProperty(h)&&(o[h]=c[h]);if(e&&e.defaultProps)for(h in c=e.defaultProps)void 0===o[h]&&(o[h]=c[h]);return{$$typeof:t,type:e,key:i,ref:m,props:o,_owner:l.current}}return u.Fragment=c,u.jsx=a,u.jsxs=a,u}()),p.exports);const H=(e,t)=>M.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:M.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"})}),V=v.forwardRef(H);var f,E;var L=function(){if(E)return f;E=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,c=Object.defineProperty,n=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},r=function(c){if(!c||"[object Object]"!==t.call(c))return!1;var n,l=e.call(c,"constructor"),r=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!l&&!r)return!1;for(n in c);return void 0===n||e.call(c,n)},a=function(e,t){c&&"__proto__"===t.name?c(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},h=function(t,c){if("__proto__"===c){if(!e.call(t,c))return;if(n)return n(t,c).value}return t[c]};return f=function e(){var t,c,n,o,i,m,s=arguments[0],v=1,z=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[1]||{},v=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});v<z;++v)if(null!=(t=arguments[v]))for(c in t)n=h(s,c),s!==(o=h(t,c))&&(d&&o&&(r(o)||(i=l(o)))?(i?(i=!1,m=n&&l(n)?n:[]):m=n&&r(n)?n:{},a(s,{name:c,newValue:e(d,m,o)})):void 0!==o&&a(s,{name:c,newValue:o}));return s},f}(),g=c(L); /** * @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 y(e,t){if(!e||isNaN(+t))return t;const c=(t="-"===e.charAt(0)?-t:+t)<0?t=-t:0,n=e.match(/[^\d\-\+#]/g),l=n?.[n.length-1]||".",r=n&&n[1]&&n[0]||",";e=e.split(l);t=""+ +(t=t.toFixed(e[1]?.length));const a=e[1]?.lastIndexOf("0"),h=t.split(".");(!h[1]||h[1]&&h[1].length<=a)&&(t=(+t).toFixed(a+1));const o=e[0].split(r);e[0]=o.join("");const i=e[0]?.indexOf("0");if(i>-1)for(;h[0].length<e[0].length-i;)h[0]=`0${h[0]}`;else 0==+h[0]&&(h[0]="");(t=t.split("."))[0]=h[0];const m=o[1]&&o[o.length-1].length;if(m){const e=t[0];let c="";const n=e.length%m;for(let t=0,l=e.length;t<l;t++)c+=e.charAt(t),!((t-n+1)%m)&&t<l-m&&(c+=r);t[0]=c}return t[1]=e[1]&&t[1]?l+t[1]:"",(c?"-":"")+t[0]+t[1]}const C=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),S={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"},b=/%$/,T=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,w=/^\(oct\)/i,x=/^\(dec\)/i,O=/^\(hex\)/i,F=/^\(bin\)/i,R=/^\(rom\)/i,k=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i;function A(e,t,c,n){return e=e.toString(t),c[1]===c[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function D(e,t,c){let n;return T.test(t)?e=A(e,Number(/\d{2}/.exec(t)[0]),t,c):w.test(t)?e=A(e,8,t,c):x.test(t)?e=A(e,10,t,c):O.test(t)?e=A(e,16,t,c):F.test(t)?e=A(e,2,t,c):R.test(t)&&(n="",e<0&&(n="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let c,n="",l=Number(String(e).slice(-3));const r=(e-l)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),h=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;l>0;)for(c=0;c<a.length;c++)if(a[c]<=l){n+=h[c],l-=a[c];break}for(c=0;c<r;c++)n=`M${n}`;t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase());return n}(e,t),e=n+e):e=t+n+e.toExponential(0)),e}class P{constructor(e,t,c,n,l){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=c||",",this.decimalDelimiter=n||".",this.type=l||"numeric",this.abbreviations=function(e){if(!e||!e.qNumericalAbbreviation)return S;const t={};return e.qNumericalAbbreviation.split(";").forEach((e=>{const c=e.split(":");2===c.length&&(t[c[0]]=c[1])})),t}(e),this.prepare()}clone(){const e=new P(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,c,n){return this.prepare(t,c,n),this.formatValue(e)}prepare(e,t,c){if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===c&&(c=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:c,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:c,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}};const n=this._prepared;e=e.split(";"),n.positive.pattern=e[0],n.negative.pattern=e[1],k.test(e[0])&&(n.positive.isFunctional=!0),e[1]?k.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1;n.positive.isFunctional&&(!n.negative||n.negative&&n.negative.isFunctional)||(I(n.positive,t,c),n.negative&&I(n.negative,t,c))}formatValue(e){let t,c,n,l,r,a,h,o=this._prepared,i="",m="";if(Number.isNaN(+e))return e;if(!1===o.pattern)return e.toString();e<0&&o.negative?(o=o.negative,e=-e):o=o.positive;const s=o.d,v=o.t;if(o.isFunctional)e=D(e,o.pattern,s);else{if(o.percentage&&(e*=100),o.abbreviate){const t=this.abbreviations,n=Object.keys(t).map((e=>parseInt(e,10))).sort(((e,t)=>e>t?1:-1));let l,a,h=n[0];for(r=0,c=Number(Number(e).toExponential().split("e")[1]);h<=c&&r<n.length;)r++,h=n[r];r>0&&(l=n[r-1]),l&&c>0&&l>0?a=l:(c<0&&l<0||!l)&&(h<0&&h-c<=o.maxPrecision?a=h:l<=c&&!(h>0&&-c<=o.maxPrecision)&&(a=l)),a&&(i=t[a],e/=10**a)}if(n=Math.abs(e),t=o.temp,a=o.numericPattern,h=a.split(s)[1],"I"===this.type&&(e=Math.round(e)),l=e,h||"#"!==a.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number(e.toFixed(Math.min(20,h?h.length:0)).split(".")[0]);let c=a.split(s)[0];if(c+=s,e=y(c,t)||"0",h){const t=Math.max(0,Math.min(14,h.length)),c=h.replace(/#+$/,"").length;let l=(n%1+Number.EPSILON).toFixed(t);for(l=l.slice(2).replace(/0+$/,""),r=l.length;r<c;r++)l+="0";l&&(e+=s+l)}else 0===t&&(l=0)}else if(n>=10**t||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=l.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),m=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",s));else{for(a+=s,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),r=0;r<t;r++)a+="#";e=y(a,e)}e=e.replace(o.numericRegex,(e=>e===v?o.groupTemp:e===s?o.decTemp:"")),l<0&&!/^-/.test(e)&&(e=`-${e}`)}return o.prefix+e+m+i+o.postfix}}function I(e,t,c){let n,l,r=e.pattern;r.indexOf("A")>=0&&(r=r.replace("A",""),e.abbreviate=!0);const a=function(e,t){t&&(t=C(t));e&&(e=C(e));return new RegExp(`(?:[#0]+${e})?[#0]+(?:${t}[#0]+)?`)}(t,c);let h=r.match(a);h=h?h[0]:"";const o=h?r.substr(0,r.indexOf(h)):r,i=h?r.substring(r.indexOf(h)+h.length):"";h||(h=r?"#":"##########"),t&&t===c&&(n=h.split(c),l=n.pop(),h=n.join("")+c+l,t="");const m=t;t=/,/.test(c)?"¤":",",m&&(h=h.replace(q(m,"g"),t));const s=c;c=".",s&&(h=h.replace(q(s,"g"),c));let v=h.match(/#/g);v=v?v.length:0;const z=r.split(s);let d;z[1]&&(d=z[1].match(/#|0/g)),e.prefix=o||"",e.postfix=i||"",e.pattern=r,e.maxPrecision=d?d.length:2,e.percentage=b.test(r),e.numericPattern=h||"",e.numericRegex=new RegExp(`${q(t,null,!0)}|${q(c,null,!0)}`,"g"),e.groupTemp=m,e.decTemp=s,e.t=t,e.d=c,e.temp=v}function q(e,t,c){const n=C(e);return c?n:new RegExp(n||"",t)}P.getStaticFormatter=function(){return{prepare(){},formatValue:e=>`${e}`}};const N=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],B=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],_=["January","February","March","April","May","June","July","August","September","October","November","December"],j=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function W(e,t){for(let c=e.length;c<t;c++)e=`0${e}`;return e}function $(e){let t=e.toString().split(".");return t[1]?(t=Number(`0.${t[1]}`),t):0}function U(e){const t=e,c=24*$(t),n=60*$(c),l=60*$(n),r=1e3*$(l);return{d:Math.floor(t),h:Math.floor(c),m:Math.floor(n),s:Math.floor(l),f:Math.round(r)}}class G{constructor(e,t){const c=e||{};c.qCalendarStrings||(c.qCalendarStrings={qLongDayNames:N,qDayNames:B,qLongMonthNames:_,qMonthNames:j}),this.localeInfo=c,this.locale_days=c.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=c.qCalendarStrings.qDayNames.slice(),this.locale_months=c.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=c.qCalendarStrings.qMonthNames.slice(),this.pattern=t}clone(){const e=new G(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 c=/t+/gi.test(t);let n;e instanceof Date?n=function(e,t){let c=e.getHours(),n=e.getDay()-1;return t&&(c%=12,c||(c=12)),n<0&&(n=6),{year:e.getFullYear(),month:e.getMonth(),day:n,date:e.getDate(),h:c,m:e.getMinutes(),s:e.getSeconds(),f:e.getMilliseconds(),t:e.getHours()>=12?"pm":"am"}}(e,c):(e<0&&(e=-e,t=`-${t}`),n=function(e,t){const c=U(e),n=c.d;let l=c.h,r=c.m,a=c.s;const h=c.f;let o,i=0;return/w+|t+/gi.test(t)&&(o=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),Number.isNaN(+o.getTime())&&(o=null)),/D+/gi.test(t)||(l+=24*n),/h+/gi.test(t)||(r+=60*l),/m+/gi.test(t)||(a+=60*r),/w+/gi.test(t)&&(i=o?o.getDay()-1:0,i<0&&(i=6)),{year:0,month:0,day:i,date:n,h:l,m:r,s:a,f:h,t:o?o.getHours()>=12?"pm":"am":""}}(e,t));const l=function(e,t){return{"Y+|y+":{Y:`${Number(`${t.year}`.slice(-2))}`,YY:W(`${t.year}`.slice(-2),2),YYY:W(`${t.year}`.slice(-3),3),def:e=>W(`${t.year}`,e.length)},"M+":{M:t.month+1,MM:W(`${t.month+1}`,2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:W(`${t.day}`,2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>W(`${t.date}`,e.length)},"h+|H+":{h:t.h,def:e=>W(`${t.h}`,e.length)},"m+":{m:t.m,def:e=>W(`${t.m}`,e.length)},"s+|S+":{s:t.s,def:e=>W(`${t.s}`,e.length)},"f+|F+":{def(e){let c=`${t.f}`;const n=e.length-c.length;if(n>0)for(let e=0;e<n;e++)c+="0";else n<0&&(c=c.slice(0,e.length));return c}},"t{1,2}|T{1,2}":{def(e){let c=t.t;return e[0].toUpperCase()===e[0]&&(c=c.toUpperCase()),c=c.slice(0,e.length),c}}}}(this,n),r=[];for(const e in l)r.push(e);const a=new RegExp(r.join("|"),"g"),h=t.replace(a,(e=>{let t,c,n;for(c in l)if(t=new RegExp(c),t.test(e))break;if(!t)return"";for(const t in l[c])if(t===e||t.toLowerCase()===e){n=l[c][t],void 0===n&&(n=l[c][t.toLowerCase()]);break}return void 0===n&&(n=l[c].def),"function"==typeof n&&(n=n(e)),n}));return h}}G.parseInterval=U;const K="U",Q="I",Y="R",X="F",Z="M",J="D",ee="T",te="TS",ce="IV";class ne{constructor(e,t,c,n,l){const r=e||{};this.localeInfo=r,this.pattern=t||"",this.decimalDelimiter="string"==typeof n?n:"string"==typeof r.qDecimalSep?r.qDecimalSep:".",this.thousandDelimiter="string"==typeof c?c:"string"==typeof r.qThousandSep&&this.decimalDelimiter!==r.qThousandSep?r.qThousandSep:"",this.type=l||K,l===K&&(this.pattern=`#${this.decimalDelimiter}##A`),this._numberFormatter=new P(e),this._dateFormatter=new G(e),this.prepare()}clone(){return new ne(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type)}prepare(e,t,c){if(e||(e=this.pattern),!e)switch(this.type){case Q:e="##############";break;case Y:e=Array(this.localeInfo.qnDec||11).join("#");break;case X:e=`#${this.localeInfo.qDecimalSep}`||`.${Array(this.localeInfo.qnDec||4).join("#")}`;break;case Z:e=this.localeInfo.qMoneyFmt,c||(c=this.localeInfo.qMoneyDecimalSep||"."),t||c===this.localeInfo.qMoneyThousandSep||(t=this.localeInfo.qMoneyThousandSep);break;case J:e=this.localeInfo.qDateFmt||"YYYY-MM-DD";break;case te:e=this.localeInfo.qTimestampFmt||"YYYY-MM-DD hh:mm:ss";break;case ee:case ce: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,c),this._prepared={pattern:e,t:t,d:c}}formatValue(e,t){let c;const n=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 J:case ee:case te:return c=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),Number.isNaN(+c.getTime())?this._numberFormatter.format(e,"0",n.t,n.d):this._dateFormatter.format(c,t||n.pattern);case ce:return this._dateFormatter.format(e,n.pattern);default:return this._numberFormatter.formatValue(e)}}format(e,t,c,n){return"NaN"===e||"number"==typeof e&&Number.isNaN(+e)?"-":Number.isNaN(+e)||"number"!=typeof e?`${e}`:(this.prepare(t,c,n),this.formatValue(e))}createPatternFromRange(e,t,c){let n,l="";const r=Number(Number(e).toExponential().split("e")[1]),a=Number(Number(t).toExponential().split("e")[1]),h=Math.min(Math.abs(r),Math.abs(a)),o=Math.abs(t-e);let i;const m=Number(Number(o/50).toExponential().split("e")[1]);let s;if(s=Math.abs(m),0===o)return`0${this.decimalDelimiter}##${c?"A":""}`;if(m>=0?s=c?Math.max(2,h-m):0:(i=(c?h-h%3:0)*(a<0?1:-1),s-=i),this.thousandDelimiter?l+=`#${this.thousandDelimiter}##0`:l+="0",s)for(l+=this.decimalDelimiter,n=0;n<s;n++)l+="#";return l+(c?"A":"")}}class le{constructor(e,t){this.localeInfo=e;const c=this.getFormattersForMeasures(t);let n=g(!0,[],c);if(n&&1===n.length&&t[0].isCustomFormatted)n=null;else{let e=0;for(let c=0;c<n.length;c++)t[c].isCustomFormatted&&(n[c]=null,e++);e===n.length&&(n=null)}this.measureFormatters=n,this.combinedMeasuresFormatter=this.getFormatterFromFormatters(c)}createFormatter(){return new ne(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 c=this.measureFormatters[t];return c?c.format(e):e}getFormatterFromFormatters(e){let t,c,n,l=0,r=0,a=0;const h=e?e.filter((e=>!!e.values&&!Number.isNaN(+e.values.range))):[];let o,i;return e&&e.length&&(e.forEach((e=>("U"===e.type||e.values&&Number.isNaN(+e.values.range)?r++:["D","T","TS","IV"].includes(e.type)?l=1:a=1,e.prepare(),e))),h.length&&(t=h.reduce(((e,t)=>Math.min(t.values.min,e)),h[0].values.min),c=h.reduce(((e,t)=>Math.max(t.values.max,e)),h[0].values.max),n=Math.abs(c-t)),l+a>1?(i=e.filter((e=>"datetime"!==e.type))[0]||{},o=new ne(this.localeInfo,i.pattern,i.thousandDelimiter,i.decimalDelimiter,"U"),Number.isNaN(+n)||(o.pattern=o.createPatternFromRange(t,c,!0))):l+a===1&&0===r?(i=e[0]||{},o=new ne(this.localeInfo,i.pattern,i.thousandDelimiter,i.decimalDelimiter,i.type)):(i=e.filter((e=>"U"!==e.type)),i=i.length?i[0]:e[0]||{},o=new ne(this.localeInfo,i.pattern,i.thousandDelimiter,i.decimalDelimiter,i.type),Number.isNaN(+n)||"U"!==i.type||(o.pattern=o.createPatternFromRange(t,c,!0))),o.prepare()),o||(o=new ne(this.localeInfo,"0")),o}getFormattersForMeasures(e,t){let c,n=[];return e&&e.length&&(c=t?e.filter(((e,c)=>t.indexOf(c)>=0)):e,n=c.map((function(e){const t=function(e){return!!e.qIsAutoFormat&&["M","D","T","TS","IV"].indexOf(e.qNumFormat.qType)<0}(e),c=new ne(this.localeInfo,e.qNumFormat.qFmt,e.qNumFormat.qThou,e.qNumFormat.qDec,t?"U":e.qNumFormat.qType),n=Math.abs(e.qMax-e.qMin),l=Number.isNaN(+n);return c.values={min:e.qMin,max:e.qMax,range:n},!l&&t&&(c.pattern=c.createPatternFromRange(e.qMin,e.qMax,!0)),c.prepare(),c}),this)),n}}function re(e,t){return!Number.isNaN(+e)&&"U"===t?.type}function ae(e,t){if("U"===t.type){const c=t.clone();return c.pattern=function(e){let t="0";const c=e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0;if(c){t+=".";for(let e=0;e<c;e++)t+="0"}return`${t}A`}(e),c.prepare(),c}return t}function he(e,t,c){const n={...c};return n.components[0].getText=e,n.components[1].getText=t,{layoutInfo:n,text:e()}}const oe=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),{useState:ie,useEffect:me}=z,se=({endValue:e,duration:t,formatter:c})=>{const[n,l]=ie(e),[r,a]=ie(null),h=(e,c,n,r,o)=>{if(r-o>=t)return void a(Math.random());l(c=e+(1-(o+t-r)/t)*n),window.requestAnimationFrame((t=>{h(e,c,n,t,o)}))};return me((()=>{if(n!==e){const t=performance.now();h(n,n,e-n,t,t)}}),[e]),me((()=>{null!==r&&l(e)}),[r]),M.jsx(M.Fragment,{children:c.format(n)})},{entries:ve,setPrototypeOf:ze,isFrozen:de,getPrototypeOf:pe,getOwnPropertyDescriptor:ue}=Object;let{freeze:Me,seal:He,create:Ve}=Object,{apply:fe,construct:Ee}="undefined"!=typeof Reflect&&Reflect;Me||(Me=function(e){return e}),He||(He=function(e){return e}),fe||(fe=function(e,t){for(var c=arguments.length,n=new Array(c>2?c-2:0),l=2;l<c;l++)n[l-2]=arguments[l];return e.apply(t,n)}),Ee||(Ee=function(e){for(var t=arguments.length,c=new Array(t>1?t-1:0),n=1;n<t;n++)c[n-1]=arguments[n];return new e(...c)});const Le=Pe(Array.prototype.forEach),ge=Pe(Array.prototype.lastIndexOf),ye=Pe(Array.prototype.pop),Ce=Pe(Array.prototype.push),Se=Pe(Array.prototype.splice),be=Pe(String.prototype.toLowerCase),Te=Pe(String.prototype.toString),we=Pe(String.prototype.match),xe=Pe(String.prototype.replace),Oe=Pe(String.prototype.indexOf),Fe=Pe(String.prototype.trim),Re=Pe(Object.prototype.hasOwnProperty),ke=Pe(RegExp.prototype.test),Ae=(De=TypeError,function(){for(var e=arguments.length,t=new Array(e),c=0;c<e;c++)t[c]=arguments[c];return Ee(De,t)});var De;function Pe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var c=arguments.length,n=new Array(c>1?c-1:0),l=1;l<c;l++)n[l-1]=arguments[l];return fe(e,t,n)}}function Ie(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:be;ze&&ze(e,null);let n=t.length;for(;n--;){let l=t[n];if("string"==typeof l){const e=c(l);e!==l&&(de(t)||(t[n]=e),l=e)}e[l]=!0}return e}function qe(e){for(let t=0;t<e.length;t++){Re(e,t)||(e[t]=null)}return e}function Ne(e){const t=Ve(null);for(const[c,n]of ve(e)){Re(e,c)&&(Array.isArray(n)?t[c]=qe(n):n&&"object"==typeof n&&n.constructor===Object?t[c]=Ne(n):t[c]=n)}return t}function Be(e,t){for(;null!==e;){const c=ue(e,t);if(c){if(c.get)return Pe(c.get);if("function"==typeof c.value)return Pe(c.value)}e=pe(e)}return function(){return null}}const _e=Me(["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"]),je=Me(["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"]),We=Me(["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"]),$e=Me(["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"]),Ue=Me(["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"]),Ge=Me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ke=Me(["#text"]),Qe=Me(["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"]),Ye=Me(["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"]),Xe=Me(["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"]),Ze=Me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Je=He(/\{\{[\w\W]*|[\w\W]*\}\}/gm),et=He(/<%[\w\W]*|[\w\W]*%>/gm),tt=He(/\$\{[\w\W]*/gm),ct=He(/^data-[\-\w.\u00B7-\uFFFF]+$/),nt=He(/^aria-[\-\w]+$/),lt=He(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rt=He(/^(?:\w+script|data):/i),at=He(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht=He(/^html$/i),ot=He(/^[a-z][.\w]*(-[.\w]+)+$/i);var it=Object.freeze({__proto__:null,ARIA_ATTR:nt,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:ot,DATA_ATTR:ct,DOCTYPE_NAME:ht,ERB_EXPR:et,IS_ALLOWED_URI:lt,IS_SCRIPT_OR_DATA:rt,MUSTACHE_EXPR:Je,TMPLIT_EXPR:tt});const mt=1,st=3,vt=7,zt=8,dt=9,pt=function(){return"undefined"==typeof window?null:window};var ut=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pt();const c=t=>e(t);if(c.version="3.3.1",c.removed=[],!t||!t.document||t.document.nodeType!==dt||!t.Element)return c.isSupported=!1,c;let{document:n}=t;const l=n,r=l.currentScript,{DocumentFragment:a,HTMLTemplateElement:h,Node:o,Element:i,NodeFilter:m,NamedNodeMap:s=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:v,DOMParser:z,trustedTypes:d}=t,p=i.prototype,u=Be(p,"cloneNode"),M=Be(p,"remove"),H=Be(p,"nextSibling"),V=Be(p,"childNodes"),f=Be(p,"parentNode");if("function"==typeof h){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let E,L="";const{implementation:g,createNodeIterator:y,createDocumentFragment:C,getElementsByTagName:S}=n,{importNode:b}=l;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};c.isSupported="function"==typeof ve&&"function"==typeof f&&g&&void 0!==g.createHTMLDocument;const{MUSTACHE_EXPR:w,ERB_EXPR:x,TMPLIT_EXPR:O,DATA_ATTR:F,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:k,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:D}=it;let{IS_ALLOWED_URI:P}=it,I=null;const q=Ie({},[..._e,...je,...We,...Ue,...Ke]);let N=null;const B=Ie({},[...Qe,...Ye,...Xe,...Ze]);let _=Object.seal(Ve(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}})),j=null,W=null;const $=Object.seal(Ve(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let U=!0,G=!0,K=!1,Q=!0,Y=!1,X=!0,Z=!1,J=!1,ee=!1,te=!1,ce=!1,ne=!1,le=!0,re=!1,ae=!0,he=!1,oe={},ie=null;const me=Ie({},["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 se=null;const ze=Ie({},["audio","video","img","source","image","track"]);let de=null;const pe=Ie({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let Ee=fe,De=!1,Pe=null;const qe=Ie({},[ue,He,fe],Te);let Je=Ie({},["mi","mo","mn","ms","mtext"]),et=Ie({},["annotation-xml"]);const tt=Ie({},["title","style","font","a","script"]);let ct=null;const nt=["application/xhtml+xml","text/html"];let rt=null,at=null;const ot=n.createElement("form"),ut=function(e){return e instanceof RegExp||e instanceof Function},Mt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!at||at!==e){if(e&&"object"==typeof e||(e={}),e=Ne(e),ct=-1===nt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===ct?Te:be,I=Re(e,"ALLOWED_TAGS")?Ie({},e.ALLOWED_TAGS,rt):q,N=Re(e,"ALLOWED_ATTR")?Ie({},e.ALLOWED_ATTR,rt):B,Pe=Re(e,"ALLOWED_NAMESPACES")?Ie({},e.ALLOWED_NAMESPACES,Te):qe,de=Re(e,"ADD_URI_SAFE_ATTR")?Ie(Ne(pe),e.ADD_URI_SAFE_ATTR,rt):pe,se=Re(e,"ADD_DATA_URI_TAGS")?Ie(Ne(ze),e.ADD_DATA_URI_TAGS,rt):ze,ie=Re(e,"FORBID_CONTENTS")?Ie({},e.FORBID_CONTENTS,rt):me,j=Re(e,"FORBID_TAGS")?Ie({},e.FORBID_TAGS,rt):Ne({}),W=Re(e,"FORBID_ATTR")?Ie({},e.FORBID_ATTR,rt):Ne({}),oe=!!Re(e,"USE_PROFILES")&&e.USE_PROFILES,U=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Q=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ce=e.RETURN_DOM_FRAGMENT||!1,ne=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,le=!1!==e.SANITIZE_DOM,re=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,he=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||lt,Ee=e.NAMESPACE||fe,Je=e.MATHML_TEXT_INTEGRATION_POINTS||Je,et=e.HTML_INTEGRATION_POINTS||et,_=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ut(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(G=!1),ce&&(te=!0),oe&&(I=Ie({},Ke),N=[],!0===oe.html&&(Ie(I,_e),Ie(N,Qe)),!0===oe.svg&&(Ie(I,je),Ie(N,Ye),Ie(N,Ze)),!0===oe.svgFilters&&(Ie(I,We),Ie(N,Ye),Ie(N,Ze)),!0===oe.mathMl&&(Ie(I,Ue),Ie(N,Xe),Ie(N,Ze))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?$.tagCheck=e.ADD_TAGS:(I===q&&(I=Ne(I)),Ie(I,e.ADD_TAGS,rt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?$.attributeCheck=e.ADD_ATTR:(N===B&&(N=Ne(N)),Ie(N,e.ADD_ATTR,rt))),e.ADD_URI_SAFE_ATTR&&Ie(de,e.ADD_URI_SAFE_ATTR,rt),e.FORBID_CONTENTS&&(ie===me&&(ie=Ne(ie)),Ie(ie,e.FORBID_CONTENTS,rt)),e.ADD_FORBID_CONTENTS&&(ie===me&&(ie=Ne(ie)),Ie(ie,e.ADD_FORBID_CONTENTS,rt)),ae&&(I["#text"]=!0),Z&&Ie(I,["html","head","body"]),I.table&&(Ie(I,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Ae('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Ae('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=e.TRUSTED_TYPES_POLICY,L=E.createHTML("")}else void 0===E&&(E=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let c=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(c=t.getAttribute(n));const l="dompurify"+(c?"#"+c:"");try{return e.createPolicy(l,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+l+" could not be created."),null}}(d,r)),null!==E&&"string"==typeof L&&(L=E.createHTML(""));Me&&Me(e),at=e}},Ht=Ie({},[...je,...We,...$e]),Vt=Ie({},[...Ue,...Ge]),ft=function(e){Ce(c.removed,{element:e});try{f(e).removeChild(e)}catch(t){M(e)}},Et=function(e,t){try{Ce(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ce(c.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ce)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Lt=function(e){let t=null,c=null;if(ee)e="<remove></remove>"+e;else{const t=we(e,/^[\r\n\t ]+/);c=t&&t[0]}"application/xhtml+xml"===ct&&Ee===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const l=E?E.createHTML(e):e;if(Ee===fe)try{t=(new z).parseFromString(l,ct)}catch(e){}if(!t||!t.documentElement){t=g.createDocument(Ee,"template",null);try{t.documentElement.innerHTML=De?L:l}catch(e){}}const r=t.body||t.documentElement;return e&&c&&r.insertBefore(n.createTextNode(c),r.childNodes[0]||null),Ee===fe?S.call(t,Z?"html":"body")[0]:Z?t.documentElement:r},gt=function(e){return y.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof v&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof s)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ct=function(e){return"function"==typeof o&&e instanceof o};function St(e,t,n){Le(e,(e=>{e.call(c,t,n,at)}))}const bt=function(e){let t=null;if(St(T.beforeSanitizeElements,e,null),yt(e))return ft(e),!0;const n=rt(e.nodeName);if(St(T.uponSanitizeElement,e,{tagName:n,allowedTags:I}),X&&e.hasChildNodes()&&!Ct(e.firstElementChild)&&ke(/<[/\w!]/g,e.innerHTML)&&ke(/<[/\w!]/g,e.textContent))return ft(e),!0;if(e.nodeType===vt)return ft(e),!0;if(X&&e.nodeType===zt&&ke(/<[/\w]/g,e.data))return ft(e),!0;if(!($.tagCheck instanceof Function&&$.tagCheck(n))&&(!I[n]||j[n])){if(!j[n]&&wt(n)){if(_.tagNameCheck instanceof RegExp&&ke(_.tagNameCheck,n))return!1;if(_.tagNameCheck instanceof Function&&_.tagNameCheck(n))return!1}if(ae&&!ie[n]){const t=f(e)||e.parentNode,c=V(e)||e.childNodes;if(c&&t){for(let n=c.length-1;n>=0;--n){const l=u(c[n],!0);l.__removalCount=(e.__removalCount||0)+1,t.insertBefore(l,H(e))}}}return ft(e),!0}return e instanceof i&&!function(e){let t=f(e);t&&t.tagName||(t={namespaceURI:Ee,tagName:"template"});const c=be(e.tagName),n=be(t.tagName);return!!Pe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===fe?"svg"===c:t.namespaceURI===ue?"svg"===c&&("annotation-xml"===n||Je[n]):Boolean(Ht[c]):e.namespaceURI===ue?t.namespaceURI===fe?"math"===c:t.namespaceURI===He?"math"===c&&et[n]:Boolean(Vt[c]):e.namespaceURI===fe?!(t.namespaceURI===He&&!et[n])&&!(t.namespaceURI===ue&&!Je[n])&&!Vt[c]&&(tt[c]||!Ht[c]):!("application/xhtml+xml"!==ct||!Pe[e.namespaceURI]))}(e)?(ft(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!ke(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===st&&(t=e.textContent,Le([w,x,O],(e=>{t=xe(t,e," ")})),e.textContent!==t&&(Ce(c.removed,{element:e.cloneNode()}),e.textContent=t)),St(T.afterSanitizeElements,e,null),!1):(ft(e),!0)},Tt=function(e,t,c){if(le&&("id"===t||"name"===t)&&(c in n||c in ot))return!1;if(G&&!W[t]&&ke(F,t));else if(U&&ke(R,t));else if($.attributeCheck instanceof Function&&$.attributeCheck(t,e));else if(!N[t]||W[t]){if(!(wt(e)&&(_.tagNameCheck instanceof RegExp&&ke(_.tagNameCheck,e)||_.tagNameCheck instanceof Function&&_.tagNameCheck(e))&&(_.attributeNameCheck instanceof RegExp&&ke(_.attributeNameCheck,t)||_.attributeNameCheck instanceof Function&&_.attributeNameCheck(t,e))||"is"===t&&_.allowCustomizedBuiltInElements&&(_.tagNameCheck instanceof RegExp&&ke(_.tagNameCheck,c)||_.tagNameCheck instanceof Function&&_.tagNameCheck(c))))return!1}else if(de[t]);else if(ke(P,xe(c,A,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Oe(c,"data:")||!se[e]){if(K&&!ke(k,xe(c,A,"")));else if(c)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&we(e,D)},xt=function(e){St(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0};let l=t.length;for(;l--;){const r=t[l],{name:a,namespaceURI:h,value:o}=r,i=rt(a),m=o;let s="value"===a?m:Fe(m);if(n.attrName=i,n.attrValue=s,n.keepAttr=!0,n.forceKeepAttr=void 0,St(T.uponSanitizeAttribute,e,n),s=n.attrValue,!re||"id"!==i&&"name"!==i||(Et(a,e),s="user-content-"+s),X&&ke(/((--!?|])>)|<\/(style|title|textarea)/i,s)){Et(a,e);continue}if("attributename"===i&&we(s,"href")){Et(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Et(a,e);continue}if(!Q&&ke(/\/>/i,s)){Et(a,e);continue}Y&&Le([w,x,O],(e=>{s=xe(s,e," ")}));const v=rt(e.nodeName);if(Tt(v,i,s)){if(E&&"object"==typeof d&&"function"==typeof d.getAttributeType)if(h);else switch(d.getAttributeType(v,i)){case"TrustedHTML":s=E.createHTML(s);break;case"TrustedScriptURL":s=E.createScriptURL(s)}if(s!==m)try{h?e.setAttributeNS(h,a,s):e.setAttribute(a,s),yt(e)?ft(e):ye(c.removed)}catch(t){Et(a,e)}}else Et(a,e)}St(T.afterSanitizeAttributes,e,null)},Ot=function e(t){let c=null;const n=gt(t);for(St(T.beforeSanitizeShadowDOM,t,null);c=n.nextNode();)St(T.uponSanitizeShadowNode,c,null),bt(c),xt(c),c.content instanceof a&&e(c.content);St(T.afterSanitizeShadowDOM,t,null)};return c.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,h=null,i=null;if(De=!e,De&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ct(e)){if("function"!=typeof e.toString)throw Ae("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ae("dirty is not a string, aborting")}if(!c.isSupported)return e;if(J||Mt(t),c.removed=[],"string"==typeof e&&(he=!1),he){if(e.nodeName){const t=rt(e.nodeName);if(!I[t]||j[t])throw Ae("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof o)n=Lt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===mt&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!te&&!Y&&!Z&&-1===e.indexOf("<"))return E&&ne?E.createHTML(e):e;if(n=Lt(e),!n)return te?null:ne?L:""}n&&ee&&ft(n.firstChild);const m=gt(he?e:n);for(;h=m.nextNode();)bt(h),xt(h),h.content instanceof a&&Ot(h.content);if(he)return e;if(te){if(ce)for(i=C.call(n.ownerDocument);n.firstChild;)i.appendChild(n.firstChild);else i=n;return(N.shadowroot||N.shadowrootmode)&&(i=b.call(l,i,!0)),i}let s=Z?n.outerHTML:n.innerHTML;return Z&&I["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&ke(ht,n.ownerDocument.doctype.name)&&(s="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+s),Y&&Le([w,x,O],(e=>{s=xe(s,e," ")})),E&&ne?E.createHTML(s):s},c.setConfig=function(){Mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},c.clearConfig=function(){at=null,J=!1},c.isValidAttribute=function(e,t,c){at||Mt({});const n=rt(e),l=rt(t);return Tt(n,l,c)},c.addHook=function(e,t){"function"==typeof t&&Ce(T[e],t)},c.removeHook=function(e,t){if(void 0!==t){const c=ge(T[e],t);return-1===c?void 0:Se(T[e],c,1)[0]}return ye(T[e])},c.removeHooks=function(e){T[e]=[]},c.removeAllHooks=function(){T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},c}(),Mt={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach((e=>{if(!e)return;const c=e.indexOf("=");let n,l="",r=!1;-1===c?n=e:(n=e.slice(0,c),l=e.slice(c+1),r=!0),t.push(function(e,t,c){return{key:Vt(e),value:Vt(t),useEqualSign:c}}(n,l,r))})),t}},Ht=Mt;function Vt(e){try{return decodeURIComponent(e)}catch{return e}}function ft(e){if(!(this instanceof ft))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let c=e.indexOf("#");-1!==c&&(t.hash=e.substr(c),e=e.substr(0,c));c=e.indexOf("?"),-1!==c&&(t.search=e.substr(c),e=e.substr(0,c));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>Ht.fromSearchString(t.search)}})}function Et(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}ft.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},ft.encodeSearchParams=function(e){let t,c="";for(let n=0;n<e.length;n++)t=e[n],c+=0===n?"?":"&",c+=Et(t.key),t.value?c+=`=${Et(t.value)}`:c+=t.useEqualSign?"=":"";return c};var Lt=ft;var gt,yt=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=t