@sme.up/ketchup2 2.0.0-SNAPSHOT-20250611141848 → 2.0.0-SNAPSHOT-20250611155909

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.
@@ -42,7 +42,7 @@ object-assign
42
42
  (c) Sindre Sorhus
43
43
  @license MIT
44
44
  */var Qe,Pt;function Gr(){if(Pt)return Qe;Pt=1;var r=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function n(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 o={},i=0;i<10;i++)o["_"+String.fromCharCode(i)]=i;var c=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qe=s()?Object.assign:function(a,o){for(var i,c=n(a),l,f=1;f<arguments.length;f++){i=Object(arguments[f]);for(var u in i)e.call(i,u)&&(c[u]=i[u]);if(r){l=r(i);for(var d=0;d<l.length;d++)t.call(i,l[d])&&(c[l[d]]=i[l[d]])}}return c},Qe}var et,At;function pt(){if(At)return et;At=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return et=r,et}var tt,jt;function or(){return jt||(jt=1,tt=Function.call.bind(Object.prototype.hasOwnProperty)),tt}var rt,$t;function Jr(){if($t)return rt;$t=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=pt(),t={},n=or();r=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function s(a,o,i,c,l){if(process.env.NODE_ENV!=="production"){for(var f in a)if(n(a,f)){var u;try{if(typeof a[f]!="function"){var d=Error((c||"React class")+": "+i+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=a[f](o,f,c,i,null,e)}catch(g){u=g}if(u&&!(u instanceof Error)&&r((c||"React class")+": type specification of "+i+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in t)){t[u.message]=!0;var h=l?l():"";r("Failed "+i+" type: "+u.message+(h??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},rt=s,rt}var nt,Ct;function Xr(){if(Ct)return nt;Ct=1;var r=ir(),e=Gr(),t=pt(),n=or(),s=Jr(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return nt=function(i,c){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(p){var m=p&&(l&&p[l]||p[f]);if(typeof m=="function")return m}var d="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:T(),arrayOf:P,element:S(),elementType:v(),instanceOf:D,node:$(),objectOf:U,oneOf:L,oneOfType:M,shape:Y,exact:q};function g(p,m){return p===m?p!==0||1/p===1/m:p!==p&&m!==m}function y(p,m){this.message=p,this.data=m&&typeof m=="object"?m:{},this.stack=""}y.prototype=Error.prototype;function b(p){if(process.env.NODE_ENV!=="production")var m={},E=0;function R(A,_,F,k,z,H,ne){if(k=k||d,H=H||F,ne!==t){if(c){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var V=k+":"+F;!m[V]&&E<3&&(a("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+k+"`. 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."),m[V]=!0,E++)}}return _[F]==null?A?_[F]===null?new y("The "+z+" `"+H+"` is marked as required "+("in `"+k+"`, but its value is `null`.")):new y("The "+z+" `"+H+"` is marked as required in "+("`"+k+"`, but its value is `undefined`.")):null:p(_,F,k,z,H)}var O=R.bind(null,!1);return O.isRequired=R.bind(null,!0),O}function w(p){function m(E,R,O,A,_,F){var k=E[R],z=X(k);if(z!==p){var H=W(k);return new y("Invalid "+A+" `"+_+"` of type "+("`"+H+"` supplied to `"+O+"`, expected ")+("`"+p+"`."),{expectedType:p})}return null}return b(m)}function T(){return b(o)}function P(p){function m(E,R,O,A,_){if(typeof p!="function")return new y("Property `"+_+"` of component `"+O+"` has invalid PropType notation inside arrayOf.");var F=E[R];if(!Array.isArray(F)){var k=X(F);return new y("Invalid "+A+" `"+_+"` of type "+("`"+k+"` supplied to `"+O+"`, expected an array."))}for(var z=0;z<F.length;z++){var H=p(F,z,O,A,_+"["+z+"]",t);if(H instanceof Error)return H}return null}return b(m)}function S(){function p(m,E,R,O,A){var _=m[E];if(!i(_)){var F=X(_);return new y("Invalid "+O+" `"+A+"` of type "+("`"+F+"` supplied to `"+R+"`, expected a single ReactElement."))}return null}return b(p)}function v(){function p(m,E,R,O,A){var _=m[E];if(!r.isValidElementType(_)){var F=X(_);return new y("Invalid "+O+" `"+A+"` of type "+("`"+F+"` supplied to `"+R+"`, expected a single ReactElement type."))}return null}return b(p)}function D(p){function m(E,R,O,A,_){if(!(E[R]instanceof p)){var F=p.name||d,k=I(E[R]);return new y("Invalid "+A+" `"+_+"` of type "+("`"+k+"` supplied to `"+O+"`, expected ")+("instance of `"+F+"`."))}return null}return b(m)}function L(p){if(!Array.isArray(p))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.")),o;function m(E,R,O,A,_){for(var F=E[R],k=0;k<p.length;k++)if(g(F,p[k]))return null;var z=JSON.stringify(p,function(ne,j){var V=W(j);return V==="symbol"?String(j):j});return new y("Invalid "+A+" `"+_+"` of value `"+String(F)+"` "+("supplied to `"+O+"`, expected one of "+z+"."))}return b(m)}function U(p){function m(E,R,O,A,_){if(typeof p!="function")return new y("Property `"+_+"` of component `"+O+"` has invalid PropType notation inside objectOf.");var F=E[R],k=X(F);if(k!=="object")return new y("Invalid "+A+" `"+_+"` of type "+("`"+k+"` supplied to `"+O+"`, expected an object."));for(var z in F)if(n(F,z)){var H=p(F,z,O,A,_+"."+z,t);if(H instanceof Error)return H}return null}return b(m)}function M(p){if(!Array.isArray(p))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var m=0;m<p.length;m++){var E=p[m];if(typeof E!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(E)+" at index "+m+"."),o}function R(O,A,_,F,k){for(var z=[],H=0;H<p.length;H++){var ne=p[H],j=ne(O,A,_,F,k,t);if(j==null)return null;j.data&&n(j.data,"expectedType")&&z.push(j.data.expectedType)}var V=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new y("Invalid "+F+" `"+k+"` supplied to "+("`"+_+"`"+V+"."))}return b(R)}function $(){function p(m,E,R,O,A){return K(m[E])?null:new y("Invalid "+O+" `"+A+"` supplied to "+("`"+R+"`, expected a ReactNode."))}return b(p)}function N(p,m,E,R,O){return new y((p||"React class")+": "+m+" type `"+E+"."+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+O+"`.")}function Y(p){function m(E,R,O,A,_){var F=E[R],k=X(F);if(k!=="object")return new y("Invalid "+A+" `"+_+"` of type `"+k+"` "+("supplied to `"+O+"`, expected `object`."));for(var z in p){var H=p[z];if(typeof H!="function")return N(O,A,_,z,W(H));var ne=H(F,z,O,A,_+"."+z,t);if(ne)return ne}return null}return b(m)}function q(p){function m(E,R,O,A,_){var F=E[R],k=X(F);if(k!=="object")return new y("Invalid "+A+" `"+_+"` of type `"+k+"` "+("supplied to `"+O+"`, expected `object`."));var z=e({},E[R],p);for(var H in z){var ne=p[H];if(n(p,H)&&typeof ne!="function")return N(O,A,_,H,W(ne));if(!ne)return new y("Invalid "+A+" `"+_+"` key `"+H+"` supplied to `"+O+"`.\nBad object: "+JSON.stringify(E[R],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(p),null," "));var j=ne(F,H,O,A,_+"."+H,t);if(j)return j}return null}return b(m)}function K(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(K);if(p===null||i(p))return!0;var m=u(p);if(m){var E=m.call(p),R;if(m!==p.entries){for(;!(R=E.next()).done;)if(!K(R.value))return!1}else for(;!(R=E.next()).done;){var O=R.value;if(O&&!K(O[1]))return!1}}else return!1;return!0;default:return!1}}function Z(p,m){return p==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function X(p){var m=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":Z(m,p)?"symbol":m}function W(p){if(typeof p>"u"||p===null)return""+p;var m=X(p);if(m==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return m}function G(p){var m=W(p);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function I(p){return!p.constructor||!p.constructor.name?d:p.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},nt}var st,Lt;function Zr(){if(Lt)return st;Lt=1;var r=pt();function e(){}function t(){}return t.resetWarningCache=e,st=function(){function n(o,i,c,l,f,u){if(u!==r){var d=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 d.name="Invariant Violation",d}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},st}var kt;function Qr(){if(kt)return Ne.exports;if(kt=1,process.env.NODE_ENV!=="production"){var r=ir(),e=!0;Ne.exports=Xr()(r.isElement,e)}else Ne.exports=Zr()();return Ne.exports}var ae=Qr(),en=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},tn=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},rn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Me="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xlink",Te=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];return n=r.call.apply(r,[this].concat(a))||this,n.initialState={hasError:!1,isLoading:!0},n.state=n.initialState,n._isMounted=!1,n.reactWrapper=void 0,n.nonReactWrapper=void 0,n.refCallback=function(i){n.reactWrapper=i},n}_r(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof en(this.reactWrapper).Node){var a=this.props,o=a.desc,i=a.evalScripts,c=a.httpRequestWithCredentials,l=a.renumerateIRIElements,f=a.src,u=a.title,d=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,y=this.props.afterInjection,b=this.props.wrapper,w,T;b==="svg"?(w=document.createElementNS(Me,b),w.setAttribute("xmlns",Me),w.setAttribute("xmlns:xlink",It),T=document.createElementNS(Me,b)):(w=document.createElement(b),T=document.createElement(b)),w.appendChild(T),T.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(w);var P=function(L){if(s.removeSVG(),!s._isMounted){h(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(L)})},S=function(L,U){if(L){P(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(U)}catch(M){P(M)}})},v=function(L){if(L.setAttribute("role","img"),o){var U=L.querySelector(":scope > desc");U&&L.removeChild(U);var M=document.createElement("desc");M.innerHTML=o,L.prepend(M)}if(u){var $=L.querySelector(":scope > title");$&&L.removeChild($);var N=document.createElement("title");N.innerHTML=u,L.prepend(N)}try{g(L)}catch(Y){P(Y)}};qr(T,{afterEach:S,beforeEach:v,cacheRequests:d,evalScripts:i,httpRequestWithCredentials:c,renumerateIRIElements:l})}},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;tn(Be({},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 o=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var i=s.wrapper,c=Nr(s,rn),l=i;return Ce.createElement(l,Be({},c,{ref:this.refCallback},i==="svg"?{xmlns:Me,xmlnsXlink:It}:{}),this.state.isLoading&&o&&Ce.createElement(o,null),this.state.hasError&&a&&Ce.createElement(a,null))},e}(Ce.Component);Te.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Te.propTypes={afterInjection:ae.func,beforeInjection:ae.func,desc:ae.string,evalScripts:ae.oneOf(["always","once","never"]),fallback:ae.oneOfType([ae.func,ae.object,ae.string]),httpRequestWithCredentials:ae.bool,loading:ae.oneOfType([ae.func,ae.object,ae.string]),onError:ae.func,renumerateIRIElements:ae.bool,src:ae.string.isRequired,title:ae.string,useRequestCache:ae.bool,wrapper:ae.oneOf(["div","span","svg"])};let lt={assets:"/"};const nn=r=>{lt={...lt,...r}},Nt=r=>`${lt.assets}/${r}`.replace(/\/+/g,"/"),ue=C.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:o="base",rotated:i=!1,onClick:c,isInteractable:l=!1,spin:f=!1,title:u})=>{const[d,h]=C.useState(r),g=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),y=g&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),b=Nt(`assets/svg/${r}.svg`),w=Nt(`assets/svg/${n}.svg`),T={img:`${l?"smp-image-interactable":""}`,svg:`smp-icon ${o?`smp-icon-${o}`:""} ${i?"smp-icon-rotated":""} ${l?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},P=()=>{!a&&c&&c()};return x.jsx(x.Fragment,{children:y?x.jsx(Te,{src:r,fallback:()=>x.jsx(Te,{src:w,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:T.svg,onClick:P}):g?x.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:u,onError:()=>h(w),onClick:P,className:T.img,title:u,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&P()}}):x.jsx(Te,{src:b,fallback:()=>x.jsx(Te,{src:w,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:T.svg,onClick:P})})}),xe=({disabled:r,readOnly:e,bindValue:t,icon:n,onBlur:s,onChange:a,placeholder:o,shapeIcon:i,sizing:c,state:l,variant:f,rotatedShapeIcon:u=!1,onShapeIconClick:d,ref:h,inputRef:g,onKeyDown:y,inputType:b="text",ariaLabel:w="input field",label:T,helperText:P=!1,error:S,appearance:v="base",fullWidth:D=!1,_dataComponent:L="textfield",width:U})=>{const M=S?"danger":l,$=S||l=="danger"?"error":i,N=P||!!S,Y=Z=>{a==null||a(Z.target.value)},q={wrapper:`smp-textfield-wrapper ${D?"smp-textfield-fullWidth":""}`,container:`smp-textfield ${r?"smp-textfield-disabled":""} ${e?"smp-textfield-readOnly":""} ${o?"smp-textfield-placeholder":""} ${c?`smp-textfield-${c}`:""} ${M?`smp-textfield-${M}`:""} ${f?`smp-textfield-variant-${f}`:""} ${v?`smp-textfield-${v}`:""}`,input:"smp-textfield-input "},K=U?{"--smp-textField-width-base":U}:void 0;return x.jsxs("div",{className:q.wrapper,"data-component":L,children:[T&&x.jsx(nr,{label:T,disabled:r}),x.jsxs("div",{className:q.container,ref:h,style:K,children:[n&&x.jsx(ue,{icon:n,disabled:r}),x.jsx("input",{type:b,value:t,placeholder:o,onChange:Y,onBlur:s,className:q.input,disabled:r,readOnly:e,onKeyDown:y,"aria-label":w,ref:g}),$&&x.jsx(ue,{icon:$,disabled:r,state:M,onClick:d,rotated:u})]}),N&&x.jsx(Ir,{helperText:S,disabled:r,state:M})]})};function sn({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=C.useState(0),o=C.useRef(null),i=r.length*e,c=Math.max(0,Math.floor(s/e)-n),l=Math.min(r.length-1,Math.floor((s+t)/e)+n),f=[];for(let h=c;h<=l;h++)f.push({item:r[h],index:h,offsetTop:h*e});const u=C.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),d=h=>{if(!o.current)return;const g=h*e,y=g+e,b=o.current,w=b.scrollTop,T=w+t;g<w?b.scrollTop=g:y>T&&(b.scrollTop=y-t)};return{virtualItems:f,containerProps:{ref:o,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${i}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:i,startIndex:c,endIndex:l},scrollToIndex:d}}const an=10,lr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:o=[],width:i,onClick:c,onKeyDown:l})=>{var $;const[f,u]=C.useState(""),d=24,[h,g]=C.useState(a!==null?a:-1),y=s!==void 0?s:e.length>an,b=f?e.filter(N=>N.label.toLowerCase().includes(f.toLowerCase())):e,w=N=>{u(N)},{virtualItems:T,containerProps:P,innerProps:S,scrollToIndex:v}=sn({items:b,itemHeight:d,containerHeight:200,overscan:5});C.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),C.useEffect(()=>{h>=0&&h<b.length&&v(h)},[h,b]);const D=N=>{if(N.key==="ArrowDown"||N.key==="ArrowUp"){N.preventDefault();let Y=h;N.key==="ArrowDown"?Y=h<b.length-1?h+1:0:N.key==="ArrowUp"&&(Y=h>0?h-1:b.length-1),g(Y)}else N.key==="Enter"?h>=0&&h<b.length&&(c==null||c(b[h])):N.key==="Escape"&&(N.preventDefault(),N.stopPropagation());l&&l(N)},L=N=>{D(N)},U=N=>{D(N)},M={wrapper:"smp-list",container:"smp-list-container",virtualScroll:"smp-list-virtualScroll",listItem:"smp-list-listItem"};return x.jsxs("div",{id:r,ref:n,className:M.wrapper,"data-component":"list",style:{width:i},children:[y&&x.jsx(xe,{bindValue:f,placeholder:"Search...",onChange:w,onKeyDown:L}),x.jsx("div",{...P,className:M.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:U,"aria-activedescendant":h>=0&&h<b.length?($=b[h])==null?void 0:$.id:void 0,children:x.jsx("div",{...S,className:M.virtualScroll,children:T.map(({item:N,index:Y,offsetTop:q})=>{const K=o.includes(N.id);return x.jsxs("li",{role:"option",id:N.id,"aria-selected":h===Y?"true":"false",tabIndex:-1,className:`${M.listItem} ${h===Y?"selected-item":""}`,"aria-label":N.id+"-"+N.label,style:{height:`${d}px`,lineHeight:`calc(${d}px - 2*2px)`,transform:`translateY(${q}px)`},onClick:()=>{c==null||c(N),g(Y)},children:[He(N.id,N.label,t),K&&x.jsx(ue,{icon:"check",width:16})]},N.id)})})})]})},cr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=C.useState(He(e,t,r));return C.useEffect(()=>{a(e)},[e]),C.useEffect(()=>{a(He(e,t,r))},[t,r]),x.jsx(xe,{...n,bindValue:s})},on=r=>{const e=C.useRef(null);return C.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}},ht=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,placeholder:o,fun:i,_changeOnEnter:c=!1,onChange:l,onOptionsRequest:f,_multiActiveIndex:u,...d})=>{const[h,g]=C.useState(r),[y,b]=C.useState(e),[w,T]=C.useState(!1),[P,S]=C.useState(t||[]),[v,D]=C.useState(0),[L,U]=C.useState([r]),{anchorRef:M,targetRef:$,anchorWidth:N}=dt({position:"bottom",enabled:w});We($,()=>T(!1));const Y=on(400),q=W=>{W.length>=a?i&&f&&Y(async()=>{const G=await f(i,W);S(G),D(G.length>0?0:-1),T(!0)}):T(!1),g(W),b(e),c||l==null||l(W,e)},K=W=>{c?(g(""),b("")):(g(W.id),b(W.label)),l==null||l(W.id,W.label);const G=P.findIndex(I=>I.id===W.id);D(G),U([W.id]),T(!1)},Z=W=>{W.key==="Escape"&&(T(!1),D(-1))},X=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),w)){const G=W.key==="ArrowDown"?(v+1)%P.length:(v-1+P.length)%P.length;D(G)}switch(W.key){case"Enter":v>=0&&v<P.length?K(P[v]):c&&(l==null||l(h,""),T(!1),g(""),b(""));break;case"Escape":T(!1),D(-1);break}};return x.jsxs("div",{"data-component":"autocomplete",children:[x.jsx(cr,{...d,bindValue:h,optionalDisplayValue:y,displayMode:n,shapeIcon:"magnify",placeholder:o,ref:M,onChange:q,onKeyDown:X,"aria-autocomplete":"list"}),w&&x.jsx(lr,{options:P,displayMode:s,onClick:K,ref:$,selectedIndex:v,activeIndex:u||L,width:N,showFilter:!1,onKeyDown:Z})]})},_t=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],Mt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Oe=({label:r,onClick:e,ariaLabel:t,icon:n,disabled:s,sizing:a="base",variant:o="primary",appearance:i="raised",showIcon:c=!0,showText:l=!0,fullWidth:f=!1,loading:u=!1,justify:d="center",title:h,optionalDisplayValue:g})=>{const y={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${o?`smp-buttonVariant-${o}`:""} ${i?`smp-buttonType-${i}`:""} ${f?"smp-button-fullWidth":""} smp-justifyContent-${d}`};return x.jsx("button",{"data-component":"button",className:y.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:h||r||g,children:u?x.jsx(ue,{icon:"spinner",state:Mt(o),spin:!0}):x.jsxs(x.Fragment,{children:[n&&c&&x.jsx(ue,{icon:n,disabled:s,state:Mt(o),width:_t(a),height:_t(a)}),l&&g&&x.jsx("span",{children:g})]})})},ur=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:o,showText:i,showIcon:c,fullWidth:l,disabled:f,justify:u,onClick:d,onOptionsRequest:h})=>{const[g,y]=C.useState(r);C.useEffect(()=>{!(g!=null&&g.length)&&h&&e&&h(e,void 0).then(T=>y(T)).catch(T=>{console.error("Errore nel caricamento delle opzioni per ButtonList",T)})},[g,e,h]);const b={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},w=g==null?void 0:g.map((T,P)=>{const S={bindValue:T.id,optionalDisplayValue:T.label,fun:T.fun,icon:T.icon,variant:a,appearance:o,showText:i,showIcon:c,fullWidth:l,disabled:f,sizing:s,justify:u,onClick:()=>{d==null||d(T.id,T.fun)}};return x.jsx(Oe,{...S},`button-${P}`)});return x.jsx("div",{role:"list","data-component":"button-list",className:b.container,children:w})},fr=({bindValue:r,onChange:e,onBlur:t})=>{const n=s=>{e&&e(s.target.checked)};return x.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:n,onBlur:t})},ln={titleLarge:"h2",title:"h3",body:"h6",label:"label"},cn=({variant:r="body",bindValue:e,color:t,...n})=>{const s=ln[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return x.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},dr=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:o=!1})=>{const[i,c]=C.useState(null),l={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=h=>{n==null||n(r.filter((g,y)=>y!==h))},u=h=>{c(h)},d=h=>{if(i===null||i===h)return;const g=[...r],[y]=g.splice(i,1);g.splice(h,0,y),n==null||n(g),c(null)};return x.jsx("div",{className:l.container,role:"list","data-component":"chip",children:r.flatMap((h,g)=>{const y=He(h.bindValue,h.optionalDisplayValue,t),b=x.jsxs("div",{className:l.element,role:"listitem",draggable:o,onDragStart:()=>u(g),onDragOver:T=>o&&T.preventDefault(),onDrop:()=>o&&d(g),style:{"--smp-chips-backgroundColor-base":a},children:[o&&x.jsx(ue,{icon:"drag_indicator_horizontal",isInteractable:!0}),x.jsx(cn,{variant:"label",bindValue:y,color:s}),e&&x.jsx(ue,{icon:"close",isInteractable:!0,onClick:()=>f(g),color:s})]},`chip-${g}`),w=o&&g<r.length-1?x.jsx(ue,{icon:"chevron-right",color:s},`separator-${g}`):null;return[b,w].filter(Boolean)})})};function pr(r,e){const t=C.useRef(null);C.useEffect(()=>{if(!r)return;const n=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!n)return;t.current=document.activeElement;const s=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(l=>!l.hasAttribute("disabled")&&l.offsetParent!==null):[];(()=>{const l=s();l.length>0&&requestAnimationFrame(()=>l[0].focus())})();const o=l=>{if(l.key==="Escape"||l.key!=="Tab")return;const f=s();if(f.length===0)return;const u=f[0],d=f[f.length-1];l.shiftKey&&document.activeElement===u?(l.preventDefault(),d.focus()):!l.shiftKey&&document.activeElement===d&&(l.preventDefault(),u.focus())},i=l=>{if(n&&!n.contains(l.target)){l.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",i);const c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",i),document.body.style.overflow=c,t.current&&requestAnimationFrame(()=>{var l;(l=t.current)==null||l.focus()})}},[r,e])}const hr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,displayMode:s,listDisplayMode:a="Both",fun:o,onOptionsRequest:i,multiActiveIndex:c,...l})=>{const[f,u]=C.useState(!1),[d,h]=C.useState(t),[g,y]=C.useState(-1),[b,w]=C.useState([r]),T=C.useId(),{anchorRef:P,targetRef:S,anchorWidth:v}=dt({position:"bottom",enabled:f});We(S,()=>u(!1)),pr(f,S);const D=$=>{e==null||e($.id,$.label);const N=d.findIndex(Y=>Y.id===$.id);y(N),w([$.id]),u(!1)},L=$=>{$.key==="Escape"&&(u(!1),y(-1))},U=$=>{($.key==="ArrowDown"||$.key==="ArrowUp")&&($.preventDefault(),M())},M=()=>{o&&i&&i(o,void 0).then($=>{h($),y($.length>0?0:-1),u(!0)})};return x.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":T,"aria-owns":T,"data-component":"combobox",children:[x.jsx(cr,{...l,bindValue:r,optionalDisplayValue:n,displayMode:s,onShapeIconClick:M,onKeyDown:U,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:P,"aria-autocomplete":"list",variant:"notSelectable"}),f&&x.jsx(lr,{id:T,options:d,displayMode:a,ref:S,selectedIndex:g,activeIndex:c||b,width:v,onClick:D,onKeyDown:L})]})},B=r=>typeof r=="string",Pe=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Ft=r=>r==null?"":""+r,un=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},fn=/###/g,Vt=r=>r&&r.indexOf("###")>-1?r.replace(fn,"."):r,Yt=r=>!r||B(r),Ae=(r,e,t)=>{const n=B(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(Yt(r))return{};const a=Vt(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return Yt(r)?{}:{obj:r,k:Vt(n[s])}},Ut=(r,e,t)=>{const{obj:n,k:s}=Ae(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],o=e.slice(0,e.length-1),i=Ae(r,o,Object);for(;i.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),i=Ae(r,o,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${a}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${a}`]=t},dn=(r,e,t,n)=>{const{obj:s,k:a}=Ae(r,e,Object);s[a]=s[a]||[],s[a].push(t)},qe=(r,e)=>{const{obj:t,k:n}=Ae(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},pn=(r,e,t)=>{const n=qe(r,t);return n!==void 0?n:qe(e,t)},gr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?B(r[n])||r[n]instanceof String||B(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):gr(r[n],e[n],t):r[n]=e[n]);return r},we=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gn=r=>B(r)?r.replace(/[&<>"'\/]/g,e=>hn[e]):r;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 n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const yn=[" ",",","?","!",";"],vn=new mn(20),bn=(r,e,t)=>{e=e||"",t=t||"";const n=yn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const s=vn.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!s.test(r);if(!a){const o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(a=!0)}return a},ct=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let s=r;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let o,i="";for(let c=a;c<n.length;++c)if(c!==a&&(i+=t),i+=n[c],o=s[i],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<n.length-1)continue;a+=c-a+1;break}s=o}return s},je=r=>r==null?void 0:r.replace("_","-"),xn={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class Ke{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||xn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(B(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ke(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ke(this.logger,e)}}var ge=new Ke;class Ge{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(t)||0;this.observers[n].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,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s.apply(s,[e,...t])})}}class Wt extends Ge{constructor(e,t={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,n,s={}){var l,f;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):B(n)&&a?i.push(...n.split(a)):i.push(n)));const c=qe(this.data,i);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),c||!o||!B(n)?c:ct((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),s=t,t=i[1]),this.addNamespaces(t),Ut(this.data,i,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(B(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),s=n,n=t,t=i[1]),this.addNamespaces(t);let c=qe(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?gr(c,n,a):c={...c,...n},Ut(this.data,i,c),o.silent||this.emit("added",e,t,n)}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 mr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var o;e=((o=this.processors[a])==null?void 0:o.process(e,t,n,s))??e}),e}};const Ht={},Bt=r=>!B(r)&&typeof r!="boolean"&&typeof r!="number";class ze extends Ge{constructor(e,t={}){super(),un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ge.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const s=this.resolve(e,n);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bn(e,n,s);if(o&&!i){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:B(a)?[a]:a};const l=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(s)}return{key:e,namespaces:B(a)?[a]:a}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(e[e.length-1],s),l=c[c.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=s.lng||this.language,d=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return d?a?{res:`${l}${f}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${f}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:i;const h=this.resolve(e,s);let g=h==null?void 0:h.res;const y=(h==null?void 0:h.usedKey)||i,b=(h==null?void 0:h.exactUsedKey)||i,w=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!B(s.count),v=ze.hasDefaultValue(s),D=S?this.pluralResolver.getSuffix(u,s.count,s):"",L=s.ordinal&&S?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",U=S&&!s.ordinal&&s.count===0,M=U&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${D}`]||s[`defaultValue${L}`]||s.defaultValue;let $=g;P&&!g&&v&&($=M);const N=Bt($),Y=Object.prototype.toString.apply($);if(P&&$&&N&&w.indexOf(Y)<0&&!(B(T)&&Array.isArray($))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,$,{...s,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(h.res=q,h.usedParams=this.getUsedParamsDetails(s),h):q}if(o){const q=Array.isArray($),K=q?[]:{},Z=q?b:y;for(const X in $)if(Object.prototype.hasOwnProperty.call($,X)){const W=`${Z}${o}${X}`;v&&!g?K[X]=this.translate(W,{...s,defaultValue:Bt(M)?M[X]:void 0,joinArrays:!1,ns:c}):K[X]=this.translate(W,{...s,joinArrays:!1,ns:c}),K[X]===W&&(K[X]=$[X])}g=K}}else if(P&&B(T)&&Array.isArray(g))g=g.join(T),g&&(g=this.extendTranslation(g,e,s,n));else{let q=!1,K=!1;!this.isValidLookup(g)&&v&&(q=!0,g=M),this.isValidLookup(g)||(K=!0,g=i);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&K?void 0:g,W=v&&M!==g&&this.options.updateMissing;if(K||q||W){if(this.logger.log(W?"updateKey":"missingKey",u,l,i,W?M:g),o){const m=this.resolve(i,{...s,keySeparator:!1});m&&m.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 G=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let m=0;m<I.length;m++)G.push(I[m]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(s.lng||this.language):G.push(s.lng||this.language);const p=(m,E,R)=>{var A;const O=v&&R!==g?R:X;this.options.missingKeyHandler?this.options.missingKeyHandler(m,l,E,O,W,s):(A=this.backendConnector)!=null&&A.saveMissing&&this.backendConnector.saveMissing(m,l,E,O,W,s),this.emit("missingKey",m,l,E,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?G.forEach(m=>{const E=this.pluralResolver.getSuffixes(m,s);U&&s[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(R=>{p([m],i+R,s[`defaultValue${R}`]||M)})}):p(G,i,M))}g=this.extendTranslation(g,e,s,h,n),K&&g===i&&this.options.appendNamespaceToMissingKey&&(g=`${l}${f}${i}`),(K||q)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${i}`:i,q?g:void 0,s))}return a?(h.res=g,h.usedParams=this.getUsedParamsDetails(s),h):g}extendTranslation(e,t,n,s,a){var c,l;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=B(e)&&(((l=n==null?void 0:n.interpolation)==null?void 0:l.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const h=e.match(this.interpolator.nestingRegexp);u=h&&h.length}let d=n.replace&&!B(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||s.usedLng,n),f){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;u<g&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(a==null?void 0:a[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=B(o)?[o]:o;return e!=null&&(i!=null&&i.length)&&n.applyPostProcessor!==!1&&(e=mr.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,o,i;return B(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(c,t),f=l.key;s=f;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=t.count!==void 0&&!B(t.count),h=d&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(B(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(b=>{var w,T;this.isValidLookup(n)||(i=b,!Ht[`${y[0]}-${b}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(i))&&(Ht[`${y[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${i}" 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(P=>{var D;if(this.isValidLookup(n))return;o=P;const S=[f];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(S,f,P,b,t);else{let L;d&&(L=this.pluralResolver.getSuffix(P,t.count,t));const U=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(S.push(f+L),t.ordinal&&L.indexOf(M)===0&&S.push(f+L.replace(M,this.options.pluralSeparator)),h&&S.push(f+U)),g){const $=`${f}${this.options.contextSeparator}${t.context}`;S.push($),d&&(S.push($+L),t.ordinal&&L.indexOf(M)===0&&S.push($+L.replace(M,this.options.pluralSeparator)),h&&S.push($+U))}}let v;for(;v=S.pop();)this.isValidLookup(n)||(a=v,n=this.getResource(P,b,v,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!B(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class qt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ge.create("languageUtils")}getScriptPartFromCode(e){if(e=je(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=je(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(B(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(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),B(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],a=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return B(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))):B(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{s.indexOf(o)<0&&a(this.formatLanguageCode(o))}),s}}const Kt={zero:0,one:1,two:2,few:3,many:4,other:5},zt={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ge.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=je(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),zt;if(!e.match(/-|_/))return zt;const c=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(c,t)}return this.pluralRulesCache[a]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,a)=>Kt[s]-Kt[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Gt=(r,e,t,n=".",s=!0)=>{let a=pn(r,e,t);return!a&&s&&B(t)&&(a=ct(r,t,n),a===void 0&&(a=ct(e,t,n))),a},at=r=>r.replace(/\$/g,"$$$$");class wn{constructor(e={}){var t;this.logger=ge.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:c,formatSeparator:l,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:T}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?we(a):o||"{{",this.suffix=i?we(i):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?we(d):h||we("$t("),this.nestingSuffix=g?we(g):y||we(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"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,n,s){var h;let a,o,i;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=g=>{if(g.indexOf(this.formatSeparator)<0){const T=Gt(t,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,n,{...s,...t,interpolationkey:g}):T}const y=g.split(this.formatSeparator),b=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(Gt(t,c,b,this.options.keySeparator,this.options.ignoreJSONStructure),w,n,{...s,...t,interpolationkey:b})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((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=>at(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?at(this.escape(g)):at(g)}].forEach(g=>{for(i=0;a=g.regex.exec(e);){const y=a[1].trim();if(o=l(y),o===void 0)if(typeof f=="function"){const w=f(e,a,s);o=B(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))o="";else if(u){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else!B(o)&&!this.useRawValueToEscape&&(o=Ft(o));const b=g.safeValue(o);if(e=e.replace(a[0],b),u?(g.regex.lastIndex+=o.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,o;const i=(c,l)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const u=c.split(new RegExp(`${f}[ ]*{`));let d=`{${u[1]}`;c=u[0],d=this.interpolate(d,o);const h=d.match(/'/g),g=d.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),l&&(o={...l,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,y),`${c}${f}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];o={...n},o=o.replace&&!B(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(u=>u.trim());s[1]=f.shift(),c=f,l=!0}if(a=t(i.call(this,s[1].trim(),o),o),a&&s[0]===e&&!B(a))return a;B(a)||(a=Ft(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),l&&(a=c.reduce((f,u)=>this.format(f,u,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const En=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[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(o=>{if(o){const[i,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),f=i.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},Jt=r=>{const e={};return(t,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const o=n+JSON.stringify(a);let i=e[o];return i||(i=r(je(n),s),e[o]=i),i(t)}},Tn=r=>(e,t,n)=>r(je(t),n)(e);class On{constructor(e={}){this.logger=ge.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Jt:Tn;this.formats={number:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a});return i=>o.format(i)}),currency:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a,style:"currency"});return i=>o.format(i)}),datetime:n((s,a)=>{const o=new Intl.DateTimeFormat(s,{...a});return i=>o.format(i)}),relativetime:n((s,a)=>{const o=new Intl.RelativeTimeFormat(s,{...a});return i=>o.format(i,a.range||"day")}),list:n((s,a)=>{const o=new Intl.ListFormat(s,{...a});return i=>o.format(i)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Jt(t)}format(e,t,n,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(i=>i.indexOf(")")>-1)){const i=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,i)].join(this.formatSeparator)}return a.reduce((i,c)=>{var u;const{formatName:l,formatOptions:f}=En(c);if(this.formats[l]){let d=i;try{const h=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||n;d=this.formats[l](i,g,{...f,...s,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${l}`);return i},e)}}const Rn=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Dn extends Ge{constructor(e,t,n,s={}){var a,o;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ge.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=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},o={},i={},c={};return e.forEach(l=>{let f=!0;t.forEach(u=>{const d=`${l}|${u}`;!n.reload&&this.store.hasResourceBundle(l,u)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,f=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),c[u]===void 0&&(c[u]=!0)))}),f||(i[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(c)}}loaded(e,t,n){const s=e.split("|"),a=s[0],o=s[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(c=>{dn(c.loaded,[a],o),Rn(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{i[l]||(i[l]={});const f=c.loaded[l];f.length&&f.forEach(u=>{i[l][u]===void 0&&(i[l][u]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(c=>!c.done)}read(e,t,n,s=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:o});return}this.readingCalls++;const i=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(l&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,o)},a);return}o(l,f)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const l=c(e,t);l&&typeof l.then=="function"?l.then(f=>i(null,f)).catch(i):i(null,l)}catch(l){i(l)}return}return c(e,t,i)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();B(e)&&(e=this.languageUtils.toResolveHierarchy(e)),B(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),s=n[0],a=n[1];this.read(s,a,"read",void 0,void 0,(o,i)=>{o&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,o),!o&&i&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,i),this.loaded(e,o,i)})}saveMissing(e,t,n,s,a,o={},i=()=>{}){var c,l,f,u,d;if((l=(c=this.services)==null?void 0:c.utils)!=null&&l.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" 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(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const h={...o,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,t,n,s,h):y=g(e,t,n,s),y&&typeof y.then=="function"?y.then(b=>i(null,b)).catch(i):i(null,y)}catch(y){i(y)}else g(e,t,n,s,i,h)}!e||!e[0]||this.store.addResource(e[0],t,n,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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),B(r[1])&&(e.defaultValue=r[1]),B(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Zt=r=>{var e,t;return B(r.ns)&&(r.ns=[r.ns]),B(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),B(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},Fe=()=>{},Pn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class $e extends Ge{constructor(e={},t){if(super(),this.options=Zt(e),this.services={},this.logger=ge,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(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(B(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Xt();this.options={...n,...this.options,...Zt(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?ge.init(s(this.modules.logger),this.options):ge.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=On;const f=new qt(this.options);this.store=new Wt(this.options.resources,this.options);const u=this.services;u.logger=ge,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new Sn(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(u.formatter=s(l),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new wn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Dn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ze(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Fe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const i=Pe(),c=()=>{const l=(f,u)=>{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),i.resolve(u),t(f,u)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),i}loadResources(e,t=Fe){var a,o;let n=t;const s=B(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>c(f)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,l=>c(l)),this.services.backendConnector.load(i,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(e,t,n){const s=Pe();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Fe),this.services.backendConnector.reload(e,t,a=>{s.resolve(),n(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"&&mr.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Pe();this.emit("languageChanging",e);const s=i=>{this.language=i,this.languages=this.services.languageUtils.toResolveHierarchy(i),this.resolvedLanguage=void 0,this.setResolvedLanguage(i)},a=(i,c)=>{c?this.isLanguageChangingTo===e&&(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),t&&t(i,(...l)=>this.t(...l))},o=i=>{var f,u;!e&&!i&&this.services.languageDetector&&(i=[]);const c=B(i)?i:i&&i[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(B(i)?[i]:i);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,l)),this.loadResources(l,d=>{a(d,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n){const s=(a,o,...i)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([a,o].concat(i)):c={...o},c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||s.keyPrefix);const l=this.options.keySeparator||".";let f;return c.keyPrefix&&Array.isArray(a)?f=a.map(u=>`${c.keyPrefix}${l}${u}`):f=c.keyPrefix?`${c.keyPrefix}${l}${a}`:a,this.t(f,c)};return B(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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 n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(i,c)=>{const l=this.services.backendConnector.state[`${i}|${c}`];return l===-1||l===0||l===2};if(t.precheck){const i=t.precheck(this,o);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(a,e)))}loadNamespaces(e,t){const n=Pe();return this.options.ns?(B(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Pe();B(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=s.concat(a),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(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"],n=((a=this.services)==null?void 0:a.languageUtils)||new qt(Xt());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new $e(e,t)}cloneInstance(e={},t=Fe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new $e(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(i=>{a[i]=this[i]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const i=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((f,u)=>(f[u]={...c[l][u]},f),c[l]),c),{});a.store=new Wt(i,s),a.services.resourceStore=a.store}return a.translator=new ze(a.services,s),a.translator.on("*",(i,...c)=>{a.emit(i,...c)}),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 se=$e.createInstance();se.createInstance=$e.createInstance;se.createInstance;se.dir;se.init;se.loadResources;se.reloadResources;se.use;se.changeLanguage;se.getFixedT;se.t;se.exists;se.setDefaultNamespace;se.hasLoadedNamespace;se.loadNamespaces;se.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"},jn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},$n={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},Cn={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:jn,Generic:$n},Ln={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"},kn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},In={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},Nn={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:Ln,Month:kn,Generic:In};function Qt(r,e){return new RegExp(_n(r),e)}function _n(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mn(r,e,t,n){let s=e;const a=Fn(r,t);if(!s){const i=Math.abs(a);i-Math.floor(i)?s="0,0.00":s="0,0"}const o=Vn(s);return new Intl.NumberFormat(n,o).format(a)}function Fn(r,e,t,n,s){let a=r;if(typeof a!="number"){let i;e&&n===void 0?i=",":i=".";const c=i=="."?",":".";a=a.replace(Qt(c,"g"),""),a=a.replace(Qt(i,"g"),"."),a=Number(a)}const o=Number(a);return isNaN(o)?NaN:o}function Vn(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}se.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return Mn(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Nn},it:{translation:Cn}}});const Yn=(r,e,t,n)=>se.format(r,e,t||se.language,n),Un=(r,e)=>se.t(r,e);function Je(){const r=C.useCallback((n,s,a,o)=>Yn(n,s,a||void 0,o),[]),e=C.useCallback(()=>se.languages[0],[]),t=C.useCallback((n,s)=>Un(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var gt=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(gt||{}),oe=(r=>(r.MONDAY="Day.Monday",r.MONDAY_SHORT="Day.MondayShort",r.TUESDAY="Day.Tuesday",r.TUESDAY_SHORT="Day.TuesdayShort",r.WEDNESDAY="Day.Wednesday",r.WEDNESDAY_SHORT="Day.WednesdayShort",r.THURSDAY="Day.Thursday",r.THURSDAY_SHORT="Day.ThursdayShort",r.FRIDAY="Day.Friday",r.FRIDAY_SHORT="Day.FridayShort",r.SATURDAY="Day.Saturday",r.SATURDAY_SHORT="Day.SaturdayShort",r.SUNDAY="Day.Sunday",r.SUNDAY_SHORT="Day.SundayShort",r))(oe||{}),ce=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(ce||{}),ut=(r=>(r.PREVIOUS_DAY="Date.PreviousDay",r.PREVIOUS_WEEK="Date.PreviousWeek",r.PREVIOUS_MONTH="Date.PreviousMonth",r.PREVIOUS_YEAR="Date.PreviousYear",r.NEXT_DAY="Date.NextDay",r.NEXT_WEEK="Date.NextWeek",r.NEXT_MONTH="Date.NextMonth",r.NEXT_YEAR="Date.NextYear",r.YESTERDAY="Date.Yesterday",r.TODAY="Date.Today",r.TOMORROW="Date.Tomorrow",r))(ut||{});function Wn({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Je(),o=()=>{if(!n)return;const I=new Date(n);return isNaN(I.getTime())?void 0:I},[i]=C.useState(new Date),[c,l]=C.useState(r||o()||new Date),[f,u]=C.useState(c?c.getMonth():new Date().getMonth()),[d,h]=C.useState(c?c.getFullYear():new Date().getFullYear()),[g,y]=C.useState(c?c.getDate():null),b=C.useRef(null),w=C.useRef([]),T=[a(ce.JANUARY),a(ce.FEBRUARY),a(ce.MARCH),a(ce.APRIL),a(ce.MAY),a(ce.JUNE),a(ce.JULY),a(ce.AUGUST),a(ce.SEPTEMBER),a(ce.OCTOBER),a(ce.NOVEMBER),a(ce.DECEMBER)],P=[{value:a(oe.SUNDAY_SHORT),full:a(oe.SUNDAY)},{value:a(oe.MONDAY_SHORT),full:a(oe.MONDAY)},{value:a(oe.TUESDAY_SHORT),full:a(oe.TUESDAY)},{value:a(oe.WEDNESDAY_SHORT),full:a(oe.WEDNESDAY)},{value:a(oe.THURSDAY_SHORT),full:a(oe.THURSDAY)},{value:a(oe.FRIDAY_SHORT),full:a(oe.FRIDAY)},{value:a(oe.SATURDAY_SHORT),full:a(oe.SATURDAY)}],S=I=>t.some(p=>{const m=p.start.getTime(),E=p.end.getTime(),R=I.getTime();return R>=m&&R<=E}),v=I=>{S(I)||(l(I),y(I.getDate()),e&&e(kr(I)))},D=()=>{f===0?(u(11),h(d-1)):u(f-1),y(1)},L=()=>{f===11?(u(0),h(d+1)):u(f+1),y(1)},U=(I,p)=>new Date(I,p+1,0).getDate(),M=(I,p)=>new Date(I,p,1).getDay(),$=I=>{var m;const p=K.findIndex(E=>E!==null&&E.getDate()===I);p!==-1&&w.current[p]&&((m=w.current[p])==null||m.focus(),y(I))},N=(I,p)=>{const m=K[p];if(!m)return;const E=U(d,f),R=m.getDate();switch(I.key){case"ArrowRight":I.preventDefault();{let O=R+1,A=new Date(d,f,O);if(O>E){const _=f===11?d+1:d,F=f===11?0:f+1;O=1,A=new Date(_,F,O),L(),setTimeout(()=>{Y(1,"forward")},0);return}S(A)?Y(O,"forward"):$(O)}break;case"Tab":break;case"ArrowLeft":I.preventDefault();{let O=R-1,A=new Date(d,f,O);if(O<1){const _=f===0?d-1:d,F=f===0?11:f-1,k=U(_,F);O=k,A=new Date(_,F,O),D(),setTimeout(()=>{Y(k,"backward")},0);return}S(A)?Y(O,"backward"):$(O)}break;case"ArrowUp":I.preventDefault();{let O=R-7,A=new Date(d,f,O);if(O<1){const _=f===0?d-1:d,F=f===0?11:f-1;O=U(_,F)+O,A=new Date(_,F,O),D(),setTimeout(()=>{Y(O,"backward")},0);return}S(A)?Y(O,"backward"):$(O)}break;case"ArrowDown":I.preventDefault();{let O=R+7,A=new Date(d,f,O);if(O>E){const _=f===11?d+1:d,F=f===11?0:f+1;O=O-E,A=new Date(_,F,O),L(),setTimeout(()=>{Y(O,"forward")},0);return}S(A)?Y(O,"forward"):$(O)}break;case"Home":I.preventDefault(),Y(1,"forward");break;case"End":I.preventDefault(),Y(E,"backward");break;case"PageUp":I.preventDefault(),D(),setTimeout(()=>{const O=U(f===0?d-1:d,f===0?11:f-1),A=Math.min(R,O);Y(A,"forward")},0);break;case"PageDown":I.preventDefault(),L(),setTimeout(()=>{const O=U(f===11?d+1:d,f===11?0:f+1),A=Math.min(R,O);Y(A,"forward")},0);break;case" ":case"Space":if(S(m))return;y(m.getDate()),l(m);break;case"Enter":I.preventDefault(),v(m);break}},Y=(I,p)=>{const m=U(d,f);if(p==="forward"){for(let E=I;E<=m;E++){const R=new Date(d,f,E);if(!S(R)){$(E);return}}L(),setTimeout(()=>{Y(1,"forward")},0)}else{for(let A=I;A>=1;A--){const _=new Date(d,f,A);if(!S(_)){$(A);return}}const E=f===0?d-1:d,R=f===0?11:f-1,O=U(E,R);D(),setTimeout(()=>{Y(O,"backward")},0)}},K=(()=>{const I=U(d,f),p=M(d,f),m=[];for(let E=0;E<p;E++)m.push(null);for(let E=1;E<=I;E++){const R=new Date(d,f,E);m.push(R)}return m})(),Z=[];let X=[];K.forEach((I,p)=>{if(X.push(I),X.length===7||p===K.length-1){for(;X.length<7;)X.push(null);Z.push(X),X=[]}}),C.useEffect(()=>{var I;if(g!==null){const p=K.findIndex(m=>m!==null&&m.getDate()===g);p!==-1&&w.current[p]&&((I=w.current[p])==null||I.focus())}},[f,d,g,K]);const W={label:"smp-datepickercalendar-label",wrapper:"smp-datepickercalendar",calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(I,p,m,E)=>`smp-datepickercalendar-td
45
+ Valid keys: `+JSON.stringify(Object.keys(p),null," "));var j=ne(F,H,O,A,_+"."+H,t);if(j)return j}return null}return b(m)}function K(p){switch(typeof p){case"number":case"string":case"undefined":return!0;case"boolean":return!p;case"object":if(Array.isArray(p))return p.every(K);if(p===null||i(p))return!0;var m=u(p);if(m){var E=m.call(p),R;if(m!==p.entries){for(;!(R=E.next()).done;)if(!K(R.value))return!1}else for(;!(R=E.next()).done;){var O=R.value;if(O&&!K(O[1]))return!1}}else return!1;return!0;default:return!1}}function Z(p,m){return p==="symbol"?!0:m?m["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&m instanceof Symbol:!1}function X(p){var m=typeof p;return Array.isArray(p)?"array":p instanceof RegExp?"object":Z(m,p)?"symbol":m}function W(p){if(typeof p>"u"||p===null)return""+p;var m=X(p);if(m==="object"){if(p instanceof Date)return"date";if(p instanceof RegExp)return"regexp"}return m}function G(p){var m=W(p);switch(m){case"array":case"object":return"an "+m;case"boolean":case"date":case"regexp":return"a "+m;default:return m}}function I(p){return!p.constructor||!p.constructor.name?d:p.constructor.name}return h.checkPropTypes=s,h.resetWarningCache=s.resetWarningCache,h.PropTypes=h,h},nt}var st,Lt;function Zr(){if(Lt)return st;Lt=1;var r=pt();function e(){}function t(){}return t.resetWarningCache=e,st=function(){function n(o,i,c,l,f,u){if(u!==r){var d=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 d.name="Invariant Violation",d}}n.isRequired=n;function s(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:t,resetWarningCache:e};return a.PropTypes=a,a},st}var kt;function Qr(){if(kt)return Ne.exports;if(kt=1,process.env.NODE_ENV!=="production"){var r=ir(),e=!0;Ne.exports=Xr()(r.isElement,e)}else Ne.exports=Zr()();return Ne.exports}var ae=Qr(),en=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},tn=function(e,t){for(var n in e)if(!(n in t))return!0;for(var s in t)if(e[s]!==t[s])return!0;return!1},rn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Me="http://www.w3.org/2000/svg",It="http://www.w3.org/1999/xlink",Te=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),o=0;o<s;o++)a[o]=arguments[o];return n=r.call.apply(r,[this].concat(a))||this,n.initialState={hasError:!1,isLoading:!0},n.state=n.initialState,n._isMounted=!1,n.reactWrapper=void 0,n.nonReactWrapper=void 0,n.refCallback=function(i){n.reactWrapper=i},n}_r(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof en(this.reactWrapper).Node){var a=this.props,o=a.desc,i=a.evalScripts,c=a.httpRequestWithCredentials,l=a.renumerateIRIElements,f=a.src,u=a.title,d=a.useRequestCache,h=this.props.onError,g=this.props.beforeInjection,y=this.props.afterInjection,b=this.props.wrapper,w,T;b==="svg"?(w=document.createElementNS(Me,b),w.setAttribute("xmlns",Me),w.setAttribute("xmlns:xlink",It),T=document.createElementNS(Me,b)):(w=document.createElement(b),T=document.createElement(b)),w.appendChild(T),T.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(w);var P=function(L){if(s.removeSVG(),!s._isMounted){h(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(L)})},S=function(L,U){if(L){P(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{y(U)}catch(M){P(M)}})},v=function(L){if(L.setAttribute("role","img"),o){var U=L.querySelector(":scope > desc");U&&L.removeChild(U);var M=document.createElement("desc");M.innerHTML=o,L.prepend(M)}if(u){var $=L.querySelector(":scope > title");$&&L.removeChild($);var N=document.createElement("title");N.innerHTML=u,L.prepend(N)}try{g(L)}catch(Y){P(Y)}};qr(T,{afterEach:S,beforeEach:v,cacheRequests:d,evalScripts:i,httpRequestWithCredentials:c,renumerateIRIElements:l})}},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;tn(Be({},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 o=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var i=s.wrapper,c=Nr(s,rn),l=i;return Ce.createElement(l,Be({},c,{ref:this.refCallback},i==="svg"?{xmlns:Me,xmlnsXlink:It}:{}),this.state.isLoading&&o&&Ce.createElement(o,null),this.state.hasError&&a&&Ce.createElement(a,null))},e}(Ce.Component);Te.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Te.propTypes={afterInjection:ae.func,beforeInjection:ae.func,desc:ae.string,evalScripts:ae.oneOf(["always","once","never"]),fallback:ae.oneOfType([ae.func,ae.object,ae.string]),httpRequestWithCredentials:ae.bool,loading:ae.oneOfType([ae.func,ae.object,ae.string]),onError:ae.func,renumerateIRIElements:ae.bool,src:ae.string.isRequired,title:ae.string,useRequestCache:ae.bool,wrapper:ae.oneOf(["div","span","svg"])};let lt={assets:"/"};const nn=r=>{lt={...lt,...r}},Nt=r=>`${lt.assets}/${r}`.replace(/\/+/g,"/"),ue=C.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:o="base",rotated:i=!1,onClick:c,isInteractable:l=!1,spin:f=!1,title:u})=>{const[d,h]=C.useState(r),g=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),y=g&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),b=Nt(`assets/svg/${r}.svg`),w=Nt(`assets/svg/${n}.svg`),T={img:`${l?"smp-image-interactable":""}`,svg:`smp-icon ${o?`smp-icon-${o}`:""} ${i?"smp-icon-rotated":""} ${l?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},P=()=>{!a&&c&&c()};return x.jsx(x.Fragment,{children:y?x.jsx(Te,{src:r,fallback:()=>x.jsx(Te,{src:w,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:T.svg,onClick:P}):g?x.jsx("img",{src:d,width:e||"16px",height:t||"auto",alt:u,onError:()=>h(w),onClick:P,className:T.img,title:u,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&P()}}):x.jsx(Te,{src:b,fallback:()=>x.jsx(Te,{src:w,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:T.svg,onClick:P})})}),xe=({disabled:r,readOnly:e,bindValue:t,icon:n,onBlur:s,onChange:a,placeholder:o,shapeIcon:i,sizing:c,state:l,variant:f,rotatedShapeIcon:u=!1,onShapeIconClick:d,ref:h,inputRef:g,onKeyDown:y,inputType:b="text",ariaLabel:w="input field",label:T,helperText:P=!1,error:S,appearance:v="base",fullWidth:D=!1,_dataComponent:L="textfield",width:U})=>{const M=S?"danger":l,$=S||l=="danger"?"error":i,N=P||!!S,Y=Z=>{a==null||a(Z.target.value)},q={wrapper:`smp-textfield-wrapper ${D?"smp-textfield-fullWidth":""}`,container:`smp-textfield ${r?"smp-textfield-disabled":""} ${e?"smp-textfield-readOnly":""} ${o?"smp-textfield-placeholder":""} ${c?`smp-textfield-${c}`:""} ${M?`smp-textfield-${M}`:""} ${f?`smp-textfield-variant-${f}`:""} ${v?`smp-textfield-${v}`:""}`,input:"smp-textfield-input "},K=U?{"--smp-textField-width-base":U}:void 0;return x.jsxs("div",{className:q.wrapper,"data-component":L,children:[T&&x.jsx(nr,{label:T,disabled:r}),x.jsxs("div",{className:q.container,ref:h,style:K,children:[n&&x.jsx(ue,{icon:n,disabled:r}),x.jsx("input",{type:b,value:t,placeholder:o,onChange:Y,onBlur:s,className:q.input,disabled:r,readOnly:e,onKeyDown:y,"aria-label":w,ref:g}),$&&x.jsx(ue,{icon:$,disabled:r,state:M,onClick:d,rotated:u})]}),N&&x.jsx(Ir,{helperText:S,disabled:r,state:M})]})};function sn({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=C.useState(0),o=C.useRef(null),i=r.length*e,c=Math.max(0,Math.floor(s/e)-n),l=Math.min(r.length-1,Math.floor((s+t)/e)+n),f=[];for(let h=c;h<=l;h++)f.push({item:r[h],index:h,offsetTop:h*e});const u=C.useCallback(h=>{const g=h.target.scrollTop;a(g)},[]),d=h=>{if(!o.current)return;const g=h*e,y=g+e,b=o.current,w=b.scrollTop,T=w+t;g<w?b.scrollTop=g:y>T&&(b.scrollTop=y-t)};return{virtualItems:f,containerProps:{ref:o,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${i}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:i,startIndex:c,endIndex:l},scrollToIndex:d}}const an=10,lr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:o=[],width:i,onClick:c,onKeyDown:l})=>{var $;const[f,u]=C.useState(""),d=24,[h,g]=C.useState(a!==null?a:-1),y=s!==void 0?s:e.length>an,b=f?e.filter(N=>N.label.toLowerCase().includes(f.toLowerCase())):e,w=N=>{u(N)},{virtualItems:T,containerProps:P,innerProps:S,scrollToIndex:v}=sn({items:b,itemHeight:d,containerHeight:200,overscan:5});C.useEffect(()=>{a!==null&&a!==h&&g(a)},[a]),C.useEffect(()=>{h>=0&&h<b.length&&v(h)},[h,b]);const D=N=>{if(N.key==="ArrowDown"||N.key==="ArrowUp"){N.preventDefault();let Y=h;N.key==="ArrowDown"?Y=h<b.length-1?h+1:0:N.key==="ArrowUp"&&(Y=h>0?h-1:b.length-1),g(Y)}else N.key==="Enter"?h>=0&&h<b.length&&(c==null||c(b[h])):N.key==="Escape"&&(N.preventDefault(),N.stopPropagation());l&&l(N)},L=N=>{D(N)},U=N=>{D(N)},M={wrapper:"smp-list",container:"smp-list-container",virtualScroll:"smp-list-virtualScroll",listItem:"smp-list-listItem"};return x.jsxs("div",{id:r,ref:n,className:M.wrapper,"data-component":"list",style:{width:i},children:[y&&x.jsx(xe,{bindValue:f,placeholder:"Search...",onChange:w,onKeyDown:L}),x.jsx("div",{...P,className:M.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:U,"aria-activedescendant":h>=0&&h<b.length?($=b[h])==null?void 0:$.id:void 0,children:x.jsx("div",{...S,className:M.virtualScroll,children:T.map(({item:N,index:Y,offsetTop:q})=>{const K=o.includes(N.id);return x.jsxs("li",{role:"option",id:N.id,"aria-selected":h===Y?"true":"false",tabIndex:-1,className:`${M.listItem} ${h===Y?"selected-item":""}`,"aria-label":N.id+"-"+N.label,style:{height:`${d}px`,lineHeight:`calc(${d}px - 2*2px)`,transform:`translateY(${q}px)`},onClick:()=>{c==null||c(N),g(Y)},children:[He(N.id,N.label,t),K&&x.jsx(ue,{icon:"check",width:16})]},N.id)})})})]})},cr=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=C.useState(He(e,t,r));return C.useEffect(()=>{a(e)},[e]),C.useEffect(()=>{a(He(e,t,r))},[t,r]),x.jsx(xe,{...n,bindValue:s})},on=r=>{const e=C.useRef(null);return C.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}},ht=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,placeholder:o,fun:i,_changeOnEnter:c=!1,onChange:l,onOptionsRequest:f,_multiActiveIndex:u,...d})=>{const[h,g]=C.useState(r),[y,b]=C.useState(e),[w,T]=C.useState(!1),[P,S]=C.useState(t||[]),[v,D]=C.useState(0),[L,U]=C.useState([r]),{anchorRef:M,targetRef:$,anchorWidth:N}=dt({position:"bottom",enabled:w});We($,()=>T(!1));const Y=on(400),q=W=>{W.length>=a?i&&f&&Y(async()=>{const G=await f(i,W);S(G),D(G.length>0?0:-1),T(!0)}):T(!1),g(W),b(e),c||l==null||l(W,e)},K=W=>{c?(g(""),b("")):(g(W.id),b(W.label)),l==null||l(W.id,W.label);const G=P.findIndex(I=>I.id===W.id);D(G),U([W.id]),T(!1)},Z=W=>{W.key==="Escape"&&(T(!1),D(-1))},X=W=>{if((W.key==="ArrowDown"||W.key==="ArrowUp")&&(W.preventDefault(),w)){const G=W.key==="ArrowDown"?(v+1)%P.length:(v-1+P.length)%P.length;D(G)}switch(W.key){case"Enter":v>=0&&v<P.length?K(P[v]):c&&(l==null||l(h,""),T(!1),g(""),b(""));break;case"Escape":T(!1),D(-1);break}};return x.jsxs("div",{"data-component":"autocomplete",children:[x.jsx(cr,{...d,bindValue:h,optionalDisplayValue:y,displayMode:n,shapeIcon:"magnify",placeholder:o,ref:M,onChange:q,onKeyDown:X,"aria-autocomplete":"list"}),w&&x.jsx(lr,{options:P,displayMode:s,onClick:K,ref:$,selectedIndex:v,activeIndex:u||L,width:N,showFilter:!1,onKeyDown:Z})]})},_t=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],Mt=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Oe=({label:r,onClick:e,ariaLabel:t,icon:n,disabled:s,sizing:a="base",variant:o="primary",appearance:i="raised",showIcon:c=!0,showText:l=!0,fullWidth:f=!1,loading:u=!1,justify:d="center",title:h,optionalDisplayValue:g})=>{const y={container:`smp-button smp-button-container ${a?`smp-button-${a}`:""} ${o?`smp-buttonVariant-${o}`:""} ${i?`smp-buttonType-${i}`:""} ${f?"smp-button-fullWidth":""} smp-justifyContent-${d}`};return x.jsx("button",{"data-component":"button",className:y.container,onClick:e,"aria-label":t,disabled:s,"aria-busy":u,title:h||r||g,children:u?x.jsx(ue,{icon:"spinner",state:Mt(o),spin:!0}):x.jsxs(x.Fragment,{children:[n&&c&&x.jsx(ue,{icon:n,disabled:s,state:Mt(o),width:_t(a),height:_t(a)}),l&&g&&x.jsx("span",{children:g})]})})},ur=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:o,showText:i,showIcon:c,fullWidth:l,disabled:f,justify:u,onClick:d,onOptionsRequest:h})=>{const[g,y]=C.useState(r);C.useEffect(()=>{!g&&h&&e&&h(e,void 0).then(T=>y(T)).catch(T=>{console.error("Errore nel caricamento delle opzioni per ButtonList",T)})},[g,e,h]);const b={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},w=g==null?void 0:g.map((T,P)=>{const S={bindValue:T.id,optionalDisplayValue:T.label,fun:T.fun,icon:T.icon,variant:a,appearance:o,showText:i,showIcon:c,fullWidth:l,disabled:f,sizing:s,justify:u,onClick:()=>{d==null||d(T.id,T.fun)}};return x.jsx(Oe,{...S},`button-${P}`)});return x.jsx("div",{role:"list","data-component":"button-list",className:b.container,children:w})},fr=({bindValue:r,onChange:e,onBlur:t})=>{const n=s=>{e&&e(s.target.checked)};return x.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:n,onBlur:t})},ln={titleLarge:"h2",title:"h3",body:"h6",label:"label"},cn=({variant:r="body",bindValue:e,color:t,...n})=>{const s=ln[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return x.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},dr=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:o=!1})=>{const[i,c]=C.useState(null),l={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=h=>{n==null||n(r.filter((g,y)=>y!==h))},u=h=>{c(h)},d=h=>{if(i===null||i===h)return;const g=[...r],[y]=g.splice(i,1);g.splice(h,0,y),n==null||n(g),c(null)};return x.jsx("div",{className:l.container,role:"list","data-component":"chip",children:r.flatMap((h,g)=>{const y=He(h.bindValue,h.optionalDisplayValue,t),b=x.jsxs("div",{className:l.element,role:"listitem",draggable:o,onDragStart:()=>u(g),onDragOver:T=>o&&T.preventDefault(),onDrop:()=>o&&d(g),style:{"--smp-chips-backgroundColor-base":a},children:[o&&x.jsx(ue,{icon:"drag_indicator_horizontal",isInteractable:!0}),x.jsx(cn,{variant:"label",bindValue:y,color:s}),e&&x.jsx(ue,{icon:"close",isInteractable:!0,onClick:()=>f(g),color:s})]},`chip-${g}`),w=o&&g<r.length-1?x.jsx(ue,{icon:"chevron-right",color:s},`separator-${g}`):null;return[b,w].filter(Boolean)})})};function pr(r,e){const t=C.useRef(null);C.useEffect(()=>{if(!r)return;const n=typeof e=="object"&&e!==null&&"current"in e?e.current:null;if(!n)return;t.current=document.activeElement;const s=()=>n?Array.from(n.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(l=>!l.hasAttribute("disabled")&&l.offsetParent!==null):[];(()=>{const l=s();l.length>0&&requestAnimationFrame(()=>l[0].focus())})();const o=l=>{if(l.key==="Escape"||l.key!=="Tab")return;const f=s();if(f.length===0)return;const u=f[0],d=f[f.length-1];l.shiftKey&&document.activeElement===u?(l.preventDefault(),d.focus()):!l.shiftKey&&document.activeElement===d&&(l.preventDefault(),u.focus())},i=l=>{if(n&&!n.contains(l.target)){l.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",o),document.addEventListener("mousedown",i);const c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.removeEventListener("mousedown",i),document.body.style.overflow=c,t.current&&requestAnimationFrame(()=>{var l;(l=t.current)==null||l.focus()})}},[r,e])}const hr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,displayMode:s,listDisplayMode:a="Both",fun:o,onOptionsRequest:i,multiActiveIndex:c,...l})=>{const[f,u]=C.useState(!1),[d,h]=C.useState(t),[g,y]=C.useState(-1),[b,w]=C.useState([r]),T=C.useId(),{anchorRef:P,targetRef:S,anchorWidth:v}=dt({position:"bottom",enabled:f});We(S,()=>u(!1)),pr(f,S);const D=$=>{e==null||e($.id,$.label);const N=d.findIndex(Y=>Y.id===$.id);y(N),w([$.id]),u(!1)},L=$=>{$.key==="Escape"&&(u(!1),y(-1))},U=$=>{($.key==="ArrowDown"||$.key==="ArrowUp")&&($.preventDefault(),M())},M=()=>{o&&i&&i(o,void 0).then($=>{h($),y($.length>0?0:-1),u(!0)})};return x.jsxs("div",{role:"combobox","aria-expanded":f,"aria-controls":T,"aria-owns":T,"data-component":"combobox",children:[x.jsx(cr,{...l,bindValue:r,optionalDisplayValue:n,displayMode:s,onShapeIconClick:M,onKeyDown:U,shapeIcon:"arrow_drop_down",rotatedShapeIcon:f,readOnly:!0,ref:P,"aria-autocomplete":"list",variant:"notSelectable"}),f&&x.jsx(lr,{id:T,options:d,displayMode:a,ref:S,selectedIndex:g,activeIndex:c||b,width:v,onClick:D,onKeyDown:L})]})},B=r=>typeof r=="string",Pe=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},Ft=r=>r==null?"":""+r,un=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},fn=/###/g,Vt=r=>r&&r.indexOf("###")>-1?r.replace(fn,"."):r,Yt=r=>!r||B(r),Ae=(r,e,t)=>{const n=B(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(Yt(r))return{};const a=Vt(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return Yt(r)?{}:{obj:r,k:Vt(n[s])}},Ut=(r,e,t)=>{const{obj:n,k:s}=Ae(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],o=e.slice(0,e.length-1),i=Ae(r,o,Object);for(;i.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),i=Ae(r,o,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${a}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${a}`]=t},dn=(r,e,t,n)=>{const{obj:s,k:a}=Ae(r,e,Object);s[a]=s[a]||[],s[a].push(t)},qe=(r,e)=>{const{obj:t,k:n}=Ae(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},pn=(r,e,t)=>{const n=qe(r,t);return n!==void 0?n:qe(e,t)},gr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?B(r[n])||r[n]instanceof String||B(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):gr(r[n],e[n],t):r[n]=e[n]);return r},we=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const gn=r=>B(r)?r.replace(/[&<>"'\/]/g,e=>hn[e]):r;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 n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const yn=[" ",",","?","!",";"],vn=new mn(20),bn=(r,e,t)=>{e=e||"",t=t||"";const n=yn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const s=vn.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!s.test(r);if(!a){const o=r.indexOf(t);o>0&&!s.test(r.substring(0,o))&&(a=!0)}return a},ct=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let s=r;for(let a=0;a<n.length;){if(!s||typeof s!="object")return;let o,i="";for(let c=a;c<n.length;++c)if(c!==a&&(i+=t),i+=n[c],o=s[i],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&c<n.length-1)continue;a+=c-a+1;break}s=o}return s},je=r=>r==null?void 0:r.replace("_","-"),xn={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class Ke{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||xn,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,s){return s&&!this.debug?null:(B(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ke(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ke(this.logger,e)}}var ge=new Ke;class Ge{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(t)||0;this.observers[n].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,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let o=0;o<a;o++)s.apply(s,[e,...t])})}}class Wt extends Ge{constructor(e,t={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,n,s={}){var l,f;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],n&&(Array.isArray(n)?i.push(...n):B(n)&&a?i.push(...n.split(a)):i.push(n)));const c=qe(this.data,i);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=i[0],t=i[1],n=i.slice(2).join(".")),c||!o||!B(n)?c:ct((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),s=t,t=i[1]),this.addNamespaces(t),Ut(this.data,i,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(B(n[a])||Array.isArray(n[a]))&&this.addResource(e,t,a,n[a],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),s=n,n=t,t=i[1]),this.addNamespaces(t);let c=qe(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?gr(c,n,a):c={...c,...n},Ut(this.data,i,c),o.silent||this.emit("added",e,t,n)}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 mr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var o;e=((o=this.processors[a])==null?void 0:o.process(e,t,n,s))??e}),e}};const Ht={},Bt=r=>!B(r)&&typeof r!="boolean"&&typeof r!="number";class ze extends Ge{constructor(e,t={}){super(),un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ge.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const n={...t};if(e==null)return!1;const s=this.resolve(e,n);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let a=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bn(e,n,s);if(o&&!i){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:B(a)?[a]:a};const l=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(l[0])>-1)&&(a=l.shift()),e=l.join(s)}return{key:e,namespaces:B(a)?[a]:a}}translate(e,t,n){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(e[e.length-1],s),l=c[c.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=s.lng||this.language,d=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return d?a?{res:`${l}${f}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${f}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:i;const h=this.resolve(e,s);let g=h==null?void 0:h.res;const y=(h==null?void 0:h.usedKey)||i,b=(h==null?void 0:h.exactUsedKey)||i,w=["[object Number]","[object Function]","[object RegExp]"],T=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject,S=s.count!==void 0&&!B(s.count),v=ze.hasDefaultValue(s),D=S?this.pluralResolver.getSuffix(u,s.count,s):"",L=s.ordinal&&S?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",U=S&&!s.ordinal&&s.count===0,M=U&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${D}`]||s[`defaultValue${L}`]||s.defaultValue;let $=g;P&&!g&&v&&($=M);const N=Bt($),Y=Object.prototype.toString.apply($);if(P&&$&&N&&w.indexOf(Y)<0&&!(B(T)&&Array.isArray($))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,$,{...s,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(h.res=q,h.usedParams=this.getUsedParamsDetails(s),h):q}if(o){const q=Array.isArray($),K=q?[]:{},Z=q?b:y;for(const X in $)if(Object.prototype.hasOwnProperty.call($,X)){const W=`${Z}${o}${X}`;v&&!g?K[X]=this.translate(W,{...s,defaultValue:Bt(M)?M[X]:void 0,joinArrays:!1,ns:c}):K[X]=this.translate(W,{...s,joinArrays:!1,ns:c}),K[X]===W&&(K[X]=$[X])}g=K}}else if(P&&B(T)&&Array.isArray(g))g=g.join(T),g&&(g=this.extendTranslation(g,e,s,n));else{let q=!1,K=!1;!this.isValidLookup(g)&&v&&(q=!0,g=M),this.isValidLookup(g)||(K=!0,g=i);const X=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&K?void 0:g,W=v&&M!==g&&this.options.updateMissing;if(K||q||W){if(this.logger.log(W?"updateKey":"missingKey",u,l,i,W?M:g),o){const m=this.resolve(i,{...s,keySeparator:!1});m&&m.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 G=[];const I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&I&&I[0])for(let m=0;m<I.length;m++)G.push(I[m]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(s.lng||this.language):G.push(s.lng||this.language);const p=(m,E,R)=>{var A;const O=v&&R!==g?R:X;this.options.missingKeyHandler?this.options.missingKeyHandler(m,l,E,O,W,s):(A=this.backendConnector)!=null&&A.saveMissing&&this.backendConnector.saveMissing(m,l,E,O,W,s),this.emit("missingKey",m,l,E,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?G.forEach(m=>{const E=this.pluralResolver.getSuffixes(m,s);U&&s[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(R=>{p([m],i+R,s[`defaultValue${R}`]||M)})}):p(G,i,M))}g=this.extendTranslation(g,e,s,h,n),K&&g===i&&this.options.appendNamespaceToMissingKey&&(g=`${l}${f}${i}`),(K||q)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${i}`:i,q?g:void 0,s))}return a?(h.res=g,h.usedParams=this.getUsedParamsDetails(s),h):g}extendTranslation(e,t,n,s,a){var c,l;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const f=B(e)&&(((l=n==null?void 0:n.interpolation)==null?void 0:l.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const h=e.match(this.interpolator.nestingRegexp);u=h&&h.length}let d=n.replace&&!B(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||s.usedLng,n),f){const h=e.match(this.interpolator.nestingRegexp),g=h&&h.length;u<g&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(a==null?void 0:a[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):this.translate(...h,t),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,i=B(o)?[o]:o;return e!=null&&(i!=null&&i.length)&&n.applyPostProcessor!==!1&&(e=mr.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,o,i;return B(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(n))return;const l=this.extractFromKey(c,t),f=l.key;s=f;let u=l.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const d=t.count!==void 0&&!B(t.count),h=d&&!t.ordinal&&t.count===0,g=t.context!==void 0&&(B(t.context)||typeof t.context=="number")&&t.context!=="",y=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(b=>{var w,T;this.isValidLookup(n)||(i=b,!Ht[`${y[0]}-${b}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((T=this.utils)!=null&&T.hasLoadedNamespace(i))&&(Ht[`${y[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${i}" 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(P=>{var D;if(this.isValidLookup(n))return;o=P;const S=[f];if((D=this.i18nFormat)!=null&&D.addLookupKeys)this.i18nFormat.addLookupKeys(S,f,P,b,t);else{let L;d&&(L=this.pluralResolver.getSuffix(P,t.count,t));const U=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(S.push(f+L),t.ordinal&&L.indexOf(M)===0&&S.push(f+L.replace(M,this.options.pluralSeparator)),h&&S.push(f+U)),g){const $=`${f}${this.options.contextSeparator}${t.context}`;S.push($),d&&(S.push($+L),t.ordinal&&L.indexOf(M)===0&&S.push($+L.replace(M,this.options.pluralSeparator)),h&&S.push($+U))}}let v;for(;v=S.pop();)this.isValidLookup(n)||(a=v,n=this.getResource(P,b,v,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!B(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const a of t)delete s[a]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class qt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ge.create("languageUtils")}getScriptPartFromCode(e){if(e=je(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=je(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(B(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(n=>{if(t)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return t=s;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return t=a;t=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),B(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],a=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return B(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))):B(e)&&a(this.formatLanguageCode(e)),n.forEach(o=>{s.indexOf(o)<0&&a(this.formatLanguageCode(o))}),s}}const Kt={zero:0,one:1,two:2,few:3,many:4,other:5},zt={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ge.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=je(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),zt;if(!e.match(/-|_/))return zt;const c=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(c,t)}return this.pluralRulesCache[a]=o,o}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((s,a)=>Kt[s]-Kt[a]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Gt=(r,e,t,n=".",s=!0)=>{let a=pn(r,e,t);return!a&&s&&B(t)&&(a=ct(r,t,n),a===void 0&&(a=ct(e,t,n))),a},at=r=>r.replace(/\$/g,"$$$$");class wn{constructor(e={}){var t;this.logger=ge.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:c,formatSeparator:l,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:h,nestingSuffix:g,nestingSuffixEscaped:y,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:T}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?we(a):o||"{{",this.suffix=i?we(i):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?we(d):h||we("$t("),this.nestingSuffix=g?we(g):y||we(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=T!==void 0?T:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"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,n,s){var h;let a,o,i;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=g=>{if(g.indexOf(this.formatSeparator)<0){const T=Gt(t,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(T,void 0,n,{...s,...t,interpolationkey:g}):T}const y=g.split(this.formatSeparator),b=y.shift().trim(),w=y.join(this.formatSeparator).trim();return this.format(Gt(t,c,b,this.options.keySeparator,this.options.ignoreJSONStructure),w,n,{...s,...t,interpolationkey:b})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((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=>at(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?at(this.escape(g)):at(g)}].forEach(g=>{for(i=0;a=g.regex.exec(e);){const y=a[1].trim();if(o=l(y),o===void 0)if(typeof f=="function"){const w=f(e,a,s);o=B(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,y))o="";else if(u){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),o="";else!B(o)&&!this.useRawValueToEscape&&(o=Ft(o));const b=g.safeValue(o);if(e=e.replace(a[0],b),u?(g.regex.lastIndex+=o.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,o;const i=(c,l)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const u=c.split(new RegExp(`${f}[ ]*{`));let d=`{${u[1]}`;c=u[0],d=this.interpolate(d,o);const h=d.match(/'/g),g=d.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!g||g.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),l&&(o={...l,...o})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,y),`${c}${f}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];o={...n},o=o.replace&&!B(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(u=>u.trim());s[1]=f.shift(),c=f,l=!0}if(a=t(i.call(this,s[1].trim(),o),o),a&&s[0]===e&&!B(a))return a;B(a)||(a=Ft(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),l&&(a=c.reduce((f,u)=>this.format(f,u,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const En=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[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(o=>{if(o){const[i,...c]=o.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),f=i.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},Jt=r=>{const e={};return(t,n,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const o=n+JSON.stringify(a);let i=e[o];return i||(i=r(je(n),s),e[o]=i),i(t)}},Tn=r=>(e,t,n)=>r(je(t),n)(e);class On{constructor(e={}){this.logger=ge.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?Jt:Tn;this.formats={number:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a});return i=>o.format(i)}),currency:n((s,a)=>{const o=new Intl.NumberFormat(s,{...a,style:"currency"});return i=>o.format(i)}),datetime:n((s,a)=>{const o=new Intl.DateTimeFormat(s,{...a});return i=>o.format(i)}),relativetime:n((s,a)=>{const o=new Intl.RelativeTimeFormat(s,{...a});return i=>o.format(i,a.range||"day")}),list:n((s,a)=>{const o=new Intl.ListFormat(s,{...a});return i=>o.format(i)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Jt(t)}format(e,t,n,s={}){const a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(i=>i.indexOf(")")>-1)){const i=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,i)].join(this.formatSeparator)}return a.reduce((i,c)=>{var u;const{formatName:l,formatOptions:f}=En(c);if(this.formats[l]){let d=i;try{const h=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},g=h.locale||h.lng||s.locale||s.lng||n;d=this.formats[l](i,g,{...f,...s,...h})}catch(h){this.logger.warn(h)}return d}else this.logger.warn(`there was no format function for ${l}`);return i},e)}}const Rn=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Dn extends Ge{constructor(e,t,n,s={}){var a,o;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ge.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=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},o={},i={},c={};return e.forEach(l=>{let f=!0;t.forEach(u=>{const d=`${l}|${u}`;!n.reload&&this.store.hasResourceBundle(l,u)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,f=!1,o[d]===void 0&&(o[d]=!0),a[d]===void 0&&(a[d]=!0),c[u]===void 0&&(c[u]=!0)))}),f||(i[l]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(c)}}loaded(e,t,n){const s=e.split("|"),a=s[0],o=s[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const i={};this.queue.forEach(c=>{dn(c.loaded,[a],o),Rn(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{i[l]||(i[l]={});const f=c.loaded[l];f.length&&f.forEach(u=>{i[l][u]===void 0&&(i[l][u]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(c=>!c.done)}read(e,t,n,s=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:o});return}this.readingCalls++;const i=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(l&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,o)},a);return}o(l,f)},c=this.backend[n].bind(this.backend);if(c.length===2){try{const l=c(e,t);l&&typeof l.then=="function"?l.then(f=>i(null,f)).catch(i):i(null,l)}catch(l){i(l)}return}return c(e,t,i)}prepareLoading(e,t,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();B(e)&&(e=this.languageUtils.toResolveHierarchy(e)),B(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){const n=e.split("|"),s=n[0],a=n[1];this.read(s,a,"read",void 0,void 0,(o,i)=>{o&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,o),!o&&i&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,i),this.loaded(e,o,i)})}saveMissing(e,t,n,s,a,o={},i=()=>{}){var c,l,f,u,d;if((l=(c=this.services)==null?void 0:c.utils)!=null&&l.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" 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(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const h={...o,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let y;g.length===5?y=g(e,t,n,s,h):y=g(e,t,n,s),y&&typeof y.then=="function"?y.then(b=>i(null,b)).catch(i):i(null,y)}catch(y){i(y)}else g(e,t,n,s,i,h)}!e||!e[0]||this.store.addResource(e[0],t,n,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:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),B(r[1])&&(e.defaultValue=r[1]),B(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Zt=r=>{var e,t;return B(r.ns)&&(r.ns=[r.ns]),B(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),B(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},Fe=()=>{},Pn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class $e extends Ge{constructor(e={},t){if(super(),this.options=Zt(e),this.services={},this.logger=ge,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(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(B(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=Xt();this.options={...n,...this.options,...Zt(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?ge.init(s(this.modules.logger),this.options):ge.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=On;const f=new qt(this.options);this.store=new Wt(this.options.resources,this.options);const u=this.services;u.logger=ge,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new Sn(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(u.formatter=s(l),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new wn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Dn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ze(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=Fe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[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(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const i=Pe(),c=()=>{const l=(f,u)=>{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),i.resolve(u),t(f,u)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),i}loadResources(e,t=Fe){var a,o;let n=t;const s=B(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>c(f)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,l=>c(l)),this.services.backendConnector.load(i,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(e,t,n){const s=Pe();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Fe),this.services.backendConnector.reload(e,t,a=>{s.resolve(),n(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"&&mr.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const n=Pe();this.emit("languageChanging",e);const s=i=>{this.language=i,this.languages=this.services.languageUtils.toResolveHierarchy(i),this.resolvedLanguage=void 0,this.setResolvedLanguage(i)},a=(i,c)=>{c?this.isLanguageChangingTo===e&&(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,n.resolve((...l)=>this.t(...l)),t&&t(i,(...l)=>this.t(...l))},o=i=>{var f,u;!e&&!i&&this.services.languageDetector&&(i=[]);const c=B(i)?i:i&&i[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(B(i)?[i]:i);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,l)),this.loadResources(l,d=>{a(d,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,t,n){const s=(a,o,...i)=>{let c;typeof o!="object"?c=this.options.overloadTranslationOptionHandler([a,o].concat(i)):c={...o},c.lng=c.lng||s.lng,c.lngs=c.lngs||s.lngs,c.ns=c.ns||s.ns,c.keyPrefix!==""&&(c.keyPrefix=c.keyPrefix||n||s.keyPrefix);const l=this.options.keySeparator||".";let f;return c.keyPrefix&&Array.isArray(a)?f=a.map(u=>`${c.keyPrefix}${l}${u}`):f=c.keyPrefix?`${c.keyPrefix}${l}${a}`:a,this.t(f,c)};return B(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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 n=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(i,c)=>{const l=this.services.backendConnector.state[`${i}|${c}`];return l===-1||l===0||l===2};if(t.precheck){const i=t.precheck(this,o);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!s||o(a,e)))}loadNamespaces(e,t){const n=Pe();return this.options.ns?(B(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),t&&t(s)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Pe();B(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=s.concat(a),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(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"],n=((a=this.services)==null?void 0:a.languageUtils)||new qt(Xt());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new $e(e,t)}cloneInstance(e={},t=Fe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new $e(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(i=>{a[i]=this[i]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const i=Object.keys(this.store.data).reduce((c,l)=>(c[l]={...this.store.data[l]},c[l]=Object.keys(c[l]).reduce((f,u)=>(f[u]={...c[l][u]},f),c[l]),c),{});a.store=new Wt(i,s),a.services.resourceStore=a.store}return a.translator=new ze(a.services,s),a.translator.on("*",(i,...c)=>{a.emit(i,...c)}),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 se=$e.createInstance();se.createInstance=$e.createInstance;se.createInstance;se.dir;se.init;se.loadResources;se.reloadResources;se.use;se.changeLanguage;se.getFixedT;se.t;se.exists;se.setDefaultNamespace;se.hasLoadedNamespace;se.loadNamespaces;se.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"},jn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},$n={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando"},Cn={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:jn,Generic:$n},Ln={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"},kn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},In={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command"},Nn={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:Ln,Month:kn,Generic:In};function Qt(r,e){return new RegExp(_n(r),e)}function _n(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mn(r,e,t,n){let s=e;const a=Fn(r,t);if(!s){const i=Math.abs(a);i-Math.floor(i)?s="0,0.00":s="0,0"}const o=Vn(s);return new Intl.NumberFormat(n,o).format(a)}function Fn(r,e,t,n,s){let a=r;if(typeof a!="number"){let i;e&&n===void 0?i=",":i=".";const c=i=="."?",":".";a=a.replace(Qt(c,"g"),""),a=a.replace(Qt(i,"g"),"."),a=Number(a)}const o=Number(a);return isNaN(o)?NaN:o}function Vn(r){const e={};r.includes(",")?e.useGrouping=!0:e.useGrouping=!1;const t=r.indexOf(".");if(t>-1){const s=(r.substring(t+1).match(/0/g)||[]).length;e.minimumFractionDigits=s,e.maximumFractionDigits=s}else e.minimumFractionDigits=0,e.maximumFractionDigits=0;return e}se.init({lng:typeof navigator<"u"&&navigator.language.split("-")[0]||"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(r,e,t,n)=>{const s=(n==null?void 0:n.type)??"number";try{switch(s){case"date":{const a=r instanceof Date?r:new Date(r);return new Intl.DateTimeFormat(t,{dateStyle:e||"short"}).format(a)}default:case"number":{const a=(n==null?void 0:n.inputIsLocalized)??!1;return Mn(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Nn},it:{translation:Cn}}});const Yn=(r,e,t,n)=>se.format(r,e,t||se.language,n),Un=(r,e)=>se.t(r,e);function Je(){const r=C.useCallback((n,s,a,o)=>Yn(n,s,a||void 0,o),[]),e=C.useCallback(()=>se.languages[0],[]),t=C.useCallback((n,s)=>Un(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var gt=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r))(gt||{}),oe=(r=>(r.MONDAY="Day.Monday",r.MONDAY_SHORT="Day.MondayShort",r.TUESDAY="Day.Tuesday",r.TUESDAY_SHORT="Day.TuesdayShort",r.WEDNESDAY="Day.Wednesday",r.WEDNESDAY_SHORT="Day.WednesdayShort",r.THURSDAY="Day.Thursday",r.THURSDAY_SHORT="Day.ThursdayShort",r.FRIDAY="Day.Friday",r.FRIDAY_SHORT="Day.FridayShort",r.SATURDAY="Day.Saturday",r.SATURDAY_SHORT="Day.SaturdayShort",r.SUNDAY="Day.Sunday",r.SUNDAY_SHORT="Day.SundayShort",r))(oe||{}),ce=(r=>(r.JANUARY="Month.January",r.FEBRUARY="Month.February",r.MARCH="Month.March",r.APRIL="Month.April",r.MAY="Month.May",r.JUNE="Month.June",r.JULY="Month.July",r.AUGUST="Month.August",r.SEPTEMBER="Month.September",r.OCTOBER="Month.October",r.NOVEMBER="Month.November",r.DECEMBER="Month.December",r))(ce||{}),ut=(r=>(r.PREVIOUS_DAY="Date.PreviousDay",r.PREVIOUS_WEEK="Date.PreviousWeek",r.PREVIOUS_MONTH="Date.PreviousMonth",r.PREVIOUS_YEAR="Date.PreviousYear",r.NEXT_DAY="Date.NextDay",r.NEXT_WEEK="Date.NextWeek",r.NEXT_MONTH="Date.NextMonth",r.NEXT_YEAR="Date.NextYear",r.YESTERDAY="Date.Yesterday",r.TODAY="Date.Today",r.TOMORROW="Date.Tomorrow",r))(ut||{});function Wn({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Je(),o=()=>{if(!n)return;const I=new Date(n);return isNaN(I.getTime())?void 0:I},[i]=C.useState(new Date),[c,l]=C.useState(r||o()||new Date),[f,u]=C.useState(c?c.getMonth():new Date().getMonth()),[d,h]=C.useState(c?c.getFullYear():new Date().getFullYear()),[g,y]=C.useState(c?c.getDate():null),b=C.useRef(null),w=C.useRef([]),T=[a(ce.JANUARY),a(ce.FEBRUARY),a(ce.MARCH),a(ce.APRIL),a(ce.MAY),a(ce.JUNE),a(ce.JULY),a(ce.AUGUST),a(ce.SEPTEMBER),a(ce.OCTOBER),a(ce.NOVEMBER),a(ce.DECEMBER)],P=[{value:a(oe.SUNDAY_SHORT),full:a(oe.SUNDAY)},{value:a(oe.MONDAY_SHORT),full:a(oe.MONDAY)},{value:a(oe.TUESDAY_SHORT),full:a(oe.TUESDAY)},{value:a(oe.WEDNESDAY_SHORT),full:a(oe.WEDNESDAY)},{value:a(oe.THURSDAY_SHORT),full:a(oe.THURSDAY)},{value:a(oe.FRIDAY_SHORT),full:a(oe.FRIDAY)},{value:a(oe.SATURDAY_SHORT),full:a(oe.SATURDAY)}],S=I=>t.some(p=>{const m=p.start.getTime(),E=p.end.getTime(),R=I.getTime();return R>=m&&R<=E}),v=I=>{S(I)||(l(I),y(I.getDate()),e&&e(kr(I)))},D=()=>{f===0?(u(11),h(d-1)):u(f-1),y(1)},L=()=>{f===11?(u(0),h(d+1)):u(f+1),y(1)},U=(I,p)=>new Date(I,p+1,0).getDate(),M=(I,p)=>new Date(I,p,1).getDay(),$=I=>{var m;const p=K.findIndex(E=>E!==null&&E.getDate()===I);p!==-1&&w.current[p]&&((m=w.current[p])==null||m.focus(),y(I))},N=(I,p)=>{const m=K[p];if(!m)return;const E=U(d,f),R=m.getDate();switch(I.key){case"ArrowRight":I.preventDefault();{let O=R+1,A=new Date(d,f,O);if(O>E){const _=f===11?d+1:d,F=f===11?0:f+1;O=1,A=new Date(_,F,O),L(),setTimeout(()=>{Y(1,"forward")},0);return}S(A)?Y(O,"forward"):$(O)}break;case"Tab":break;case"ArrowLeft":I.preventDefault();{let O=R-1,A=new Date(d,f,O);if(O<1){const _=f===0?d-1:d,F=f===0?11:f-1,k=U(_,F);O=k,A=new Date(_,F,O),D(),setTimeout(()=>{Y(k,"backward")},0);return}S(A)?Y(O,"backward"):$(O)}break;case"ArrowUp":I.preventDefault();{let O=R-7,A=new Date(d,f,O);if(O<1){const _=f===0?d-1:d,F=f===0?11:f-1;O=U(_,F)+O,A=new Date(_,F,O),D(),setTimeout(()=>{Y(O,"backward")},0);return}S(A)?Y(O,"backward"):$(O)}break;case"ArrowDown":I.preventDefault();{let O=R+7,A=new Date(d,f,O);if(O>E){const _=f===11?d+1:d,F=f===11?0:f+1;O=O-E,A=new Date(_,F,O),L(),setTimeout(()=>{Y(O,"forward")},0);return}S(A)?Y(O,"forward"):$(O)}break;case"Home":I.preventDefault(),Y(1,"forward");break;case"End":I.preventDefault(),Y(E,"backward");break;case"PageUp":I.preventDefault(),D(),setTimeout(()=>{const O=U(f===0?d-1:d,f===0?11:f-1),A=Math.min(R,O);Y(A,"forward")},0);break;case"PageDown":I.preventDefault(),L(),setTimeout(()=>{const O=U(f===11?d+1:d,f===11?0:f+1),A=Math.min(R,O);Y(A,"forward")},0);break;case" ":case"Space":if(S(m))return;y(m.getDate()),l(m);break;case"Enter":I.preventDefault(),v(m);break}},Y=(I,p)=>{const m=U(d,f);if(p==="forward"){for(let E=I;E<=m;E++){const R=new Date(d,f,E);if(!S(R)){$(E);return}}L(),setTimeout(()=>{Y(1,"forward")},0)}else{for(let A=I;A>=1;A--){const _=new Date(d,f,A);if(!S(_)){$(A);return}}const E=f===0?d-1:d,R=f===0?11:f-1,O=U(E,R);D(),setTimeout(()=>{Y(O,"backward")},0)}},K=(()=>{const I=U(d,f),p=M(d,f),m=[];for(let E=0;E<p;E++)m.push(null);for(let E=1;E<=I;E++){const R=new Date(d,f,E);m.push(R)}return m})(),Z=[];let X=[];K.forEach((I,p)=>{if(X.push(I),X.length===7||p===K.length-1){for(;X.length<7;)X.push(null);Z.push(X),X=[]}}),C.useEffect(()=>{var I;if(g!==null){const p=K.findIndex(m=>m!==null&&m.getDate()===g);p!==-1&&w.current[p]&&((I=w.current[p])==null||I.focus())}},[f,d,g,K]);const W={label:"smp-datepickercalendar-label",wrapper:"smp-datepickercalendar",calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(I,p,m,E)=>`smp-datepickercalendar-td
46
46
  ${I?"smp-datepickercalendar-td-today":""}
47
47
  ${p?"smp-datepickercalendar-td-selected":""}
48
48
  ${m?"smp-datepickercalendar-td-focused":""}
@@ -80,7 +80,7 @@ function Dr() {
80
80
  case S:
81
81
  var m = p.render;
82
82
  return p = p.displayName, p || (p = m.displayName || m.name || "", p = p !== "" ? "ForwardRef(" + p + ")" : "ForwardRef"), p;
83
- case C:
83
+ case L:
84
84
  return m = p.displayName || null, m !== null ? m : n(p.type) || "Memo";
85
85
  case Y:
86
86
  m = p._payload, p = p._init;
@@ -187,24 +187,24 @@ function Dr() {
187
187
  }), Object.freeze && (Object.freeze(p.props), Object.freeze(p)), p;
188
188
  }
189
189
  function f(p, m, E, R, O, A, N, M) {
190
- var L = m.children;
191
- if (L !== void 0)
190
+ var C = m.children;
191
+ if (C !== void 0)
192
192
  if (R)
193
- if (B(L)) {
194
- for (R = 0; R < L.length; R++)
195
- u(L[R]);
196
- Object.freeze && Object.freeze(L);
193
+ if (B(C)) {
194
+ for (R = 0; R < C.length; R++)
195
+ u(C[R]);
196
+ Object.freeze && Object.freeze(C);
197
197
  } else
198
198
  console.error(
199
199
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
200
200
  );
201
- else u(L);
201
+ else u(C);
202
202
  if (V.call(m, "key")) {
203
- L = n(p);
203
+ C = n(p);
204
204
  var K = Object.keys(m).filter(function(ne) {
205
205
  return ne !== "key";
206
206
  });
207
- R = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", I[L + R] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ R = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", I[C + R] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
208
208
  `A props object containing a "key" prop is being spread into JSX:
209
209
  let props = %s;
210
210
  <%s {...props} />
@@ -212,22 +212,22 @@ React keys must be passed directly to JSX without using spread:
212
212
  let props = %s;
213
213
  <%s key={someKey} {...props} />`,
214
214
  R,
215
- L,
215
+ C,
216
216
  K,
217
- L
218
- ), I[L + R] = !0);
217
+ C
218
+ ), I[C + R] = !0);
219
219
  }
220
- if (L = null, E !== void 0 && (t(E), L = "" + E), o(m) && (t(m.key), L = "" + m.key), "key" in m) {
220
+ if (C = null, E !== void 0 && (t(E), C = "" + E), o(m) && (t(m.key), C = "" + m.key), "key" in m) {
221
221
  E = {};
222
222
  for (var W in m)
223
223
  W !== "key" && (E[W] = m[W]);
224
224
  } else E = m;
225
- return L && i(
225
+ return C && i(
226
226
  E,
227
227
  typeof p == "function" ? p.displayName || p.name || "Unknown" : p
228
228
  ), l(
229
229
  p,
230
- L,
230
+ C,
231
231
  A,
232
232
  O,
233
233
  s(),
@@ -239,7 +239,7 @@ React keys must be passed directly to JSX without using spread:
239
239
  function u(p) {
240
240
  typeof p == "object" && p !== null && p.$$typeof === h && p._store && (p._store.validated = 1);
241
241
  }
242
- var d = ar, h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), P = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), j = Symbol.for("react.client.reference"), k = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, B = Array.isArray, q = console.createTask ? console.createTask : function() {
242
+ var d = ar, h = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), P = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), j = Symbol.for("react.client.reference"), k = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, B = Array.isArray, q = console.createTask ? console.createTask : function() {
243
243
  return null;
244
244
  };
245
245
  d = {
@@ -374,7 +374,7 @@ function ht(n) {
374
374
  function _e(n) {
375
375
  return n instanceof Date && !isNaN(n.getTime());
376
376
  }
377
- function Cr(n) {
377
+ function Lr(n) {
378
378
  if (!/^\d{8}$/.test(n)) return !1;
379
379
  const e = parseInt(n.slice(0, 4), 10), t = parseInt(n.slice(4, 6), 10), r = parseInt(n.slice(6, 8), 10);
380
380
  return ct(r, t - 1, e);
@@ -383,7 +383,7 @@ function ct(n, e, t) {
383
383
  const r = [
384
384
  31,
385
385
  // January
386
- Lr(t) ? 29 : 28,
386
+ Cr(t) ? 29 : 28,
387
387
  // February
388
388
  31,
389
389
  // March
@@ -408,7 +408,7 @@ function ct(n, e, t) {
408
408
  ];
409
409
  return !(e < 0 || e > 11 || n < 1 || n > r[e]);
410
410
  }
411
- function Lr(n) {
411
+ function Cr(n) {
412
412
  return n % 4 === 0 && (n % 100 !== 0 || n % 400 === 0);
413
413
  }
414
414
  function Ir(n) {
@@ -444,7 +444,7 @@ const St = /* @__PURE__ */ new Map([
444
444
  "D8*YYMD",
445
445
  {
446
446
  legacyToIso(n) {
447
- return Cr(n) && `${n.substring(0, 4)}-${n.substring(4, 6)}-${n.substring(6, 8)}` || n;
447
+ return Lr(n) && `${n.substring(0, 4)}-${n.substring(4, 6)}-${n.substring(6, 8)}` || n;
448
448
  },
449
449
  isoToLegacy(n) {
450
450
  return ht(n) && n.replaceAll("-", "") || n;
@@ -741,22 +741,22 @@ var Fr = Mr(), Oe = /* @__PURE__ */ new Map(), or = function(e) {
741
741
  path: [],
742
742
  pattern: ["fill", "stroke"],
743
743
  radialGradient: ["fill", "stroke"]
744
- }, S, v, D, C, Y;
744
+ }, S, v, D, L, Y;
745
745
  Object.keys(P).forEach(function(z) {
746
746
  S = z, D = P[z], v = u.querySelectorAll(S + "[id]");
747
747
  for (var I = function(R, O) {
748
- C = v[R].id, Y = C + "-" + Hr();
748
+ L = v[R].id, Y = L + "-" + Hr();
749
749
  var A;
750
750
  Array.prototype.forEach.call(D, function(F) {
751
- A = u.querySelectorAll("[" + F + '*="' + C + '"]');
751
+ A = u.querySelectorAll("[" + F + '*="' + L + '"]');
752
752
  for (var G = 0, te = A.length; G < te; G++) {
753
753
  var re = A[G].getAttribute(F);
754
- re && !re.match(new RegExp('url\\("?#' + C + '"?\\)')) || A[G].setAttribute(F, "url(#" + Y + ")");
754
+ re && !re.match(new RegExp('url\\("?#' + L + '"?\\)')) || A[G].setAttribute(F, "url(#" + Y + ")");
755
755
  }
756
756
  });
757
- for (var N = u.querySelectorAll("[*|href]"), M = [], L = 0, K = N.length; L < K; L++) {
758
- var W = N[L].getAttributeNS(tt, "href");
759
- W && W.toString() === "#" + v[R].id && M.push(N[L]);
757
+ for (var N = u.querySelectorAll("[*|href]"), M = [], C = 0, K = N.length; C < K; C++) {
758
+ var W = N[C].getAttributeNS(tt, "href");
759
+ W && W.toString() === "#" + v[R].id && M.push(N[C]);
760
760
  }
761
761
  for (var ne = 0, $ = M.length; ne < $; ne++)
762
762
  M[ne].setAttributeNS(tt, "href", "#" + Y);
@@ -919,7 +919,7 @@ function zr() {
919
919
  }
920
920
  }
921
921
  }
922
- var v = c, D = l, C = i, Y = o, _ = e, j = f, k = r, V = g, B = h, q = t, Z = a, J = s, U = u, z = !1;
922
+ var v = c, D = l, L = i, Y = o, _ = e, j = f, k = r, V = g, B = h, q = t, Z = a, J = s, U = u, z = !1;
923
923
  function I($) {
924
924
  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.")), p($) || S($) === c;
925
925
  }
@@ -947,7 +947,7 @@ function zr() {
947
947
  function M($) {
948
948
  return S($) === h;
949
949
  }
950
- function L($) {
950
+ function C($) {
951
951
  return S($) === t;
952
952
  }
953
953
  function K($) {
@@ -959,7 +959,7 @@ function zr() {
959
959
  function ne($) {
960
960
  return S($) === u;
961
961
  }
962
- ee.AsyncMode = v, ee.ConcurrentMode = D, ee.ContextConsumer = C, ee.ContextProvider = Y, ee.Element = _, ee.ForwardRef = j, ee.Fragment = k, ee.Lazy = V, ee.Memo = B, ee.Portal = q, ee.Profiler = Z, ee.StrictMode = J, ee.Suspense = U, ee.isAsyncMode = I, ee.isConcurrentMode = p, ee.isContextConsumer = m, ee.isContextProvider = E, ee.isElement = R, ee.isForwardRef = O, ee.isFragment = A, ee.isLazy = N, ee.isMemo = M, ee.isPortal = L, ee.isProfiler = K, ee.isStrictMode = W, ee.isSuspense = ne, ee.isValidElementType = P, ee.typeOf = S;
962
+ ee.AsyncMode = v, ee.ConcurrentMode = D, ee.ContextConsumer = L, ee.ContextProvider = Y, ee.Element = _, ee.ForwardRef = j, ee.Fragment = k, ee.Lazy = V, ee.Memo = B, ee.Portal = q, ee.Profiler = Z, ee.StrictMode = J, ee.Suspense = U, ee.isAsyncMode = I, ee.isConcurrentMode = p, ee.isContextConsumer = m, ee.isContextProvider = E, ee.isElement = R, ee.isForwardRef = O, ee.isFragment = A, ee.isLazy = N, ee.isMemo = M, ee.isPortal = C, ee.isProfiler = K, ee.isStrictMode = W, ee.isSuspense = ne, ee.isValidElementType = P, ee.typeOf = S;
963
963
  }()), ee;
964
964
  }
965
965
  var At;
@@ -1024,14 +1024,14 @@ function mt() {
1024
1024
  var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
1025
1025
  return nt = n, nt;
1026
1026
  }
1027
- var st, Ct;
1027
+ var st, Lt;
1028
1028
  function ur() {
1029
- return Ct || (Ct = 1, st = Function.call.bind(Object.prototype.hasOwnProperty)), st;
1029
+ return Lt || (Lt = 1, st = Function.call.bind(Object.prototype.hasOwnProperty)), st;
1030
1030
  }
1031
- var at, Lt;
1031
+ var at, Ct;
1032
1032
  function Jr() {
1033
- if (Lt) return at;
1034
- Lt = 1;
1033
+ if (Ct) return at;
1034
+ Ct = 1;
1035
1035
  var n = function() {
1036
1036
  };
1037
1037
  if (process.env.NODE_ENV !== "production") {
@@ -1117,7 +1117,7 @@ function Xr() {
1117
1117
  instanceOf: D,
1118
1118
  node: j(),
1119
1119
  objectOf: Y,
1120
- oneOf: C,
1120
+ oneOf: L,
1121
1121
  oneOfType: _,
1122
1122
  shape: V,
1123
1123
  exact: B
@@ -1132,31 +1132,31 @@ function Xr() {
1132
1132
  function b(p) {
1133
1133
  if (process.env.NODE_ENV !== "production")
1134
1134
  var m = {}, E = 0;
1135
- function R(A, N, M, L, K, W, ne) {
1136
- if (L = L || d, W = W || M, ne !== t) {
1135
+ function R(A, N, M, C, K, W, ne) {
1136
+ if (C = C || d, W = W || M, ne !== t) {
1137
1137
  if (c) {
1138
1138
  var $ = new Error(
1139
1139
  "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"
1140
1140
  );
1141
1141
  throw $.name = "Invariant Violation", $;
1142
1142
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
1143
- var F = L + ":" + M;
1143
+ var F = C + ":" + M;
1144
1144
  !m[F] && // Avoid spamming the console because they are often not actionable except for lib authors
1145
1145
  E < 3 && (a(
1146
- "You are manually calling a React.PropTypes validation function for the `" + W + "` prop on `" + L + "`. 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."
1146
+ "You are manually calling a React.PropTypes validation function for the `" + W + "` prop on `" + C + "`. 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."
1147
1147
  ), m[F] = !0, E++);
1148
1148
  }
1149
1149
  }
1150
- return N[M] == null ? A ? N[M] === null ? new y("The " + K + " `" + W + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new y("The " + K + " `" + W + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : p(N, M, L, K, W);
1150
+ return N[M] == null ? A ? N[M] === null ? new y("The " + K + " `" + W + "` is marked as required " + ("in `" + C + "`, but its value is `null`.")) : new y("The " + K + " `" + W + "` is marked as required in " + ("`" + C + "`, but its value is `undefined`.")) : null : p(N, M, C, K, W);
1151
1151
  }
1152
1152
  var O = R.bind(null, !1);
1153
1153
  return O.isRequired = R.bind(null, !0), O;
1154
1154
  }
1155
1155
  function w(p) {
1156
1156
  function m(E, R, O, A, N, M) {
1157
- var L = E[R], K = J(L);
1157
+ var C = E[R], K = J(C);
1158
1158
  if (K !== p) {
1159
- var W = U(L);
1159
+ var W = U(C);
1160
1160
  return new y(
1161
1161
  "Invalid " + A + " `" + N + "` of type " + ("`" + W + "` supplied to `" + O + "`, expected ") + ("`" + p + "`."),
1162
1162
  { expectedType: p }
@@ -1175,8 +1175,8 @@ function Xr() {
1175
1175
  return new y("Property `" + N + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
1176
1176
  var M = E[R];
1177
1177
  if (!Array.isArray(M)) {
1178
- var L = J(M);
1179
- return new y("Invalid " + A + " `" + N + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an array."));
1178
+ var C = J(M);
1179
+ return new y("Invalid " + A + " `" + N + "` of type " + ("`" + C + "` supplied to `" + O + "`, expected an array."));
1180
1180
  }
1181
1181
  for (var K = 0; K < M.length; K++) {
1182
1182
  var W = p(M, K, O, A, N + "[" + K + "]", t);
@@ -1212,21 +1212,21 @@ function Xr() {
1212
1212
  function D(p) {
1213
1213
  function m(E, R, O, A, N) {
1214
1214
  if (!(E[R] instanceof p)) {
1215
- var M = p.name || d, L = I(E[R]);
1216
- return new y("Invalid " + A + " `" + N + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected ") + ("instance of `" + M + "`."));
1215
+ var M = p.name || d, C = I(E[R]);
1216
+ return new y("Invalid " + A + " `" + N + "` of type " + ("`" + C + "` supplied to `" + O + "`, expected ") + ("instance of `" + M + "`."));
1217
1217
  }
1218
1218
  return null;
1219
1219
  }
1220
1220
  return b(m);
1221
1221
  }
1222
- function C(p) {
1222
+ function L(p) {
1223
1223
  if (!Array.isArray(p))
1224
1224
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
1225
1225
  "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])."
1226
1226
  ) : a("Invalid argument supplied to oneOf, expected an array.")), o;
1227
1227
  function m(E, R, O, A, N) {
1228
- for (var M = E[R], L = 0; L < p.length; L++)
1229
- if (g(M, p[L]))
1228
+ for (var M = E[R], C = 0; C < p.length; C++)
1229
+ if (g(M, p[C]))
1230
1230
  return null;
1231
1231
  var K = JSON.stringify(p, function(ne, $) {
1232
1232
  var F = U($);
@@ -1240,9 +1240,9 @@ function Xr() {
1240
1240
  function m(E, R, O, A, N) {
1241
1241
  if (typeof p != "function")
1242
1242
  return new y("Property `" + N + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
1243
- var M = E[R], L = J(M);
1244
- if (L !== "object")
1245
- return new y("Invalid " + A + " `" + N + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an object."));
1243
+ var M = E[R], C = J(M);
1244
+ if (C !== "object")
1245
+ return new y("Invalid " + A + " `" + N + "` of type " + ("`" + C + "` supplied to `" + O + "`, expected an object."));
1246
1246
  for (var K in M)
1247
1247
  if (r(M, K)) {
1248
1248
  var W = p(M, K, O, A, N + "." + K, t);
@@ -1263,15 +1263,15 @@ function Xr() {
1263
1263
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + z(E) + " at index " + m + "."
1264
1264
  ), o;
1265
1265
  }
1266
- function R(O, A, N, M, L) {
1266
+ function R(O, A, N, M, C) {
1267
1267
  for (var K = [], W = 0; W < p.length; W++) {
1268
- var ne = p[W], $ = ne(O, A, N, M, L, t);
1268
+ var ne = p[W], $ = ne(O, A, N, M, C, t);
1269
1269
  if ($ == null)
1270
1270
  return null;
1271
1271
  $.data && r($.data, "expectedType") && K.push($.data.expectedType);
1272
1272
  }
1273
1273
  var F = K.length > 0 ? ", expected one of type [" + K.join(", ") + "]" : "";
1274
- return new y("Invalid " + M + " `" + L + "` supplied to " + ("`" + N + "`" + F + "."));
1274
+ return new y("Invalid " + M + " `" + C + "` supplied to " + ("`" + N + "`" + F + "."));
1275
1275
  }
1276
1276
  return b(R);
1277
1277
  }
@@ -1288,9 +1288,9 @@ function Xr() {
1288
1288
  }
1289
1289
  function V(p) {
1290
1290
  function m(E, R, O, A, N) {
1291
- var M = E[R], L = J(M);
1292
- if (L !== "object")
1293
- return new y("Invalid " + A + " `" + N + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1291
+ var M = E[R], C = J(M);
1292
+ if (C !== "object")
1293
+ return new y("Invalid " + A + " `" + N + "` of type `" + C + "` " + ("supplied to `" + O + "`, expected `object`."));
1294
1294
  for (var K in p) {
1295
1295
  var W = p[K];
1296
1296
  if (typeof W != "function")
@@ -1305,9 +1305,9 @@ function Xr() {
1305
1305
  }
1306
1306
  function B(p) {
1307
1307
  function m(E, R, O, A, N) {
1308
- var M = E[R], L = J(M);
1309
- if (L !== "object")
1310
- return new y("Invalid " + A + " `" + N + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1308
+ var M = E[R], C = J(M);
1309
+ if (C !== "object")
1310
+ return new y("Invalid " + A + " `" + N + "` of type `" + C + "` " + ("supplied to `" + O + "`, expected `object`."));
1311
1311
  var K = e({}, E[R], p);
1312
1312
  for (var W in K) {
1313
1313
  var ne = p[W];
@@ -1485,9 +1485,9 @@ var ae = /* @__PURE__ */ Qr(), en = function(e) {
1485
1485
  if (this.reactWrapper instanceof en(this.reactWrapper).Node) {
1486
1486
  var a = this.props, o = a.desc, i = a.evalScripts, c = a.httpRequestWithCredentials, l = a.renumerateIRIElements, f = a.src, u = a.title, d = a.useRequestCache, h = this.props.onError, g = this.props.beforeInjection, y = this.props.afterInjection, b = this.props.wrapper, w, T;
1487
1487
  b === "svg" ? (w = document.createElementNS(Ye, b), w.setAttribute("xmlns", Ye), w.setAttribute("xmlns:xlink", _t), T = document.createElementNS(Ye, b)) : (w = document.createElement(b), T = document.createElement(b)), w.appendChild(T), T.dataset.src = f, this.nonReactWrapper = this.reactWrapper.appendChild(w);
1488
- var P = function(C) {
1488
+ var P = function(L) {
1489
1489
  if (s.removeSVG(), !s._isMounted) {
1490
- h(C);
1490
+ h(L);
1491
1491
  return;
1492
1492
  }
1493
1493
  s.setState(function() {
@@ -1496,11 +1496,11 @@ var ae = /* @__PURE__ */ Qr(), en = function(e) {
1496
1496
  isLoading: !1
1497
1497
  };
1498
1498
  }, function() {
1499
- h(C);
1499
+ h(L);
1500
1500
  });
1501
- }, S = function(C, Y) {
1502
- if (C) {
1503
- P(C);
1501
+ }, S = function(L, Y) {
1502
+ if (L) {
1503
+ P(L);
1504
1504
  return;
1505
1505
  }
1506
1506
  s._isMounted && s.setState(function() {
@@ -1514,21 +1514,21 @@ var ae = /* @__PURE__ */ Qr(), en = function(e) {
1514
1514
  P(_);
1515
1515
  }
1516
1516
  });
1517
- }, v = function(C) {
1518
- if (C.setAttribute("role", "img"), o) {
1519
- var Y = C.querySelector(":scope > desc");
1520
- Y && C.removeChild(Y);
1517
+ }, v = function(L) {
1518
+ if (L.setAttribute("role", "img"), o) {
1519
+ var Y = L.querySelector(":scope > desc");
1520
+ Y && L.removeChild(Y);
1521
1521
  var _ = document.createElement("desc");
1522
- _.innerHTML = o, C.prepend(_);
1522
+ _.innerHTML = o, L.prepend(_);
1523
1523
  }
1524
1524
  if (u) {
1525
- var j = C.querySelector(":scope > title");
1526
- j && C.removeChild(j);
1525
+ var j = L.querySelector(":scope > title");
1526
+ j && L.removeChild(j);
1527
1527
  var k = document.createElement("title");
1528
- k.innerHTML = u, C.prepend(k);
1528
+ k.innerHTML = u, L.prepend(k);
1529
1529
  }
1530
1530
  try {
1531
- g(C);
1531
+ g(L);
1532
1532
  } catch (V) {
1533
1533
  P(V);
1534
1534
  }
@@ -1707,7 +1707,7 @@ const ts = (n) => {
1707
1707
  error: S,
1708
1708
  appearance: v = "base",
1709
1709
  fullWidth: D = !1,
1710
- _dataComponent: C = "textfield",
1710
+ _dataComponent: L = "textfield",
1711
1711
  width: Y
1712
1712
  }) => {
1713
1713
  const _ = S ? "danger" : l, j = S || l == "danger" ? "error" : i, k = P || !!S, V = (Z) => {
@@ -1717,7 +1717,7 @@ const ts = (n) => {
1717
1717
  container: `smp-textfield ${n ? "smp-textfield-disabled" : ""} ${e ? "smp-textfield-readOnly" : ""} ${o ? "smp-textfield-placeholder" : ""} ${c ? `smp-textfield-${c}` : ""} ${_ ? `smp-textfield-${_}` : ""} ${f ? `smp-textfield-variant-${f}` : ""} ${v ? `smp-textfield-${v}` : ""}`,
1718
1718
  input: "smp-textfield-input "
1719
1719
  }, q = Y ? { "--smp-textField-width-base": Y } : void 0;
1720
- return /* @__PURE__ */ x.jsxs("div", { className: B.wrapper, "data-component": C, children: [
1720
+ return /* @__PURE__ */ x.jsxs("div", { className: B.wrapper, "data-component": L, children: [
1721
1721
  T && /* @__PURE__ */ x.jsx(ir, { label: T, disabled: n }),
1722
1722
  /* @__PURE__ */ x.jsxs(
1723
1723
  "div",
@@ -1858,7 +1858,7 @@ const sn = 10, fr = ({
1858
1858
  k.key === "ArrowDown" ? V = h < b.length - 1 ? h + 1 : 0 : k.key === "ArrowUp" && (V = h > 0 ? h - 1 : b.length - 1), g(V);
1859
1859
  } else k.key === "Enter" ? h >= 0 && h < b.length && (c == null || c(b[h])) : k.key === "Escape" && (k.preventDefault(), k.stopPropagation());
1860
1860
  l && l(k);
1861
- }, C = (k) => {
1861
+ }, L = (k) => {
1862
1862
  D(k);
1863
1863
  }, Y = (k) => {
1864
1864
  D(k);
@@ -1885,7 +1885,7 @@ const sn = 10, fr = ({
1885
1885
  bindValue: f,
1886
1886
  placeholder: "Search...",
1887
1887
  onChange: w,
1888
- onKeyDown: C
1888
+ onKeyDown: L
1889
1889
  }
1890
1890
  ),
1891
1891
  /* @__PURE__ */ x.jsx(
@@ -1974,7 +1974,7 @@ const sn = 10, fr = ({
1974
1974
  _multiActiveIndex: u,
1975
1975
  ...d
1976
1976
  }) => {
1977
- const [h, g] = X(n), [y, b] = X(e), [w, T] = X(!1), [P, S] = X(t || []), [v, D] = X(0), [C, Y] = X([n]), { anchorRef: _, targetRef: j, anchorWidth: k } = gt({
1977
+ const [h, g] = X(n), [y, b] = X(e), [w, T] = X(!1), [P, S] = X(t || []), [v, D] = X(0), [L, Y] = X([n]), { anchorRef: _, targetRef: j, anchorWidth: k } = gt({
1978
1978
  position: "bottom",
1979
1979
  enabled: w
1980
1980
  });
@@ -2028,7 +2028,7 @@ const sn = 10, fr = ({
2028
2028
  onClick: q,
2029
2029
  ref: j,
2030
2030
  selectedIndex: v,
2031
- activeIndex: u || C,
2031
+ activeIndex: u || L,
2032
2032
  width: k,
2033
2033
  showFilter: !1,
2034
2034
  onKeyDown: Z
@@ -2045,7 +2045,7 @@ const sn = 10, fr = ({
2045
2045
  primary: "onPrimary",
2046
2046
  danger: "onDanger",
2047
2047
  base: "base"
2048
- })[n], Ce = ({
2048
+ })[n], Le = ({
2049
2049
  label: n,
2050
2050
  onClick: e,
2051
2051
  ariaLabel: t,
@@ -2108,7 +2108,7 @@ const sn = 10, fr = ({
2108
2108
  }) => {
2109
2109
  const [g, y] = X(n);
2110
2110
  le(() => {
2111
- !(g != null && g.length) && h && e && h(e, void 0).then((T) => y(T)).catch((T) => {
2111
+ !g && h && e && h(e, void 0).then((T) => y(T)).catch((T) => {
2112
2112
  console.error(
2113
2113
  "Errore nel caricamento delle opzioni per ButtonList",
2114
2114
  T
@@ -2135,7 +2135,7 @@ const sn = 10, fr = ({
2135
2135
  d == null || d(T.id, T.fun);
2136
2136
  }
2137
2137
  };
2138
- return /* @__PURE__ */ x.jsx(Ce, { ...S }, `button-${P}`);
2138
+ return /* @__PURE__ */ x.jsx(Le, { ...S }, `button-${P}`);
2139
2139
  });
2140
2140
  return /* @__PURE__ */ x.jsx("div", { role: "list", "data-component": "button-list", className: b.container, children: w });
2141
2141
  }, ln = ({
@@ -2305,7 +2305,7 @@ const fn = ({
2305
2305
  e == null || e(j.id, j.label);
2306
2306
  const k = d.findIndex((V) => V.id === j.id);
2307
2307
  y(k), w([j.id]), u(!1);
2308
- }, C = (j) => {
2308
+ }, L = (j) => {
2309
2309
  j.key === "Escape" && (u(!1), y(-1));
2310
2310
  }, Y = (j) => {
2311
2311
  (j.key === "ArrowDown" || j.key === "ArrowUp") && (j.preventDefault(), _());
@@ -2351,7 +2351,7 @@ const fn = ({
2351
2351
  activeIndex: c || b,
2352
2352
  width: v,
2353
2353
  onClick: D,
2354
- onKeyDown: C
2354
+ onKeyDown: L
2355
2355
  }
2356
2356
  )
2357
2357
  ]
@@ -2465,7 +2465,7 @@ const bn = [" ", ",", "?", "!", ";"], xn = new vn(20), Sn = (n, e, t) => {
2465
2465
  s = o;
2466
2466
  }
2467
2467
  return s;
2468
- }, Le = (n) => n == null ? void 0 : n.replace("_", "-"), wn = {
2468
+ }, Ce = (n) => n == null ? void 0 : n.replace("_", "-"), wn = {
2469
2469
  type: "logger",
2470
2470
  log(n) {
2471
2471
  this.output("log", n);
@@ -2698,9 +2698,9 @@ class Xe extends Ze {
2698
2698
  } : i;
2699
2699
  const h = this.resolve(e, s);
2700
2700
  let g = h == null ? void 0 : h.res;
2701
- const y = (h == null ? void 0 : h.usedKey) || i, b = (h == null ? void 0 : h.exactUsedKey) || i, w = ["[object Number]", "[object Function]", "[object RegExp]"], T = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, P = !this.i18nFormat || this.i18nFormat.handleAsObject, S = s.count !== void 0 && !H(s.count), v = Xe.hasDefaultValue(s), D = S ? this.pluralResolver.getSuffix(u, s.count, s) : "", C = s.ordinal && S ? this.pluralResolver.getSuffix(u, s.count, {
2701
+ const y = (h == null ? void 0 : h.usedKey) || i, b = (h == null ? void 0 : h.exactUsedKey) || i, w = ["[object Number]", "[object Function]", "[object RegExp]"], T = s.joinArrays !== void 0 ? s.joinArrays : this.options.joinArrays, P = !this.i18nFormat || this.i18nFormat.handleAsObject, S = s.count !== void 0 && !H(s.count), v = Xe.hasDefaultValue(s), D = S ? this.pluralResolver.getSuffix(u, s.count, s) : "", L = s.ordinal && S ? this.pluralResolver.getSuffix(u, s.count, {
2702
2702
  ordinal: !1
2703
- }) : "", Y = S && !s.ordinal && s.count === 0, _ = Y && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${D}`] || s[`defaultValue${C}`] || s.defaultValue;
2703
+ }) : "", Y = S && !s.ordinal && s.count === 0, _ = Y && s[`defaultValue${this.options.pluralSeparator}zero`] || s[`defaultValue${D}`] || s[`defaultValue${L}`] || s.defaultValue;
2704
2704
  let j = g;
2705
2705
  P && !g && v && (j = _);
2706
2706
  const k = Kt(j), V = Object.prototype.toString.apply(j);
@@ -2828,12 +2828,12 @@ class Xe extends Ze {
2828
2828
  if ((D = this.i18nFormat) != null && D.addLookupKeys)
2829
2829
  this.i18nFormat.addLookupKeys(S, f, P, b, t);
2830
2830
  else {
2831
- let C;
2832
- d && (C = this.pluralResolver.getSuffix(P, t.count, t));
2831
+ let L;
2832
+ d && (L = this.pluralResolver.getSuffix(P, t.count, t));
2833
2833
  const Y = `${this.options.pluralSeparator}zero`, _ = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
2834
- if (d && (S.push(f + C), t.ordinal && C.indexOf(_) === 0 && S.push(f + C.replace(_, this.options.pluralSeparator)), h && S.push(f + Y)), g) {
2834
+ if (d && (S.push(f + L), t.ordinal && L.indexOf(_) === 0 && S.push(f + L.replace(_, this.options.pluralSeparator)), h && S.push(f + Y)), g) {
2835
2835
  const j = `${f}${this.options.contextSeparator}${t.context}`;
2836
- S.push(j), d && (S.push(j + C), t.ordinal && C.indexOf(_) === 0 && S.push(j + C.replace(_, this.options.pluralSeparator)), h && S.push(j + Y));
2836
+ S.push(j), d && (S.push(j + L), t.ordinal && L.indexOf(_) === 0 && S.push(j + L.replace(_, this.options.pluralSeparator)), h && S.push(j + Y));
2837
2837
  }
2838
2838
  }
2839
2839
  let v;
@@ -2884,12 +2884,12 @@ class zt {
2884
2884
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = me.create("languageUtils");
2885
2885
  }
2886
2886
  getScriptPartFromCode(e) {
2887
- if (e = Le(e), !e || e.indexOf("-") < 0) return null;
2887
+ if (e = Ce(e), !e || e.indexOf("-") < 0) return null;
2888
2888
  const t = e.split("-");
2889
2889
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
2890
2890
  }
2891
2891
  getLanguagePartFromCode(e) {
2892
- if (e = Le(e), !e || e.indexOf("-") < 0) return e;
2892
+ if (e = Ce(e), !e || e.indexOf("-") < 0) return e;
2893
2893
  const t = e.split("-");
2894
2894
  return this.formatLanguageCode(t[0]);
2895
2895
  }
@@ -2967,7 +2967,7 @@ class En {
2967
2967
  this.pluralRulesCache = {};
2968
2968
  }
2969
2969
  getRule(e, t = {}) {
2970
- const r = Le(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", a = JSON.stringify({
2970
+ const r = Ce(e === "dev" ? "en" : e), s = t.ordinal ? "ordinal" : "cardinal", a = JSON.stringify({
2971
2971
  cleanedCode: r,
2972
2972
  type: s
2973
2973
  });
@@ -3159,9 +3159,9 @@ const On = (n) => {
3159
3159
  });
3160
3160
  const o = r + JSON.stringify(a);
3161
3161
  let i = e[o];
3162
- return i || (i = n(Le(r), s), e[o] = i), i(t);
3162
+ return i || (i = n(Ce(r), s), e[o] = i), i(t);
3163
3163
  };
3164
- }, Rn = (n) => (e, t, r) => n(Le(t), r)(e);
3164
+ }, Rn = (n) => (e, t, r) => n(Ce(t), r)(e);
3165
3165
  class Dn {
3166
3166
  constructor(e = {}) {
3167
3167
  this.logger = me.create("formatter"), this.options = e, this.init(e);
@@ -3683,11 +3683,11 @@ se.setDefaultNamespace;
3683
3683
  se.hasLoadedNamespace;
3684
3684
  se.loadNamespaces;
3685
3685
  se.loadLanguages;
3686
- const jn = { 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" }, Ln = { CalendarFor: "Calendario per", Close: "Chiudi", SpotlightDefaultPlaceholder: "Esegui Comando" }, In = {
3686
+ const jn = { 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" }, Ln = { April: "Aprile", August: "Agosto", December: "Dicembre", February: "Febbraio", January: "Gennaio", June: "Giugno", July: "Luglio", March: "Marzo", May: "Maggio", October: "Ottobre", November: "Novembre", September: "Settembre" }, Cn = { CalendarFor: "Calendario per", Close: "Chiudi", SpotlightDefaultPlaceholder: "Esegui Comando" }, In = {
3687
3687
  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" },
3688
3688
  Day: jn,
3689
- Month: Cn,
3690
- Generic: Ln
3689
+ Month: Ln,
3690
+ Generic: Cn
3691
3691
  }, kn = { 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" }, Nn = { April: "April", August: "August", December: "December", February: "February", January: "January", July: "July", June: "June", March: "March", May: "May", November: "November", October: "October", September: "September" }, _n = { CalendarFor: "Calendar for", Close: "Close", SpotlightDefaultPlaceholder: "Execute Command" }, Mn = {
3692
3692
  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" },
3693
3693
  Day: kn,
@@ -3848,7 +3848,7 @@ function Bn({
3848
3848
  S(I) || (l(I), y(I.getDate()), e && e(Ir(I)));
3849
3849
  }, D = () => {
3850
3850
  f === 0 ? (u(11), h(d - 1)) : u(f - 1), y(1);
3851
- }, C = () => {
3851
+ }, L = () => {
3852
3852
  f === 11 ? (u(0), h(d + 1)) : u(f + 1), y(1);
3853
3853
  }, Y = (I, p) => new Date(I, p + 1, 0).getDate(), _ = (I, p) => new Date(I, p, 1).getDay(), j = (I) => {
3854
3854
  var m;
@@ -3867,7 +3867,7 @@ function Bn({
3867
3867
  let O = R + 1, A = new Date(d, f, O);
3868
3868
  if (O > E) {
3869
3869
  const N = f === 11 ? d + 1 : d, M = f === 11 ? 0 : f + 1;
3870
- O = 1, A = new Date(N, M, O), C(), setTimeout(() => {
3870
+ O = 1, A = new Date(N, M, O), L(), setTimeout(() => {
3871
3871
  V(1, "forward");
3872
3872
  }, 0);
3873
3873
  return;
@@ -3882,9 +3882,9 @@ function Bn({
3882
3882
  {
3883
3883
  let O = R - 1, A = new Date(d, f, O);
3884
3884
  if (O < 1) {
3885
- const N = f === 0 ? d - 1 : d, M = f === 0 ? 11 : f - 1, L = Y(N, M);
3886
- O = L, A = new Date(N, M, O), D(), setTimeout(() => {
3887
- V(L, "backward");
3885
+ const N = f === 0 ? d - 1 : d, M = f === 0 ? 11 : f - 1, C = Y(N, M);
3886
+ O = C, A = new Date(N, M, O), D(), setTimeout(() => {
3887
+ V(C, "backward");
3888
3888
  }, 0);
3889
3889
  return;
3890
3890
  }
@@ -3911,7 +3911,7 @@ function Bn({
3911
3911
  let O = R + 7, A = new Date(d, f, O);
3912
3912
  if (O > E) {
3913
3913
  const N = f === 11 ? d + 1 : d, M = f === 11 ? 0 : f + 1;
3914
- O = O - E, A = new Date(N, M, O), C(), setTimeout(() => {
3914
+ O = O - E, A = new Date(N, M, O), L(), setTimeout(() => {
3915
3915
  V(O, "forward");
3916
3916
  }, 0);
3917
3917
  return;
@@ -3935,7 +3935,7 @@ function Bn({
3935
3935
  }, 0);
3936
3936
  break;
3937
3937
  case "PageDown":
3938
- I.preventDefault(), C(), setTimeout(() => {
3938
+ I.preventDefault(), L(), setTimeout(() => {
3939
3939
  const O = Y(
3940
3940
  f === 11 ? d + 1 : d,
3941
3941
  f === 11 ? 0 : f + 1
@@ -3962,7 +3962,7 @@ function Bn({
3962
3962
  return;
3963
3963
  }
3964
3964
  }
3965
- C(), setTimeout(() => {
3965
+ L(), setTimeout(() => {
3966
3966
  V(1, "forward");
3967
3967
  }, 0);
3968
3968
  } else {
@@ -4037,7 +4037,7 @@ function Bn({
4037
4037
  },
4038
4038
  children: [
4039
4039
  /* @__PURE__ */ x.jsx(
4040
- Ce,
4040
+ Le,
4041
4041
  {
4042
4042
  onClick: D,
4043
4043
  ariaLabel: a(pt.PREVIOUS_MONTH),
@@ -4055,9 +4055,9 @@ function Bn({
4055
4055
  }
4056
4056
  ),
4057
4057
  /* @__PURE__ */ x.jsx(
4058
- Ce,
4058
+ Le,
4059
4059
  {
4060
- onClick: C,
4060
+ onClick: L,
4061
4061
  ariaLabel: a(pt.NEXT_MONTH),
4062
4062
  bindValue: ">",
4063
4063
  appearance: "ghost",
@@ -4108,12 +4108,12 @@ function Bn({
4108
4108
  "aria-selected": A,
4109
4109
  tabIndex: N ? 0 : -1,
4110
4110
  onClick: () => v(m),
4111
- onKeyDown: (L) => k(L, R),
4111
+ onKeyDown: (C) => k(C, R),
4112
4112
  "aria-label": `${m.getDate()} ${T[m.getMonth()]} ${m.getFullYear()}`,
4113
4113
  "data-selected": A,
4114
4114
  "aria-disabled": M,
4115
- ref: (L) => {
4116
- w.current[R] = L;
4115
+ ref: (C) => {
4116
+ w.current[R] = C;
4117
4117
  },
4118
4118
  className: U.td(
4119
4119
  O,
@@ -4157,29 +4157,29 @@ const qn = ({
4157
4157
  }), gr(a, d);
4158
4158
  const { format: h, getCurrentLanguage: g } = Qe(), y = ye(
4159
4159
  (D) => {
4160
- const C = D.length > 5 && jr(D, g()) || D, Y = h(C, void 0, void 0, {
4160
+ const L = D.length > 5 && jr(D, g()) || D, Y = h(L, void 0, void 0, {
4161
4161
  type: "date"
4162
- }), _ = typeof C != "string", j = _ && C.toISOString().substring(0, 10) || "";
4162
+ }), _ = typeof L != "string", j = _ && L.toISOString().substring(0, 10) || "";
4163
4163
  return {
4164
4164
  isValid: _,
4165
4165
  formattedDate: Y,
4166
4166
  isoDate: j,
4167
- normalizedDate: C
4167
+ normalizedDate: L
4168
4168
  };
4169
4169
  },
4170
4170
  [g, h]
4171
4171
  );
4172
4172
  le(() => {
4173
- const { formattedDate: D, isoDate: C, isValid: Y } = y(n);
4174
- c(Y && C || n), f(Y && D || n);
4173
+ const { formattedDate: D, isoDate: L, isValid: Y } = y(n);
4174
+ c(Y && L || n), f(Y && D || n);
4175
4175
  }, [n, h, y]);
4176
4176
  const b = () => o((D) => !D), w = () => {
4177
4177
  P(l);
4178
4178
  }, T = (D) => {
4179
4179
  P(D), o(!1);
4180
4180
  }, P = (D) => {
4181
- const { isoDate: C, isValid: Y } = y(D);
4182
- t && t(Y && C || D);
4181
+ const { isoDate: L, isValid: Y } = y(D);
4182
+ t && t(Y && L || D);
4183
4183
  }, S = (D) => {
4184
4184
  f(D);
4185
4185
  }, v = (D) => {
@@ -4406,15 +4406,15 @@ const We = (n, e, t) => ({
4406
4406
  f == null || f(w(y, t.k));
4407
4407
  }
4408
4408
  };
4409
- return /* @__PURE__ */ x.jsx(Ce, { ...S });
4409
+ return /* @__PURE__ */ x.jsx(Le, { ...S });
4410
4410
  }
4411
4411
  case ie.BUTTON_LIST: {
4412
4412
  const S = {
4413
4413
  ...b,
4414
4414
  options: c,
4415
4415
  onClick: (v, D) => {
4416
- const C = { ...y, fun: D };
4417
- f == null || f(w(C, v));
4416
+ const L = { ...y, fun: D };
4417
+ f == null || f(w(L, v));
4418
4418
  }
4419
4419
  };
4420
4420
  return /* @__PURE__ */ x.jsx(on, { ...S });
@@ -4700,7 +4700,7 @@ const We = (n, e, t) => ({
4700
4700
  SelectLayout: T = "1",
4701
4701
  onClick: P
4702
4702
  }) => {
4703
- const S = "N/A", v = (e == null ? void 0 : e.columns) || [], D = (e == null ? void 0 : e.rows) || [], C = D.length > 0, Y = "--smp-dashList-color", _ = "smp-layout", j = "descr", k = "icon", V = "um", B = "value", q = o || "1em", Z = "18px", J = "--smp-dashList-columns", U = "--smp-dashList-fontSize", z = {
4703
+ const S = "N/A", v = (e == null ? void 0 : e.columns) || [], D = (e == null ? void 0 : e.rows) || [], L = D.length > 0, Y = "--smp-dashList-color", _ = "smp-layout", j = "descr", k = "icon", V = "um", B = "value", q = o || "1em", Z = "18px", J = "--smp-dashList-columns", U = "--smp-dashList-fontSize", z = {
4704
4704
  dash: (F = "1") => {
4705
4705
  const G = p(F), te = G, re = m(G, j), fe = m(G, k), ve = m(G, V), he = m(G, B);
4706
4706
  return {
@@ -4747,7 +4747,7 @@ const We = (n, e, t) => ({
4747
4747
  };
4748
4748
  }, M = (F) => {
4749
4749
  P == null || P(F);
4750
- }, L = (F, G) => {
4750
+ }, C = (F, G) => {
4751
4751
  (F.key === "Enter" || F.key === " ") && (F.preventDefault(), F.stopPropagation(), M(G));
4752
4752
  }, W = ((F) => {
4753
4753
  const G = z.dash(F);
@@ -4792,7 +4792,7 @@ const We = (n, e, t) => ({
4792
4792
  style: ve,
4793
4793
  tabIndex: 0,
4794
4794
  onClick: () => M(F),
4795
- onKeyDown: (Sr) => L(Sr, F),
4795
+ onKeyDown: (Sr) => C(Sr, F),
4796
4796
  children: he
4797
4797
  },
4798
4798
  F.rowId
@@ -4801,7 +4801,7 @@ const We = (n, e, t) => ({
4801
4801
  [J]: String(n),
4802
4802
  [U]: q
4803
4803
  };
4804
- return /* @__PURE__ */ x.jsx("div", { className: z.dashList, style: $, children: C ? D.map((F) => ne(F)) : S });
4804
+ return /* @__PURE__ */ x.jsx("div", { className: z.dashList, style: $, children: L ? D.map((F) => ne(F)) : S });
4805
4805
  }, Zn = (n) => {
4806
4806
  var e;
4807
4807
  return (e = n.children) != null && e.length ? n.children.map((t) => {
@@ -4827,8 +4827,8 @@ const We = (n, e, t) => ({
4827
4827
  var P, S;
4828
4828
  const [l, f] = X(), [u, d] = X(t ?? !0), h = xe(null), g = s.trim() ? s : "100vh", y = ye(
4829
4829
  (v) => {
4830
- var C, Y;
4831
- if (!((C = v.rows) != null && C.length) || !((Y = v.columns) != null && Y.length))
4830
+ var L, Y;
4831
+ if (!((L = v.rows) != null && L.length) || !((Y = v.columns) != null && Y.length))
4832
4832
  return {};
4833
4833
  const D = v.rows[0];
4834
4834
  return v.columns.filter((_) => _.visible ?? !0).reduce((_, j) => {
@@ -4994,13 +4994,13 @@ const We = (n, e, t) => ({
4994
4994
  }
4995
4995
  ),
4996
4996
  ce(t) && //TODO: translation
4997
- /* @__PURE__ */ x.jsx(Ce, { bindValue: "Confirm", onClick: () => c == null ? void 0 : c(f) })
4997
+ /* @__PURE__ */ x.jsx(Le, { bindValue: "Confirm", onClick: () => c == null ? void 0 : c(f) })
4998
4998
  ] });
4999
4999
  };
5000
5000
  export {
5001
5001
  rs as AppBar,
5002
5002
  pr as Autocomplete,
5003
- Ce as Button,
5003
+ Le as Button,
5004
5004
  on as ButtonList,
5005
5005
  ln as Checkbox,
5006
5006
  fn as Combobox,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup2",
3
- "version": "2.0.0-SNAPSHOT-20250611141848",
3
+ "version": "2.0.0-SNAPSHOT-20250611155909",
4
4
  "description": "Sme.UP web components library",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Smeup LAB <info@smeup.com> (https://www.smeup.com/)",