@sme.up/ketchup2 1.0.0-SNAPSHOT-20250515140708 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/input-panel/input-panel-types.d.ts +9 -0
- package/dist/components/input-panel/input-panel-types.d.ts.map +1 -1
- package/dist/components/input-panel/input-panel.d.ts +1 -2
- package/dist/components/input-panel/input-panel.d.ts.map +1 -1
- package/dist/functional-components/layout/layout-types.d.ts +7 -0
- package/dist/functional-components/layout/layout-types.d.ts.map +1 -1
- package/dist/functional-components/layout/layout.d.ts +1 -2
- package/dist/functional-components/layout/layout.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/ketchup2.cjs.js +23 -14
- package/dist/ketchup2.css +1 -1
- package/dist/ketchup2.es.js +2310 -2151
- package/dist/types/data-structures.d.ts +10 -0
- package/dist/types/data-structures.d.ts.map +1 -1
- package/package.json +48 -48
package/dist/ketchup2.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Lr=Object.defineProperty;var Nr=(n,e,t)=>e in n?Lr(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var je=(n,e,t)=>Nr(n,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("react");function Ir(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const Xe=Ir(F);var Ze={exports:{}},Fe={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Lt;function Mr(){if(Lt)return Fe;Lt=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(r,s,a){var i=null;if(a!==void 0&&(i=""+a),s.key!==void 0&&(i=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:n,type:r,key:i,ref:s!==void 0?s:null,props:a}}return Fe.Fragment=e,Fe.jsx=t,Fe.jsxs=t,Fe}var Ve={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,37 +14,46 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Nt;function Fr(){return Nt||(Nt=1,process.env.NODE_ENV!=="production"&&function(){function n(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===Z?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case W:return"Fragment";case x:return"Portal";case H:return"Profiler";case L:return"StrictMode";case K:return"Suspense";case J:return"SuspenseList"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case U:return(p.displayName||"Context")+".Provider";case Y:return(p._context.displayName||"Context")+".Consumer";case A:var I=p.render;return p=p.displayName,p||(p=I.displayName||I.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case te:return I=p.displayName||null,I!==null?I:n(p.type)||"Memo";case ee:I=p._payload,p=p._init;try{return n(p(I))}catch{}}return null}function e(p){return""+p}function t(p){try{e(p);var I=!1}catch{I=!0}if(I){I=console;var M=I.error,re=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return M.call(I,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",re),e(p)}}function r(){}function s(){if(E===0){P=console.log,k=console.info,N=console.warn,V=console.error,Q=console.group,B=console.groupCollapsed,le=console.groupEnd;var p={configurable:!0,enumerable:!0,value:r,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}E++}function a(){if(E--,E===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:v({},p,{value:P}),info:v({},p,{value:k}),warn:v({},p,{value:N}),error:v({},p,{value:V}),group:v({},p,{value:Q}),groupCollapsed:v({},p,{value:B}),groupEnd:v({},p,{value:le})})}0>E&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function i(p){if(_===void 0)try{throw Error()}catch(M){var I=M.stack.trim().match(/\n( *(at )?)/);_=I&&I[1]||"",$=-1<M.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<M.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+_+p+$}function l(p,I){if(!p||G)return"";var M=ne.get(p);if(M!==void 0)return M;G=!0,M=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var re=null;re=T.H,T.H=null,s();try{var de={DetermineComponentFrameRoot:function(){try{if(I){var Ae=function(){throw Error()};if(Object.defineProperty(Ae.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ae,[])}catch(Oe){var Je=Oe}Reflect.construct(p,[],Ae)}else{try{Ae.call()}catch(Oe){Je=Oe}p.call(Ae.prototype)}}else{try{throw Error()}catch(Oe){Je=Oe}(Ae=p())&&typeof Ae.catch=="function"&&Ae.catch(function(){})}}catch(Oe){if(Oe&&Je&&typeof Oe.stack=="string")return[Oe.stack,Je.stack]}return[null,null]}};de.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var ue=Object.getOwnPropertyDescriptor(de.DetermineComponentFrameRoot,"name");ue&&ue.configurable&&Object.defineProperty(de.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var X=de.DetermineComponentFrameRoot(),we=X[0],$e=X[1];if(we&&$e){var he=we.split(`
|
|
20
|
+
`),Pe=$e.split(`
|
|
21
|
+
`);for(X=ue=0;ue<he.length&&!he[ue].includes("DetermineComponentFrameRoot");)ue++;for(;X<Pe.length&&!Pe[X].includes("DetermineComponentFrameRoot");)X++;if(ue===he.length||X===Pe.length)for(ue=he.length-1,X=Pe.length-1;1<=ue&&0<=X&&he[ue]!==Pe[X];)X--;for(;1<=ue&&0<=X;ue--,X--)if(he[ue]!==Pe[X]){if(ue!==1||X!==1)do if(ue--,X--,0>X||he[ue]!==Pe[X]){var Me=`
|
|
22
|
+
`+he[ue].replace(" at new "," at ");return p.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",p.displayName)),typeof p=="function"&&ne.set(p,Me),Me}while(1<=ue&&0<=X);break}}}finally{G=!1,T.H=re,a(),Error.prepareStackTrace=M}return he=(he=p?p.displayName||p.name:"")?i(he):"",typeof p=="function"&&ne.set(p,he),he}function o(p){if(p==null)return"";if(typeof p=="function"){var I=p.prototype;return l(p,!(!I||!I.isReactComponent))}if(typeof p=="string")return i(p);switch(p){case K:return i("Suspense");case J:return i("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case A:return p=l(p.render,!1),p;case te:return o(p.type);case ee:I=p._payload,p=p._init;try{return o(p(I))}catch{}}return""}function u(){var p=T.A;return p===null?null:p.getOwner()}function c(p){if(m.call(p,"key")){var I=Object.getOwnPropertyDescriptor(p,"key").get;if(I&&I.isReactWarning)return!1}return p.key!==void 0}function d(p,I){function M(){pe||(pe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",I))}M.isReactWarning=!0,Object.defineProperty(p,"key",{get:M,configurable:!0})}function f(){var p=n(this.type);return ve[p]||(ve[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function h(p,I,M,re,de,ue){return M=ue.ref,p={$$typeof:j,type:p,key:I,props:ue,_owner:de},(M!==void 0?M:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:f}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function g(p,I,M,re,de,ue){if(typeof p=="string"||typeof p=="function"||p===W||p===H||p===L||p===K||p===J||p===ie||typeof p=="object"&&p!==null&&(p.$$typeof===ee||p.$$typeof===te||p.$$typeof===U||p.$$typeof===Y||p.$$typeof===A||p.$$typeof===R||p.getModuleId!==void 0)){var X=I.children;if(X!==void 0)if(re)if(C(X)){for(re=0;re<X.length;re++)y(X[re],p);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(X,p)}else X="",(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(X+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),p===null?re="null":C(p)?re="array":p!==void 0&&p.$$typeof===j?(re="<"+(n(p.type)||"Unknown")+" />",X=" Did you accidentally export a JSX literal instead of a component?"):re=typeof p,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",re,X);if(m.call(I,"key")){X=n(p);var we=Object.keys(I).filter(function(he){return he!=="key"});re=0<we.length?"{key: someKey, "+we.join(": ..., ")+": ...}":"{key: someKey}",me[X+re]||(we=0<we.length?"{"+we.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
23
|
let props = %s;
|
|
19
24
|
<%s {...props} />
|
|
20
25
|
React keys must be passed directly to JSX without using spread:
|
|
21
26
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
27
|
+
<%s key={someKey} {...props} />`,re,X,we,X),me[X+re]=!0)}if(X=null,M!==void 0&&(t(M),X=""+M),c(I)&&(t(I.key),X=""+I.key),"key"in I){M={};for(var $e in I)$e!=="key"&&(M[$e]=I[$e])}else M=I;return X&&d(M,typeof p=="function"?p.displayName||p.name||"Unknown":p),h(p,X,ue,de,u(),M)}function y(p,I){if(typeof p=="object"&&p&&p.$$typeof!==oe){if(C(p))for(var M=0;M<p.length;M++){var re=p[M];b(re)&&S(re,I)}else if(b(p))p._store&&(p._store.validated=1);else if(p===null||typeof p!="object"?M=null:(M=q&&p[q]||p["@@iterator"],M=typeof M=="function"?M:null),typeof M=="function"&&M!==p.entries&&(M=M.call(p),M!==p))for(;!(p=M.next()).done;)b(p.value)&&S(p.value,I)}}function b(p){return typeof p=="object"&&p!==null&&p.$$typeof===j}function S(p,I){if(p._store&&!p._store.validated&&p.key==null&&(p._store.validated=1,I=w(I),!Ee[I])){Ee[I]=!0;var M="";p&&p._owner!=null&&p._owner!==u()&&(M=null,typeof p._owner.tag=="number"?M=n(p._owner.type):typeof p._owner.name=="string"&&(M=p._owner.name),M=" It was passed a child from "+M+".");var re=T.getCurrentStack;T.getCurrentStack=function(){var de=o(p.type);return re&&(de+=re()||""),de},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',I,M),T.getCurrentStack=re}}function w(p){var I="",M=u();return M&&(M=n(M.type))&&(I=`
|
|
28
|
+
|
|
29
|
+
Check the render method of \``+M+"`."),I||(p=n(p))&&(I=`
|
|
30
|
+
|
|
31
|
+
Check the top-level render call using <`+p+">."),I}var D=F,j=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),U=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),ie=Symbol.for("react.offscreen"),q=Symbol.iterator,Z=Symbol.for("react.client.reference"),T=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,m=Object.prototype.hasOwnProperty,v=Object.assign,R=Symbol.for("react.client.reference"),C=Array.isArray,E=0,P,k,N,V,Q,B,le;r.__reactDisabledLog=!0;var _,$,G=!1,ne=new(typeof WeakMap=="function"?WeakMap:Map),oe=Symbol.for("react.client.reference"),pe,ve={},me={},Ee={};Ve.Fragment=W,Ve.jsx=function(p,I,M,re,de){return g(p,I,M,!1,re,de)},Ve.jsxs=function(p,I,M,re,de){return g(p,I,M,!0,re,de)}}()),Ve}var It;function Vr(){return It||(It=1,process.env.NODE_ENV==="production"?Ze.exports=Mr():Ze.exports=Fr()),Ze.exports}var O=Vr();function Yr(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function at(){return at=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},at.apply(null,arguments)}function _t(n,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},_t(n,e)}function Ur(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,_t(n,e)}function gt(n,e,t){if(t||arguments.length===2)for(var r=0,s=e.length,a;r<s;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return n.concat(a||Array.prototype.slice.call(e))}var Qe={};/*!
|
|
23
32
|
* content-type
|
|
24
33
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
25
34
|
* MIT Licensed
|
|
26
|
-
*/var
|
|
35
|
+
*/var Mt;function Wr(){if(Mt)return Qe;Mt=1;var n=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Qe.format=i,Qe.parse=l;function i(d){if(!d||typeof d!="object")throw new TypeError("argument obj is required");var f=d.parameters,h=d.type;if(!h||!a.test(h))throw new TypeError("invalid type");var g=h;if(f&&typeof f=="object")for(var y,b=Object.keys(f).sort(),S=0;S<b.length;S++){if(y=b[S],!t.test(y))throw new TypeError("invalid parameter name");g+="; "+y+"="+u(f[y])}return g}function l(d){if(!d)throw new TypeError("argument string is required");var f=typeof d=="object"?o(d):d;if(typeof f!="string")throw new TypeError("argument string is required to be a string");var h=f.indexOf(";"),g=h!==-1?f.slice(0,h).trim():f.trim();if(!a.test(g))throw new TypeError("invalid media type");var y=new c(g.toLowerCase());if(h!==-1){var b,S,w;for(n.lastIndex=h;S=n.exec(f);){if(S.index!==h)throw new TypeError("invalid parameter format");h+=S[0].length,b=S[1].toLowerCase(),w=S[2],w.charCodeAt(0)===34&&(w=w.slice(1,-1),w.indexOf("\\")!==-1&&(w=w.replace(r,"$1"))),y.parameters[b]=w}if(h!==f.length)throw new TypeError("invalid parameter format")}return y}function o(d){var f;if(typeof d.getHeader=="function"?f=d.getHeader("content-type"):typeof d.headers=="object"&&(f=d.headers&&d.headers["content-type"]),typeof f!="string")throw new TypeError("content-type header is missing from object");return f}function u(d){var f=String(d);if(t.test(f))return f;if(f.length>0&&!e.test(f))throw new TypeError("invalid parameter value");return'"'+f.replace(s,"\\$1")+'"'}function c(d){this.parameters=Object.create(null),this.type=d}return Qe}var Hr=Wr(),Ne=new Map,xr=function(e){return e.cloneNode(!0)},Ft=function(){return window.location.protocol==="file:"},Sr=function(e,t,r){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var i=Hr.parse(a).type;if(!(i==="image/svg+xml"||i==="text/plain"))throw new Error("Invalid content type: ".concat(i))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(Ft()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||Ft()&&s.status===0)r(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(l){if(s.abort(),l instanceof Error)r(l,s);else throw l}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},Ce={},Vt=function(e,t){Ce[e]=Ce[e]||[],Ce[e].push(t)},qr=function(e){for(var t=function(i,l){setTimeout(function(){if(Array.isArray(Ce[e])){var o=Ne.get(e),u=Ce[e][i];o instanceof SVGSVGElement&&u(null,xr(o)),o instanceof Error&&u(o),i===Ce[e].length-1&&delete Ce[e]}},0)},r=0,s=Ce[e].length;r<s;r++)t(r)},Kr=function(e,t,r){if(Ne.has(e)){var s=Ne.get(e);if(s===void 0){Vt(e,r);return}if(s instanceof SVGSVGElement){r(null,xr(s));return}}Ne.set(e,void 0),Vt(e,r),Sr(e,t,function(a,i){var l;a?Ne.set(e,a):((l=i.responseXML)===null||l===void 0?void 0:l.documentElement)instanceof SVGSVGElement&&Ne.set(e,i.responseXML.documentElement),qr(e)})},Br=function(e,t,r){Sr(e,t,function(s,a){var i;s?r(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&r(null,a.responseXML.documentElement)})},zr=0,Gr=function(){return++zr},be=[],Yt={},Jr="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xlink",Ut=function(e,t,r,s,a,i,l){var o=e.getAttribute("data-src")||e.getAttribute("src");if(!o){l(new Error("Invalid data-src or src attribute"));return}if(be.indexOf(e)!==-1){be.splice(be.indexOf(e),1),e=null;return}be.push(e),e.setAttribute("src","");var u=s?Kr:Br;u(o,a,function(c,d){if(!d){be.splice(be.indexOf(e),1),e=null,l(c);return}var f=e.getAttribute("id");f&&d.setAttribute("id",f);var h=e.getAttribute("title");h&&d.setAttribute("title",h);var g=e.getAttribute("width");g&&d.setAttribute("width",g);var y=e.getAttribute("height");y&&d.setAttribute("height",y);var b=Array.from(new Set(gt(gt(gt([],(d.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();d.setAttribute("class",b);var S=e.getAttribute("style");S&&d.setAttribute("style",S),d.setAttribute("data-src",o);var w=[].filter.call(e.attributes,function(Z){return/^data-\w[\w-]*$/.test(Z.name)});if(Array.prototype.forEach.call(w,function(Z){Z.name&&Z.value&&d.setAttribute(Z.name,Z.value)}),r){var D={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},j,x,W,L,H;Object.keys(D).forEach(function(Z){j=Z,W=D[Z],x=d.querySelectorAll(j+"[id]");for(var T=function(C,E){L=x[C].id,H=L+"-"+Gr();var P;Array.prototype.forEach.call(W,function($){P=d.querySelectorAll("["+$+'*="'+L+'"]');for(var G=0,ne=P.length;G<ne;G++){var oe=P[G].getAttribute($);oe&&!oe.match(new RegExp('url\\("?#'+L+'"?\\)'))||P[G].setAttribute($,"url(#"+H+")")}});for(var k=d.querySelectorAll("[*|href]"),N=[],V=0,Q=k.length;V<Q;V++){var B=k[V].getAttributeNS(mt,"href");B&&B.toString()==="#"+x[C].id&&N.push(k[V])}for(var le=0,_=N.length;le<_;le++)N[le].setAttributeNS(mt,"href","#"+H);x[C].id=H},m=0,v=x.length;m<v;m++)T(m)})}d.removeAttribute("xmlns:a");for(var Y=d.querySelectorAll("script"),U=[],A,K,J=0,te=Y.length;J<te;J++)K=Y[J].getAttribute("type"),(!K||K==="application/ecmascript"||K==="application/javascript"||K==="text/javascript")&&(A=Y[J].innerText||Y[J].textContent,A&&U.push(A),d.removeChild(Y[J]));if(U.length>0&&(t==="always"||t==="once"&&!Yt[o])){for(var ee=0,ie=U.length;ee<ie;ee++)new Function(U[ee])(window);Yt[o]=!0}var q=d.querySelectorAll("style");if(Array.prototype.forEach.call(q,function(Z){Z.textContent+=""}),d.setAttribute("xmlns",Jr),d.setAttribute("xmlns:xlink",mt),i(d),!e.parentNode){be.splice(be.indexOf(e),1),e=null,l(new Error("Parent node is null"));return}e.parentNode.replaceChild(d,e),be.splice(be.indexOf(e),1),e=null,l(null,d)})},Xr=function(e,t){var r=t===void 0?{}:t,s=r.afterAll,a=s===void 0?function(){}:s,i=r.afterEach,l=i===void 0?function(){}:i,o=r.beforeEach,u=o===void 0?function(){}:o,c=r.cacheRequests,d=c===void 0?!0:c,f=r.evalScripts,h=f===void 0?"never":f,g=r.httpRequestWithCredentials,y=g===void 0?!1:g,b=r.renumerateIRIElements,S=b===void 0?!0:b;if(e&&"length"in e)for(var w=0,D=0,j=e.length;D<j;D++)Ut(e[D],h,S,d,y,u,function(x,W){l(x,W),e&&"length"in e&&e.length===++w&&a(w)});else e?Ut(e,h,S,d,y,u,function(x,W){l(x,W),a(1),e=null}):a(0)},et={exports:{}},tt={exports:{}},se={};/** @license React v16.13.1
|
|
27
36
|
* react-is.production.min.js
|
|
28
37
|
*
|
|
29
38
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
39
|
*
|
|
31
40
|
* This source code is licensed under the MIT license found in the
|
|
32
41
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
42
|
+
*/var Wt;function Zr(){if(Wt)return se;Wt=1;var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,o=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,S=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function D(x){if(typeof x=="object"&&x!==null){var W=x.$$typeof;switch(W){case e:switch(x=x.type,x){case o:case u:case r:case a:case s:case d:return x;default:switch(x=x&&x.$$typeof,x){case l:case c:case g:case h:case i:return x;default:return W}}case t:return W}}}function j(x){return D(x)===u}return se.AsyncMode=o,se.ConcurrentMode=u,se.ContextConsumer=l,se.ContextProvider=i,se.Element=e,se.ForwardRef=c,se.Fragment=r,se.Lazy=g,se.Memo=h,se.Portal=t,se.Profiler=a,se.StrictMode=s,se.Suspense=d,se.isAsyncMode=function(x){return j(x)||D(x)===o},se.isConcurrentMode=j,se.isContextConsumer=function(x){return D(x)===l},se.isContextProvider=function(x){return D(x)===i},se.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},se.isForwardRef=function(x){return D(x)===c},se.isFragment=function(x){return D(x)===r},se.isLazy=function(x){return D(x)===g},se.isMemo=function(x){return D(x)===h},se.isPortal=function(x){return D(x)===t},se.isProfiler=function(x){return D(x)===a},se.isStrictMode=function(x){return D(x)===s},se.isSuspense=function(x){return D(x)===d},se.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===u||x===a||x===s||x===d||x===f||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===h||x.$$typeof===i||x.$$typeof===l||x.$$typeof===c||x.$$typeof===b||x.$$typeof===S||x.$$typeof===w||x.$$typeof===y)},se.typeOf=D,se}var ae={};/** @license React v16.13.1
|
|
34
43
|
* react-is.development.js
|
|
35
44
|
*
|
|
36
45
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
46
|
*
|
|
38
47
|
* This source code is licensed under the MIT license found in the
|
|
39
48
|
* LICENSE file in the root directory of this source tree.
|
|
40
|
-
*/var
|
|
49
|
+
*/var Ht;function Qr(){return Ht||(Ht=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,i=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,o=n?Symbol.for("react.async_mode"):60111,u=n?Symbol.for("react.concurrent_mode"):60111,c=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,S=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function D(_){return typeof _=="string"||typeof _=="function"||_===r||_===u||_===a||_===s||_===d||_===f||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===h||_.$$typeof===i||_.$$typeof===l||_.$$typeof===c||_.$$typeof===b||_.$$typeof===S||_.$$typeof===w||_.$$typeof===y)}function j(_){if(typeof _=="object"&&_!==null){var $=_.$$typeof;switch($){case e:var G=_.type;switch(G){case o:case u:case r:case a:case s:case d:return G;default:var ne=G&&G.$$typeof;switch(ne){case l:case c:case g:case h:case i:return ne;default:return $}}case t:return $}}}var x=o,W=u,L=l,H=i,Y=e,U=c,A=r,K=g,J=h,te=t,ee=a,ie=s,q=d,Z=!1;function T(_){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(_)||j(_)===o}function m(_){return j(_)===u}function v(_){return j(_)===l}function R(_){return j(_)===i}function C(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function E(_){return j(_)===c}function P(_){return j(_)===r}function k(_){return j(_)===g}function N(_){return j(_)===h}function V(_){return j(_)===t}function Q(_){return j(_)===a}function B(_){return j(_)===s}function le(_){return j(_)===d}ae.AsyncMode=x,ae.ConcurrentMode=W,ae.ContextConsumer=L,ae.ContextProvider=H,ae.Element=Y,ae.ForwardRef=U,ae.Fragment=A,ae.Lazy=K,ae.Memo=J,ae.Portal=te,ae.Profiler=ee,ae.StrictMode=ie,ae.Suspense=q,ae.isAsyncMode=T,ae.isConcurrentMode=m,ae.isContextConsumer=v,ae.isContextProvider=R,ae.isElement=C,ae.isForwardRef=E,ae.isFragment=P,ae.isLazy=k,ae.isMemo=N,ae.isPortal=V,ae.isProfiler=Q,ae.isStrictMode=B,ae.isSuspense=le,ae.isValidElementType=D,ae.typeOf=j}()),ae}var qt;function Er(){return qt||(qt=1,process.env.NODE_ENV==="production"?tt.exports=Zr():tt.exports=Qr()),tt.exports}/*
|
|
41
50
|
object-assign
|
|
42
51
|
(c) Sindre Sorhus
|
|
43
52
|
@license MIT
|
|
44
|
-
*/var
|
|
45
|
-
Valid keys: `+JSON.stringify(Object.keys(f),null," "));var A=ne(k,U,E,_,$+"."+U,t);if(A)return A}return null}return b(g)}function X(f){switch(typeof f){case"number":case"string":case"undefined":return!0;case"boolean":return!f;case"object":if(Array.isArray(f))return f.every(X);if(f===null||l(f))return!0;var g=p(f);if(g){var S=g.call(f),w;if(g!==f.entries){for(;!(w=S.next()).done;)if(!X(w.value))return!1}else for(;!(w=S.next()).done;){var E=w.value;if(E&&!X(E[1]))return!1}}else return!1;return!0;default:return!1}}function J(f,g){return f==="symbol"?!0:g?g["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&g instanceof Symbol:!1}function ee(f){var g=typeof f;return Array.isArray(f)?"array":f instanceof RegExp?"object":J(g,f)?"symbol":g}function Y(f){if(typeof f>"u"||f===null)return""+f;var g=ee(f);if(g==="object"){if(f instanceof Date)return"date";if(f instanceof RegExp)return"regexp"}return g}function z(f){var g=Y(f);switch(g){case"array":case"object":return"an "+g;case"boolean":case"date":case"regexp":return"a "+g;default:return g}}function R(f){return!f.constructor||!f.constructor.name?c:f.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},it}var ot,Nt;function Wr(){if(Nt)return ot;Nt=1;var n=gt();function e(){}function t(){}return t.resetWarningCache=e,ot=function(){function r(i,l,o,d,u,p){if(p!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}r.isRequired=r;function s(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},ot}var It;function Hr(){if(It)return Fe.exports;if(It=1,process.env.NODE_ENV!=="production"){var n=or(),e=!0;Fe.exports=Ur()(n.isElement,e)}else Fe.exports=Wr()();return Fe.exports}var se=Hr(),qr=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},Kr=function(e,t){for(var r in e)if(!(r in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},Br=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ye="http://www.w3.org/2000/svg",Mt="http://www.w3.org/1999/xlink",qe=function(n){function e(){for(var r,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return r=n.call.apply(n,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(l){r.reactWrapper=l},r}Ar(e,n);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof qr(this.reactWrapper).Node){var a=this.props,i=a.desc,l=a.evalScripts,o=a.httpRequestWithCredentials,d=a.renumerateIRIElements,u=a.src,p=a.title,c=a.useRequestCache,h=this.props.onError,m=this.props.beforeInjection,y=this.props.afterInjection,b=this.props.wrapper,x,O;b==="svg"?(x=document.createElementNS(Ye,b),x.setAttribute("xmlns",Ye),x.setAttribute("xmlns:xlink",Mt),O=document.createElementNS(Ye,b)):(x=document.createElement(b),O=document.createElement(b)),x.appendChild(O),O.dataset.src=u,this.nonReactWrapper=this.reactWrapper.appendChild(x);var D=function(N){if(s.removeSVG(),!s._isMounted){h(N);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(N)})},j=function(N,V){if(N){D(N);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(V)}catch(M){D(M)}})},v=function(N){if(N.setAttribute("role","img"),i){var V=N.querySelector(":scope > desc");V&&N.removeChild(V);var M=document.createElement("desc");M.innerHTML=i,N.prepend(M)}if(p){var F=N.querySelector(":scope > title");F&&N.removeChild(F);var P=document.createElement("title");P.innerHTML=p,N.prepend(P)}try{m(N)}catch(q){D(q)}};Ir(O,{afterEach:j,beforeEach:v,cacheRequests:c,evalScripts:l,httpRequestWithCredentials:o,renumerateIRIElements:d})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;Kr(He({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var l=s.wrapper,o=Rr(s,Br),d=l;return Ne.createElement(d,He({},o,{ref:this.refCallback},l==="svg"?{xmlns:Ye,xmlnsXlink:Mt}:{}),this.state.isLoading&&i&&Ne.createElement(i,null),this.state.hasError&&a&&Ne.createElement(a,null))},e}(Ne.Component);qe.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};qe.propTypes={afterInjection:se.func,beforeInjection:se.func,desc:se.string,evalScripts:se.oneOf(["always","once","never"]),fallback:se.oneOfType([se.func,se.object,se.string]),httpRequestWithCredentials:se.bool,loading:se.oneOfType([se.func,se.object,se.string]),onError:se.func,renumerateIRIElements:se.bool,src:se.string.isRequired,title:se.string,useRequestCache:se.bool,wrapper:se.oneOf(["div","span","svg"])};const Re={"smp-icon":"_smp-icon_ttsft_1","smp-icon-rotated":"_smp-icon-rotated_ttsft_15","smp-icon-base":"_smp-icon-base_ttsft_19","smp-icon-interactable":"_smp-icon-interactable_ttsft_22","smp-icon-danger":"_smp-icon-danger_ttsft_33","smp-icon-warning":"_smp-icon-warning_ttsft_37","smp-icon-onDanger":"_smp-icon-onDanger_ttsft_45","smp-icon-onPrimary":"_smp-icon-onPrimary_ttsft_49","smp-icon-spin":"_smp-icon-spin_ttsft_53"};let dt={assets:"/"};const zr=n=>{dt={...dt,...n}},Ft=n=>`${dt.assets}/${n}`.replace(/\/+/g,"/"),ge=I.memo(({icon:n,width:e,height:t,placeholderIcon:r,color:s,disabled:a,state:i="base",rotated:l=!1,onClick:o,isInteractable:d=!1,spin:u=!1})=>{const[p,c]=I.useState(n),h=n.indexOf(".")>-1||n.indexOf("/")>-1||n.indexOf("\\")>-1,m=Ft(`assets/svg/${n}.svg`),y=Ft(`assets/svg/${r}.svg`),b={svg:`${Re["smp-icon"]} ${i?Re[`smp-icon-${i}`]:""} ${l?Re["smp-icon-rotated"]:""} ${d?Re["smp-icon-interactable"]:""} ${u?Re["smp-icon-spin"]:""}`},x=()=>{!a&&o&&o()};return T.jsx(T.Fragment,{children:h?T.jsx("img",{src:p,width:e||"16px",height:t||"auto",alt:n||"image",onError:()=>c(y)}):T.jsx(qe,{src:m,fallback:()=>T.jsx(qe,{src:y,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:n,role:"application",fill:s,"aria-disabled":a,className:b.svg,onClick:x})})}),Ae={"smp-dash-list":"_smp-dash-list_ajkcc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_ajkcc_25","smp-dash-list-horizontal":"_smp-dash-list-horizontal_ajkcc_30","smp-layout-1":"_smp-layout-1_ajkcc_34","smp-layout-2":"_smp-layout-2_ajkcc_38","smp-layout-1__descr":"_smp-layout-1__descr_ajkcc_67","smp-layout-2__descr":"_smp-layout-2__descr_ajkcc_68","smp-layout-1__value":"_smp-layout-1__value_ajkcc_76","smp-layout-2__value":"_smp-layout-2__value_ajkcc_77","smp-layout-2__icon":"_smp-layout-2__icon_ajkcc_84"},W=n=>typeof n=="string",Pe=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},Vt=n=>n==null?"":""+n,Gr=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},Jr=/###/g,Yt=n=>n&&n.indexOf("###")>-1?n.replace(Jr,"."):n,Ut=n=>!n||W(n),Ce=(n,e,t)=>{const r=W(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Ut(n))return{};const a=Yt(r[s]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++s}return Ut(n)?{}:{obj:n,k:Yt(r[s])}},Wt=(n,e,t)=>{const{obj:r,k:s}=Ce(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),l=Ce(n,i,Object);for(;l.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),l=Ce(n,i,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},Xr=(n,e,t,r)=>{const{obj:s,k:a}=Ce(n,e,Object);s[a]=s[a]||[],s[a].push(t)},Ke=(n,e)=>{const{obj:t,k:r}=Ce(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},Zr=(n,e,t)=>{const r=Ke(n,t);return r!==void 0?r:Ke(e,t)},ur=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?W(n[r])||n[r]instanceof String||W(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):ur(n[r],e[r],t):n[r]=e[r]);return n},Se=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qr={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const en=n=>W(n)?n.replace(/[&<>"'\/]/g,e=>Qr[e]):n;class tn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const rn=[" ",",","?","!",";"],nn=new tn(20),sn=(n,e,t)=>{e=e||"",t=t||"";const r=rn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(r.length===0)return!0;const s=nn.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(n);if(!a){const i=n.indexOf(t);i>0&&!s.test(n.substring(0,i))&&(a=!0)}return a},pt=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let o=a;o<r.length;++o)if(o!==a&&(l+=t),l+=r[o],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&o<r.length-1)continue;a+=o-a+1;break}s=i}return s},Be=n=>n==null?void 0:n.replace("_","-"),an={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class ze{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||an,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(W(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ze(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ze(this.logger,e)}}var de=new ze;class Qe{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(i=>{let[l,o]=i;for(let d=0;d<o;d++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,o]=i;for(let d=0;d<o;d++)l.apply(l,[e,...r])})}}class Ht extends Qe{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){var d,u;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):W(r)&&a?l.push(...r.split(a)):l.push(r)));const o=Ke(this.data,l);return!o&&!t&&!r&&e.indexOf(".")>-1&&(e=l[0],t=l[1],r=l.slice(2).join(".")),o||!i||!W(r)?o:pt((u=(d=this.data)==null?void 0:d[e])==null?void 0:u[t],r,a)}addResource(e,t,r,s){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(l=e.split("."),s=t,t=l[1]),this.addNamespaces(t),Wt(this.data,l,s),a.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(W(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,t];e.indexOf(".")>-1&&(l=e.split("."),s=r,r=t,t=l[1]),this.addNamespaces(t);let o=Ke(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?ur(o,r,a):o={...o,...r},Wt(this.data,l,o),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var cr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,r,s))??e}),e}};const qt={},Kt=n=>!W(n)&&typeof n!="boolean"&&typeof n!="number";class Ge extends Qe{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Gr(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=de.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!sn(e,r,s);if(i&&!l){const o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:W(a)?[a]:a};const d=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(d[0])>-1)&&(a=d.shift()),e=d.join(s)}return{key:e,namespaces:W(a)?[a]:a}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(e[e.length-1],t),o=l[l.length-1],d=t.lng||this.language,u=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode"){if(u){const P=t.nsSeparator||this.options.nsSeparator;return s?{res:`${o}${P}${i}`,usedKey:i,exactUsedKey:i,usedLng:d,usedNS:o,usedParams:this.getUsedParamsDetails(t)}:`${o}${P}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:d,usedNS:o,usedParams:this.getUsedParamsDetails(t)}:i}const p=this.resolve(e,t);let c=p==null?void 0:p.res;const h=(p==null?void 0:p.usedKey)||i,m=(p==null?void 0:p.exactUsedKey)||i,y=["[object Number]","[object Function]","[object RegExp]"],b=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,O=t.count!==void 0&&!W(t.count),D=Ge.hasDefaultValue(t),j=O?this.pluralResolver.getSuffix(d,t.count,t):"",v=t.ordinal&&O?this.pluralResolver.getSuffix(d,t.count,{ordinal:!1}):"",H=O&&!t.ordinal&&t.count===0,N=H&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${j}`]||t[`defaultValue${v}`]||t.defaultValue;let V=c;x&&!c&&D&&(V=N);const M=Kt(V),F=Object.prototype.toString.apply(V);if(x&&V&&M&&y.indexOf(F)<0&&!(W(b)&&Array.isArray(V))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,V,{...t,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(p.res=P,p.usedParams=this.getUsedParamsDetails(t),p):P}if(a){const P=Array.isArray(V),q=P?[]:{},B=P?m:h;for(const X in V)if(Object.prototype.hasOwnProperty.call(V,X)){const J=`${B}${a}${X}`;D&&!c?q[X]=this.translate(J,{...t,defaultValue:Kt(N)?N[X]:void 0,joinArrays:!1,ns:l}):q[X]=this.translate(J,{...t,joinArrays:!1,ns:l}),q[X]===J&&(q[X]=V[X])}c=q}}else if(x&&W(b)&&Array.isArray(c))c=c.join(b),c&&(c=this.extendTranslation(c,e,t,r));else{let P=!1,q=!1;!this.isValidLookup(c)&&D&&(P=!0,c=N),this.isValidLookup(c)||(q=!0,c=i);const X=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&q?void 0:c,J=D&&N!==c&&this.options.updateMissing;if(q||P||J){if(this.logger.log(J?"updateKey":"missingKey",d,o,i,J?N:c),a){const R=this.resolve(i,{...t,keySeparator:!1});R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ee=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let R=0;R<Y.length;R++)ee.push(Y[R]);else this.options.saveMissingTo==="all"?ee=this.languageUtils.toResolveHierarchy(t.lng||this.language):ee.push(t.lng||this.language);const z=(R,f,g)=>{var w;const S=D&&g!==c?g:X;this.options.missingKeyHandler?this.options.missingKeyHandler(R,o,f,S,J,t):(w=this.backendConnector)!=null&&w.saveMissing&&this.backendConnector.saveMissing(R,o,f,S,J,t),this.emit("missingKey",R,o,f,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?ee.forEach(R=>{const f=this.pluralResolver.getSuffixes(R,t);H&&t[`defaultValue${this.options.pluralSeparator}zero`]&&f.indexOf(`${this.options.pluralSeparator}zero`)<0&&f.push(`${this.options.pluralSeparator}zero`),f.forEach(g=>{z([R],i+g,t[`defaultValue${g}`]||N)})}):z(ee,i,N))}c=this.extendTranslation(c,e,t,p,r),q&&c===i&&this.options.appendNamespaceToMissingKey&&(c=`${o}:${i}`),(q||P)&&this.options.parseMissingKeyHandler&&(c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${o}:${i}`:i,P?c:void 0,t))}return s?(p.res=c,p.usedParams=this.getUsedParamsDetails(t),p):c}extendTranslation(e,t,r,s,a){var d,u;var i=this;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const p=W(e)&&(((u=r==null?void 0:r.interpolation)==null?void 0:u.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(p){const m=e.match(this.interpolator.nestingRegexp);c=m&&m.length}let h=r.replace&&!W(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||s.usedLng,r),p){const m=e.match(this.interpolator.nestingRegexp),y=m&&m.length;c<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var m=arguments.length,y=new Array(m),b=0;b<m;b++)y[b]=arguments[b];return(a==null?void 0:a[0])===y[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${t[0]}`),null):i.translate(...y,t)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,o=W(l)?[l]:l;return e!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(e=cr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,a,i,l;return W(e)&&(e=[e]),e.forEach(o=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(o,t),u=d.key;s=u;let p=d.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const c=t.count!==void 0&&!W(t.count),h=c&&!t.ordinal&&t.count===0,m=t.context!==void 0&&(W(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);p.forEach(b=>{var x,O;this.isValidLookup(r)||(l=b,!qt[`${y[0]}-${b}`]&&((x=this.utils)!=null&&x.hasLoadedNamespace)&&!((O=this.utils)!=null&&O.hasLoadedNamespace(l))&&(qt[`${y[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(D=>{var H;if(this.isValidLookup(r))return;i=D;const j=[u];if((H=this.i18nFormat)!=null&&H.addLookupKeys)this.i18nFormat.addLookupKeys(j,u,D,b,t);else{let N;c&&(N=this.pluralResolver.getSuffix(D,t.count,t));const V=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(j.push(u+N),t.ordinal&&N.indexOf(M)===0&&j.push(u+N.replace(M,this.options.pluralSeparator)),h&&j.push(u+V)),m){const F=`${u}${this.options.contextSeparator}${t.context}`;j.push(F),c&&(j.push(F+N),t.ordinal&&N.indexOf(M)===0&&j.push(F+N.replace(M,this.options.pluralSeparator)),h&&j.push(F+V))}}let v;for(;v=j.pop();)this.isValidLookup(r)||(a=v,r=this.getResource(D,b,v,t))}))})}),{res:r,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var a;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!W(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class Bt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=de.create("languageUtils")}getScriptPartFromCode(e){if(e=Be(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Be(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(W(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),W(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return W(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):W(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const zt={zero:0,one:1,two:2,few:3,many:4,other:5},Gt={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class on{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=de.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Be(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Gt;if(!e.match(/-|_/))return Gt;const o=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(o,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>zt[s]-zt[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Jt=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Zr(n,e,t);return!a&&s&&W(t)&&(a=pt(n,t,r),a===void 0&&(a=pt(e,t,r))),a},lt=n=>n.replace(/\$/g,"$$$$");class ln{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=de.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:l,suffixEscaped:o,formatSeparator:d,unescapeSuffix:u,unescapePrefix:p,nestingPrefix:c,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:b,maxReplaces:x,alwaysFormat:O}=e.interpolation;this.escape=t!==void 0?t:en,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Se(a):i||"{{",this.suffix=l?Se(l):o||"}}",this.formatSeparator=d||",",this.unescapePrefix=u?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=c?Se(c):h||Se("$t("),this.nestingSuffix=m?Se(m):y||Se(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=x||1e3,this.alwaysFormat=O!==void 0?O:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,s){var h;let a,i,l;const o=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=m=>{if(m.indexOf(this.formatSeparator)<0){const O=Jt(t,o,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,r,{...s,...t,interpolationkey:m}):O}const y=m.split(this.formatSeparator),b=y.shift().trim(),x=y.join(this.formatSeparator).trim();return this.format(Jt(t,o,b,this.options.keySeparator,this.options.ignoreJSONStructure),x,r,{...s,...t,interpolationkey:b})};this.resetRegExp();const u=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>lt(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?lt(this.escape(m)):lt(m)}].forEach(m=>{for(l=0;a=m.regex.exec(e);){const y=a[1].trim();if(i=d(y),i===void 0)if(typeof u=="function"){const x=u(e,a,s);i=W(x)?x:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))i="";else if(p){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),i="";else!W(i)&&!this.useRawValueToEscape&&(i=Vt(i));const b=m.safeValue(i);if(e=e.replace(a[0],b),p?(m.regex.lastIndex+=i.length,m.regex.lastIndex-=a[0].length):m.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,i;const l=(o,d)=>{const u=this.nestingOptionsSeparator;if(o.indexOf(u)<0)return o;const p=o.split(new RegExp(`${u}[ ]*{`));let c=`{${p[1]}`;o=p[0],c=this.interpolate(c,i);const h=c.match(/'/g),m=c.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!m||m.length%2!==0)&&(c=c.replace(/'/g,'"'));try{i=JSON.parse(c),d&&(i={...d,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${o}`,y),`${o}${u}${c}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,o};for(;s=this.nestingRegexp.exec(e);){let o=[];i={...r},i=i.replace&&!W(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let d=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const u=s[1].split(this.formatSeparator).map(p=>p.trim());s[1]=u.shift(),o=u,d=!0}if(a=t(l.call(this,s[1].trim(),i),i),a&&s[0]===e&&!W(a))return a;W(a)||(a=Vt(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),d&&(a=o.reduce((u,p)=>this.format(u,p,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const un=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...o]=i.split(":"),d=o.join(":").trim().replace(/^'+|'+$/g,""),u=l.trim();t[u]||(t[u]=d),d==="false"&&(t[u]=!1),d==="true"&&(t[u]=!0),isNaN(d)||(t[u]=parseInt(d,10))}})}return{formatName:e,formatOptions:t}},Ee=n=>{const e={};return(t,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=r+JSON.stringify(a);let l=e[i];return l||(l=n(Be(r),s),e[i]=l),l(t)}};class cn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=de.create("formatter"),this.options=e,this.formats={number:Ee((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return a=>s.format(a)}),currency:Ee((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return a=>s.format(a)}),datetime:Ee((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return a=>s.format(a)}),relativetime:Ee((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return a=>s.format(a,r.range||"day")}),list:Ee((t,r)=>{const s=new Intl.ListFormat(t,{...r});return a=>s.format(a)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ee(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(o=>o.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,o)=>{var p;const{formatName:d,formatOptions:u}=un(o);if(this.formats[d]){let c=l;try{const h=((p=s==null?void 0:s.formatParams)==null?void 0:p[s.interpolationkey])||{},m=h.locale||h.lng||s.locale||s.lng||r;c=this.formats[d](l,m,{...u,...s,...h})}catch(h){this.logger.warn(h)}return c}else this.logger.warn(`there was no format function for ${d}`);return l},e)}}const fn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class dn extends Qe{constructor(e,t,r){var a,i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=de.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,s.backend,s)}queueLoad(e,t,r,s){const a={},i={},l={},o={};return e.forEach(d=>{let u=!0;t.forEach(p=>{const c=`${d}|${p}`;!r.reload&&this.store.hasResourceBundle(d,p)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?i[c]===void 0&&(i[c]=!0):(this.state[c]=1,u=!1,i[c]===void 0&&(i[c]=!0),a[c]===void 0&&(a[c]=!0),o[p]===void 0&&(o[p]=!0)))}),u||(l[d]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(o)}}loaded(e,t,r){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const l={};this.queue.forEach(o=>{Xr(o.loaded,[a],i),fn(o,e),t&&o.errors.push(t),o.pendingCount===0&&!o.done&&(Object.keys(o.loaded).forEach(d=>{l[d]||(l[d]={});const u=o.loaded[d];u.length&&u.forEach(p=>{l[d][p]===void 0&&(l[d][p]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(o=>!o.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:a,callback:i});return}this.readingCalls++;const l=(d,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(d&&u&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,a*2,i)},a);return}i(d,u)},o=this.backend[r].bind(this.backend);if(o.length===2){try{const d=o(e,t);d&&typeof d.then=="function"?d.then(u=>l(null,u)).catch(l):l(null,d)}catch(d){l(d)}return}return o(e,t,l)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();W(e)&&(e=this.languageUtils.toResolveHierarchy(e)),W(t)&&(t=[t]);const a=this.queueLoad(e,t,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],a=r[1];this.read(s,a,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,l),this.loaded(e,i,l)})}saveMissing(e,t,r,s,a){var o,d,u,p,c;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((d=(o=this.services)==null?void 0:o.utils)!=null&&d.hasLoadedNamespace&&!((p=(u=this.services)==null?void 0:u.utils)!=null&&p.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((c=this.backend)!=null&&c.create){const h={...i,isUpdate:a},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(e,t,r,s,h):y=m(e,t,r,s),y&&typeof y.then=="function"?y.then(b=>l(null,b)).catch(l):l(null,y)}catch(y){l(y)}else m(e,t,r,s,l,h)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const Xt=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),W(n[1])&&(e.defaultValue=n[1]),W(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Zt=n=>{var e,t;return W(n.ns)&&(n.ns=[n.ns]),W(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),W(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Ue=()=>{},pn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ke extends Qe{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Zt(e),this.services={},this.logger=de,this.modules={external:[]},pn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(W(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Xt();this.options={...s,...this.options,...Zt(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const a=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?de.init(a(this.modules.logger),this.options):de.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=cn;const p=new Bt(this.options);this.store=new Ht(this.options.resources,this.options);const c=this.services;c.logger=de,c.resourceStore=this.store,c.languageUtils=p,c.pluralResolver=new on(p,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=a(u),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new ln(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new dn(a(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(h){for(var m=arguments.length,y=new Array(m>1?m-1:0),b=1;b<m;b++)y[b-1]=arguments[b];e.emit(h,...y)}),this.modules.languageDetector&&(c.languageDetector=a(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=a(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Ge(this.services,this.options),this.translator.on("*",function(h){for(var m=arguments.length,y=new Array(m>1?m-1:0),b=1;b<m;b++)y[b-1]=arguments[b];e.emit(h,...y)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ue),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return e.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return e.store[u](...arguments),e}});const o=Pe(),d=()=>{const u=(p,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(c),r(p,c)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),o}loadResources(e){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ue;const s=W(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],o=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(p=>{p!=="cimode"&&l.indexOf(p)<0&&l.push(p)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,d=>o(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(d)})}else r(null)}reloadResources(e,t,r){const s=Pe();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Ue),this.services.backendConnector.reload(e,t,a=>{s.resolve(),r(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&cr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=Pe();this.emit("languageChanging",e);const a=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,d)=>{d?this.isLanguageChangingTo===e&&(a(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(o,function(){return r.t(...arguments)})},l=o=>{var p,c;!e&&!o&&this.services.languageDetector&&(o=[]);const d=W(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(d)?d:this.services.languageUtils.getBestMatchFromCodes(W(o)?[o]:o);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(c=(p=this.services.languageDetector)==null?void 0:p.cacheUserLanguage)==null||c.call(p,u)),this.loadResources(u,h=>{i(h,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),s}getFixedT(e,t,r){var s=this;const a=function(i,l){let o;if(typeof l!="object"){for(var d=arguments.length,u=new Array(d>2?d-2:0),p=2;p<d;p++)u[p-2]=arguments[p];o=s.options.overloadTranslationOptionHandler([i,l].concat(u))}else o={...l};o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs,o.ns=o.ns||a.ns,o.keyPrefix!==""&&(o.keyPrefix=o.keyPrefix||r||a.keyPrefix);const c=s.options.keySeparator||".";let h;return o.keyPrefix&&Array.isArray(i)?h=i.map(m=>`${o.keyPrefix}${c}${m}`):h=o.keyPrefix?`${o.keyPrefix}${c}${i}`:i,s.t(h,o)};return W(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=r,a}t(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...t)}exists(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,o)=>{const d=this.services.backendConnector.state[`${l}|${o}`];return d===-1||d===0||d===2};if(t.precheck){const l=t.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const r=Pe();return this.options.ns?(W(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Pe();W(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new Bt(Xt());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ke(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ue;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new ke(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const l=Object.keys(this.store.data).reduce((o,d)=>(o[d]={...this.store.data[d]},o[d]=Object.keys(o[d]).reduce((u,p)=>(u[p]={...o[d][p]},u),o[d]),o),{});a.store=new Ht(l,s),a.services.resourceStore=a.store}return a.translator=new Ge(a.services,s),a.translator.on("*",function(l){for(var o=arguments.length,d=new Array(o>1?o-1:0),u=1;u<o;u++)d[u-1]=arguments[u];a.emit(l,...d)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ae=ke.createInstance();ae.createInstance=ke.createInstance;ae.createInstance;ae.dir;ae.init;ae.loadResources;ae.reloadResources;ae.use;ae.changeLanguage;ae.getFixedT;ae.t;ae.exists;ae.setDefaultNamespace;ae.hasLoadedNamespace;ae.loadNamespaces;ae.loadLanguages;const hn={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},gn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},mn={CalendarFor:"Calendario per",Close:"Chiudi"},yn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:hn,Month:gn,Generic:mn},vn={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},bn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},xn={CalendarFor:"Calendar for",Close:"Close"},Sn={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:vn,Month:bn,Generic:xn};function Qt(n,e){return new RegExp(En(n),e)}function En(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wn(n,e,t,r){let s=e;const a=On(n,t);if(!s){const l=Math.abs(a);l-Math.floor(l)?s="0,0.00":s="0,0"}const i=Tn(s);return new Intl.NumberFormat(r,i).format(a)}function On(n,e,t,r,s){let a=n;if(typeof a!="number"){let l;e&&r===void 0?l=",":l=".";const o=l=="."?",":".";a=a.replace(Qt(o,"g"),""),a=a.replace(Qt(l,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Tn(n){const e={};n.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=n.indexOf(".");if(t>-1){const s=(n.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}ae.init({lng:navigator.language.split("-")[0],fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,e,t,r)=>{if(!isNaN(Number(n))){const s=(r==null?void 0:r.inputIsLocalized)??!1;return wn(n,e,s,t)}return n}},resources:{en:{translation:Sn},it:{translation:yn}}});const _n=(n,e,t,r)=>ae.format(n,e,t||ae.language,r),Rn=(n,e)=>ae.t(n,e);function fr(){const n=I.useCallback((t,r,s,a)=>_n(t,r,s||void 0,a),[]),e=I.useCallback((t,r)=>Rn(t,r),[]);return{format:n,translate:e}}const $e=n=>n==null?!1:typeof n=="string"?n.toLocaleLowerCase()=="yes":n,An=({ColumnsNumber:n=1,data:e={},ForceText:t,TextColName:r,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:l,ForceIcon:o,IconColName:d,IconColor:u="var(--smp-dashList-color-base)",NumberFormat:p,ForceUM:c,UmColName:h,UmColor:m="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:b,ValueColor:x="var(--smp-dashList-color-base)",SelectLayout:O="1",onClick:D})=>{const j="N/A",v=(e==null?void 0:e.columns)||[],H=(e==null?void 0:e.rows)||[],N=H.length>0,V="--smp-dashList-color",M="smp-layout",F="descr",P="icon",q="um",B="value",X=i||"1em",J="18px",ee="--smp-dashList-columns",Y="--smp-dashList-fontSize",z={dash:(L="1")=>{const G=f(L),te=Ae[G],re=g(G,F),le=g(G,P),me=g(G,q),ue=g(G,B);return{container:te,descr:re,icon:le,um:me,value:ue}},dashList:`${Ae["smp-dash-list"]} ${$e(a)?Ae["smp-dash-list-fill-space"]:""}
|
|
46
|
-
${$e(l)?Ae["smp-dash-list-horizontal"]:""}`},{format:R}=fr(),f=L=>`${M}-${L}`,g=(L,G)=>Ae[`${L}__${G}`],S=L=>`${V}-${L}`,w=L=>{const G=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(G.test(L)){const re=L.match(G)||[];if((re==null?void 0:re.length)>3)return"rgb("+re[1]+","+re[2]+","+re[3]+")"}return L},E=L=>{if(!p)return L;const[G,te]=_(p).map(xe=>parseInt(xe||"0")),re="0,0"+(te?"."+"0".repeat(te):""),le=R(L,re,"it");if(!G)return le;const[me,ue]=le.split(",");return me+(ue?`,${ue}`:"")},_=L=>L.includes(";")?L.split(";"):[L],$=L=>{const G=re=>{var le;if(re)return(le=L==null?void 0:L.cells[re])==null?void 0:le.obj.k},te=re=>{var le,me;if(!(v.length<=re))return(me=(le=L==null?void 0:L.cells[v[re].name])==null?void 0:le.obj)==null?void 0:me.k};return{descr:t||G(r)||te(2)||"",icon:o||G(d)||te(3)||"",um:c||G(h)||te(1)||"",value:y||G(b)||te(0)||""}},k=L=>{D==null||D(L)},C=(L,G)=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),L.stopPropagation(),k(G))},U=(L=>{const G=z.dash(L);return{className:G,descr:te=>T.jsx("div",{className:G.descr,children:te},`${L}-${F}`),icon:te=>T.jsx("div",{className:G.icon,children:T.jsx(ge,{color:u,height:J,icon:te,width:J})},`${L}-${P}`),um:te=>T.jsx("div",{className:G.um,children:te},`${L}-${q}`),value:te=>T.jsx("div",{className:G.value,children:te},`${L}-${B}`)}})(O),ne=L=>{const{descr:G,icon:te,um:re,value:le}=$(L),me={[S(F)]:w(s),[S(q)]:w(m),[S(B)]:w(x)},ue=[],xe=E(le);switch(O){case"2":te&&ue.push(U.icon(te)),ue.push(U.descr(G)),ue.push(U.value(re?xe+" "+re:xe));break;default:case"1":ue.push(U.descr(G)),ue.push(U.value(re?xe+" "+re:xe))}return T.jsx("div",{className:U.className.container,role:"button",style:me,tabIndex:0,onClick:()=>k(L),onKeyDown:xr=>C(xr,L),children:ue},L.id)},A={[ee]:String(n),[Y]:X};return T.jsx("div",{className:z.dashList,style:A,children:N?H.map(L=>ne(L)):j})},fe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",MULTI_AUTOCOMPLETE:"AML",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Pn=n=>n.t=="D8",Dn=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class Je{constructor(e,t){ve(this,"class");ve(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Je(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}class Xe{constructor(e,t){ve(this,"class");ve(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=er.get(`${e.t}${e.p}`);if(t)return new Xe(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=er.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const er=new Map([["D8*YYMD",{legacyToIso(n){return`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`},isoToLegacy(n){return`${n.substring(0,4)}${n.substring(5,7)}${n.substring(8,10)}`}}]]),mt=(n,e)=>{I.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function yt({position:n="bottom",enabled:e=!0}){const t=I.useRef(null),r=I.useRef(null),[s,a]=I.useState(0),i=I.useCallback(()=>{const l=t.current,o=r.current;if(!l||!o)return;const{top:d,left:u,width:p,height:c}=l.getBoundingClientRect();a(p);const h=o.offsetHeight,m=o.offsetWidth;if(m===0||h===0){requestAnimationFrame(i);return}let y=d+window.scrollY,b=u+window.scrollX;switch(n){case"top":y-=h;break;case"bottom":y+=c;break;case"left":b-=m;break;case"right":b+=p;break}requestAnimationFrame(()=>{o.style.transform=`translate(${b}px, ${y}px)`})},[n]);return I.useLayoutEffect(()=>{e&&t.current&&r.current&&i();const l=new MutationObserver(()=>{r.current&&i()});return r.current&&l.observe(r.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),l.disconnect()}},[i,e]),{anchorRef:t,targetRef:r,anchorWidth:s}}const Ze=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},De={"smp-list":"_smp-list_1ux5k_1","smp-list-container":"_smp-list-container_1ux5k_18","smp-list-listItem":"_smp-list-listItem_1ux5k_23"},ut={"smp-helper-text":"_smp-helper-text_10pis_1","smp-helper-text-danger":"_smp-helper-text-danger_10pis_9","smp-helper-text-warning":"_smp-helper-text-warning_10pis_13","smp-helper-text-disabled":"_smp-helper-text-disabled_10pis_17"},jn=({helperText:n,disabled:e,state:t})=>{const r={container:`${ut["smp-helper-text"]} ${e?ut["smp-helper-text-disabled"]:""} ${t?ut[`smp-helper-text-${t}`]:""}`};return T.jsx("span",{className:r.container,children:n})},tr={"smp-label":"_smp-label_3ywt3_1","smp-label-disabled":"_smp-label-disabled_3ywt3_5"},Cn=({label:n,disabled:e})=>{const t={container:`${tr["smp-label"]} ${e?tr["smp-label-disabled"]:""}`};return T.jsx("span",{className:t.container,children:n})},pe={"smp-textfield-wrapper":"_smp-textfield-wrapper_1tjct_4","smp-textfield":"_smp-textfield_1tjct_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1tjct_63","smp-textfield-small":"_smp-textfield-small_1tjct_68","smp-textfield-medium":"_smp-textfield-medium_1tjct_73","smp-textfield-large":"_smp-textfield-large_1tjct_78","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1tjct_83","smp-textfield-input":"_smp-textfield-input_1tjct_89","smp-textfield-danger":"_smp-textfield-danger_1tjct_106","smp-textfield-readOnly":"_smp-textfield-readOnly_1tjct_110","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1tjct_115","smp-textfield-disabled":"_smp-textfield-disabled_1tjct_125"},Oe=({disabled:n,readOnly:e,bindValue:t,icon:r,onBlur:s,onChange:a,placeholder:i,shapeIcon:l,sizing:o,state:d,variant:u,rotatedShapeIcon:p=!1,onShapeIconClick:c,ref:h,inputRef:m,onKeyDown:y,inputType:b="text",ariaLabel:x="input field",label:O,helperText:D=!1,error:j})=>{const v=j?"danger":d,H=j||d=="danger"?"error":l,N=D||!!j,V=F=>{a==null||a(F.target.value)},M={wrapper:`${pe["smp-textfield-wrapper"]}`,container:`${pe["smp-textfield"]} ${n?pe["smp-textfield-disabled"]:""} ${e?pe["smp-textfield-readOnly"]:""} ${i?pe["smp-textfield-placeholder"]:""} ${o?pe[`smp-textfield-${o}`]:""} ${v?pe[`smp-textfield-${v}`]:""} ${u?pe[`smp-textfield-variant-${u}`]:""}`,input:`${pe["smp-textfield-input"]}`};return T.jsxs("div",{className:M.wrapper,children:[O&&T.jsx(Cn,{label:O,disabled:n}),T.jsxs("div",{className:M.container,ref:h,children:[r&&T.jsx(ge,{icon:r,disabled:n}),T.jsx("input",{type:b,value:t,placeholder:i,onChange:V,onBlur:s,className:M.input,disabled:n,readOnly:e,onKeyDown:y,"aria-label":x,ref:m}),H&&T.jsx(ge,{icon:H,disabled:n,state:v,onClick:c,rotated:p})]}),N&&T.jsx(jn,{helperText:j,disabled:n,state:v})]})};function $n({items:n,itemHeight:e,containerHeight:t,overscan:r=5}){const[s,a]=I.useState(0),i=I.useRef(null),l=n.length*e,o=Math.max(0,Math.floor(s/e)-r),d=Math.min(n.length-1,Math.floor((s+t)/e)+r),u=[];for(let h=o;h<=d;h++)u.push({item:n[h],index:h,offsetTop:h*e});const p=I.useCallback(h=>{const m=h.target.scrollTop;a(m)},[]),c=h=>{if(!i.current)return;const m=h*e,y=m+e,b=i.current,x=b.scrollTop,O=x+t;m<x?b.scrollTop=m:y>O&&(b.scrollTop=y-t)};return{virtualItems:u,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:p},innerProps:{style:{height:`${l}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:l,startIndex:o,endIndex:d},scrollToIndex:c}}const kn=10,dr=({id:n,options:e,displayMode:t,ref:r,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:l,onClick:o,onKeyDown:d})=>{var F;const[u,p]=I.useState(""),c=24,[h,m]=I.useState(a!==null?a:-1),y=s!==void 0?s:e.length>kn,b=u?e.filter(P=>P.label.toLowerCase().includes(u.toLowerCase())):e,x=P=>{p(P)},{virtualItems:O,containerProps:D,innerProps:j,scrollToIndex:v}=$n({items:b,itemHeight:c,containerHeight:200,overscan:5});I.useEffect(()=>{a!==null&&a!==h&&m(a)},[a]),I.useEffect(()=>{h>=0&&h<b.length&&v(h)},[h,b]);const H=P=>{if(P.key==="ArrowDown"||P.key==="ArrowUp"){P.preventDefault();let q=h;P.key==="ArrowDown"?q=h<b.length-1?h+1:0:P.key==="ArrowUp"&&(q=h>0?h-1:b.length-1),m(q)}else P.key==="Enter"?h>=0&&h<b.length&&(o==null||o(b[h])):P.key==="Escape"&&(P.preventDefault(),P.stopPropagation());d&&d(P)},N=P=>{H(P)},V=P=>{H(P)},M={wrapper:`${De["smp-list"]}`,container:`${De["smp-list-container"]}`,virtualScroll:`${De["smp-list-virtualScroll"]}`,listItem:`${De["smp-list-listItem"]}`};return T.jsxs("div",{id:n,ref:r,className:M.wrapper,style:{width:l},children:[y&&T.jsx(Oe,{bindValue:u,placeholder:"Search...",onChange:x,onKeyDown:N}),T.jsx("div",{...D,className:M.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:V,"aria-activedescendant":h>=0&&h<b.length?(F=b[h])==null?void 0:F.id:void 0,children:T.jsx("div",{...j,className:M.virtualScroll,children:O.map(({item:P,index:q,offsetTop:B})=>{const X=i.includes(P.id);return T.jsxs("li",{role:"option",id:P.id,"aria-selected":h===q?"true":"false",tabIndex:-1,className:`${M.listItem} ${h===q?De["selected-item"]:""}`,"aria-label":P.id+"-"+P.label,style:{height:`${c}px`,lineHeight:`calc(${c}px - 2*2px)`,transform:`translateY(${B}px)`},onClick:()=>{o==null||o(P),m(q)},children:[Ze(P.id,P.label,t),X&&T.jsx(ge,{icon:"check",width:16})]},P.id)})})})]})},pr=({displayMode:n,bindValue:e,optionalDisplayValue:t,...r})=>{const[s,a]=I.useState(Ze(e,t,n));return I.useEffect(()=>{a(e)},[e]),I.useEffect(()=>{a(Ze(e,t,n))},[t,n]),T.jsx(Oe,{...r,bindValue:s})},Ln=n=>{const e=I.useRef(null);return I.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),r=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r()},n)}},vt=({bindValue:n,optionalDisplayValue:e,options:t,displayMode:r,listDisplayMode:s="Both",minimumChars:a=3,placeholder:i,fun:l,_changeOnEnter:o=!1,onChange:d,onOptionsRequest:u,_multiActiveIndex:p,...c})=>{const[h,m]=I.useState(n),[y,b]=I.useState(e),[x,O]=I.useState(!1),[D,j]=I.useState(t||[]),[v,H]=I.useState(0),[N,V]=I.useState([n]),{anchorRef:M,targetRef:F,anchorWidth:P}=yt({position:"bottom",enabled:x});mt(F,()=>O(!1));const q=Ln(400),B=Y=>{Y.length>=a?l&&u&&q(async()=>{const z=await u(l,Y);j(z),H(z.length>0?0:-1),O(!0)}):O(!1),m(Y),b(e),o||d==null||d(Y,e)},X=Y=>{o?(m(""),b("")):(m(Y.id),b(Y.label)),d==null||d(Y.id,Y.label);const z=D.findIndex(R=>R.id===Y.id);H(z),V([Y.id]),O(!1)},J=Y=>{Y.key==="Escape"&&(O(!1),H(-1))},ee=Y=>{if((Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Y.preventDefault(),x)){const z=Y.key==="ArrowDown"?(v+1)%D.length:(v-1+D.length)%D.length;H(z)}switch(Y.key){case"Enter":v>=0&&v<D.length?X(D[v]):o&&(d==null||d(h,""),O(!1),m(""),b(""));break;case"Escape":O(!1),H(-1);break}};return T.jsxs("div",{children:[T.jsx(pr,{...c,bindValue:h,optionalDisplayValue:y,displayMode:r,shapeIcon:"magnify",placeholder:i,ref:M,onChange:B,onKeyDown:ee,"aria-autocomplete":"list"}),x&&T.jsx(dr,{options:D,displayMode:s,onClick:X,ref:F,selectedIndex:v,activeIndex:p||N,width:P,showFilter:!1,onKeyDown:J})]})},je={"smp-button-container":"_smp-button-container_pte2h_1","smp-button-extraSmall":"_smp-button-extraSmall_pte2h_51","smp-button-small":"_smp-button-small_pte2h_56","smp-button-base":"_smp-button-base_pte2h_61","smp-button-large":"_smp-button-large_pte2h_66","smp-button-extraLarge":"_smp-button-extraLarge_pte2h_71","smp-button-fullWidth":"_smp-button-fullWidth_pte2h_76","smp-buttonType-raised":"_smp-buttonType-raised_pte2h_81","smp-buttonVariant-base":"_smp-buttonVariant-base_pte2h_83","smp-buttonVariant-primary":"_smp-buttonVariant-primary_pte2h_97","smp-buttonVariant-danger":"_smp-buttonVariant-danger_pte2h_111","smp-buttonType-ghost":"_smp-buttonType-ghost_pte2h_138"},Le=({bindValue:n,onClick:e,ariaLabel:t,icon:r,disabled:s,sizing:a="base",variant:i="primary",type:l="raised",showIcon:o=!0,showText:d=!0,fullWidth:u=!1,loading:p=!1})=>{const c={container:`${je["smp-button-container"]} ${a?je[`smp-button-${a}`]:""} ${i?je[`smp-buttonVariant-${i}`]:""} ${l?je[`smp-buttonType-${l}`]:""} ${u?je["smp-button-fullWidth"]:""}`},h=m=>({primary:"onPrimary",danger:"onDanger",base:"base"})[m];return T.jsx("button",{className:c.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":p,children:p?T.jsx(ge,{icon:"spinner",state:h(i),spin:!0}):T.jsxs(T.Fragment,{children:[r&&o&&T.jsx(ge,{icon:r,disabled:s,state:h(i)}),d&&T.jsx("span",{children:n})]})})},hr=({bindValue:n,onChange:e,onBlur:t})=>{const r=s=>{e&&e(s.target.checked)};return T.jsx("input",{type:"checkbox",checked:n,onChange:r,onBlur:t})},Nn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},ct={"smp-typography":"_smp-typography_oznk3_1","smp-typography-body":"_smp-typography-body_oznk3_12","smp-typography-large":"_smp-typography-large_oznk3_16","smp-typography-titleLarge":"_smp-typography-titleLarge_oznk3_20","smp-typography-label":"_smp-typography-label_oznk3_24","smp-typography-disabled":"_smp-typography-disabled_oznk3_29"},In=({variant:n="body",bindValue:e,...t})=>{const r=Nn[n],s={container:`${ct["smp-typography"]} ${n?ct[`smp-typography-${n}`]:""} ${t.disabled?ct["smp-typography-disabled"]:""}`};return T.jsx(r,{className:s.container,disabled:t.disabled,children:e})},rr={"smp-chips-container":"_smp-chips-container_g7dut_1","smp-chips-element":"_smp-chips-element_g7dut_9"},gr=({elements:n,isEditable:e=!1,displayMode:t="Both",onChange:r})=>{const s={container:`${rr["smp-chips-container"]}`,element:`${rr["smp-chips-element"]}`},a=i=>{r==null||r(n.filter((l,o)=>o!==i))};return T.jsx("div",{className:s.container,role:"list",children:n.map((i,l)=>{const o=Ze(i.bindValue,i.optionalDisplayValue,t);return T.jsxs("div",{className:s.element,role:"listitem",children:[T.jsx(In,{variant:"label",bindValue:o}),e&&T.jsx(ge,{icon:"close",isInteractable:!0,onClick:()=>a(l)})]},l)})})};function mr(n,e){const t=I.useRef(null);I.useEffect(()=>{if(!n)return;const r=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!r)return;t.current=document.activeElement;const s=()=>r?Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(d=>!d.hasAttribute("disabled")&&d.offsetParent!==null):[];(()=>{const d=s();d.length>0&&requestAnimationFrame(()=>d[0].focus())})();const i=d=>{if(d.key==="Escape"||d.key!=="Tab")return;const u=s();if(u.length===0)return;const p=u[0],c=u[u.length-1];d.shiftKey&&document.activeElement===p?(d.preventDefault(),c.focus()):!d.shiftKey&&document.activeElement===c&&(d.preventDefault(),p.focus())},l=d=>{if(r&&!r.contains(d.target)){d.preventDefault();const u=s();u.length>0&&u[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",l);const o=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",l),document.body.style.overflow=o,t.current&&requestAnimationFrame(()=>{var d;(d=t.current)==null||d.focus()})}},[n,e])}const bt=({bindValue:n,onChange:e,options:t=[],optionalDisplayValue:r,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:l,multiActiveIndex:o,...d})=>{const[u,p]=I.useState(!1),[c,h]=I.useState(t),[m,y]=I.useState(-1),[b,x]=I.useState([n]),O=I.useId(),{anchorRef:D,targetRef:j,anchorWidth:v}=yt({position:"bottom",enabled:u});mt(j,()=>p(!1)),mr(u,j);const H=F=>{e==null||e(F.id,F.label);const P=c.findIndex(q=>q.id===F.id);y(P),x([F.id]),p(!1)},N=F=>{F.key==="Escape"&&(p(!1),y(-1))},V=F=>{(F.key==="ArrowDown"||F.key==="ArrowUp")&&(F.preventDefault(),M())},M=()=>{i&&l&&l(i,void 0).then(F=>{h(F),y(F.length>0?0:-1),p(!0)})};return T.jsxs("div",{role:"combobox","aria-expanded":u,"aria-controls":O,"aria-owns":O,children:[T.jsx(pr,{...d,bindValue:n,optionalDisplayValue:r,displayMode:s,onShapeIconClick:M,onKeyDown:V,shapeIcon:"arrow_drop_down",rotatedShapeIcon:u,readOnly:!0,ref:D,"aria-autocomplete":"list",variant:"notSelectable"}),u&&T.jsx(dr,{id:O,options:c,displayMode:a,ref:j,selectedIndex:m,activeIndex:o||b,width:v,onClick:H,onKeyDown:N})]})};var yr=(n=>(n.CALENDAR_FOR="Date.CalendarFor",n.CLOSE="Generic.Close",n))(yr||{}),ie=(n=>(n.MONDAY="Day.Monday",n.MONDAY_SHORT="Day.MondayShort",n.TUESDAY="Day.Tuesday",n.TUESDAY_SHORT="Day.TuesdayShort",n.WEDNESDAY="Day.Wednesday",n.WEDNESDAY_SHORT="Day.WednesdayShort",n.THURSDAY="Day.Thursday",n.THURSDAY_SHORT="Day.ThursdayShort",n.FRIDAY="Day.Friday",n.FRIDAY_SHORT="Day.FridayShort",n.SATURDAY="Day.Saturday",n.SATURDAY_SHORT="Day.SaturdayShort",n.SUNDAY="Day.Sunday",n.SUNDAY_SHORT="Day.SundayShort",n))(ie||{}),oe=(n=>(n.JANUARY="Month.January",n.FEBRUARY="Month.February",n.MARCH="Month.March",n.APRIL="Month.April",n.MAY="Month.May",n.JUNE="Month.June",n.JULY="Month.July",n.AUGUST="Month.August",n.SEPTEMBER="Month.September",n.OCTOBER="Month.October",n.NOVEMBER="Month.November",n.DECEMBER="Month.December",n))(oe||{}),ht=(n=>(n.PREVIOUS_DAY="Date.PreviousDay",n.PREVIOUS_WEEK="Date.PreviousWeek",n.PREVIOUS_MONTH="Date.PreviousMonth",n.PREVIOUS_YEAR="Date.PreviousYear",n.NEXT_DAY="Date.NextDay",n.NEXT_WEEK="Date.NextWeek",n.NEXT_MONTH="Date.NextMonth",n.NEXT_YEAR="Date.NextYear",n.YESTERDAY="Date.Yesterday",n.TODAY="Date.Today",n.TOMORROW="Date.Tomorrow",n))(ht||{});const he={"smp-datepickercalendar":"_smp-datepickercalendar_vpeb5_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_vpeb5_30","smp-datepickercalendar-th":"_smp-datepickercalendar-th_vpeb5_42","smp-datepickercalendar-td":"_smp-datepickercalendar-td_vpeb5_53","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_vpeb5_72","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_vpeb5_78","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_vpeb5_83"};function Mn({selectedDate:n,onDateChange:e,disabledDateRanges:t=[],initialValue:r,targetRef:s}){const{translate:a}=fr(),i=()=>{if(!r)return;const R=new Date(r);return isNaN(R.getTime())?void 0:R},[l]=I.useState(new Date),[o,d]=I.useState(n||i()||new Date),[u,p]=I.useState(o?o.getMonth():new Date().getMonth()),[c,h]=I.useState(o?o.getFullYear():new Date().getFullYear()),[m,y]=I.useState(o?o.getDate():null),b=I.useRef(null),x=I.useRef([]),O=[a(oe.JANUARY),a(oe.FEBRUARY),a(oe.MARCH),a(oe.APRIL),a(oe.MAY),a(oe.JUNE),a(oe.JULY),a(oe.AUGUST),a(oe.SEPTEMBER),a(oe.OCTOBER),a(oe.NOVEMBER),a(oe.DECEMBER)],D=[{value:a(ie.SUNDAY_SHORT),full:a(ie.SUNDAY)},{value:a(ie.MONDAY_SHORT),full:a(ie.MONDAY)},{value:a(ie.TUESDAY_SHORT),full:a(ie.TUESDAY)},{value:a(ie.WEDNESDAY_SHORT),full:a(ie.WEDNESDAY)},{value:a(ie.THURSDAY_SHORT),full:a(ie.THURSDAY)},{value:a(ie.FRIDAY_SHORT),full:a(ie.FRIDAY)},{value:a(ie.SATURDAY_SHORT),full:a(ie.SATURDAY)}],j=R=>t.some(f=>{const g=f.start.getTime(),S=f.end.getTime(),w=R.getTime();return w>=g&&w<=S}),v=R=>{const f={year:"numeric",month:"long",day:"numeric"};return R.toLocaleDateString(void 0,f)},H=R=>{j(R)||(d(R),y(R.getDate()),e&&e(v(R)))},N=()=>{u===0?(p(11),h(c-1)):p(u-1),y(1)},V=()=>{u===11?(p(0),h(c+1)):p(u+1),y(1)},M=(R,f)=>new Date(R,f+1,0).getDate(),F=(R,f)=>new Date(R,f,1).getDay(),P=R=>{var g;const f=J.findIndex(S=>S!==null&&S.getDate()===R);f!==-1&&x.current[f]&&((g=x.current[f])==null||g.focus(),y(R))},q=(R,f)=>{const g=J[f];if(!g)return;const S=M(c,u),w=g.getDate();switch(R.key){case"ArrowRight":R.preventDefault();{let E=w+1,_=new Date(c,u,E);if(E>S){const $=u===11?c+1:c,k=u===11?0:u+1;E=1,_=new Date($,k,E),V(),setTimeout(()=>{B(1,"forward")},0);return}j(_)?B(E,"forward"):P(E)}break;case"Tab":break;case"ArrowLeft":R.preventDefault();{let E=w-1,_=new Date(c,u,E);if(E<1){const $=u===0?c-1:c,k=u===0?11:u-1,C=M($,k);E=C,_=new Date($,k,E),N(),setTimeout(()=>{B(C,"backward")},0);return}j(_)?B(E,"backward"):P(E)}break;case"ArrowUp":R.preventDefault();{let E=w-7,_=new Date(c,u,E);if(E<1){const $=u===0?c-1:c,k=u===0?11:u-1;E=M($,k)+E,_=new Date($,k,E),N(),setTimeout(()=>{B(E,"backward")},0);return}j(_)?B(E,"backward"):P(E)}break;case"ArrowDown":R.preventDefault();{let E=w+7,_=new Date(c,u,E);if(E>S){const $=u===11?c+1:c,k=u===11?0:u+1;E=E-S,_=new Date($,k,E),V(),setTimeout(()=>{B(E,"forward")},0);return}j(_)?B(E,"forward"):P(E)}break;case"Home":R.preventDefault(),B(1,"forward");break;case"End":R.preventDefault(),B(S,"backward");break;case"PageUp":R.preventDefault(),N(),setTimeout(()=>{const E=M(u===0?c-1:c,u===0?11:u-1),_=Math.min(w,E);B(_,"forward")},0);break;case"PageDown":R.preventDefault(),V(),setTimeout(()=>{const E=M(u===11?c+1:c,u===11?0:u+1),_=Math.min(w,E);B(_,"forward")},0);break;case" ":case"Space":if(j(g))return;y(g.getDate()),d(g);break;case"Enter":R.preventDefault(),H(g);break}},B=(R,f)=>{const g=M(c,u);if(f==="forward"){for(let S=R;S<=g;S++){const w=new Date(c,u,S);if(!j(w)){P(S);return}}V(),setTimeout(()=>{B(1,"forward")},0)}else{for(let _=R;_>=1;_--){const $=new Date(c,u,_);if(!j($)){P(_);return}}const S=u===0?c-1:c,w=u===0?11:u-1,E=M(S,w);N(),setTimeout(()=>{B(E,"backward")},0)}},J=(()=>{const R=M(c,u),f=F(c,u),g=[];for(let S=0;S<f;S++)g.push(null);for(let S=1;S<=R;S++){const w=new Date(c,u,S);g.push(w)}return g})(),ee=[];let Y=[];J.forEach((R,f)=>{if(Y.push(R),Y.length===7||f===J.length-1){for(;Y.length<7;)Y.push(null);ee.push(Y),Y=[]}}),I.useEffect(()=>{var R;if(m!==null){const f=J.findIndex(g=>g!==null&&g.getDate()===m);f!==-1&&x.current[f]&&((R=x.current[f])==null||R.focus())}},[u,c,m,J]);const z={wrapper:`${he["smp-datepickercalendar"]}`,calendar:`${he["smp-datepickercalendar"]}`,table:`${he["smp-datepickercalendar-table"]}`,th:`${he["smp-datepickercalendar-th"]}`,td:(R,f,g,S)=>`${he["smp-datepickercalendar-td"]}
|
|
47
|
-
${
|
|
48
|
-
${
|
|
49
|
-
${
|
|
50
|
-
${
|
|
53
|
+
*/var yt,Kt;function en(){if(Kt)return yt;Kt=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function s(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var i={},l=0;l<10;l++)i["_"+String.fromCharCode(l)]=l;var o=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(o.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return yt=s()?Object.assign:function(a,i){for(var l,o=r(a),u,c=1;c<arguments.length;c++){l=Object(arguments[c]);for(var d in l)e.call(l,d)&&(o[d]=l[d]);if(n){u=n(l);for(var f=0;f<u.length;f++)t.call(l,u[f])&&(o[u[f]]=l[u[f]])}}return o},yt}var vt,Bt;function Pt(){if(Bt)return vt;Bt=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return vt=n,vt}var bt,zt;function wr(){return zt||(zt=1,bt=Function.call.bind(Object.prototype.hasOwnProperty)),bt}var xt,Gt;function tn(){if(Gt)return xt;Gt=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var e=Pt(),t={},r=wr();n=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,l,o,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var d;try{if(typeof a[c]!="function"){var f=Error((o||"React class")+": "+l+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[c](i,c,o,l,null,e)}catch(g){d=g}if(d&&!(d instanceof Error)&&n((o||"React class")+": type specification of "+l+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in t)){t[d.message]=!0;var h=u?u():"";n("Failed "+l+" type: "+d.message+(h??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},xt=s,xt}var St,Jt;function rn(){if(Jt)return St;Jt=1;var n=Er(),e=en(),t=Pt(),r=wr(),s=tn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var o="Warning: "+l;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}});function i(){return null}return St=function(l,o){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(m){var v=m&&(u&&m[u]||m[c]);if(typeof v=="function")return v}var f="<<anonymous>>",h={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:w(),arrayOf:D,element:j(),elementType:x(),instanceOf:W,node:U(),objectOf:H,oneOf:L,oneOfType:Y,shape:K,exact:J};function g(m,v){return m===v?m!==0||1/m===1/v:m!==m&&v!==v}function y(m,v){this.message=m,this.data=v&&typeof v=="object"?v:{},this.stack=""}y.prototype=Error.prototype;function b(m){if(process.env.NODE_ENV!=="production")var v={},R=0;function C(P,k,N,V,Q,B,le){if(V=V||f,B=B||N,le!==t){if(o){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var $=V+":"+N;!v[$]&&R<3&&(a("You are manually calling a React.PropTypes validation function for the `"+B+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),v[$]=!0,R++)}}return k[N]==null?P?k[N]===null?new y("The "+Q+" `"+B+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new y("The "+Q+" `"+B+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:m(k,N,V,Q,B)}var E=C.bind(null,!1);return E.isRequired=C.bind(null,!0),E}function S(m){function v(R,C,E,P,k,N){var V=R[C],Q=ie(V);if(Q!==m){var B=q(V);return new y("Invalid "+P+" `"+k+"` of type "+("`"+B+"` supplied to `"+E+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return b(v)}function w(){return b(i)}function D(m){function v(R,C,E,P,k){if(typeof m!="function")return new y("Property `"+k+"` of component `"+E+"` has invalid PropType notation inside arrayOf.");var N=R[C];if(!Array.isArray(N)){var V=ie(N);return new y("Invalid "+P+" `"+k+"` of type "+("`"+V+"` supplied to `"+E+"`, expected an array."))}for(var Q=0;Q<N.length;Q++){var B=m(N,Q,E,P,k+"["+Q+"]",t);if(B instanceof Error)return B}return null}return b(v)}function j(){function m(v,R,C,E,P){var k=v[R];if(!l(k)){var N=ie(k);return new y("Invalid "+E+" `"+P+"` of type "+("`"+N+"` supplied to `"+C+"`, expected a single ReactElement."))}return null}return b(m)}function x(){function m(v,R,C,E,P){var k=v[R];if(!n.isValidElementType(k)){var N=ie(k);return new y("Invalid "+E+" `"+P+"` of type "+("`"+N+"` supplied to `"+C+"`, expected a single ReactElement type."))}return null}return b(m)}function W(m){function v(R,C,E,P,k){if(!(R[C]instanceof m)){var N=m.name||f,V=T(R[C]);return new y("Invalid "+P+" `"+k+"` of type "+("`"+V+"` supplied to `"+E+"`, expected ")+("instance of `"+N+"`."))}return null}return b(v)}function L(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function v(R,C,E,P,k){for(var N=R[C],V=0;V<m.length;V++)if(g(N,m[V]))return null;var Q=JSON.stringify(m,function(le,_){var $=q(_);return $==="symbol"?String(_):_});return new y("Invalid "+P+" `"+k+"` of value `"+String(N)+"` "+("supplied to `"+E+"`, expected one of "+Q+"."))}return b(v)}function H(m){function v(R,C,E,P,k){if(typeof m!="function")return new y("Property `"+k+"` of component `"+E+"` has invalid PropType notation inside objectOf.");var N=R[C],V=ie(N);if(V!=="object")return new y("Invalid "+P+" `"+k+"` of type "+("`"+V+"` supplied to `"+E+"`, expected an object."));for(var Q in N)if(r(N,Q)){var B=m(N,Q,E,P,k+"."+Q,t);if(B instanceof Error)return B}return null}return b(v)}function Y(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var v=0;v<m.length;v++){var R=m[v];if(typeof R!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(R)+" at index "+v+"."),i}function C(E,P,k,N,V){for(var Q=[],B=0;B<m.length;B++){var le=m[B],_=le(E,P,k,N,V,t);if(_==null)return null;_.data&&r(_.data,"expectedType")&&Q.push(_.data.expectedType)}var $=Q.length>0?", expected one of type ["+Q.join(", ")+"]":"";return new y("Invalid "+N+" `"+V+"` supplied to "+("`"+k+"`"+$+"."))}return b(C)}function U(){function m(v,R,C,E,P){return te(v[R])?null:new y("Invalid "+E+" `"+P+"` supplied to "+("`"+C+"`, expected a ReactNode."))}return b(m)}function A(m,v,R,C,E){return new y((m||"React class")+": "+v+" type `"+R+"."+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+E+"`.")}function K(m){function v(R,C,E,P,k){var N=R[C],V=ie(N);if(V!=="object")return new y("Invalid "+P+" `"+k+"` of type `"+V+"` "+("supplied to `"+E+"`, expected `object`."));for(var Q in m){var B=m[Q];if(typeof B!="function")return A(E,P,k,Q,q(B));var le=B(N,Q,E,P,k+"."+Q,t);if(le)return le}return null}return b(v)}function J(m){function v(R,C,E,P,k){var N=R[C],V=ie(N);if(V!=="object")return new y("Invalid "+P+" `"+k+"` of type `"+V+"` "+("supplied to `"+E+"`, expected `object`."));var Q=e({},R[C],m);for(var B in Q){var le=m[B];if(r(m,B)&&typeof le!="function")return A(E,P,k,B,q(le));if(!le)return new y("Invalid "+P+" `"+k+"` key `"+B+"` supplied to `"+E+"`.\nBad object: "+JSON.stringify(R[C],null," ")+`
|
|
54
|
+
Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=le(N,B,E,P,k+"."+B,t);if(_)return _}return null}return b(v)}function te(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(te);if(m===null||l(m))return!0;var v=d(m);if(v){var R=v.call(m),C;if(v!==m.entries){for(;!(C=R.next()).done;)if(!te(C.value))return!1}else for(;!(C=R.next()).done;){var E=C.value;if(E&&!te(E[1]))return!1}}else return!1;return!0;default:return!1}}function ee(m,v){return m==="symbol"?!0:v?v["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&v instanceof Symbol:!1}function ie(m){var v=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":ee(v,m)?"symbol":v}function q(m){if(typeof m>"u"||m===null)return""+m;var v=ie(m);if(v==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return v}function Z(m){var v=q(m);switch(v){case"array":case"object":return"an "+v;case"boolean":case"date":case"regexp":return"a "+v;default:return v}}function T(m){return!m.constructor||!m.constructor.name?f:m.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},St}var Et,Xt;function nn(){if(Xt)return Et;Xt=1;var n=Pt();function e(){}function t(){}return t.resetWarningCache=e,Et=function(){function r(i,l,o,u,c,d){if(d!==n){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function s(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},Et}var Zt;function sn(){if(Zt)return et.exports;if(Zt=1,process.env.NODE_ENV!=="production"){var n=Er(),e=!0;et.exports=rn()(n.isElement,e)}else et.exports=nn()();return et.exports}var ce=sn(),an=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},on=function(e,t){for(var r in e)if(!(r in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},ln=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],rt="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xlink",it=function(n){function e(){for(var r,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return r=n.call.apply(n,[this].concat(a))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(l){r.reactWrapper=l},r}Ur(e,n);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof an(this.reactWrapper).Node){var a=this.props,i=a.desc,l=a.evalScripts,o=a.httpRequestWithCredentials,u=a.renumerateIRIElements,c=a.src,d=a.title,f=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,y=this.props.afterInjection,b=this.props.wrapper,S,w;b==="svg"?(S=document.createElementNS(rt,b),S.setAttribute("xmlns",rt),S.setAttribute("xmlns:xlink",Qt),w=document.createElementNS(rt,b)):(S=document.createElement(b),w=document.createElement(b)),S.appendChild(w),w.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(S);var D=function(L){if(s.removeSVG(),!s._isMounted){h(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(L)})},j=function(L,H){if(L){D(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(H)}catch(Y){D(Y)}})},x=function(L){if(L.setAttribute("role","img"),i){var H=L.querySelector(":scope > desc");H&&L.removeChild(H);var Y=document.createElement("desc");Y.innerHTML=i,L.prepend(Y)}if(d){var U=L.querySelector(":scope > title");U&&L.removeChild(U);var A=document.createElement("title");A.innerHTML=d,L.prepend(A)}try{g(L)}catch(K){D(K)}};Xr(w,{afterEach:j,beforeEach:x,cacheRequests:f,evalScripts:l,httpRequestWithCredentials:o,renumerateIRIElements:u})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;on(at({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var l=s.wrapper,o=Yr(s,ln),u=l;return Xe.createElement(u,at({},o,{ref:this.refCallback},l==="svg"?{xmlns:rt,xmlnsXlink:Qt}:{}),this.state.isLoading&&i&&Xe.createElement(i,null),this.state.hasError&&a&&Xe.createElement(a,null))},e}(Xe.Component);it.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};it.propTypes={afterInjection:ce.func,beforeInjection:ce.func,desc:ce.string,evalScripts:ce.oneOf(["always","once","never"]),fallback:ce.oneOfType([ce.func,ce.object,ce.string]),httpRequestWithCredentials:ce.bool,loading:ce.oneOfType([ce.func,ce.object,ce.string]),onError:ce.func,renumerateIRIElements:ce.bool,src:ce.string.isRequired,title:ce.string,useRequestCache:ce.bool,wrapper:ce.oneOf(["div","span","svg"])};const Ye={"smp-icon":"_smp-icon_ttsft_1","smp-icon-rotated":"_smp-icon-rotated_ttsft_15","smp-icon-base":"_smp-icon-base_ttsft_19","smp-icon-interactable":"_smp-icon-interactable_ttsft_22","smp-icon-danger":"_smp-icon-danger_ttsft_33","smp-icon-warning":"_smp-icon-warning_ttsft_37","smp-icon-onDanger":"_smp-icon-onDanger_ttsft_45","smp-icon-onPrimary":"_smp-icon-onPrimary_ttsft_49","smp-icon-spin":"_smp-icon-spin_ttsft_53"};let Rt={assets:"/"};const un=n=>{Rt={...Rt,...n}},er=n=>`${Rt.assets}/${n}`.replace(/\/+/g,"/"),Re=F.memo(({icon:n,width:e,height:t,placeholderIcon:r,color:s,disabled:a,state:i="base",rotated:l=!1,onClick:o,isInteractable:u=!1,spin:c=!1})=>{const[d,f]=F.useState(n),h=n.indexOf(".")>-1||n.indexOf("/")>-1||n.indexOf("\\")>-1,g=er(`assets/svg/${n}.svg`),y=er(`assets/svg/${r}.svg`),b={svg:`${Ye["smp-icon"]} ${i?Ye[`smp-icon-${i}`]:""} ${l?Ye["smp-icon-rotated"]:""} ${u?Ye["smp-icon-interactable"]:""} ${c?Ye["smp-icon-spin"]:""}`},S=()=>{!a&&o&&o()};return O.jsx(O.Fragment,{children:h?O.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:n||"image",onError:()=>f(y)}):O.jsx(it,{src:g,fallback:()=>O.jsx(it,{src:y,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:n,role:"application",fill:s,"aria-disabled":a,className:b.svg,onClick:S})})}),Ue={"smp-dash-list":"_smp-dash-list_ajkcc_1","smp-dash-list-fill-space":"_smp-dash-list-fill-space_ajkcc_25","smp-dash-list-horizontal":"_smp-dash-list-horizontal_ajkcc_30","smp-layout-1":"_smp-layout-1_ajkcc_34","smp-layout-2":"_smp-layout-2_ajkcc_38","smp-layout-1__descr":"_smp-layout-1__descr_ajkcc_67","smp-layout-2__descr":"_smp-layout-2__descr_ajkcc_68","smp-layout-1__value":"_smp-layout-1__value_ajkcc_76","smp-layout-2__value":"_smp-layout-2__value_ajkcc_77","smp-layout-2__icon":"_smp-layout-2__icon_ajkcc_84"},z=n=>typeof n=="string",We=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},tr=n=>n==null?"":""+n,cn=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},fn=/###/g,rr=n=>n&&n.indexOf("###")>-1?n.replace(fn,"."):n,nr=n=>!n||z(n),Ke=(n,e,t)=>{const r=z(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(nr(n))return{};const a=rr(r[s]);!n[a]&&t&&(n[a]=new t),Object.prototype.hasOwnProperty.call(n,a)?n=n[a]:n={},++s}return nr(n)?{}:{obj:n,k:rr(r[s])}},sr=(n,e,t)=>{const{obj:r,k:s}=Ke(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),l=Ke(n,i,Object);for(;l.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),l=Ke(n,i,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${a}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=t},dn=(n,e,t,r)=>{const{obj:s,k:a}=Ke(n,e,Object);s[a]=s[a]||[],s[a].push(t)},ot=(n,e)=>{const{obj:t,k:r}=Ke(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},pn=(n,e,t)=>{const r=ot(n,t);return r!==void 0?r:ot(e,t)},Or=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?z(n[r])||n[r]instanceof String||z(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Or(n[r],e[r],t):n[r]=e[r]);return n},ke=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const gn=n=>z(n)?n.replace(/[&<>"'\/]/g,e=>hn[e]):n;class mn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const yn=[" ",",","?","!",";"],vn=new mn(20),bn=(n,e,t)=>{e=e||"",t=t||"";const r=yn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(r.length===0)return!0;const s=vn.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(n);if(!a){const i=n.indexOf(t);i>0&&!s.test(n.substring(0,i))&&(a=!0)}return a},At=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let i,l="";for(let o=a;o<r.length;++o)if(o!==a&&(l+=t),l+=r[o],i=s[l],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&o<r.length-1)continue;a+=o-a+1;break}s=i}return s},lt=n=>n==null?void 0:n.replace("_","-"),xn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class ut{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||xn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(z(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ut(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ut(this.logger,e)}}var Se=new ut;class ht{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(i=>{let[l,o]=i;for(let u=0;u<o;u++)l(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[l,o]=i;for(let u=0;u<o;u++)l.apply(l,[e,...r])})}}class ar extends ht{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){var u,c;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,t],r&&(Array.isArray(r)?l.push(...r):z(r)&&a?l.push(...r.split(a)):l.push(r)));const o=ot(this.data,l);return!o&&!t&&!r&&e.indexOf(".")>-1&&(e=l[0],t=l[1],r=l.slice(2).join(".")),o||!i||!z(r)?o:At((c=(u=this.data)==null?void 0:u[e])==null?void 0:c[t],r,a)}addResource(e,t,r,s){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,t];r&&(l=l.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(l=e.split("."),s=t,t=l[1]),this.addNamespaces(t),sr(this.data,l,s),a.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(z(r[a])||Array.isArray(r[a]))&&this.addResource(e,t,a,r[a],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,t];e.indexOf(".")>-1&&(l=e.split("."),s=r,r=t,t=l[1]),this.addNamespaces(t);let o=ot(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Or(o,r,a):o={...o,...r},sr(this.data,l,o),i.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Tr={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,r,s))??e}),e}};const ir={},or=n=>!z(n)&&typeof n!="boolean"&&typeof n!="number";class ct extends ht{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Se.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bn(e,r,s);if(i&&!l){const o=e.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:e,namespaces:z(a)?[a]:a};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(s)}return{key:e,namespaces:z(a)?[a]:a}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,a=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(e[e.length-1],t),o=l[l.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode"){if(c){const A=t.nsSeparator||this.options.nsSeparator;return s?{res:`${o}${A}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:o,usedParams:this.getUsedParamsDetails(t)}:`${o}${A}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:o,usedParams:this.getUsedParamsDetails(t)}:i}const d=this.resolve(e,t);let f=d==null?void 0:d.res;const h=(d==null?void 0:d.usedKey)||i,g=(d==null?void 0:d.exactUsedKey)||i,y=["[object Number]","[object Function]","[object RegExp]"],b=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w=t.count!==void 0&&!z(t.count),D=ct.hasDefaultValue(t),j=w?this.pluralResolver.getSuffix(u,t.count,t):"",x=t.ordinal&&w?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",W=w&&!t.ordinal&&t.count===0,L=W&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${j}`]||t[`defaultValue${x}`]||t.defaultValue;let H=f;S&&!f&&D&&(H=L);const Y=or(H),U=Object.prototype.toString.apply(H);if(S&&H&&Y&&y.indexOf(U)<0&&!(z(b)&&Array.isArray(H))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const A=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,H,{...t,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(d.res=A,d.usedParams=this.getUsedParamsDetails(t),d):A}if(a){const A=Array.isArray(H),K=A?[]:{},J=A?g:h;for(const te in H)if(Object.prototype.hasOwnProperty.call(H,te)){const ee=`${J}${a}${te}`;D&&!f?K[te]=this.translate(ee,{...t,defaultValue:or(L)?L[te]:void 0,joinArrays:!1,ns:l}):K[te]=this.translate(ee,{...t,joinArrays:!1,ns:l}),K[te]===ee&&(K[te]=H[te])}f=K}}else if(S&&z(b)&&Array.isArray(f))f=f.join(b),f&&(f=this.extendTranslation(f,e,t,r));else{let A=!1,K=!1;!this.isValidLookup(f)&&D&&(A=!0,f=L),this.isValidLookup(f)||(K=!0,f=i);const te=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&K?void 0:f,ee=D&&L!==f&&this.options.updateMissing;if(K||A||ee){if(this.logger.log(ee?"updateKey":"missingKey",u,o,i,ee?L:f),a){const T=this.resolve(i,{...t,keySeparator:!1});T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ie=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let T=0;T<q.length;T++)ie.push(q[T]);else this.options.saveMissingTo==="all"?ie=this.languageUtils.toResolveHierarchy(t.lng||this.language):ie.push(t.lng||this.language);const Z=(T,m,v)=>{var C;const R=D&&v!==f?v:te;this.options.missingKeyHandler?this.options.missingKeyHandler(T,o,m,R,ee,t):(C=this.backendConnector)!=null&&C.saveMissing&&this.backendConnector.saveMissing(T,o,m,R,ee,t),this.emit("missingKey",T,o,m,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?ie.forEach(T=>{const m=this.pluralResolver.getSuffixes(T,t);W&&t[`defaultValue${this.options.pluralSeparator}zero`]&&m.indexOf(`${this.options.pluralSeparator}zero`)<0&&m.push(`${this.options.pluralSeparator}zero`),m.forEach(v=>{Z([T],i+v,t[`defaultValue${v}`]||L)})}):Z(ie,i,L))}f=this.extendTranslation(f,e,t,d,r),K&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${o}:${i}`),(K||A)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${o}:${i}`:i,A?f:void 0))}return s?(d.res=f,d.usedParams=this.getUsedParamsDetails(t),d):f}extendTranslation(e,t,r,s,a){var u,c;var i=this;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const d=z(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const g=e.match(this.interpolator.nestingRegexp);f=g&&g.length}let h=r.replace&&!z(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language||s.usedLng,r),d){const g=e.match(this.interpolator.nestingRegexp),y=g&&g.length;f<y&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var g=arguments.length,y=new Array(g),b=0;b<g;b++)y[b]=arguments[b];return(a==null?void 0:a[0])===y[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${t[0]}`),null):i.translate(...y,t)},r)),r.interpolation&&this.interpolator.reset()}const l=r.postProcess||this.options.postProcess,o=z(l)?[l]:l;return e!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(e=Tr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,a,i,l;return z(e)&&(e=[e]),e.forEach(o=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(o,t),c=u.key;s=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=t.count!==void 0&&!z(t.count),h=f&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(z(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(b=>{var S,w;this.isValidLookup(r)||(l=b,!ir[`${y[0]}-${b}`]&&((S=this.utils)!=null&&S.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(l))&&(ir[`${y[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach(D=>{var W;if(this.isValidLookup(r))return;i=D;const j=[c];if((W=this.i18nFormat)!=null&&W.addLookupKeys)this.i18nFormat.addLookupKeys(j,c,D,b,t);else{let L;f&&(L=this.pluralResolver.getSuffix(D,t.count,t));const H=`${this.options.pluralSeparator}zero`,Y=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(j.push(c+L),t.ordinal&&L.indexOf(Y)===0&&j.push(c+L.replace(Y,this.options.pluralSeparator)),h&&j.push(c+H)),g){const U=`${c}${this.options.contextSeparator}${t.context}`;j.push(U),f&&(j.push(U+L),t.ordinal&&L.indexOf(Y)===0&&j.push(U+L.replace(Y,this.options.pluralSeparator)),h&&j.push(U+H))}}let x;for(;x=j.pop();)this.isValidLookup(r)||(a=x,r=this.getResource(D,b,x,t))}))})}),{res:r,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var a;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!z(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class lr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Se.create("languageUtils")}getScriptPartFromCode(e){if(e=lt(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=lt(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(z(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],a=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return z(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):z(e)&&a(this.formatLanguageCode(e)),r.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const ur={zero:0,one:1,two:2,few:3,many:4,other:5},cr={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Se.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=lt(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),cr;if(!e.match(/-|_/))return cr;const o=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(o,t)}return this.pluralRulesCache[a]=i,i}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>ur[s]-ur[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const fr=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=pn(n,e,t);return!a&&s&&z(t)&&(a=At(n,t,r),a===void 0&&(a=At(e,t,r))),a},wt=n=>n.replace(/\$/g,"$$$$");class En{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Se.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:i,suffix:l,suffixEscaped:o,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:b,maxReplaces:S,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?ke(a):i||"{{",this.suffix=l?ke(l):o||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?ke(f):h||ke("$t("),this.nestingSuffix=g?ke(g):y||ke(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=S||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,s){var h;let a,i,l;const o=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const w=fr(t,o,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...s,...t,interpolationkey:g}):w}const y=g.split(this.formatSeparator),b=y.shift().trim(),S=y.join(this.formatSeparator).trim();return this.format(fr(t,o,b,this.options.keySeparator,this.options.ignoreJSONStructure),S,r,{...s,...t,interpolationkey:b})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>wt(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?wt(this.escape(g)):wt(g)}].forEach(g=>{for(l=0;a=g.regex.exec(e);){const y=a[1].trim();if(i=u(y),i===void 0)if(typeof c=="function"){const S=c(e,a,s);i=z(S)?S:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))i="";else if(d){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),i="";else!z(i)&&!this.useRawValueToEscape&&(i=tr(i));const b=g.safeValue(i);if(e=e.replace(a[0],b),d?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,i;const l=(o,u)=>{const c=this.nestingOptionsSeparator;if(o.indexOf(c)<0)return o;const d=o.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;o=d[0],f=this.interpolate(f,i);const h=f.match(/'/g),g=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(f=f.replace(/'/g,'"'));try{i=JSON.parse(f),u&&(i={...u,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${o}`,y),`${o}${c}${f}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,o};for(;s=this.nestingRegexp.exec(e);){let o=[];i={...r},i=i.replace&&!z(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const c=s[1].split(this.formatSeparator).map(d=>d.trim());s[1]=c.shift(),o=c,u=!0}if(a=t(l.call(this,s[1].trim(),i),i),a&&s[0]===e&&!z(a))return a;z(a)||(a=tr(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),u&&(a=o.reduce((c,d)=>this.format(c,d,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const wn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...o]=i.split(":"),u=o.join(":").trim().replace(/^'+|'+$/g,""),c=l.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},Le=n=>{const e={};return(t,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const i=r+JSON.stringify(a);let l=e[i];return l||(l=n(lt(r),s),e[i]=l),l(t)}};class On{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Se.create("formatter"),this.options=e,this.formats={number:Le((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return a=>s.format(a)}),currency:Le((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return a=>s.format(a)}),datetime:Le((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return a=>s.format(a)}),relativetime:Le((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return a=>s.format(a,r.range||"day")}),list:Le((t,r)=>{const s=new Intl.ListFormat(t,{...r});return a=>s.format(a)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Le(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(o=>o.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,o)=>{var d;const{formatName:u,formatOptions:c}=wn(o);if(this.formats[u]){let f=l;try{const h=((d=s==null?void 0:s.formatParams)==null?void 0:d[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||r;f=this.formats[u](l,g,{...c,...s,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${u}`);return l},e)}}const Tn=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class _n extends ht{constructor(e,t,r){var a,i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Se.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,s.backend,s)}queueLoad(e,t,r,s){const a={},i={},l={},o={};return e.forEach(u=>{let c=!0;t.forEach(d=>{const f=`${u}|${d}`;!r.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?i[f]===void 0&&(i[f]=!0):(this.state[f]=1,c=!1,i[f]===void 0&&(i[f]=!0),a[f]===void 0&&(a[f]=!0),o[d]===void 0&&(o[d]=!0)))}),c||(l[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(o)}}loaded(e,t,r){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const l={};this.queue.forEach(o=>{dn(o.loaded,[a],i),Tn(o,e),t&&o.errors.push(t),o.pendingCount===0&&!o.done&&(Object.keys(o.loaded).forEach(u=>{l[u]||(l[u]={});const c=o.loaded[u];c.length&&c.forEach(d=>{l[u][d]===void 0&&(l[u][d]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(o=>!o.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:a,callback:i});return}this.readingCalls++;const l=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,a*2,i)},a);return}i(u,c)},o=this.backend[r].bind(this.backend);if(o.length===2){try{const u=o(e,t);u&&typeof u.then=="function"?u.then(c=>l(null,c)).catch(l):l(null,u)}catch(u){l(u)}return}return o(e,t,l)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),z(t)&&(t=[t]);const a=this.queueLoad(e,t,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],a=r[1];this.read(s,a,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&l&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,l),this.loaded(e,i,l)})}saveMissing(e,t,r,s,a){var o,u,c,d,f;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((u=(o=this.services)==null?void 0:o.utils)!=null&&u.hasLoadedNamespace&&!((d=(c=this.services)==null?void 0:c.utils)!=null&&d.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,t,r,s,h):y=g(e,t,r,s),y&&typeof y.then=="function"?y.then(b=>l(null,b)).catch(l):l(null,y)}catch(y){l(y)}else g(e,t,r,s,l,h)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const dr=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),z(n[1])&&(e.defaultValue=n[1]),z(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),pr=n=>{var e,t;return z(n.ns)&&(n.ns=[n.ns]),z(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),z(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},nt=()=>{},Rn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ze extends ht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=pr(e),this.services={},this.logger=Se,this.modules={external:[]},Rn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(z(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=dr();this.options={...s,...this.options,...pr(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const a=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Se.init(a(this.modules.logger),this.options):Se.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=On;const d=new lr(this.options);this.store=new ar(this.options.resources,this.options);const f=this.services;f.logger=Se,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Sn(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=a(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new En(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new _n(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var g=arguments.length,y=new Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];e.emit(h,...y)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new ct(this.services,this.options),this.translator.on("*",function(h){for(var g=arguments.length,y=new Array(g>1?g-1:0),b=1;b<g;b++)y[b-1]=arguments[b];e.emit(h,...y)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=nt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const o=We(),u=()=>{const c=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(f),r(d,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt;const s=z(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const l=[],o=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(d=>{d!=="cimode"&&l.indexOf(d)<0&&l.push(d)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>o(c)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,u=>o(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(e,t,r){const s=We();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=nt),this.services.backendConnector.reload(e,t,a=>{s.resolve(),r(a)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Tr.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=We();this.emit("languageChanging",e);const a=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},i=(o,u)=>{u?this.isLanguageChangingTo===e&&(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(o,function(){return r.t(...arguments)})},l=o=>{var c,d;!e&&!o&&this.services.languageDetector&&(o=[]);const u=this.services.languageUtils.getBestMatchFromCodes(z(o)?[o]:o);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),(d=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||d.call(c,u)),this.loadResources(u,f=>{i(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),s}getFixedT(e,t,r){var s=this;const a=function(i,l){let o;if(typeof l!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];o=s.options.overloadTranslationOptionHandler([i,l].concat(c))}else o={...l};o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs,o.ns=o.ns||a.ns,o.keyPrefix!==""&&(o.keyPrefix=o.keyPrefix||r||a.keyPrefix);const f=s.options.keySeparator||".";let h;return o.keyPrefix&&Array.isArray(i)?h=i.map(g=>`${o.keyPrefix}${f}${g}`):h=o.keyPrefix?`${o.keyPrefix}${f}${i}`:i,s.t(h,o)};return z(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=r,a}t(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...t)}exists(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,o)=>{const u=this.services.backendConnector.state[`${l}|${o}`];return u===-1||u===0||u===2};if(t.precheck){const l=t.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const r=We();return this.options.ns?(z(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=We();z(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{r.resolve(),t&&t(i)}),r):(t&&t(),Promise.resolve())}dir(e){var s,a;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new lr(dr());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ze(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nt;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new ze(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const l=Object.keys(this.store.data).reduce((o,u)=>(o[u]={...this.store.data[u]},Object.keys(o[u]).reduce((c,d)=>(c[d]={...o[u][d]},c),{})),{});a.store=new ar(l,s),a.services.resourceStore=a.store}return a.translator=new ct(a.services,s),a.translator.on("*",function(l){for(var o=arguments.length,u=new Array(o>1?o-1:0),c=1;c<o;c++)u[c-1]=arguments[c];a.emit(l,...u)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const fe=ze.createInstance();fe.createInstance=ze.createInstance;fe.createInstance;fe.dir;fe.init;fe.loadResources;fe.reloadResources;fe.use;fe.changeLanguage;fe.getFixedT;fe.t;fe.exists;fe.setDefaultNamespace;fe.hasLoadedNamespace;fe.loadNamespaces;fe.loadLanguages;const An={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Cn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Pn={CalendarFor:"Calendario per",Close:"Chiudi"},jn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:An,Month:Cn,Generic:Pn},Dn={Friday:"Friday",FridayShort:"Fri",Monday:"Monday",MondayShort:"Mon",Saturday:"Saturday",SaturdayShort:"Sat",Sunday:"Sunday",SundayShort:"Sun",Tuesday:"Tuesday",TuesdayShort:"Tue",Thursday:"Thursday",ThursdayShort:"Thu",Wednesday:"Wednesday",WednesdayShort:"Wed"},$n={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},kn={CalendarFor:"Calendar for",Close:"Close"},Ln={Date:{NextDay:"Next Day",NextMonth:"Next Month",NextWeek:"Next Week",NextYear:"Next Year",PreviousDay:"Previous Day",PreviousMonth:"Previous Month",PreviousWeek:"Previous Week",PreviousYear:"Previous Year",Today:"Today",Tomorrow:"Tomorrow",Yesterday:"Yesterday"},Day:Dn,Month:$n,Generic:kn};function hr(n,e){return new RegExp(Nn(n),e)}function Nn(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function In(n,e,t,r){let s=e;const a=Mn(n,t);if(!s){const l=Math.abs(a);l-Math.floor(l)?s="0,0.00":s="0,0"}const i=Fn(s);return new Intl.NumberFormat(r,i).format(a)}function Mn(n,e,t,r,s){let a=n;if(typeof a!="number"){let l;e&&r===void 0?l=",":l=".";const o=l=="."?",":".";a=a.replace(hr(o,"g"),""),a=a.replace(hr(l,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function Fn(n){const e={};n.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=n.indexOf(".");if(t>-1){const s=(n.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}fe.init({lng:navigator.language.split("-")[0],fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,e,t,r)=>{if(!isNaN(Number(n))){const s=(r==null?void 0:r.inputIsLocalized)??!1;return In(n,e,s,t)}return n}},resources:{en:{translation:Ln},it:{translation:jn}}});const Vn=(n,e,t,r)=>fe.format(n,e,t||fe.language,r),Yn=(n,e)=>fe.t(n,e);function _r(){const n=F.useCallback((t,r,s,a)=>Vn(t,r,s||void 0,a),[]),e=F.useCallback((t,r)=>Yn(t,r),[]);return{format:n,translate:e}}const Be=n=>n==null?!1:typeof n=="string"?n.toLocaleLowerCase()=="yes":n,Un=({ColumnsNumber:n=1,data:e={},ForceText:t,TextColName:r,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:l,ForceIcon:o,IconColName:u,IconColor:c="var(--smp-dashList-color-base)",NumberFormat:d,ForceUM:f,UmColName:h,UmColor:g="var(--smp-dashList-color-base)",ForceValue:y,ValueColName:b,ValueColor:S="var(--smp-dashList-color-base)",SelectLayout:w="1",onClick:D})=>{const j="N/A",x=(e==null?void 0:e.columns)||[],W=(e==null?void 0:e.rows)||[],L=W.length>0,H="--smp-dashList-color",Y="smp-layout",U="descr",A="icon",K="um",J="value",te=i||"1em",ee="18px",ie="--smp-dashList-columns",q="--smp-dashList-fontSize",Z={dash:($="1")=>{const G=m($),ne=Ue[G],oe=v(G,U),pe=v(G,A),ve=v(G,K),me=v(G,J);return{container:ne,descr:oe,icon:pe,um:ve,value:me}},dashList:`${Ue["smp-dash-list"]} ${Be(a)?Ue["smp-dash-list-fill-space"]:""}
|
|
55
|
+
${Be(l)?Ue["smp-dash-list-horizontal"]:""}`},{format:T}=_r(),m=$=>`${Y}-${$}`,v=($,G)=>Ue[`${$}__${G}`],R=$=>`${H}-${$}`,C=$=>{const G=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(G.test($)){const oe=$.match(G)||[];if((oe==null?void 0:oe.length)>3)return"rgb("+oe[1]+","+oe[2]+","+oe[3]+")"}return $},E=$=>{if(!d)return $;const[G,ne]=P(d).map(Ee=>parseInt(Ee||"0")),oe="0,0"+(ne?"."+"0".repeat(ne):""),pe=T($,oe,"it");if(!G)return pe;const[ve,me]=pe.split(",");return ve+(me?`,${me}`:"")},P=$=>$.includes(";")?$.split(";"):[$],k=$=>{const G=oe=>{var pe;if(oe)return(pe=$==null?void 0:$.cells[oe])==null?void 0:pe.obj.k},ne=oe=>{var pe,ve;if(!(x.length<=oe))return(ve=(pe=$==null?void 0:$.cells[x[oe].name])==null?void 0:pe.obj)==null?void 0:ve.k};return{descr:t||G(r)||ne(2)||"",icon:o||G(u)||ne(3)||"",um:f||G(h)||ne(1)||"",value:y||G(b)||ne(0)||""}},N=$=>{D==null||D($)},V=($,G)=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),$.stopPropagation(),N(G))},B=($=>{const G=Z.dash($);return{className:G,descr:ne=>O.jsx("div",{className:G.descr,children:ne},`${$}-${U}`),icon:ne=>O.jsx("div",{className:G.icon,children:O.jsx(Re,{color:c,height:ee,icon:ne,width:ee})},`${$}-${A}`),um:ne=>O.jsx("div",{className:G.um,children:ne},`${$}-${K}`),value:ne=>O.jsx("div",{className:G.value,children:ne},`${$}-${J}`)}})(w),le=$=>{const{descr:G,icon:ne,um:oe,value:pe}=k($),ve={[R(U)]:C(s),[R(K)]:C(g),[R(J)]:C(S)},me=[],Ee=E(pe);switch(w){case"2":ne&&me.push(B.icon(ne)),me.push(B.descr(G)),me.push(B.value(oe?Ee+" "+oe:Ee));break;default:case"1":me.push(B.descr(G)),me.push(B.value(oe?Ee+" "+oe:Ee))}return O.jsx("div",{className:B.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>N($),onKeyDown:p=>V(p,$),children:me},$.id)},_={[ie]:String(n),[q]:te};return O.jsx("div",{className:Z.dashList,style:_,children:L?W.map($=>le($)):j})},xe={AUTOCOMPLETE:"ACP",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",MULTI_AUTOCOMPLETE:"AML",TEXT_FIELD:"ITX",PASSWORD:"PWD"},Wn=n=>n.t=="D8",Hn=n=>{if(n){const e=n.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class ft{constructor(e,t){je(this,"class");je(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new ft(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}class dt{constructor(e,t){je(this,"class");je(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=gr.get(`${e.t}${e.p}`);if(t)return new dt(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=gr.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const gr=new Map([["D8*YYMD",{legacyToIso(n){return`${n.substring(0,4)}-${n.substring(4,6)}-${n.substring(6,8)}`},isoToLegacy(n){return`${n.substring(0,4)}${n.substring(5,7)}${n.substring(8,10)}`}}]]),jt=(n,e)=>{F.useEffect(()=>{const t=r=>{typeof n=="object"&&n!==null&&"current"in n&&n.current&&!n.current.contains(r.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[n,e])};function Dt({position:n="bottom",enabled:e=!0}){const t=F.useRef(null),r=F.useRef(null),[s,a]=F.useState(0),i=F.useCallback(()=>{const l=t.current,o=r.current;if(!l||!o)return;const{top:u,left:c,width:d,height:f}=l.getBoundingClientRect();a(d);const h=o.offsetHeight,g=o.offsetWidth;if(g===0||h===0){requestAnimationFrame(i);return}let y=u+window.scrollY,b=c+window.scrollX;switch(n){case"top":y-=h;break;case"bottom":y+=f;break;case"left":b-=g;break;case"right":b+=d;break}requestAnimationFrame(()=>{o.style.transform=`translate(${b}px, ${y}px)`})},[n]);return F.useLayoutEffect(()=>{e&&t.current&&r.current&&i();const l=new MutationObserver(()=>{r.current&&i()});return r.current&&l.observe(r.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),l.disconnect()}},[i,e]),{anchorRef:t,targetRef:r,anchorWidth:s}}const pt=(n,e,t)=>{if(t)switch(t){case"CodeOnly":return n;case"DescOnly":return e||"";case"Both":return`${n} - ${e}`}return n},He={"smp-list":"_smp-list_1ux5k_1","smp-list-container":"_smp-list-container_1ux5k_18","smp-list-listItem":"_smp-list-listItem_1ux5k_23"},Ot={"smp-helper-text":"_smp-helper-text_10pis_1","smp-helper-text-danger":"_smp-helper-text-danger_10pis_9","smp-helper-text-warning":"_smp-helper-text-warning_10pis_13","smp-helper-text-disabled":"_smp-helper-text-disabled_10pis_17"},qn=({helperText:n,disabled:e,state:t})=>{const r={container:`${Ot["smp-helper-text"]} ${e?Ot["smp-helper-text-disabled"]:""} ${t?Ot[`smp-helper-text-${t}`]:""}`};return O.jsx("span",{className:r.container,children:n})},mr={"smp-label":"_smp-label_3ywt3_1","smp-label-disabled":"_smp-label-disabled_3ywt3_5"},Kn=({label:n,disabled:e})=>{const t={container:`${mr["smp-label"]} ${e?mr["smp-label-disabled"]:""}`};return O.jsx("span",{className:t.container,children:n})},Te={"smp-textfield-wrapper":"_smp-textfield-wrapper_1tjct_4","smp-textfield":"_smp-textfield_1tjct_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_1tjct_63","smp-textfield-small":"_smp-textfield-small_1tjct_68","smp-textfield-medium":"_smp-textfield-medium_1tjct_73","smp-textfield-large":"_smp-textfield-large_1tjct_78","smp-textfield-extraLarge":"_smp-textfield-extraLarge_1tjct_83","smp-textfield-input":"_smp-textfield-input_1tjct_89","smp-textfield-danger":"_smp-textfield-danger_1tjct_106","smp-textfield-readOnly":"_smp-textfield-readOnly_1tjct_110","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_1tjct_115","smp-textfield-disabled":"_smp-textfield-disabled_1tjct_125"},Ie=({disabled:n,readOnly:e,bindValue:t,icon:r,onBlur:s,onChange:a,placeholder:i,shapeIcon:l,sizing:o,state:u,variant:c,rotatedShapeIcon:d=!1,onShapeIconClick:f,ref:h,inputRef:g,onKeyDown:y,inputType:b="text",ariaLabel:S="input field",label:w,helperText:D=!1,error:j})=>{const x=j?"danger":u,W=j||u=="danger"?"error":l,L=D||!!j,H=U=>{a==null||a(U.target.value)},Y={wrapper:`${Te["smp-textfield-wrapper"]}`,container:`${Te["smp-textfield"]} ${n?Te["smp-textfield-disabled"]:""} ${e?Te["smp-textfield-readOnly"]:""} ${i?Te["smp-textfield-placeholder"]:""} ${o?Te[`smp-textfield-${o}`]:""} ${x?Te[`smp-textfield-${x}`]:""} ${c?Te[`smp-textfield-variant-${c}`]:""}`,input:`${Te["smp-textfield-input"]}`};return O.jsxs("div",{className:Y.wrapper,children:[w&&O.jsx(Kn,{label:w,disabled:n}),O.jsxs("div",{className:Y.container,ref:h,children:[r&&O.jsx(Re,{icon:r,disabled:n}),O.jsx("input",{type:b,value:t,placeholder:i,onChange:H,onBlur:s,className:Y.input,disabled:n,readOnly:e,onKeyDown:y,"aria-label":S,ref:g}),W&&O.jsx(Re,{icon:W,disabled:n,state:x,onClick:f,rotated:d})]}),L&&O.jsx(qn,{helperText:j,disabled:n,state:x})]})};function Bn({items:n,itemHeight:e,containerHeight:t,overscan:r=5}){const[s,a]=F.useState(0),i=F.useRef(null),l=n.length*e,o=Math.max(0,Math.floor(s/e)-r),u=Math.min(n.length-1,Math.floor((s+t)/e)+r),c=[];for(let h=o;h<=u;h++)c.push({item:n[h],index:h,offsetTop:h*e});const d=F.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),f=h=>{if(!i.current)return;const g=h*e,y=g+e,b=i.current,S=b.scrollTop,w=S+t;g<S?b.scrollTop=g:y>w&&(b.scrollTop=y-t)};return{virtualItems:c,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:d},innerProps:{style:{height:`${l}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:l,startIndex:o,endIndex:u},scrollToIndex:f}}const zn=10,Rr=({id:n,options:e,displayMode:t,ref:r,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:l,onClick:o,onKeyDown:u})=>{var U;const[c,d]=F.useState(""),f=24,[h,g]=F.useState(a!==null?a:-1),y=s!==void 0?s:e.length>zn,b=c?e.filter(A=>A.label.toLowerCase().includes(c.toLowerCase())):e,S=A=>{d(A)},{virtualItems:w,containerProps:D,innerProps:j,scrollToIndex:x}=Bn({items:b,itemHeight:f,containerHeight:200,overscan:5});F.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),F.useEffect(()=>{h>=0&&h<b.length&&x(h)},[h,b]);const W=A=>{if(A.key==="ArrowDown"||A.key==="ArrowUp"){A.preventDefault();let K=h;A.key==="ArrowDown"?K=h<b.length-1?h+1:0:A.key==="ArrowUp"&&(K=h>0?h-1:b.length-1),g(K)}else A.key==="Enter"?h>=0&&h<b.length&&(o==null||o(b[h])):A.key==="Escape"&&(A.preventDefault(),A.stopPropagation());u&&u(A)},L=A=>{W(A)},H=A=>{W(A)},Y={wrapper:`${He["smp-list"]}`,container:`${He["smp-list-container"]}`,virtualScroll:`${He["smp-list-virtualScroll"]}`,listItem:`${He["smp-list-listItem"]}`};return O.jsxs("div",{id:n,ref:r,className:Y.wrapper,style:{width:l},children:[y&&O.jsx(Ie,{bindValue:c,placeholder:"Search...",onChange:S,onKeyDown:L}),O.jsx("div",{...D,className:Y.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:H,"aria-activedescendant":h>=0&&h<b.length?(U=b[h])==null?void 0:U.id:void 0,children:O.jsx("div",{...j,className:Y.virtualScroll,children:w.map(({item:A,index:K,offsetTop:J})=>{const te=i.includes(A.id);return O.jsxs("li",{role:"option",id:A.id,"aria-selected":h===K?"true":"false",tabIndex:-1,className:`${Y.listItem} ${h===K?He["selected-item"]:""}`,"aria-label":A.id+"-"+A.label,style:{height:`${f}px`,lineHeight:`calc(${f}px - 2*2px)`,transform:`translateY(${J}px)`},onClick:()=>{o==null||o(A),g(K)},children:[pt(A.id,A.label,t),te&&O.jsx(Re,{icon:"check",width:16})]},A.id)})})})]})},Ar=({displayMode:n,bindValue:e,optionalDisplayValue:t,...r})=>{const[s,a]=F.useState(pt(e,t,n));return F.useEffect(()=>{a(e)},[e]),F.useEffect(()=>{a(pt(e,t,n))},[t,n]),O.jsx(Ie,{...r,bindValue:s})},Gn=n=>{const e=F.useRef(null);return F.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),r=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{r()},n)}},$t=({bindValue:n,optionalDisplayValue:e,options:t,displayMode:r,listDisplayMode:s="Both",minimumChars:a=3,placeholder:i,fun:l,_changeOnEnter:o=!1,onChange:u,onOptionsRequest:c,_multiActiveIndex:d,...f})=>{const[h,g]=F.useState(n),[y,b]=F.useState(e),[S,w]=F.useState(!1),[D,j]=F.useState(t||[]),[x,W]=F.useState(0),[L,H]=F.useState([n]),{anchorRef:Y,targetRef:U,anchorWidth:A}=Dt({position:"bottom",enabled:S});jt(U,()=>w(!1));const K=Gn(400),J=q=>{q.length>=a?l&&c&&K(async()=>{const Z=await c(l,q);j(Z),W(Z.length>0?0:-1),w(!0)}):w(!1),g(q),b(e),o||u==null||u(q,e)},te=q=>{o?(g(""),b("")):(g(q.id),b(q.label)),u==null||u(q.id,q.label);const Z=D.findIndex(T=>T.id===q.id);W(Z),H([q.id]),w(!1)},ee=q=>{q.key==="Escape"&&(w(!1),W(-1))},ie=q=>{if((q.key==="ArrowDown"||q.key==="ArrowUp")&&(q.preventDefault(),S)){const Z=q.key==="ArrowDown"?(x+1)%D.length:(x-1+D.length)%D.length;W(Z)}switch(q.key){case"Enter":x>=0&&x<D.length?te(D[x]):o&&(u==null||u(h,""),w(!1),g(""),b(""));break;case"Escape":w(!1),W(-1);break}};return O.jsxs("div",{children:[O.jsx(Ar,{...f,bindValue:h,optionalDisplayValue:y,displayMode:r,shapeIcon:"magnify",placeholder:i,ref:Y,onChange:J,onKeyDown:ie,"aria-autocomplete":"list"}),S&&O.jsx(Rr,{options:D,displayMode:s,onClick:te,ref:U,selectedIndex:x,activeIndex:d||L,width:A,showFilter:!1,onKeyDown:ee})]})},qe={"smp-button-container":"_smp-button-container_pte2h_1","smp-button-extraSmall":"_smp-button-extraSmall_pte2h_51","smp-button-small":"_smp-button-small_pte2h_56","smp-button-base":"_smp-button-base_pte2h_61","smp-button-large":"_smp-button-large_pte2h_66","smp-button-extraLarge":"_smp-button-extraLarge_pte2h_71","smp-button-fullWidth":"_smp-button-fullWidth_pte2h_76","smp-buttonType-raised":"_smp-buttonType-raised_pte2h_81","smp-buttonVariant-base":"_smp-buttonVariant-base_pte2h_83","smp-buttonVariant-primary":"_smp-buttonVariant-primary_pte2h_97","smp-buttonVariant-danger":"_smp-buttonVariant-danger_pte2h_111","smp-buttonType-ghost":"_smp-buttonType-ghost_pte2h_138"},Ge=({bindValue:n,onClick:e,ariaLabel:t,icon:r,disabled:s,sizing:a="base",variant:i="primary",type:l="raised",showIcon:o=!0,showText:u=!0,fullWidth:c=!1,loading:d=!1})=>{const f={container:`${qe["smp-button-container"]} ${a?qe[`smp-button-${a}`]:""} ${i?qe[`smp-buttonVariant-${i}`]:""} ${l?qe[`smp-buttonType-${l}`]:""} ${c?qe["smp-button-fullWidth"]:""}`},h=g=>({primary:"onPrimary",danger:"onDanger",base:"base"})[g];return O.jsx("button",{className:f.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":d,children:d?O.jsx(Re,{icon:"spinner",state:h(i),spin:!0}):O.jsxs(O.Fragment,{children:[r&&o&&O.jsx(Re,{icon:r,disabled:s,state:h(i)}),u&&O.jsx("span",{children:n})]})})},Cr=({bindValue:n,onChange:e,onBlur:t})=>{const r=s=>{e&&e(s.target.checked)};return O.jsx("input",{type:"checkbox",checked:n,onChange:r,onBlur:t})},Jn={titleLarge:"h2",title:"h3",body:"h6",label:"label"},Tt={"smp-typography":"_smp-typography_oznk3_1","smp-typography-body":"_smp-typography-body_oznk3_12","smp-typography-large":"_smp-typography-large_oznk3_16","smp-typography-titleLarge":"_smp-typography-titleLarge_oznk3_20","smp-typography-label":"_smp-typography-label_oznk3_24","smp-typography-disabled":"_smp-typography-disabled_oznk3_29"},Xn=({variant:n="body",bindValue:e,...t})=>{const r=Jn[n],s={container:`${Tt["smp-typography"]} ${n?Tt[`smp-typography-${n}`]:""} ${t.disabled?Tt["smp-typography-disabled"]:""}`};return O.jsx(r,{className:s.container,disabled:t.disabled,children:e})},yr={"smp-chips-container":"_smp-chips-container_g7dut_1","smp-chips-element":"_smp-chips-element_g7dut_9"},Pr=({elements:n,isEditable:e=!1,displayMode:t="Both",onChange:r})=>{const s={container:`${yr["smp-chips-container"]}`,element:`${yr["smp-chips-element"]}`},a=i=>{r==null||r(n.filter((l,o)=>o!==i))};return O.jsx("div",{className:s.container,role:"list",children:n.map((i,l)=>{const o=pt(i.bindValue,i.optionalDisplayValue,t);return O.jsxs("div",{className:s.element,role:"listitem",children:[O.jsx(Xn,{variant:"label",bindValue:o}),e&&O.jsx(Re,{icon:"close",isInteractable:!0,onClick:()=>a(l)})]},l)})})};function jr(n,e){const t=F.useRef(null);F.useEffect(()=>{if(!n)return;const r=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!r)return;t.current=document.activeElement;const s=()=>r?Array.from(r.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null):[];(()=>{const u=s();u.length>0&&requestAnimationFrame(()=>u[0].focus())})();const i=u=>{if(u.key==="Escape"||u.key!=="Tab")return;const c=s();if(c.length===0)return;const d=c[0],f=c[c.length-1];u.shiftKey&&document.activeElement===d?(u.preventDefault(),f.focus()):!u.shiftKey&&document.activeElement===f&&(u.preventDefault(),d.focus())},l=u=>{if(r&&!r.contains(u.target)){u.preventDefault();const c=s();c.length>0&&c[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",l);const o=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",l),document.body.style.overflow=o,t.current&&requestAnimationFrame(()=>{var u;(u=t.current)==null||u.focus()})}},[n,e])}const kt=({bindValue:n,onChange:e,options:t=[],optionalDisplayValue:r,displayMode:s,listDisplayMode:a="Both",fun:i,onOptionsRequest:l,multiActiveIndex:o,...u})=>{const[c,d]=F.useState(!1),[f,h]=F.useState(t),[g,y]=F.useState(-1),[b,S]=F.useState([n]),w=F.useId(),{anchorRef:D,targetRef:j,anchorWidth:x}=Dt({position:"bottom",enabled:c});jt(j,()=>d(!1)),jr(c,j);const W=U=>{e==null||e(U.id,U.label);const A=f.findIndex(K=>K.id===U.id);y(A),S([U.id]),d(!1)},L=U=>{U.key==="Escape"&&(d(!1),y(-1))},H=U=>{(U.key==="ArrowDown"||U.key==="ArrowUp")&&(U.preventDefault(),Y())},Y=()=>{i&&l&&l(i,void 0).then(U=>{h(U),y(U.length>0?0:-1),d(!0)})};return O.jsxs("div",{role:"combobox","aria-expanded":c,"aria-controls":w,"aria-owns":w,children:[O.jsx(Ar,{...u,bindValue:n,optionalDisplayValue:r,displayMode:s,onShapeIconClick:Y,onKeyDown:H,shapeIcon:"arrow_drop_down",rotatedShapeIcon:c,readOnly:!0,ref:D,"aria-autocomplete":"list",variant:"notSelectable"}),c&&O.jsx(Rr,{id:w,options:f,displayMode:a,ref:j,selectedIndex:g,activeIndex:o||b,width:x,onClick:W,onKeyDown:L})]})};var Dr=(n=>(n.CALENDAR_FOR="Date.CalendarFor",n.CLOSE="Generic.Close",n))(Dr||{}),ge=(n=>(n.MONDAY="Day.Monday",n.MONDAY_SHORT="Day.MondayShort",n.TUESDAY="Day.Tuesday",n.TUESDAY_SHORT="Day.TuesdayShort",n.WEDNESDAY="Day.Wednesday",n.WEDNESDAY_SHORT="Day.WednesdayShort",n.THURSDAY="Day.Thursday",n.THURSDAY_SHORT="Day.ThursdayShort",n.FRIDAY="Day.Friday",n.FRIDAY_SHORT="Day.FridayShort",n.SATURDAY="Day.Saturday",n.SATURDAY_SHORT="Day.SaturdayShort",n.SUNDAY="Day.Sunday",n.SUNDAY_SHORT="Day.SundayShort",n))(ge||{}),ye=(n=>(n.JANUARY="Month.January",n.FEBRUARY="Month.February",n.MARCH="Month.March",n.APRIL="Month.April",n.MAY="Month.May",n.JUNE="Month.June",n.JULY="Month.July",n.AUGUST="Month.August",n.SEPTEMBER="Month.September",n.OCTOBER="Month.October",n.NOVEMBER="Month.November",n.DECEMBER="Month.December",n))(ye||{}),Ct=(n=>(n.PREVIOUS_DAY="Date.PreviousDay",n.PREVIOUS_WEEK="Date.PreviousWeek",n.PREVIOUS_MONTH="Date.PreviousMonth",n.PREVIOUS_YEAR="Date.PreviousYear",n.NEXT_DAY="Date.NextDay",n.NEXT_WEEK="Date.NextWeek",n.NEXT_MONTH="Date.NextMonth",n.NEXT_YEAR="Date.NextYear",n.YESTERDAY="Date.Yesterday",n.TODAY="Date.Today",n.TOMORROW="Date.Tomorrow",n))(Ct||{});const _e={"smp-datepickercalendar":"_smp-datepickercalendar_vpeb5_1","smp-datepickercalendar-table":"_smp-datepickercalendar-table_vpeb5_30","smp-datepickercalendar-th":"_smp-datepickercalendar-th_vpeb5_42","smp-datepickercalendar-td":"_smp-datepickercalendar-td_vpeb5_53","smp-datepickercalendar-td-today":"_smp-datepickercalendar-td-today_vpeb5_72","smp-datepickercalendar-td-selected":"_smp-datepickercalendar-td-selected_vpeb5_78","smp-datepickercalendar-td-focused":"_smp-datepickercalendar-td-focused_vpeb5_83"};function Zn({selectedDate:n,onDateChange:e,disabledDateRanges:t=[],initialValue:r,targetRef:s}){const{translate:a}=_r(),i=()=>{if(!r)return;const T=new Date(r);return isNaN(T.getTime())?void 0:T},[l]=F.useState(new Date),[o,u]=F.useState(n||i()||new Date),[c,d]=F.useState(o?o.getMonth():new Date().getMonth()),[f,h]=F.useState(o?o.getFullYear():new Date().getFullYear()),[g,y]=F.useState(o?o.getDate():null),b=F.useRef(null),S=F.useRef([]),w=[a(ye.JANUARY),a(ye.FEBRUARY),a(ye.MARCH),a(ye.APRIL),a(ye.MAY),a(ye.JUNE),a(ye.JULY),a(ye.AUGUST),a(ye.SEPTEMBER),a(ye.OCTOBER),a(ye.NOVEMBER),a(ye.DECEMBER)],D=[{value:a(ge.SUNDAY_SHORT),full:a(ge.SUNDAY)},{value:a(ge.MONDAY_SHORT),full:a(ge.MONDAY)},{value:a(ge.TUESDAY_SHORT),full:a(ge.TUESDAY)},{value:a(ge.WEDNESDAY_SHORT),full:a(ge.WEDNESDAY)},{value:a(ge.THURSDAY_SHORT),full:a(ge.THURSDAY)},{value:a(ge.FRIDAY_SHORT),full:a(ge.FRIDAY)},{value:a(ge.SATURDAY_SHORT),full:a(ge.SATURDAY)}],j=T=>t.some(m=>{const v=m.start.getTime(),R=m.end.getTime(),C=T.getTime();return C>=v&&C<=R}),x=T=>{const m={year:"numeric",month:"long",day:"numeric"};return T.toLocaleDateString(void 0,m)},W=T=>{j(T)||(u(T),y(T.getDate()),e&&e(x(T)))},L=()=>{c===0?(d(11),h(f-1)):d(c-1),y(1)},H=()=>{c===11?(d(0),h(f+1)):d(c+1),y(1)},Y=(T,m)=>new Date(T,m+1,0).getDate(),U=(T,m)=>new Date(T,m,1).getDay(),A=T=>{var v;const m=ee.findIndex(R=>R!==null&&R.getDate()===T);m!==-1&&S.current[m]&&((v=S.current[m])==null||v.focus(),y(T))},K=(T,m)=>{const v=ee[m];if(!v)return;const R=Y(f,c),C=v.getDate();switch(T.key){case"ArrowRight":T.preventDefault();{let E=C+1,P=new Date(f,c,E);if(E>R){const k=c===11?f+1:f,N=c===11?0:c+1;E=1,P=new Date(k,N,E),H(),setTimeout(()=>{J(1,"forward")},0);return}j(P)?J(E,"forward"):A(E)}break;case"Tab":break;case"ArrowLeft":T.preventDefault();{let E=C-1,P=new Date(f,c,E);if(E<1){const k=c===0?f-1:f,N=c===0?11:c-1,V=Y(k,N);E=V,P=new Date(k,N,E),L(),setTimeout(()=>{J(V,"backward")},0);return}j(P)?J(E,"backward"):A(E)}break;case"ArrowUp":T.preventDefault();{let E=C-7,P=new Date(f,c,E);if(E<1){const k=c===0?f-1:f,N=c===0?11:c-1;E=Y(k,N)+E,P=new Date(k,N,E),L(),setTimeout(()=>{J(E,"backward")},0);return}j(P)?J(E,"backward"):A(E)}break;case"ArrowDown":T.preventDefault();{let E=C+7,P=new Date(f,c,E);if(E>R){const k=c===11?f+1:f,N=c===11?0:c+1;E=E-R,P=new Date(k,N,E),H(),setTimeout(()=>{J(E,"forward")},0);return}j(P)?J(E,"forward"):A(E)}break;case"Home":T.preventDefault(),J(1,"forward");break;case"End":T.preventDefault(),J(R,"backward");break;case"PageUp":T.preventDefault(),L(),setTimeout(()=>{const E=Y(c===0?f-1:f,c===0?11:c-1),P=Math.min(C,E);J(P,"forward")},0);break;case"PageDown":T.preventDefault(),H(),setTimeout(()=>{const E=Y(c===11?f+1:f,c===11?0:c+1),P=Math.min(C,E);J(P,"forward")},0);break;case" ":case"Space":if(j(v))return;y(v.getDate()),u(v);break;case"Enter":T.preventDefault(),W(v);break}},J=(T,m)=>{const v=Y(f,c);if(m==="forward"){for(let R=T;R<=v;R++){const C=new Date(f,c,R);if(!j(C)){A(R);return}}H(),setTimeout(()=>{J(1,"forward")},0)}else{for(let P=T;P>=1;P--){const k=new Date(f,c,P);if(!j(k)){A(P);return}}const R=c===0?f-1:f,C=c===0?11:c-1,E=Y(R,C);L(),setTimeout(()=>{J(E,"backward")},0)}},ee=(()=>{const T=Y(f,c),m=U(f,c),v=[];for(let R=0;R<m;R++)v.push(null);for(let R=1;R<=T;R++){const C=new Date(f,c,R);v.push(C)}return v})(),ie=[];let q=[];ee.forEach((T,m)=>{if(q.push(T),q.length===7||m===ee.length-1){for(;q.length<7;)q.push(null);ie.push(q),q=[]}}),F.useEffect(()=>{var T;if(g!==null){const m=ee.findIndex(v=>v!==null&&v.getDate()===g);m!==-1&&S.current[m]&&((T=S.current[m])==null||T.focus())}},[c,f,g,ee]);const Z={wrapper:`${_e["smp-datepickercalendar"]}`,calendar:`${_e["smp-datepickercalendar"]}`,table:`${_e["smp-datepickercalendar-table"]}`,th:`${_e["smp-datepickercalendar-th"]}`,td:(T,m,v,R)=>`${_e["smp-datepickercalendar-td"]}
|
|
56
|
+
${T?_e["smp-datepickercalendar-td-today"]:""}
|
|
57
|
+
${m?_e["smp-datepickercalendar-td-selected"]:""}
|
|
58
|
+
${v?_e["smp-datepickercalendar-td-focused"]:""}
|
|
59
|
+
${R?_e["smp-datepickercalendar-td-disabled"]:""}`};return O.jsxs("div",{className:Z.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true",children:[O.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[O.jsx(Ge,{onClick:L,ariaLabel:a(Ct.PREVIOUS_MONTH),bindValue:"<",type:"ghost",variant:"base"}),O.jsx(kt,{bindValue:f.toString()}),O.jsx(Ge,{onClick:H,ariaLabel:a(Ct.NEXT_MONTH),bindValue:">",type:"ghost",variant:"base"})]}),O.jsxs("table",{ref:b,role:"grid","aria-label":`${a(Dr.CALENDAR_FOR)} ${w[c]} ${f}`,className:Z.table,children:[O.jsx("thead",{children:O.jsx("tr",{children:D.map(T=>O.jsx("th",{scope:"col",abbr:T.full,className:Z.th,children:T.value},T.value))})}),O.jsx("tbody",{children:ie.map((T,m)=>O.jsx("tr",{children:T.map((v,R)=>{const C=m*7+R;if(v===null)return O.jsx("td",{className:Z.td(!1,!1,!1,!0)},`empty-${R}`);const E=v.getDate()===l.getDate()&&v.getMonth()===l.getMonth()&&v.getFullYear()===l.getFullYear(),P=o&&v.getDate()===o.getDate()&&v.getMonth()===o.getMonth()&&v.getFullYear()===o.getFullYear(),k=g===v.getDate(),N=j(v);return O.jsx("td",{role:"gridcell","aria-selected":P,tabIndex:k?0:-1,onClick:()=>W(v),onKeyDown:V=>K(V,C),"aria-label":`${v.getDate()} ${w[v.getMonth()]} ${v.getFullYear()}`,"data-selected":P,"aria-disabled":N,ref:V=>{S.current[C]=V},className:Z.td(E,P,k,N),children:v.getDate()},`day-${R}`)})},`week-${m}`))})]})]})}const $r=({bindValue:n,placeholder:e,onChange:t,onBlur:r,disabledDateRanges:s,...a})=>{const[i,l]=F.useState(!1),[o,u]=F.useState(n||"");F.useEffect(()=>{u(n||"")},[n]);const c=()=>l(y=>!y),d=y=>{u(y),l(!1),t&&t(y)},f=y=>{u(y),t&&t(y)},{anchorRef:h,targetRef:g}=Dt({position:"bottom",enabled:i});return jt(g,()=>l(!1)),jr(i,g),O.jsxs("div",{children:[O.jsx(Ie,{bindValue:n,placeholder:e,onChange:f,onBlur:r,shapeIcon:"calendar",onShapeIconClick:c,ref:h,...a}),i&&O.jsx(Zn,{disabledDateRanges:s,onDateChange:d,initialValue:o,targetRef:g})]})},Qn={"smp-multipleAutocomplete-container":"_smp-multipleAutocomplete-container_1mtv2_1"},es=({elements:n,displayMode:e,minimumChars:t,listDisplayMode:r,placeholder:s,fun:a,onOptionsRequest:i,onChange:l})=>{const o=n.map(d=>d.bindValue),u=(d,f)=>{const h=[...n];if(d=="")h.pop();else{const g=h.findIndex(y=>y.bindValue===d&&y.optionalDisplayValue===f);g>=0?h.splice(g,1):h.push({bindValue:d,optionalDisplayValue:f})}l==null||l(h)},c={container:`${Qn["smp-multipleAutocomplete-container"]}`};return O.jsxs("div",{className:c.container,children:[O.jsx(Pr,{elements:n,displayMode:e,isEditable:!0,onChange:d=>{l==null||l(d)}}),O.jsx($t,{bindValue:"",fun:a,onChange:u,_changeOnEnter:!0,listDisplayMode:r,minimumChars:t,placeholder:s,onOptionsRequest:i,_multiActiveIndex:o})]})},kr=({...n})=>{const[e,t]=F.useState(!1),r=e?"visibility-off":"visibility";return O.jsx(Ie,{...n,inputType:e?"text":"password",shapeIcon:r,onShapeIconClick:()=>t(!e),ariaLabel:"password"})};class De{constructor(e,t){je(this,"class");je(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new De(e,e.k.split(";"))}static fromString(e){return new De({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const st=(n,e,t)=>({obj:{t:n.obj.t,p:n.obj.p,k:e},decode:t||n.decode,shape:n.shape}),vr=n=>{const e=De.fromDataObj(n.obj),t=n.decode?De.fromString(n.decode).getValue():[];return e.getValue().map((r,s)=>({bindValue:r,optionalDisplayValue:t.length>=s?t[s]:""}))},ts=(n,e)=>{const t=new De(n.obj,e.map(s=>s.bindValue)).getLegacyValue(),r=new De(n.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return st(n,t,r)},rs=({decode:n,shape:e,obj:t,data:r,icon:s,fun:a,placeholderIcon:i,label:l,onChange:o,onClick:u,onBlur:c,onOptionsRequest:d})=>{const f={obj:t,shape:e,decode:n},h={onBlur:c,onOptionsRequest:d,fun:a,icon:s,label:l,...r},g=(S,w)=>Wn(t)?st(f,new dt(t,S).getLegacyValue()):st(f,S,w),y=S=>st(f,new ft(t,S).getLegacyValue()),b=S=>ts(f,S);switch(e){case xe.AUTOCOMPLETE:{const S={...h,bindValue:t.k,optionalDisplayValue:n,onChange:(w,D)=>{o==null||o(g(w,D))}};return O.jsx($t,{...S})}case xe.BUTTON:{const S={...h,bindValue:t.k,optionalDisplayValue:n,onClick:()=>{u==null||u(g(t.k))}};return O.jsx(Ge,{...S})}case xe.COMBOBOX:{const S={...h,bindValue:t.k,optionalDisplayValue:n,onChange:(w,D)=>{o==null||o(g(w,D))}};return O.jsx(kt,{...S})}case xe.CHECKBOX:{const S={...h,bindValue:ft.fromDataObj(t).getValue(),optionalDisplayValue:n,onChange:w=>{o==null||o(y(w))}};return O.jsx(Cr,{...S})}case xe.CHIP:{const S={...h,elements:vr(f)};return O.jsx(Pr,{...S})}case xe.DATE:{const S={...h,bindValue:dt.fromDataObj(t).getValue(),onChange:w=>{o==null||o(g(w))}};return O.jsx($r,{...S})}case xe.ICON:{const S={...h,icon:s,placeholderIcon:i,onClick:()=>{u==null||u(g(t.k))}};return O.jsx(Re,{...S})}case xe.MULTI_AUTOCOMPLETE:{const S={...h,elements:vr(f),onChange:w=>{o==null||o(b(w))}};return O.jsx(es,{...S})}case xe.PASSWORD:{const S={...h,bindValue:t.k,onChange:w=>{o==null||o(g(w))}};return O.jsx(kr,{...S})}case xe.TEXT_FIELD:case void 0:{const S={...h,bindValue:t.k,onChange:w=>{o==null||o(g(w))}};return O.jsx(Ie,{...S})}}},br={"smp-field-container":"_smp-field-container_nnmjb_1","smp-field-position-left":"_smp-field-position-left_nnmjb_6","smp-field-position-right":"_smp-field-position-right_nnmjb_10","smp-field-position-top":"_smp-field-position-top_nnmjb_14","smp-field-position-bottom":"_smp-field-position-bottom_nnmjb_18"},ns=({data:n,type:e,showSubmit:t=!1,submitPosition:r="right",defaultValue:s,label:a,labelPosition:i="left",onBlur:l,onClick:o,onOptionsRequest:u})=>{const[c,d]=F.useState();F.useEffect(()=>{d(()=>{const y={...n};return e&&(y.shape=e),s&&(y.obj=Hn(s)),y})},[n,s,e]);const f=Be(t)?br[`smp-field-position-${r}`]:"",h={container:`${br["smp-field-container"]} ${f}`},g=()=>{Be(t)||l==null||l(c)};if(c)return O.jsxs("div",{className:h.container,children:[O.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:O.jsx(rs,{...c,onChange:d,onOptionsRequest:u,fun:n.fun,onBlur:g,label:a,labelPosition:i})}),Be(t)&&O.jsx(Ge,{bindValue:"Confirm",onClick:()=>o==null?void 0:o(c)})]})};exports.Autocomplete=$t;exports.Button=Ge;exports.Checkbox=Cr;exports.Combobox=kt;exports.DashList=Un;exports.DatePicker=$r;exports.Field=ns;exports.Icon=Re;exports.Password=kr;exports.Textfield=Ie;exports.configurePaths=un;
|