@sme.up/ketchup2 2.0.0-SNAPSHOT-20250624150101 → 2.0.0-SNAPSHOT-20250625123442

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.
@@ -14,37 +14,37 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Pt;function Wr(){return Pt||(Pt=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===A?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case v:return"Fragment";case w:return"Profiler";case b:return"StrictMode";case g:return"Suspense";case k:return"SuspenseList";case $:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case p:return"Portal";case T:return(h.displayName||"Context")+".Provider";case S:return(h._context.displayName||"Context")+".Consumer";case R:var x=h.render;return h=h.displayName,h||(h=x.displayName||x.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case E:return x=h.displayName||null,x!==null?x:r(h.type)||"Memo";case O:x=h._payload,h=h._init;try{return r(h(x))}catch{}}return null}function e(h){return""+h}function t(h){try{e(h);var x=!1}catch{x=!0}if(x){x=console;var _=x.error,L=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return _.call(x,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",L),e(h)}}function n(h){if(h===v)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===O)return"<...>";try{var x=r(h);return x?"<"+x+">":"<...>"}catch{return"<...>"}}function s(){var h=B.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function i(h){if(P.call(h,"key")){var x=Object.getOwnPropertyDescriptor(h,"key").get;if(x&&x.isReactWarning)return!1}return h.key!==void 0}function o(h,x){function _(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",x))}_.isReactWarning=!0,Object.defineProperty(h,"key",{get:_,configurable:!0})}function c(){var h=r(this.type);return G[h]||(G[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function l(h,x,_,L,C,I,Y,U){return _=I.ref,h={$$typeof:m,type:h,key:x,props:I,_owner:C},(_!==void 0?_:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:c}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function f(h,x,_,L,C,I,Y,U){var V=x.children;if(V!==void 0)if(L)if(D(V)){for(L=0;L<V.length;L++)u(V[L]);Object.freeze&&Object.freeze(V)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else u(V);if(P.call(x,"key")){V=r(h);var J=Object.keys(x).filter(function(se){return se!=="key"});L=0<J.length?"{key: someKey, "+J.join(": ..., ")+": ...}":"{key: someKey}",M[V+L]||(J=0<J.length?"{"+J.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Pt;function Wr(){return Pt||(Pt=1,process.env.NODE_ENV!=="production"&&function(){function r(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===k?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case v:return"Fragment";case w:return"Profiler";case T:return"StrictMode";case g:return"Suspense";case $:return"SuspenseList";case O:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case p:return"Portal";case D:return(h.displayName||"Context")+".Provider";case x:return(h._context.displayName||"Context")+".Consumer";case E:var b=h.render;return h=h.displayName,h||(h=b.displayName||b.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case L:return b=h.displayName||null,b!==null?b:r(h.type)||"Memo";case S:b=h._payload,h=h._init;try{return r(h(b))}catch{}}return null}function e(h){return""+h}function t(h){try{e(h);var b=!1}catch{b=!0}if(b){b=console;var _=b.error,A=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return _.call(b,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",A),e(h)}}function n(h){if(h===v)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===S)return"<...>";try{var b=r(h);return b?"<"+b+">":"<...>"}catch{return"<...>"}}function s(){var h=M.A;return h===null?null:h.getOwner()}function a(){return Error("react-stack-top-frame")}function i(h){if(P.call(h,"key")){var b=Object.getOwnPropertyDescriptor(h,"key").get;if(b&&b.isReactWarning)return!1}return h.key!==void 0}function o(h,b){function _(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",b))}_.isReactWarning=!0,Object.defineProperty(h,"key",{get:_,configurable:!0})}function l(){var h=r(this.type);return z[h]||(z[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function u(h,b,_,A,C,N,U,W){return _=N.ref,h={$$typeof:m,type:h,key:b,props:N,_owner:C},(_!==void 0?_:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:l}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:U}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:W}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function c(h,b,_,A,C,N,U,W){var Y=b.children;if(Y!==void 0)if(A)if(R(Y)){for(A=0;A<Y.length;A++)f(Y[A]);Object.freeze&&Object.freeze(Y)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(Y);if(P.call(b,"key")){Y=r(h);var J=Object.keys(b).filter(function(se){return se!=="key"});A=0<J.length?"{key: someKey, "+J.join(": ..., ")+": ...}":"{key: someKey}",V[Y+A]||(J=0<J.length?"{"+J.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,L,V,J,V),M[V+L]=!0)}if(V=null,_!==void 0&&(t(_),V=""+_),i(x)&&(t(x.key),V=""+x.key),"key"in x){_={};for(var K in x)K!=="key"&&(_[K]=x[K])}else _=x;return V&&o(_,typeof h=="function"?h.displayName||h.name||"Unknown":h),l(h,V,I,C,s(),_,Y,U)}function u(h){typeof h=="object"&&h!==null&&h.$$typeof===m&&h._store&&(h._store.validated=1)}var d=j,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),A=Symbol.for("react.client.reference"),B=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,D=Array.isArray,F=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(h){return h()}};var H,G={},z=d["react-stack-bottom-frame"].bind(d,a)(),Z=F(n(a)),M={};Le.Fragment=v,Le.jsx=function(h,x,_,L,C){var I=1e4>B.recentlyCreatedOwnerStacks++;return f(h,x,_,!1,L,C,I?Error("react-stack-top-frame"):z,I?F(n(h)):Z)},Le.jsxs=function(h,x,_,L,C){var I=1e4>B.recentlyCreatedOwnerStacks++;return f(h,x,_,!0,L,C,I?Error("react-stack-top-frame"):z,I?F(n(h)):Z)}}()),Le}var At;function Br(){return At||(At=1,process.env.NODE_ENV==="production"?Ue.exports=Ur():Ue.exports=Wr()),Ue.exports}var y=Br();const Te=({label:r,disabled:e,htmlFor:t})=>{const n={container:`smp-label ${e?"smp-label-disabled":""}`};return y.jsx("label",{className:n.container,htmlFor:t,children:r})},pe={"smp-layout":"_smp-layout_xrjwg_1","smp-layout-horizontal":"_smp-layout-horizontal_xrjwg_9","smp-layout-vertical":"_smp-layout-vertical_xrjwg_13","smp-layout-section-grid":"_smp-layout-section-grid_xrjwg_18","smp-layout-section-vertical":"_smp-layout-section-vertical_xrjwg_20","smp-layout-section-horizontal":"_smp-layout-section-horizontal_xrjwg_24","smp-layout-section-flex":"_smp-layout-section-flex_xrjwg_29","smp-layout-cell-container":"_smp-layout-cell-container_xrjwg_34","smp-grid-template-cols":"_smp-grid-template-cols_xrjwg_44","smp-grid-template-rows":"_smp-grid-template-rows_xrjwg_48","smp-layout-section-with-title":"_smp-layout-section-with-title_xrjwg_52","smp-layout-section-title":"_smp-layout-section-title_xrjwg_58"},Hr=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},Sr=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:Sr(t.sections,e),content:t.content};let n=t.sections,s=t.content;return(i=t.content)!=null&&i.length&&t.columns&&+t.columns>1&&(n=Hr(t.content.filter(c=>e.includes(c.id)),+t.columns).map((c,l)=>({...t,id:`${t.id}-${l}`,content:c,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:n,content:s}}),Lt=(r,e)=>{if(!e)return{};const t=r.some(n=>n.dim)?r.map(n=>n.dim||"auto").join(" "):`repeat(${r.length}, 1fr)`;return{[e]:t}},It=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),Qe=({children:r,layout:e={horizontal:!1,sections:[{id:"1",content:Array.isArray(r)?r.map(t=>({id:t.props.id})):[{id:r.props.id}]}]}})=>{const t={};j.Children.forEach(r,d=>{j.isValidElement(d)&&(t[d.props.id]=d)});const n="--smp-grid-template-cols",s="--smp-grid-template-rows",a=Sr(e.sections??[],Object.keys(t)),i=d=>d.reduce((m,p)=>{var T,R;let v="",b={},w={},S="";return(T=p.sections)!=null&&T.length?(v=pe["smp-layout-section-grid"],b=i(p.sections),p.gridCols===void 0&&(S=pe[p.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],(p.horizontal||It(p.sections))&&(w=Lt(p.sections,p.horizontal?n:s)))):(R=p.content)!=null&&R.length&&(p.gridCols!==void 0&&p.gridCols>0?(v=pe["smp-layout-section-grid"],S=pe["smp-grid-template-cols"],w={[n]:`repeat(${p.gridCols}, 1fr)`}):v=pe["smp-layout-section-flex"]),{...m,...b,[p.id]:{classes:`${v} ${pe[p.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${S} ${p.justify?`smp-justifyContent-${p.justify}`:""} ${p.align?`smp-alignItems-${p.align}`:""}`,styles:w}}},{}),o=i(a),c=`${pe["smp-layout"]} ${e.horizontal?pe["smp-layout-horizontal"]:pe["smp-layout-vertical"]}`,l=e.horizontal||It(e.sections||[])?Lt(a,e.horizontal?n:s):{},f=d=>{var p,v;const m=y.jsx("div",{"smp-id":`section-${d.id}`,className:o[d.id].classes,style:o[d.id].styles,children:(p=d.sections)!=null&&p.length?d.sections.map(b=>f(b)):(v=d.content)==null?void 0:v.map(b=>u(b,d.justify,d.align))},`section-${d.id}`);return d.title?y.jsxs("div",{className:pe["smp-layout-section-with-title"],children:[y.jsx("span",{className:`${pe["smp-layout-section-title"]} ${d.justify?`smp-justifyContent-${d.justify}`:""} ${d.align?`smp-alignItems-${d.align}`:""}`,children:y.jsx(Te,{label:d.title})}),m]},`title-section-${d.id}`):m},u=(d,m,p)=>{const v=t[d.id];if(!v)return null;const w={gridColumnStart:(d.colSpan&&d.colSpan>0?`span ${d.colSpan}`:d.colStart&&d.colStart<1?"1":void 0)??d.colStart,gridColumnEnd:d.colEnd&&d.colEnd>0?d.colEnd:void 0},S=`${pe["smp-layout-cell-container"]} ${m?`smp-justifyContent-${m}`:""} ${p?`smp-alignItems-${p}`:""}`;return y.jsx("div",{className:S,style:w,"smp-id":d.id,children:v},d.id)};return y.jsx("div",{className:c,style:l,"smp-id":"layout",children:a.map(d=>f(d))})},te={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",TIME:"TIM",PASSWORD:"PWD"},Gr=r=>r.t=="D8",Kr=r=>r.t=="I1",qr=r=>{if(r){const e=r.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class et{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new et(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function zr(r,e){if(Rt(r)){const f=new Date(r);if(!isNaN(f.getTime()))return f}const t=new Date,n=r.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),i=s.indexOf("MM");let o=0,c=0,l="";switch(n.length){case 1:case 2:return o=parseInt(n),t.setDate(o),We(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),c=parseInt(n.substring(2,4)),i===0?(t.setMonth(o-1),t.setDate(c)):a===0&&(t.setMonth(c-1),t.setDate(o)),We(t)?t:r;case 5:case 6:{o=parseInt(n.substring(0,2)),c=parseInt(n.substring(2,4)),Number(n.substring(4))>50?l="19"+n.substring(4):l="20"+n.substring(4);let f=0,u=0;return i===0?(f=c,u=o-1,t.setFullYear(parseInt(l),u,f)):a===0&&(f=o,u=c-1,t.setFullYear(parseInt(l),u,f)),St(o,u,parseInt(l))&&We(t)?t:r}case 7:case 8:{o=parseInt(n.substring(0,2)),c=parseInt(n.substring(2,4)),l=n.substring(4);let f=0,u=0;return i===0?(f=c,u=o-1,t.setFullYear(parseInt(l),u,f)):a===0&&(f=o,u=c-1,t.setFullYear(parseInt(l),u,f)),St(f,u,parseInt(l))&&We(t)?t:r}}return r}function Rt(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function We(r){return r instanceof Date&&!isNaN(r.getTime())}function Jr(r){if(!/^\d{8}$/.test(r))return!1;const e=parseInt(r.slice(0,4),10),t=parseInt(r.slice(4,6),10),n=parseInt(r.slice(6,8),10);return St(n,t-1,e)}function St(r,e,t){const n=[31,Xr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Xr(r){return r%4===0&&(r%100!==0||r%400===0)}function Zr(r){const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(n))?r.toString():`${e}-${t}-${n}`}class tt{constructor(e,t){de(this,"class");de(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=Nt.get(`${e.t}${e.p}`);if(t)return new tt(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=Nt.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const Nt=new Map([["D8*YYMD",{legacyToIso(r){return Jr(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return Rt(r)&&r.replaceAll("-","")||r}}]]),_e=(r,e)=>{j.useEffect(()=>{const t=n=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(n.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])};function lt({position:r="bottom",enabled:e=!0}){const t=j.useRef(null),n=j.useRef(null),[s,a]=j.useState(0),i=j.useCallback(()=>{const o=t.current,c=n.current;if(!o||!c)return;const{top:l,left:f,width:u,height:d}=o.getBoundingClientRect();a(u);const m=c.offsetHeight,p=c.offsetWidth;if(p===0||m===0){requestAnimationFrame(i);return}let v=l+window.scrollY,b=f+window.scrollX;switch(r){case"top":v-=m;break;case"bottom":v+=d;break;case"left":b-=p;break;case"right":b+=u;break}requestAnimationFrame(()=>{c.style.transform=`translate(${b}px, ${v}px)`,c.style.opacity="1"})},[r]);return j.useLayoutEffect(()=>{if(!e)return;const o=requestAnimationFrame(()=>{i()}),c=new MutationObserver(()=>{n.current&&i()});return n.current&&c.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),c.disconnect()}},[i,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const Me=(r,e,t)=>{if(r=="")return"";if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},wr=({helperText:r,disabled:e,state:t,id:n})=>{const s={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return y.jsx("label",{className:s.container,id:n,children:r})};function Qr(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function rt(){return rt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},rt.apply(null,arguments)}function wt(r,e){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},wt(r,e)}function en(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,wt(r,e)}function dt(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Be={};/*!
22
+ <%s key={someKey} {...props} />`,A,Y,J,Y),V[Y+A]=!0)}if(Y=null,_!==void 0&&(t(_),Y=""+_),i(b)&&(t(b.key),Y=""+b.key),"key"in b){_={};for(var G in b)G!=="key"&&(_[G]=b[G])}else _=b;return Y&&o(_,typeof h=="function"?h.displayName||h.name||"Unknown":h),u(h,Y,N,C,s(),_,U,W)}function f(h){typeof h=="object"&&h!==null&&h.$$typeof===m&&h._store&&(h._store.validated=1)}var d=j,m=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),D=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),k=Symbol.for("react.client.reference"),M=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,R=Array.isArray,F=console.createTask?console.createTask:function(){return null};d={"react-stack-bottom-frame":function(h){return h()}};var H,z={},q=d["react-stack-bottom-frame"].bind(d,a)(),Z=F(n(a)),V={};Le.Fragment=v,Le.jsx=function(h,b,_,A,C){var N=1e4>M.recentlyCreatedOwnerStacks++;return c(h,b,_,!1,A,C,N?Error("react-stack-top-frame"):q,N?F(n(h)):Z)},Le.jsxs=function(h,b,_,A,C){var N=1e4>M.recentlyCreatedOwnerStacks++;return c(h,b,_,!0,A,C,N?Error("react-stack-top-frame"):q,N?F(n(h)):Z)}}()),Le}var At;function Br(){return At||(At=1,process.env.NODE_ENV==="production"?Ue.exports=Ur():Ue.exports=Wr()),Ue.exports}var y=Br();const Te=({label:r,disabled:e,htmlFor:t})=>{const n={container:`smp-label ${e?"smp-label-disabled":""}`};return y.jsx("label",{className:n.container,htmlFor:t,children:r})},pe={"smp-layout":"_smp-layout_xrjwg_1","smp-layout-horizontal":"_smp-layout-horizontal_xrjwg_9","smp-layout-vertical":"_smp-layout-vertical_xrjwg_13","smp-layout-section-grid":"_smp-layout-section-grid_xrjwg_18","smp-layout-section-vertical":"_smp-layout-section-vertical_xrjwg_20","smp-layout-section-horizontal":"_smp-layout-section-horizontal_xrjwg_24","smp-layout-section-flex":"_smp-layout-section-flex_xrjwg_29","smp-layout-cell-container":"_smp-layout-cell-container_xrjwg_34","smp-grid-template-cols":"_smp-grid-template-cols_xrjwg_44","smp-grid-template-rows":"_smp-grid-template-rows_xrjwg_48","smp-layout-section-with-title":"_smp-layout-section-with-title_xrjwg_52","smp-layout-section-title":"_smp-layout-section-title_xrjwg_58"},Hr=(r,e)=>{const t=[];for(let n=0;n<r.length;n+=e)t.push(r.slice(n,n+e));return t},Sr=(r,e)=>r.map(t=>{var a,i;if((a=t.sections)!=null&&a.length)return{...t,sections:Sr(t.sections,e),content:t.content};let n=t.sections,s=t.content;return(i=t.content)!=null&&i.length&&t.columns&&+t.columns>1&&(n=Hr(t.content.filter(l=>e.includes(l.id)),+t.columns).map((l,u)=>({...t,id:`${t.id}-${u}`,content:l,gridCols:t.columns,horizontal:!0})),s=[]),{...t,sections:n,content:s}}),Lt=(r,e)=>{if(!e)return{};const t=r.some(n=>n.dim)?r.map(n=>n.dim||"auto").join(" "):`repeat(${r.length}, 1fr)`;return{[e]:t}},Nt=r=>r.some(e=>e.dim&&!e.dim.endsWith("%")),Qe=({children:r,layout:e={horizontal:!1,sections:[{id:"1",content:Array.isArray(r)?r.map(t=>({id:t.props.id})):[{id:r.props.id}]}]}})=>{const t={};j.Children.forEach(r,d=>{j.isValidElement(d)&&(t[d.props.id]=d)});const n="--smp-grid-template-cols",s="--smp-grid-template-rows",a=Sr(e.sections??[],Object.keys(t)),i=d=>d.reduce((m,p)=>{var D,E;let v="",T={},w={},x="";return(D=p.sections)!=null&&D.length?(v=pe["smp-layout-section-grid"],T=i(p.sections),p.gridCols===void 0&&(x=pe[p.horizontal?"smp-grid-template-cols":"smp-grid-template-rows"],(p.horizontal||Nt(p.sections))&&(w=Lt(p.sections,p.horizontal?n:s)))):(E=p.content)!=null&&E.length&&(p.gridCols!==void 0&&p.gridCols>0?(v=pe["smp-layout-section-grid"],x=pe["smp-grid-template-cols"],w={[n]:`repeat(${p.gridCols}, 1fr)`}):v=pe["smp-layout-section-flex"]),{...m,...T,[p.id]:{classes:`${v} ${pe[p.horizontal?"smp-layout-section-horizontal":"smp-layout-section-vertical"]} ${x} ${p.justify?`smp-justifyContent-${p.justify}`:""} ${p.align?`smp-alignItems-${p.align}`:""}`,styles:w}}},{}),o=i(a),l=`${pe["smp-layout"]} ${e.horizontal?pe["smp-layout-horizontal"]:pe["smp-layout-vertical"]}`,u=e.horizontal||Nt(e.sections||[])?Lt(a,e.horizontal?n:s):{},c=d=>{var p,v;const m=y.jsx("div",{"smp-id":`section-${d.id}`,className:o[d.id].classes,style:o[d.id].styles,children:(p=d.sections)!=null&&p.length?d.sections.map(T=>c(T)):(v=d.content)==null?void 0:v.map(T=>f(T,d.justify,d.align))},`section-${d.id}`);return d.title?y.jsxs("div",{className:pe["smp-layout-section-with-title"],children:[y.jsx("span",{className:`${pe["smp-layout-section-title"]} ${d.justify?`smp-justifyContent-${d.justify}`:""} ${d.align?`smp-alignItems-${d.align}`:""}`,children:y.jsx(Te,{label:d.title})}),m]},`title-section-${d.id}`):m},f=(d,m,p)=>{const v=t[d.id];if(!v)return null;const w={gridColumnStart:(d.colSpan&&d.colSpan>0?`span ${d.colSpan}`:d.colStart&&d.colStart<1?"1":void 0)??d.colStart,gridColumnEnd:d.colEnd&&d.colEnd>0?d.colEnd:void 0},x=`${pe["smp-layout-cell-container"]} ${m?`smp-justifyContent-${m}`:""} ${p?`smp-alignItems-${p}`:""}`;return y.jsx("div",{className:x,style:w,"smp-id":d.id,children:v},d.id)};return y.jsx("div",{className:l,style:u,"smp-id":"layout",children:a.map(d=>c(d))})},te={AUTOCOMPLETE:"ACP",BUTTON_LIST:"BTL",BUTTON:"BTN",CHECKBOX:"CHK",CHIP:"CHI",COMBOBOX:"CMB",DATE:"CAL",ICON:"ICO",IMAGE:"IMG",INPUT_NUMBER:"INR",MEMO:"MEM",MULTI_AUTOCOMPLETE:"AML",RADIO:"RAD",SPOTLIGHT:"SPL",SWITCH:"SWT",TEXT_FIELD:"ITX",TIME:"TIM",PASSWORD:"PWD"},zr=r=>r.t=="D8",Gr=r=>r.t=="I1",Kr=r=>{if(r){const e=r.split(";");if(e.length==3)return{t:e[0],p:e[1],k:e[2]}}return{t:"",p:"",k:""}};class et{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new et(e,e.k=="1"||e.k=="true")}getValue(){return this.value}getLegacyValue(){if(this.class.t=="V2"){if(this.class.p=="SI/NO")return this.value?"1":" ";if(this.class.p=="ON/OFF")return this.value?"1":"0"}return this.value?"true":"false"}}function qr(r,e){if(jt(r)){const c=new Date(r);if(!isNaN(c.getTime()))return c}const t=new Date,n=r.replaceAll("/","").replaceAll("-","");let s="DDMMYYYY";e==="en"&&(s="MMDDYYYY");const a=s.indexOf("DD"),i=s.indexOf("MM");let o=0,l=0,u="";switch(n.length){case 1:case 2:return o=parseInt(n),t.setDate(o),We(t)?t:r;case 3:case 4:return o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),i===0?(t.setMonth(o-1),t.setDate(l)):a===0&&(t.setMonth(l-1),t.setDate(o)),We(t)?t:r;case 5:case 6:{o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),Number(n.substring(4))>50?u="19"+n.substring(4):u="20"+n.substring(4);let c=0,f=0;return i===0?(c=l,f=o-1,t.setFullYear(parseInt(u),f,c)):a===0&&(c=o,f=l-1,t.setFullYear(parseInt(u),f,c)),St(o,f,parseInt(u))&&We(t)?t:r}case 7:case 8:{o=parseInt(n.substring(0,2)),l=parseInt(n.substring(2,4)),u=n.substring(4);let c=0,f=0;return i===0?(c=l,f=o-1,t.setFullYear(parseInt(u),f,c)):a===0&&(c=o,f=l-1,t.setFullYear(parseInt(u),f,c)),St(c,f,parseInt(u))&&We(t)?t:r}}return r}function jt(r){return/^\d{4}-\d{2}-\d{2}$/.test(r)&&r.length===10}function We(r){return r instanceof Date&&!isNaN(r.getTime())}function Jr(r){if(!/^\d{8}$/.test(r))return!1;const e=parseInt(r.slice(0,4),10),t=parseInt(r.slice(4,6),10),n=parseInt(r.slice(6,8),10);return St(n,t-1,e)}function St(r,e,t){const n=[31,Xr(t)?29:28,31,30,31,30,31,31,30,31,30,31];return!(e<0||e>11||r<1||r>n[e])}function Xr(r){return r%4===0&&(r%100!==0||r%400===0)}function Zr(r){const e=r.getFullYear(),t=String(r.getMonth()+1).padStart(2,"0"),n=String(r.getDate()).padStart(2,"0");return isNaN(e)||isNaN(Number(t))||isNaN(Number(n))?r.toString():`${e}-${t}-${n}`}class tt{constructor(e,t){de(this,"class");de(this,"date");this.class=e,this.date=t}static fromDataObj(e){const t=It.get(`${e.t}${e.p}`);if(t)return new tt(e,t.legacyToIso(e.k));throw new Error(`Date creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=It.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.date);throw new Error(`Date object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.date}}const It=new Map([["D8*YYMD",{legacyToIso(r){return Jr(r)&&`${r.substring(0,4)}-${r.substring(4,6)}-${r.substring(6,8)}`||r},isoToLegacy(r){return jt(r)&&r.replaceAll("-","")||r}}]]),$e=(r,e)=>{j.useEffect(()=>{const t=n=>{typeof r=="object"&&r!==null&&"current"in r&&r.current&&!r.current.contains(n.target)&&e()};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[r,e])};function lt({position:r="bottom",enabled:e=!0}){const t=j.useRef(null),n=j.useRef(null),[s,a]=j.useState(0),i=j.useCallback(()=>{const o=t.current,l=n.current;if(!o||!l)return;const{top:u,left:c,width:f,height:d}=o.getBoundingClientRect();a(f);const m=l.offsetHeight,p=l.offsetWidth;if(p===0||m===0){requestAnimationFrame(i);return}let v=u+window.scrollY,T=c+window.scrollX;switch(r){case"top":v-=m;break;case"bottom":v+=d;break;case"left":T-=p;break;case"right":T+=f;break}requestAnimationFrame(()=>{l.style.transform=`translate(${T}px, ${v}px)`,l.style.opacity="1"})},[r]);return j.useLayoutEffect(()=>{if(!e)return;const o=requestAnimationFrame(()=>{i()}),l=new MutationObserver(()=>{n.current&&i()});return n.current&&l.observe(n.current,{childList:!0,subtree:!0}),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0),()=>{cancelAnimationFrame(o),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),l.disconnect()}},[i,e]),{anchorRef:t,targetRef:n,anchorWidth:s}}const Me=(r,e,t)=>{if(r=="")return"";if(t)switch(t){case"CodeOnly":return r;case"DescOnly":return e||"";case"Both":return`${r} - ${e}`}return r},wr=({helperText:r,disabled:e,state:t,id:n})=>{const s={container:`smp-helper-text ${e?"smp-helper-text-disabled":""} ${t?`smp-helper-text-${t}`:""}`};return y.jsx("label",{className:s.container,id:n,children:r})};function Qr(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}function rt(){return rt=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},rt.apply(null,arguments)}function wt(r,e){return wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},wt(r,e)}function en(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,wt(r,e)}function dt(r,e,t){if(t||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))}var Be={};/*!
23
23
  * content-type
24
24
  * Copyright(c) 2015 Douglas Christopher Wilson
25
25
  * MIT Licensed
26
- */var Mt;function tn(){if(Mt)return Be;Mt=1;var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,n=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Be.format=i,Be.parse=o;function i(u){if(!u||typeof u!="object")throw new TypeError("argument obj is required");var d=u.parameters,m=u.type;if(!m||!a.test(m))throw new TypeError("invalid type");var p=m;if(d&&typeof d=="object")for(var v,b=Object.keys(d).sort(),w=0;w<b.length;w++){if(v=b[w],!t.test(v))throw new TypeError("invalid parameter name");p+="; "+v+"="+l(d[v])}return p}function o(u){if(!u)throw new TypeError("argument string is required");var d=typeof u=="object"?c(u):u;if(typeof d!="string")throw new TypeError("argument string is required to be a string");var m=d.indexOf(";"),p=m!==-1?d.slice(0,m).trim():d.trim();if(!a.test(p))throw new TypeError("invalid media type");var v=new f(p.toLowerCase());if(m!==-1){var b,w,S;for(r.lastIndex=m;w=r.exec(d);){if(w.index!==m)throw new TypeError("invalid parameter format");m+=w[0].length,b=w[1].toLowerCase(),S=w[2],S.charCodeAt(0)===34&&(S=S.slice(1,-1),S.indexOf("\\")!==-1&&(S=S.replace(n,"$1"))),v.parameters[b]=S}if(m!==d.length)throw new TypeError("invalid parameter format")}return v}function c(u){var d;if(typeof u.getHeader=="function"?d=u.getHeader("content-type"):typeof u.headers=="object"&&(d=u.headers&&u.headers["content-type"]),typeof d!="string")throw new TypeError("content-type header is missing from object");return d}function l(u){var d=String(u);if(t.test(d))return d;if(d.length>0&&!e.test(d))throw new TypeError("invalid parameter value");return'"'+d.replace(s,"\\$1")+'"'}function f(u){this.parameters=Object.create(null),this.type=u}return Be}var rn=tn(),je=new Map,Er=function(e){return e.cloneNode(!0)},Ft=function(){return window.location.protocol==="file:"},Tr=function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var i=rn.parse(a).type;if(!(i==="image/svg+xml"||i==="text/plain"))throw new Error("Invalid content type: ".concat(i))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(Ft()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||Ft()&&s.status===0)n(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(o){if(s.abort(),o instanceof Error)n(o,s);else throw o}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},xe={},Vt=function(e,t){xe[e]=xe[e]||[],xe[e].push(t)},nn=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(xe[e])){var c=je.get(e),l=xe[e][i];c instanceof SVGSVGElement&&l(null,Er(c)),c instanceof Error&&l(c),i===xe[e].length-1&&delete xe[e]}},0)},n=0,s=xe[e].length;n<s;n++)t(n)},sn=function(e,t,n){if(je.has(e)){var s=je.get(e);if(s===void 0){Vt(e,n);return}if(s instanceof SVGSVGElement){n(null,Er(s));return}}je.set(e,void 0),Vt(e,n),Tr(e,t,function(a,i){var o;a?je.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&je.set(e,i.responseXML.documentElement),nn(e)})},an=function(e,t,n){Tr(e,t,function(s,a){var i;s?n(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&n(null,a.responseXML.documentElement)})},on=0,ln=function(){return++on},ge=[],Yt={},cn="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xlink",Ut=function(e,t,n,s,a,i,o){var c=e.getAttribute("data-src")||e.getAttribute("src");if(!c){o(new Error("Invalid data-src or src attribute"));return}if(ge.indexOf(e)!==-1){ge.splice(ge.indexOf(e),1),e=null;return}ge.push(e),e.setAttribute("src","");var l=s?sn:an;l(c,a,function(f,u){if(!u){ge.splice(ge.indexOf(e),1),e=null,o(f);return}var d=e.getAttribute("id");d&&u.setAttribute("id",d);var m=e.getAttribute("title");m&&u.setAttribute("title",m);var p=e.getAttribute("width");p&&u.setAttribute("width",p);var v=e.getAttribute("height");v&&u.setAttribute("height",v);var b=Array.from(new Set(dt(dt(dt([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",b);var w=e.getAttribute("style");w&&u.setAttribute("style",w),u.setAttribute("data-src",c);var S=[].filter.call(e.attributes,function(Z){return/^data-\w[\w-]*$/.test(Z.name)});if(Array.prototype.forEach.call(S,function(Z){Z.name&&Z.value&&u.setAttribute(Z.name,Z.value)}),n){var T={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},R,g,k,E,O;Object.keys(T).forEach(function(Z){R=Z,k=T[Z],g=u.querySelectorAll(R+"[id]");for(var M=function(L,C){E=g[L].id,O=E+"-"+ln();var I;Array.prototype.forEach.call(k,function(W){I=u.querySelectorAll("["+W+'*="'+E+'"]');for(var X=0,re=I.length;X<re;X++){var ne=I[X].getAttribute(W);ne&&!ne.match(new RegExp('url\\("?#'+E+'"?\\)'))||I[X].setAttribute(W,"url(#"+O+")")}});for(var Y=u.querySelectorAll("[*|href]"),U=[],V=0,J=Y.length;V<J;V++){var K=Y[V].getAttributeNS(pt,"href");K&&K.toString()==="#"+g[L].id&&U.push(Y[V])}for(var se=0,N=U.length;se<N;se++)U[se].setAttributeNS(pt,"href","#"+O);g[L].id=O},h=0,x=g.length;h<x;h++)M(h)})}u.removeAttribute("xmlns:a");for(var $=u.querySelectorAll("script"),A=[],B,P,D=0,F=$.length;D<F;D++)P=$[D].getAttribute("type"),(!P||P==="application/ecmascript"||P==="application/javascript"||P==="text/javascript")&&(B=$[D].innerText||$[D].textContent,B&&A.push(B),u.removeChild($[D]));if(A.length>0&&(t==="always"||t==="once"&&!Yt[c])){for(var H=0,G=A.length;H<G;H++)new Function(A[H])(window);Yt[c]=!0}var z=u.querySelectorAll("style");if(Array.prototype.forEach.call(z,function(Z){Z.textContent+=""}),u.setAttribute("xmlns",cn),u.setAttribute("xmlns:xlink",pt),i(u),!e.parentNode){ge.splice(ge.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),ge.splice(ge.indexOf(e),1),e=null,o(null,u)})},un=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,i=n.afterEach,o=i===void 0?function(){}:i,c=n.beforeEach,l=c===void 0?function(){}:c,f=n.cacheRequests,u=f===void 0?!0:f,d=n.evalScripts,m=d===void 0?"never":d,p=n.httpRequestWithCredentials,v=p===void 0?!1:p,b=n.renumerateIRIElements,w=b===void 0?!0:b;if(e&&"length"in e)for(var S=0,T=0,R=e.length;T<R;T++)Ut(e[T],m,w,u,v,l,function(g,k){o(g,k),e&&"length"in e&&e.length===++S&&a(S)});else e?Ut(e,m,w,u,v,l,function(g,k){o(g,k),a(1),e=null}):a(0)},He={exports:{}},Ge={exports:{}},Q={};/** @license React v16.13.1
26
+ */var Mt;function tn(){if(Mt)return Be;Mt=1;var r=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,e=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,t=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,n=/\\([\u000b\u0020-\u00ff])/g,s=/([\\"])/g,a=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;Be.format=i,Be.parse=o;function i(f){if(!f||typeof f!="object")throw new TypeError("argument obj is required");var d=f.parameters,m=f.type;if(!m||!a.test(m))throw new TypeError("invalid type");var p=m;if(d&&typeof d=="object")for(var v,T=Object.keys(d).sort(),w=0;w<T.length;w++){if(v=T[w],!t.test(v))throw new TypeError("invalid parameter name");p+="; "+v+"="+u(d[v])}return p}function o(f){if(!f)throw new TypeError("argument string is required");var d=typeof f=="object"?l(f):f;if(typeof d!="string")throw new TypeError("argument string is required to be a string");var m=d.indexOf(";"),p=m!==-1?d.slice(0,m).trim():d.trim();if(!a.test(p))throw new TypeError("invalid media type");var v=new c(p.toLowerCase());if(m!==-1){var T,w,x;for(r.lastIndex=m;w=r.exec(d);){if(w.index!==m)throw new TypeError("invalid parameter format");m+=w[0].length,T=w[1].toLowerCase(),x=w[2],x.charCodeAt(0)===34&&(x=x.slice(1,-1),x.indexOf("\\")!==-1&&(x=x.replace(n,"$1"))),v.parameters[T]=x}if(m!==d.length)throw new TypeError("invalid parameter format")}return v}function l(f){var d;if(typeof f.getHeader=="function"?d=f.getHeader("content-type"):typeof f.headers=="object"&&(d=f.headers&&f.headers["content-type"]),typeof d!="string")throw new TypeError("content-type header is missing from object");return d}function u(f){var d=String(f);if(t.test(d))return d;if(d.length>0&&!e.test(d))throw new TypeError("invalid parameter value");return'"'+d.replace(s,"\\$1")+'"'}function c(f){this.parameters=Object.create(null),this.type=f}return Be}var rn=tn(),Re=new Map,Er=function(e){return e.cloneNode(!0)},Ft=function(){return window.location.protocol==="file:"},Tr=function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&s.readyState===2){var a=s.getResponseHeader("Content-Type");if(!a)throw new Error("Content type not found");var i=rn.parse(a).type;if(!(i==="image/svg+xml"||i==="text/plain"))throw new Error("Invalid content type: ".concat(i))}if(s.readyState===4){if(s.status===404||s.responseXML===null)throw new Error(Ft()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(s.status===200||Ft()&&s.status===0)n(null,s);else throw new Error("There was a problem injecting the SVG: "+s.status+" "+s.statusText)}}catch(o){if(s.abort(),o instanceof Error)n(o,s);else throw o}},s.open("GET",e),s.withCredentials=t,s.overrideMimeType&&s.overrideMimeType("text/xml"),s.send()},be={},Vt=function(e,t){be[e]=be[e]||[],be[e].push(t)},nn=function(e){for(var t=function(i,o){setTimeout(function(){if(Array.isArray(be[e])){var l=Re.get(e),u=be[e][i];l instanceof SVGSVGElement&&u(null,Er(l)),l instanceof Error&&u(l),i===be[e].length-1&&delete be[e]}},0)},n=0,s=be[e].length;n<s;n++)t(n)},sn=function(e,t,n){if(Re.has(e)){var s=Re.get(e);if(s===void 0){Vt(e,n);return}if(s instanceof SVGSVGElement){n(null,Er(s));return}}Re.set(e,void 0),Vt(e,n),Tr(e,t,function(a,i){var o;a?Re.set(e,a):((o=i.responseXML)===null||o===void 0?void 0:o.documentElement)instanceof SVGSVGElement&&Re.set(e,i.responseXML.documentElement),nn(e)})},an=function(e,t,n){Tr(e,t,function(s,a){var i;s?n(s):((i=a.responseXML)===null||i===void 0?void 0:i.documentElement)instanceof SVGSVGElement&&n(null,a.responseXML.documentElement)})},on=0,ln=function(){return++on},ge=[],Yt={},cn="http://www.w3.org/2000/svg",pt="http://www.w3.org/1999/xlink",Ut=function(e,t,n,s,a,i,o){var l=e.getAttribute("data-src")||e.getAttribute("src");if(!l){o(new Error("Invalid data-src or src attribute"));return}if(ge.indexOf(e)!==-1){ge.splice(ge.indexOf(e),1),e=null;return}ge.push(e),e.setAttribute("src","");var u=s?sn:an;u(l,a,function(c,f){if(!f){ge.splice(ge.indexOf(e),1),e=null,o(c);return}var d=e.getAttribute("id");d&&f.setAttribute("id",d);var m=e.getAttribute("title");m&&f.setAttribute("title",m);var p=e.getAttribute("width");p&&f.setAttribute("width",p);var v=e.getAttribute("height");v&&f.setAttribute("height",v);var T=Array.from(new Set(dt(dt(dt([],(f.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();f.setAttribute("class",T);var w=e.getAttribute("style");w&&f.setAttribute("style",w),f.setAttribute("data-src",l);var x=[].filter.call(e.attributes,function(Z){return/^data-\w[\w-]*$/.test(Z.name)});if(Array.prototype.forEach.call(x,function(Z){Z.name&&Z.value&&f.setAttribute(Z.name,Z.value)}),n){var D={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},E,g,$,L,S;Object.keys(D).forEach(function(Z){E=Z,$=D[Z],g=f.querySelectorAll(E+"[id]");for(var V=function(A,C){L=g[A].id,S=L+"-"+ln();var N;Array.prototype.forEach.call($,function(B){N=f.querySelectorAll("["+B+'*="'+L+'"]');for(var X=0,re=N.length;X<re;X++){var ne=N[X].getAttribute(B);ne&&!ne.match(new RegExp('url\\("?#'+L+'"?\\)'))||N[X].setAttribute(B,"url(#"+S+")")}});for(var U=f.querySelectorAll("[*|href]"),W=[],Y=0,J=U.length;Y<J;Y++){var G=U[Y].getAttributeNS(pt,"href");G&&G.toString()==="#"+g[A].id&&W.push(U[Y])}for(var se=0,I=W.length;se<I;se++)W[se].setAttributeNS(pt,"href","#"+S);g[A].id=S},h=0,b=g.length;h<b;h++)V(h)})}f.removeAttribute("xmlns:a");for(var O=f.querySelectorAll("script"),k=[],M,P,R=0,F=O.length;R<F;R++)P=O[R].getAttribute("type"),(!P||P==="application/ecmascript"||P==="application/javascript"||P==="text/javascript")&&(M=O[R].innerText||O[R].textContent,M&&k.push(M),f.removeChild(O[R]));if(k.length>0&&(t==="always"||t==="once"&&!Yt[l])){for(var H=0,z=k.length;H<z;H++)new Function(k[H])(window);Yt[l]=!0}var q=f.querySelectorAll("style");if(Array.prototype.forEach.call(q,function(Z){Z.textContent+=""}),f.setAttribute("xmlns",cn),f.setAttribute("xmlns:xlink",pt),i(f),!e.parentNode){ge.splice(ge.indexOf(e),1),e=null,o(new Error("Parent node is null"));return}e.parentNode.replaceChild(f,e),ge.splice(ge.indexOf(e),1),e=null,o(null,f)})},un=function(e,t){var n=t===void 0?{}:t,s=n.afterAll,a=s===void 0?function(){}:s,i=n.afterEach,o=i===void 0?function(){}:i,l=n.beforeEach,u=l===void 0?function(){}:l,c=n.cacheRequests,f=c===void 0?!0:c,d=n.evalScripts,m=d===void 0?"never":d,p=n.httpRequestWithCredentials,v=p===void 0?!1:p,T=n.renumerateIRIElements,w=T===void 0?!0:T;if(e&&"length"in e)for(var x=0,D=0,E=e.length;D<E;D++)Ut(e[D],m,w,f,v,u,function(g,$){o(g,$),e&&"length"in e&&e.length===++x&&a(x)});else e?Ut(e,m,w,f,v,u,function(g,$){o(g,$),a(1),e=null}):a(0)},He={exports:{}},ze={exports:{}},Q={};/** @license React v16.13.1
27
27
  * react-is.production.min.js
28
28
  *
29
29
  * Copyright (c) Facebook, Inc. and its affiliates.
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Wt;function fn(){if(Wt)return Q;Wt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function T(g){if(typeof g=="object"&&g!==null){var k=g.$$typeof;switch(k){case e:switch(g=g.type,g){case c:case l:case n:case a:case s:case u:return g;default:switch(g=g&&g.$$typeof,g){case o:case f:case p:case m:case i:return g;default:return k}}case t:return k}}}function R(g){return T(g)===l}return Q.AsyncMode=c,Q.ConcurrentMode=l,Q.ContextConsumer=o,Q.ContextProvider=i,Q.Element=e,Q.ForwardRef=f,Q.Fragment=n,Q.Lazy=p,Q.Memo=m,Q.Portal=t,Q.Profiler=a,Q.StrictMode=s,Q.Suspense=u,Q.isAsyncMode=function(g){return R(g)||T(g)===c},Q.isConcurrentMode=R,Q.isContextConsumer=function(g){return T(g)===o},Q.isContextProvider=function(g){return T(g)===i},Q.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Q.isForwardRef=function(g){return T(g)===f},Q.isFragment=function(g){return T(g)===n},Q.isLazy=function(g){return T(g)===p},Q.isMemo=function(g){return T(g)===m},Q.isPortal=function(g){return T(g)===t},Q.isProfiler=function(g){return T(g)===a},Q.isStrictMode=function(g){return T(g)===s},Q.isSuspense=function(g){return T(g)===u},Q.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===l||g===a||g===s||g===u||g===d||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===m||g.$$typeof===i||g.$$typeof===o||g.$$typeof===f||g.$$typeof===b||g.$$typeof===w||g.$$typeof===S||g.$$typeof===v)},Q.typeOf=T,Q}var ee={};/** @license React v16.13.1
33
+ */var Wt;function fn(){if(Wt)return Q;Wt=1;var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,u=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,T=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function D(g){if(typeof g=="object"&&g!==null){var $=g.$$typeof;switch($){case e:switch(g=g.type,g){case l:case u:case n:case a:case s:case f:return g;default:switch(g=g&&g.$$typeof,g){case o:case c:case p:case m:case i:return g;default:return $}}case t:return $}}}function E(g){return D(g)===u}return Q.AsyncMode=l,Q.ConcurrentMode=u,Q.ContextConsumer=o,Q.ContextProvider=i,Q.Element=e,Q.ForwardRef=c,Q.Fragment=n,Q.Lazy=p,Q.Memo=m,Q.Portal=t,Q.Profiler=a,Q.StrictMode=s,Q.Suspense=f,Q.isAsyncMode=function(g){return E(g)||D(g)===l},Q.isConcurrentMode=E,Q.isContextConsumer=function(g){return D(g)===o},Q.isContextProvider=function(g){return D(g)===i},Q.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},Q.isForwardRef=function(g){return D(g)===c},Q.isFragment=function(g){return D(g)===n},Q.isLazy=function(g){return D(g)===p},Q.isMemo=function(g){return D(g)===m},Q.isPortal=function(g){return D(g)===t},Q.isProfiler=function(g){return D(g)===a},Q.isStrictMode=function(g){return D(g)===s},Q.isSuspense=function(g){return D(g)===f},Q.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===u||g===a||g===s||g===f||g===d||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===m||g.$$typeof===i||g.$$typeof===o||g.$$typeof===c||g.$$typeof===T||g.$$typeof===w||g.$$typeof===x||g.$$typeof===v)},Q.typeOf=D,Q}var ee={};/** @license React v16.13.1
34
34
  * react-is.development.js
35
35
  *
36
36
  * Copyright (c) Facebook, Inc. and its affiliates.
37
37
  *
38
38
  * This source code is licensed under the MIT license found in the
39
39
  * LICENSE file in the root directory of this source tree.
40
- */var Bt;function dn(){return Bt||(Bt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,u=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function T(N){return typeof N=="string"||typeof N=="function"||N===n||N===l||N===a||N===s||N===u||N===d||typeof N=="object"&&N!==null&&(N.$$typeof===p||N.$$typeof===m||N.$$typeof===i||N.$$typeof===o||N.$$typeof===f||N.$$typeof===b||N.$$typeof===w||N.$$typeof===S||N.$$typeof===v)}function R(N){if(typeof N=="object"&&N!==null){var W=N.$$typeof;switch(W){case e:var X=N.type;switch(X){case c:case l:case n:case a:case s:case u:return X;default:var re=X&&X.$$typeof;switch(re){case o:case f:case p:case m:case i:return re;default:return W}}case t:return W}}}var g=c,k=l,E=o,O=i,$=e,A=f,B=n,P=p,D=m,F=t,H=a,G=s,z=u,Z=!1;function M(N){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.")),h(N)||R(N)===c}function h(N){return R(N)===l}function x(N){return R(N)===o}function _(N){return R(N)===i}function L(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function C(N){return R(N)===f}function I(N){return R(N)===n}function Y(N){return R(N)===p}function U(N){return R(N)===m}function V(N){return R(N)===t}function J(N){return R(N)===a}function K(N){return R(N)===s}function se(N){return R(N)===u}ee.AsyncMode=g,ee.ConcurrentMode=k,ee.ContextConsumer=E,ee.ContextProvider=O,ee.Element=$,ee.ForwardRef=A,ee.Fragment=B,ee.Lazy=P,ee.Memo=D,ee.Portal=F,ee.Profiler=H,ee.StrictMode=G,ee.Suspense=z,ee.isAsyncMode=M,ee.isConcurrentMode=h,ee.isContextConsumer=x,ee.isContextProvider=_,ee.isElement=L,ee.isForwardRef=C,ee.isFragment=I,ee.isLazy=Y,ee.isMemo=U,ee.isPortal=V,ee.isProfiler=J,ee.isStrictMode=K,ee.isSuspense=se,ee.isValidElementType=T,ee.typeOf=R}()),ee}var Ht;function Or(){return Ht||(Ht=1,process.env.NODE_ENV==="production"?Ge.exports=fn():Ge.exports=dn()),Ge.exports}/*
40
+ */var Bt;function dn(){return Bt||(Bt=1,process.env.NODE_ENV!=="production"&&function(){var r=typeof Symbol=="function"&&Symbol.for,e=r?Symbol.for("react.element"):60103,t=r?Symbol.for("react.portal"):60106,n=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,i=r?Symbol.for("react.provider"):60109,o=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,u=r?Symbol.for("react.concurrent_mode"):60111,c=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,p=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,T=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function D(I){return typeof I=="string"||typeof I=="function"||I===n||I===u||I===a||I===s||I===f||I===d||typeof I=="object"&&I!==null&&(I.$$typeof===p||I.$$typeof===m||I.$$typeof===i||I.$$typeof===o||I.$$typeof===c||I.$$typeof===T||I.$$typeof===w||I.$$typeof===x||I.$$typeof===v)}function E(I){if(typeof I=="object"&&I!==null){var B=I.$$typeof;switch(B){case e:var X=I.type;switch(X){case l:case u:case n:case a:case s:case f:return X;default:var re=X&&X.$$typeof;switch(re){case o:case c:case p:case m:case i:return re;default:return B}}case t:return B}}}var g=l,$=u,L=o,S=i,O=e,k=c,M=n,P=p,R=m,F=t,H=a,z=s,q=f,Z=!1;function V(I){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.")),h(I)||E(I)===l}function h(I){return E(I)===u}function b(I){return E(I)===o}function _(I){return E(I)===i}function A(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function C(I){return E(I)===c}function N(I){return E(I)===n}function U(I){return E(I)===p}function W(I){return E(I)===m}function Y(I){return E(I)===t}function J(I){return E(I)===a}function G(I){return E(I)===s}function se(I){return E(I)===f}ee.AsyncMode=g,ee.ConcurrentMode=$,ee.ContextConsumer=L,ee.ContextProvider=S,ee.Element=O,ee.ForwardRef=k,ee.Fragment=M,ee.Lazy=P,ee.Memo=R,ee.Portal=F,ee.Profiler=H,ee.StrictMode=z,ee.Suspense=q,ee.isAsyncMode=V,ee.isConcurrentMode=h,ee.isContextConsumer=b,ee.isContextProvider=_,ee.isElement=A,ee.isForwardRef=C,ee.isFragment=N,ee.isLazy=U,ee.isMemo=W,ee.isPortal=Y,ee.isProfiler=J,ee.isStrictMode=G,ee.isSuspense=se,ee.isValidElementType=D,ee.typeOf=E}()),ee}var Ht;function Or(){return Ht||(Ht=1,process.env.NODE_ENV==="production"?ze.exports=fn():ze.exports=dn()),ze.exports}/*
41
41
  object-assign
42
42
  (c) Sindre Sorhus
43
43
  @license MIT
44
- */var ht,Gt;function pn(){if(Gt)return ht;Gt=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 i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var c=Object.getOwnPropertyNames(i).map(function(f){return i[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 ht=s()?Object.assign:function(a,i){for(var o,c=n(a),l,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var u in o)e.call(o,u)&&(c[u]=o[u]);if(r){l=r(o);for(var d=0;d<l.length;d++)t.call(o,l[d])&&(c[l[d]]=o[l[d]])}}return c},ht}var mt,Kt;function jt(){if(Kt)return mt;Kt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mt=r,mt}var gt,qt;function Rr(){return qt||(qt=1,gt=Function.call.bind(Object.prototype.hasOwnProperty)),gt}var yt,zt;function hn(){if(zt)return yt;zt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=jt(),t={},n=Rr();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,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")+": "+o+" 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](i,f,c,o,null,e)}catch(p){u=p}if(u&&!(u instanceof Error)&&r((c||"React class")+": type specification of "+o+" `"+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 m=l?l():"";r("Failed "+o+" type: "+u.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},yt=s,yt}var vt,Jt;function mn(){if(Jt)return vt;Jt=1;var r=Or(),e=pn(),t=jt(),n=Rr(),s=hn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var c="Warning: "+o;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function i(){return null}return vt=function(o,c){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(h){var x=h&&(l&&h[l]||h[f]);if(typeof x=="function")return x}var d="<<anonymous>>",m={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:S(),arrayOf:T,element:R(),elementType:g(),instanceOf:k,node:A(),objectOf:O,oneOf:E,oneOfType:$,shape:P,exact:D};function p(h,x){return h===x?h!==0||1/h===1/x:h!==h&&x!==x}function v(h,x){this.message=h,this.data=x&&typeof x=="object"?x:{},this.stack=""}v.prototype=Error.prototype;function b(h){if(process.env.NODE_ENV!=="production")var x={},_=0;function L(I,Y,U,V,J,K,se){if(V=V||d,K=K||U,se!==t){if(c){var N=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 N.name="Invariant Violation",N}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var W=V+":"+U;!x[W]&&_<3&&(a("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+V+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[W]=!0,_++)}}return Y[U]==null?I?Y[U]===null?new v("The "+J+" `"+K+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new v("The "+J+" `"+K+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:h(Y,U,V,J,K)}var C=L.bind(null,!1);return C.isRequired=L.bind(null,!0),C}function w(h){function x(_,L,C,I,Y,U){var V=_[L],J=G(V);if(J!==h){var K=z(V);return new v("Invalid "+I+" `"+Y+"` of type "+("`"+K+"` supplied to `"+C+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return b(x)}function S(){return b(i)}function T(h){function x(_,L,C,I,Y){if(typeof h!="function")return new v("Property `"+Y+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var U=_[L];if(!Array.isArray(U)){var V=G(U);return new v("Invalid "+I+" `"+Y+"` of type "+("`"+V+"` supplied to `"+C+"`, expected an array."))}for(var J=0;J<U.length;J++){var K=h(U,J,C,I,Y+"["+J+"]",t);if(K instanceof Error)return K}return null}return b(x)}function R(){function h(x,_,L,C,I){var Y=x[_];if(!o(Y)){var U=G(Y);return new v("Invalid "+C+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected a single ReactElement."))}return null}return b(h)}function g(){function h(x,_,L,C,I){var Y=x[_];if(!r.isValidElementType(Y)){var U=G(Y);return new v("Invalid "+C+" `"+I+"` of type "+("`"+U+"` supplied to `"+L+"`, expected a single ReactElement type."))}return null}return b(h)}function k(h){function x(_,L,C,I,Y){if(!(_[L]instanceof h)){var U=h.name||d,V=M(_[L]);return new v("Invalid "+I+" `"+Y+"` of type "+("`"+V+"` supplied to `"+C+"`, expected ")+("instance of `"+U+"`."))}return null}return b(x)}function E(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function x(_,L,C,I,Y){for(var U=_[L],V=0;V<h.length;V++)if(p(U,h[V]))return null;var J=JSON.stringify(h,function(se,N){var W=z(N);return W==="symbol"?String(N):N});return new v("Invalid "+I+" `"+Y+"` of value `"+String(U)+"` "+("supplied to `"+C+"`, expected one of "+J+"."))}return b(x)}function O(h){function x(_,L,C,I,Y){if(typeof h!="function")return new v("Property `"+Y+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var U=_[L],V=G(U);if(V!=="object")return new v("Invalid "+I+" `"+Y+"` of type "+("`"+V+"` supplied to `"+C+"`, expected an object."));for(var J in U)if(n(U,J)){var K=h(U,J,C,I,Y+"."+J,t);if(K instanceof Error)return K}return null}return b(x)}function $(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var x=0;x<h.length;x++){var _=h[x];if(typeof _!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(_)+" at index "+x+"."),i}function L(C,I,Y,U,V){for(var J=[],K=0;K<h.length;K++){var se=h[K],N=se(C,I,Y,U,V,t);if(N==null)return null;N.data&&n(N.data,"expectedType")&&J.push(N.data.expectedType)}var W=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new v("Invalid "+U+" `"+V+"` supplied to "+("`"+Y+"`"+W+"."))}return b(L)}function A(){function h(x,_,L,C,I){return F(x[_])?null:new v("Invalid "+C+" `"+I+"` supplied to "+("`"+L+"`, expected a ReactNode."))}return b(h)}function B(h,x,_,L,C){return new v((h||"React class")+": "+x+" type `"+_+"."+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function P(h){function x(_,L,C,I,Y){var U=_[L],V=G(U);if(V!=="object")return new v("Invalid "+I+" `"+Y+"` of type `"+V+"` "+("supplied to `"+C+"`, expected `object`."));for(var J in h){var K=h[J];if(typeof K!="function")return B(C,I,Y,J,z(K));var se=K(U,J,C,I,Y+"."+J,t);if(se)return se}return null}return b(x)}function D(h){function x(_,L,C,I,Y){var U=_[L],V=G(U);if(V!=="object")return new v("Invalid "+I+" `"+Y+"` of type `"+V+"` "+("supplied to `"+C+"`, expected `object`."));var J=e({},_[L],h);for(var K in J){var se=h[K];if(n(h,K)&&typeof se!="function")return B(C,I,Y,K,z(se));if(!se)return new v("Invalid "+I+" `"+Y+"` key `"+K+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(_[L],null," ")+`
45
- Valid keys: `+JSON.stringify(Object.keys(h),null," "));var N=se(U,K,C,I,Y+"."+K,t);if(N)return N}return null}return b(x)}function F(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(F);if(h===null||o(h))return!0;var x=u(h);if(x){var _=x.call(h),L;if(x!==h.entries){for(;!(L=_.next()).done;)if(!F(L.value))return!1}else for(;!(L=_.next()).done;){var C=L.value;if(C&&!F(C[1]))return!1}}else return!1;return!0;default:return!1}}function H(h,x){return h==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function G(h){var x=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":H(x,h)?"symbol":x}function z(h){if(typeof h>"u"||h===null)return""+h;var x=G(h);if(x==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return x}function Z(h){var x=z(h);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function M(h){return!h.constructor||!h.constructor.name?d:h.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},vt}var xt,Xt;function gn(){if(Xt)return xt;Xt=1;var r=jt();function e(){}function t(){}return t.resetWarningCache=e,xt=function(){function n(i,o,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},xt}var Zt;function yn(){if(Zt)return He.exports;if(Zt=1,process.env.NODE_ENV!=="production"){var r=Or(),e=!0;He.exports=mn()(r.isElement,e)}else He.exports=gn()();return He.exports}var ie=yn(),vn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},xn=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},bn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ke="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xlink",$e=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];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(o){n.reactWrapper=o},n}en(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof vn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,c=a.httpRequestWithCredentials,l=a.renumerateIRIElements,f=a.src,u=a.title,d=a.useRequestCache,m=this.props.onError,p=this.props.beforeInjection,v=this.props.afterInjection,b=this.props.wrapper,w,S;b==="svg"?(w=document.createElementNS(Ke,b),w.setAttribute("xmlns",Ke),w.setAttribute("xmlns:xlink",Qt),S=document.createElementNS(Ke,b)):(w=document.createElement(b),S=document.createElement(b)),w.appendChild(S),S.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(w);var T=function(E){if(s.removeSVG(),!s._isMounted){m(E);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){m(E)})},R=function(E,O){if(E){T(E);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{v(O)}catch($){T($)}})},g=function(E){if(E.setAttribute("role","img"),i){var O=E.querySelector(":scope > desc");O&&E.removeChild(O);var $=document.createElement("desc");$.innerHTML=i,E.prepend($)}if(u){var A=E.querySelector(":scope > title");A&&E.removeChild(A);var B=document.createElement("title");B.innerHTML=u,E.prepend(B)}try{p(E)}catch(P){T(P)}};un(S,{afterEach:R,beforeEach:g,cacheRequests:d,evalScripts:o,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;xn(rt({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var o=s.wrapper,c=Qr(s,bn),l=o;return Ye.createElement(l,rt({},c,{ref:this.refCallback},o==="svg"?{xmlns:Ke,xmlnsXlink:Qt}:{}),this.state.isLoading&&i&&Ye.createElement(i,null),this.state.hasError&&a&&Ye.createElement(a,null))},e}(Ye.Component);$e.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};$e.propTypes={afterInjection:ie.func,beforeInjection:ie.func,desc:ie.string,evalScripts:ie.oneOf(["always","once","never"]),fallback:ie.oneOfType([ie.func,ie.object,ie.string]),httpRequestWithCredentials:ie.bool,loading:ie.oneOfType([ie.func,ie.object,ie.string]),onError:ie.func,renumerateIRIElements:ie.bool,src:ie.string.isRequired,title:ie.string,useRequestCache:ie.bool,wrapper:ie.oneOf(["div","span","svg"])};let Et={assets:"/"};const Sn=r=>{Et={...Et,...r}},er=r=>`${Et.assets}/${r}`.replace(/\/+/g,"/"),oe=j.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:i="base",rotated:o=!1,onClick:c,isInteractable:l=!1,spin:f=!1,title:u,tabIndex:d})=>{const[m,p]=j.useState(r),v=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),b=v&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),w=er(`assets/svg/${r}.svg`),S=er(`assets/svg/${n}.svg`),T={img:`${l?"smp-image-interactable":""}`,svg:`smp-icon ${i?`smp-icon-${i}`:""} ${o?"smp-icon-rotated":""} ${l?"smp-icon-interactable":""} ${f?"smp-icon-spin":""}`},R=()=>{!a&&l&&c&&c()},g=k=>{!a&&l&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),R())};return y.jsx(y.Fragment,{children:b?y.jsx($e,{src:r,fallback:()=>y.jsx($e,{src:S,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:T.svg,onClick:R,onKeyDown:g,tabIndex:d}):v?y.jsx("img",{src:m,width:e||"16px",height:t||"auto",alt:u,onError:()=>p(S),onClick:R,className:T.img,title:u,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&R()}}):y.jsx($e,{src:w,fallback:()=>y.jsx($e,{src:S,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:u,role:"application",fill:s,"aria-disabled":a,className:T.svg,onClick:R,onKeyDown:g,tabIndex:d})})}),me={"smp-textfield-wrapper":"_smp-textfield-wrapper_mmttf_4","smp-textfield":"_smp-textfield_mmttf_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_mmttf_30","smp-textfield-small":"_smp-textfield-small_mmttf_35","smp-textfield-medium":"_smp-textfield-medium_mmttf_40","smp-textfield-large":"_smp-textfield-large_mmttf_45","smp-textfield-extraLarge":"_smp-textfield-extraLarge_mmttf_50","smp-textfield-input":"_smp-textfield-input_mmttf_56","smp-textfield-outlined":"_smp-textfield-outlined_mmttf_79","smp-textfield-danger":"_smp-textfield-danger_mmttf_90","smp-textfield-readOnly":"_smp-textfield-readOnly_mmttf_94","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_mmttf_99","smp-textfield-disabled":"_smp-textfield-disabled_mmttf_109","smp-textfield-fullWidth":"_smp-textfield-fullWidth_mmttf_118"},be=({disabled:r,bindValue:e,icon:t,onBlur:n,onChange:s,placeholder:a,isEditable:i=!0,shapeIcon:o,sizing:c,state:l,variant:f,rotatedShapeIcon:u=!1,onShapeIconClick:d,ref:m,inputRef:p,onKeyDown:v,inputType:b="text",ariaLabel:w="input field",label:S,helperText:T=!1,error:R,appearance:g="base",fullWidth:k=!1,_dataComponent:E="textfield",min:O,max:$,step:A,inputMode:B="text",width:P})=>{const D=j.useId(),F=`${D}-helper`,H=R?"danger":l,G=R||l=="danger"?"error":o,z=T||!!R,Z=x=>{s==null||s(x.target.value)},M={wrapper:`${me["smp-textfield-wrapper"]} ${k?me["smp-textfield-fullWidth"]:""}`,container:`${me["smp-textfield"]} ${r?me["smp-textfield-disabled"]:""} ${a?me["smp-textfield-placeholder"]:""} ${c?me[`smp-textfield-${c}`]:""} ${H?me[`smp-textfield-${H}`]:""} ${g?me[`smp-textfield-${g}`]:""} ${i?"":me["smp-textfield-readOnly"]}`,input:`${me["smp-textfield-input"]}`};if(f&&(f!=="notSelectable"||i)){const x=me[`smp-textfield-variant-${f}`];x&&(M.container+=` ${x}`)}const h=P?{"--smp-textField-width-base":P}:void 0;return y.jsxs("div",{className:M.wrapper,"data-component":E,children:[S&&y.jsx(Te,{label:S,disabled:r,htmlFor:D}),y.jsxs("div",{className:M.container,ref:m,style:h,children:[t&&y.jsx(oe,{icon:t,disabled:r}),y.jsx("input",{id:D,type:b,value:e,placeholder:a,onChange:Z,onBlur:n,className:M.input,disabled:r,readOnly:!i,onKeyDown:v,"aria-label":w,ref:p,"aria-describedby":z?F:void 0,min:O,max:$,step:A,inputMode:B}),G&&y.jsx(oe,{icon:G,disabled:r,state:H,onClick:d,rotated:u,isInteractable:i,tabIndex:0})]}),z&&y.jsx(wr,{helperText:R,disabled:r,state:H,id:F})]})};function jr({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=j.useState(0),i=j.useRef(null),o=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 m=c;m<=l;m++)f.push({item:r[m],index:m,offsetTop:m*e});const u=j.useCallback(m=>{const p=m.target.scrollTop;a(p)},[]),d=m=>{if(!i.current)return;const p=m*e,v=p+e,b=i.current,w=b.scrollTop,S=w+t;p<w?b.scrollTop=p:v>S&&(b.scrollTop=v-t)};return{virtualItems:f,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:u},innerProps:{style:{height:`${o}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:o,startIndex:c,endIndex:l},scrollToIndex:d}}const qe={"smp-list":"_smp-list_t8eqj_1","smp-list-container":"_smp-list-container_t8eqj_10","smp-list-listItem":"_smp-list-listItem_t8eqj_15"},wn=10,Dr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:c,onKeyDown:l,isOpen:f})=>{var P;const[u,d]=j.useState(""),m=24,[p,v]=j.useState(a!==null?a:-1),b=s!==void 0?s:e.length>wn,w=u?e.filter(D=>D.label.toLowerCase().includes(u.toLowerCase())):e,S=D=>{d(D)},{virtualItems:T,containerProps:R,innerProps:g,scrollToIndex:k}=jr({items:w,itemHeight:m,containerHeight:200,overscan:5});j.useEffect(()=>{a!==null&&a!==p&&v(a)},[a]),j.useEffect(()=>{p>=0&&p<w.length&&k(p)},[p,w]);const E=D=>{if(D.key==="ArrowDown"||D.key==="ArrowUp"){D.preventDefault();let F=p;D.key==="ArrowDown"?F=p<w.length-1?p+1:0:D.key==="ArrowUp"&&(F=p>0?p-1:w.length-1),v(F)}else D.key==="Enter"?p>=0&&p<w.length&&(c==null||c(w[p])):D.key==="Escape"&&(D.preventDefault(),D.stopPropagation());l&&l(D)},O=D=>{E(D)},$=D=>{E(D)},A={wrapper:`${qe["smp-list"]}`,container:`${qe["smp-list-container"]}`,virtualScroll:`${qe["smp-list-virtualScroll"]}`,listItem:`${qe["smp-list-listItem"]}`},B=j.useRef(null);return j.useEffect(()=>{f&&(B!=null&&B.current)&&B.current.focus()},[f,B]),y.jsxs("div",{id:r,ref:n,className:A.wrapper,"data-component":"list",style:{width:o},children:[b&&y.jsx(be,{bindValue:u,placeholder:"Search...",onChange:S,onKeyDown:O,inputRef:B}),y.jsx("div",{...R,className:A.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:$,"aria-activedescendant":p>=0&&p<w.length?(P=w[p])==null?void 0:P.id:void 0,children:y.jsx("div",{...g,className:A.virtualScroll,children:T.map(({item:D,index:F,offsetTop:H})=>{const G=i.includes(D.id);return y.jsxs("li",{role:"option",id:D.id,"aria-selected":p===F?"true":"false",tabIndex:-1,className:`${A.listItem} ${p===F?"selected-item":""}`,"aria-label":D.id+"-"+D.label,style:{height:`${m}px`,lineHeight:`calc(${m}px - 2*2px)`,transform:`translateY(${H}px)`},onClick:()=>{c==null||c(D),v(F)},children:[Me(D.id,D.label,t),G&&y.jsx(oe,{icon:"check",width:16})]},D.id)})})})]})},Dt=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=j.useState(Me(e,t,r));return j.useEffect(()=>{a(e)},[e]),j.useEffect(()=>{a(Me(e,t,r))},[t,r]),y.jsx(be,{...n,bindValue:s})},En=r=>{const e=j.useRef(null);return j.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}};function ct({children:r}){const[e,t]=j.useState(!1);return j.useEffect(()=>{t(!0)},[]),e?Vr.createPortal(r,document.body):null}const $t=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,isEditable:i=!0,placeholder:o,fun:c,_changeOnEnter:l=!1,onChange:f,onOptionsRequest:u,_multiActiveIndex:d,...m})=>{const p=j.useRef(null),[v,b]=j.useState(r),[w,S]=j.useState(e),[T,R]=j.useState(!1),[g,k]=j.useState(t||[]),[E,O]=j.useState(0),[$,A]=j.useState([r]),{anchorRef:B,targetRef:P,anchorWidth:D}=lt({position:"bottom",enabled:T}),F=j.useCallback(()=>{var h;R(!1),(h=p==null?void 0:p.current)==null||h.focus()},[]);_e(P,()=>F());const H=En(400),G=h=>{h.length>=a?c&&u&&H(async()=>{const x=await u(c,h);k(x),O(x.length>0?0:-1),R(!0)}):F(),b(h),S(e),l||f==null||f(h,e)},z=h=>{l?(b(""),S("")):(b(h.id),S(h.label)),f==null||f(h.id,h.label);const x=g.findIndex(_=>_.id===h.id);O(x),A([h.id]),F()},Z=h=>{h.key==="Escape"&&(F(),O(-1))},M=h=>{if((h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),T)){const x=h.key==="ArrowDown"?(E+1)%g.length:(E-1+g.length)%g.length;O(x)}switch(h.key){case"Enter":E>=0&&E<g.length?z(g[E]):l&&(f==null||f(v,""),F(),b(""),S(""));break;case"Escape":F(),O(-1);break}};return y.jsxs("div",{"data-component":"autocomplete",children:[y.jsx(Dt,{...m,bindValue:v,optionalDisplayValue:w,displayMode:n,isEditable:i,shapeIcon:"magnify",placeholder:o,ref:B,inputRef:p,onChange:G,onKeyDown:M,"aria-autocomplete":"list"}),T&&y.jsx(ct,{children:y.jsx(Dr,{options:g,displayMode:s,onClick:z,ref:P,selectedIndex:E,activeIndex:d||$,width:D,showFilter:!1,onKeyDown:Z,isOpen:T})})]})},tr=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],rr=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Ce=({label:r,bindValue:e,onClick:t,ariaLabel:n,icon:s,disabled:a,sizing:i="base",variant:o="primary",appearance:c="raised",showIcon:l=!0,showText:f=!0,fullWidth:u=!1,loading:d=!1,justify:m="center",title:p,optionalDisplayValue:v})=>{const b={container:`smp-button smp-button-container ${i?`smp-button-${i}`:""} ${o?`smp-buttonVariant-${o}`:""} ${c?`smp-buttonType-${c}`:""} ${u?"smp-button-fullWidth":""} smp-justifyContent-${m}`};return y.jsx("button",{"data-component":"button",className:b.container,onClick:t,"aria-label":n,disabled:a,"aria-busy":d,title:p||r||v,children:d?y.jsx(oe,{icon:"spinner",state:rr(o),spin:!0}):y.jsxs(y.Fragment,{children:[s&&l&&y.jsx(oe,{icon:s,disabled:a,state:rr(o),width:tr(i),height:tr(i)}),f&&y.jsx("span",{children:v||e})]})})},$r=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:i,showText:o,showIcon:c,fullWidth:l,disabled:f,justify:u,onClick:d,onOptionsRequest:m})=>{const[p,v]=j.useState(r);j.useEffect(()=>{!p&&m&&e&&m(e,void 0).then(S=>v(S)).catch(S=>{console.error("Errore nel caricamento delle opzioni per ButtonList",S)})},[p,e,m]);const b={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},w=p==null?void 0:p.map((S,T)=>{const R={bindValue:S.id,optionalDisplayValue:S.label,fun:S.fun,icon:S.icon,variant:a,appearance:i,showText:o,showIcon:c,fullWidth:l,disabled:f,sizing:s,justify:u,onClick:()=>{d==null||d(S.id,S.fun)}};return y.jsx(Ce,{...R},`button-${T}`)});return y.jsx("div",{role:"list","data-component":"button-list",className:b.container,children:w})},Tn={"smp-checkbox-wrapper":"_smp-checkbox-wrapper_z14lq_2"},_r=({bindValue:r,_dataComponent:e="checkbox",disabled:t,label:n,isEditable:s=!0,onChange:a,onBlur:i,variant:o="checkbox"})=>{const c=j.useId(),l=u=>{s&&a&&a(u.target.checked)},f={wrapper:`${Tn["smp-checkbox-wrapper"]}`};return y.jsxs("div",{className:f.wrapper,"data-component":e,children:[n&&y.jsx(Te,{label:n,disabled:t,htmlFor:c}),y.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:l,onBlur:i,role:o==="switch"?"switch":"checkbox",id:c})]})},On={titleLarge:"h2",title:"h3",body:"h6",label:"label"},ke=({variant:r="body",bindValue:e,color:t,...n})=>{const s=On[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return y.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},_t=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:i=!1})=>{const[o,c]=j.useState(null),l={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},f=m=>{n==null||n(r.filter((p,v)=>v!==m))},u=m=>{c(m)},d=m=>{if(o===null||o===m)return;const p=[...r],[v]=p.splice(o,1);p.splice(m,0,v),n==null||n(p),c(null)};return y.jsx("div",{className:l.container,role:"list","data-component":"chip",children:r.flatMap((m,p)=>{const v=Me(m.bindValue,m.optionalDisplayValue,t),b=y.jsxs("div",{className:l.element,role:"listitem",draggable:i,onDragStart:()=>u(p),onDragOver:S=>i&&S.preventDefault(),onDrop:()=>i&&d(p),style:{"--smp-chips-backgroundColor-base":a},children:[i&&y.jsx(oe,{icon:"drag_indicator_horizontal",isInteractable:!0}),y.jsx(ke,{variant:"label",bindValue:v,color:s}),e&&y.jsx(oe,{icon:"close",isInteractable:!0,onClick:()=>f(p),color:s})]},`chip-${p}`),w=i&&p<r.length-1?y.jsx(oe,{icon:"chevron-right",color:s},`separator-${p}`):null;return[b,w].filter(Boolean)})})};function Ct(r,e){const t=j.useRef(null);j.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 i=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())},o=l=>{if(n&&!n.contains(l.target)){l.preventDefault();const f=s();f.length>0&&f[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",o);const c=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),document.body.style.overflow=c,t.current&&requestAnimationFrame(()=>{var l;(l=t.current)==null||l.focus()})}},[r,e])}const Cr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,isEditable:s,displayMode:a,listDisplayMode:i="Both",fun:o,onOptionsRequest:c,multiActiveIndex:l,...f})=>{const u=j.useRef(null),[d,m]=j.useState(!1),[p,v]=j.useState(t),[b,w]=j.useState(-1),[S,T]=j.useState([r]),R=j.useId(),{anchorRef:g,targetRef:k,anchorWidth:E}=lt({position:"bottom",enabled:d}),O=j.useCallback(()=>{var D;m(!1),(D=u==null?void 0:u.current)==null||D.focus()},[]);_e(k,()=>O()),Ct(d,k);const $=D=>{e==null||e(D.id,D.label);const F=p.findIndex(H=>H.id===D.id);w(F),T([D.id]),O()},A=D=>{D.key==="Escape"&&(O(),w(-1))},B=D=>{(D.key==="ArrowDown"||D.key==="ArrowUp")&&(D.preventDefault(),P())},P=()=>{o&&c&&c(o,void 0).then(D=>{v(D),w(D.length>0?0:-1),m(!0)})};return y.jsxs("div",{role:"combobox","aria-expanded":d,"aria-controls":R,"aria-owns":R,"data-component":"combobox",children:[y.jsx(Dt,{...f,bindValue:r,optionalDisplayValue:n,displayMode:a,onShapeIconClick:P,onKeyDown:B,shapeIcon:"arrow_drop_down",rotatedShapeIcon:d,isEditable:s,ref:g,inputRef:u,"aria-autocomplete":"list",variant:"notSelectable"}),d&&y.jsx(ct,{children:y.jsx(Dr,{id:R,options:p,displayMode:i,ref:k,isOpen:d,selectedIndex:b,activeIndex:l||S,width:E,onClick:$,onKeyDown:A})})]})},q=r=>typeof r=="string",Ie=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},nr=r=>r==null?"":""+r,Rn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},jn=/###/g,sr=r=>r&&r.indexOf("###")>-1?r.replace(jn,"."):r,ar=r=>!r||q(r),Ne=(r,e,t)=>{const n=q(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(ar(r))return{};const a=sr(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return ar(r)?{}:{obj:r,k:sr(n[s])}},ir=(r,e,t)=>{const{obj:n,k:s}=Ne(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),o=Ne(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Ne(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},Dn=(r,e,t,n)=>{const{obj:s,k:a}=Ne(r,e,Object);s[a]=s[a]||[],s[a].push(t)},nt=(r,e)=>{const{obj:t,k:n}=Ne(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},$n=(r,e,t)=>{const n=nt(r,t);return n!==void 0?n:nt(e,t)},kr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?q(r[n])||r[n]instanceof String||q(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):kr(r[n],e[n],t):r[n]=e[n]);return r},Re=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Cn=r=>q(r)?r.replace(/[&<>"'\/]/g,e=>_n[e]):r;class kn{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 Pn=[" ",",","?","!",";"],An=new kn(20),Ln=(r,e,t)=>{e=e||"",t=t||"";const n=Pn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=An.getRegExp(`(${n.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(r);if(!a){const i=r.indexOf(t);i>0&&!s.test(r.substring(0,i))&&(a=!0)}return a},Tt=(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 i,o="";for(let c=a;c<n.length;++c)if(c!==a&&(o+=t),o+=n[c],i=s[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&c<n.length-1)continue;a+=c-a+1;break}s=i}return s},Fe=r=>r==null?void 0:r.replace("_","-"),In={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 st{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||In,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:(q(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new st(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new st(this.logger,e)}}var ye=new st;class ut{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 i=0;i<a;i++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s.apply(s,[e,...t])})}}class or extends ut{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,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):q(n)&&a?o.push(...n.split(a)):o.push(n)));const c=nt(this.data,o);return!c&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),c||!i||!q(n)?c:Tt((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 i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),ir(this.data,o,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(q(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,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let c=nt(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?kr(c,n,a):c={...c,...n},ir(this.data,o,c),i.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 Pr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,n,s))??e}),e}};const lr={},cr=r=>!q(r)&&typeof r!="boolean"&&typeof r!="number";class at extends ut{constructor(e,t={}){super(),Rn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ye.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 i=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ln(e,n,s);if(i&&!o){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:q(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:q(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,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,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}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${f}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:o;const m=this.resolve(e,s);let p=m==null?void 0:m.res;const v=(m==null?void 0:m.usedKey)||o,b=(m==null?void 0:m.exactUsedKey)||o,w=["[object Number]","[object Function]","[object RegExp]"],S=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,R=s.count!==void 0&&!q(s.count),g=at.hasDefaultValue(s),k=R?this.pluralResolver.getSuffix(u,s.count,s):"",E=s.ordinal&&R?this.pluralResolver.getSuffix(u,s.count,{ordinal:!1}):"",O=R&&!s.ordinal&&s.count===0,$=O&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${k}`]||s[`defaultValue${E}`]||s.defaultValue;let A=p;T&&!p&&g&&(A=$);const B=cr(A),P=Object.prototype.toString.apply(A);if(T&&A&&B&&w.indexOf(P)<0&&!(q(S)&&Array.isArray(A))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,A,{...s,ns:c}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(m.res=D,m.usedParams=this.getUsedParamsDetails(s),m):D}if(i){const D=Array.isArray(A),F=D?[]:{},H=D?b:v;for(const G in A)if(Object.prototype.hasOwnProperty.call(A,G)){const z=`${H}${i}${G}`;g&&!p?F[G]=this.translate(z,{...s,defaultValue:cr($)?$[G]:void 0,joinArrays:!1,ns:c}):F[G]=this.translate(z,{...s,joinArrays:!1,ns:c}),F[G]===z&&(F[G]=A[G])}p=F}}else if(T&&q(S)&&Array.isArray(p))p=p.join(S),p&&(p=this.extendTranslation(p,e,s,n));else{let D=!1,F=!1;!this.isValidLookup(p)&&g&&(D=!0,p=$),this.isValidLookup(p)||(F=!0,p=o);const G=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:p,z=g&&$!==p&&this.options.updateMissing;if(F||D||z){if(this.logger.log(z?"updateKey":"missingKey",u,l,o,z?$:p),i){const x=this.resolve(o,{...s,keySeparator:!1});x&&x.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 Z=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let x=0;x<M.length;x++)Z.push(M[x]);else this.options.saveMissingTo==="all"?Z=this.languageUtils.toResolveHierarchy(s.lng||this.language):Z.push(s.lng||this.language);const h=(x,_,L)=>{var I;const C=g&&L!==p?L:G;this.options.missingKeyHandler?this.options.missingKeyHandler(x,l,_,C,z,s):(I=this.backendConnector)!=null&&I.saveMissing&&this.backendConnector.saveMissing(x,l,_,C,z,s),this.emit("missingKey",x,l,_,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?Z.forEach(x=>{const _=this.pluralResolver.getSuffixes(x,s);O&&s[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(L=>{h([x],o+L,s[`defaultValue${L}`]||$)})}):h(Z,o,$))}p=this.extendTranslation(p,e,s,m,n),F&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${l}${f}${o}`),(F||D)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${o}`:o,D?p:void 0,s))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(s),m):p}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=q(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 m=e.match(this.interpolator.nestingRegexp);u=m&&m.length}let d=n.replace&&!q(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 m=e.match(this.interpolator.nestingRegexp),p=m&&m.length;u<p&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...m)=>(a==null?void 0:a[0])===m[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):this.translate(...m,t),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=q(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(e=Pr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,i,o;return q(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&&!q(t.count),m=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(q(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(b=>{var w,S;this.isValidLookup(n)||(o=b,!lr[`${v[0]}-${b}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((S=this.utils)!=null&&S.hasLoadedNamespace(o))&&(lr[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),v.forEach(T=>{var k;if(this.isValidLookup(n))return;i=T;const R=[f];if((k=this.i18nFormat)!=null&&k.addLookupKeys)this.i18nFormat.addLookupKeys(R,f,T,b,t);else{let E;d&&(E=this.pluralResolver.getSuffix(T,t.count,t));const O=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(R.push(f+E),t.ordinal&&E.indexOf($)===0&&R.push(f+E.replace($,this.options.pluralSeparator)),m&&R.push(f+O)),p){const A=`${f}${this.options.contextSeparator}${t.context}`;R.push(A),d&&(R.push(A+E),t.ordinal&&E.indexOf($)===0&&R.push(A+E.replace($,this.options.pluralSeparator)),m&&R.push(A+O))}}let g;for(;g=R.pop();)this.isValidLookup(n)||(a=g,n=this.getResource(T,b,g,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}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&&!q(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 ur{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ye.create("languageUtils")}getScriptPartFromCode(e){if(e=Fe(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=Fe(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(q(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(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),q(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=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return q(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))):q(e)&&a(this.formatLanguageCode(e)),n.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const fr={zero:0,one:1,two:2,few:3,many:4,other:5},dr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Nn{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ye.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Fe(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 i;try{i=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dr;if(!e.match(/-|_/))return dr;const c=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(c,t)}return this.pluralRulesCache[a]=i,i}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)=>fr[s]-fr[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 pr=(r,e,t,n=".",s=!0)=>{let a=$n(r,e,t);return!a&&s&&q(t)&&(a=Tt(r,t,n),a===void 0&&(a=Tt(e,t,n))),a},bt=r=>r.replace(/\$/g,"$$$$");class Mn{constructor(e={}){var t;this.logger=ye.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:i,suffix:o,suffixEscaped:c,formatSeparator:l,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:S}=e.interpolation;this.escape=t!==void 0?t:Cn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?Re(a):i||"{{",this.suffix=o?Re(o):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Re(d):m||Re("$t("),this.nestingSuffix=p?Re(p):v||Re(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=S!==void 0?S:!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 m;let a,i,o;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const S=pr(t,c,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,n,{...s,...t,interpolationkey:p}):S}const v=p.split(this.formatSeparator),b=v.shift().trim(),w=v.join(this.formatSeparator).trim();return this.format(pr(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=((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>bt(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?bt(this.escape(p)):bt(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const v=a[1].trim();if(i=l(v),i===void 0)if(typeof f=="function"){const w=f(e,a,s);i=q(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))i="";else if(u){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),i="";else!q(i)&&!this.useRawValueToEscape&&(i=nr(i));const b=p.safeValue(i);if(e=e.replace(a[0],b),u?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,i;const o=(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,i);const m=d.match(/'/g),p=d.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{i=JSON.parse(d),l&&(i={...l,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,v),`${c}${f}${d}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];i={...n},i=i.replace&&!q(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.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(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!q(a))return a;q(a)||(a=nr(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 Fn=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(i=>{if(i){const[o,...c]=i.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),f=o.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}},hr=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 i=n+JSON.stringify(a);let o=e[i];return o||(o=r(Fe(n),s),e[i]=o),o(t)}},Vn=r=>(e,t,n)=>r(Fe(t),n)(e);class Yn{constructor(e={}){this.logger=ye.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?hr:Vn;this.formats={number:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a});return o=>i.format(o)}),currency:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a,style:"currency"});return o=>i.format(o)}),datetime:n((s,a)=>{const i=new Intl.DateTimeFormat(s,{...a});return o=>i.format(o)}),relativetime:n((s,a)=>{const i=new Intl.RelativeTimeFormat(s,{...a});return o=>i.format(o,a.range||"day")}),list:n((s,a)=>{const i=new Intl.ListFormat(s,{...a});return o=>i.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=hr(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(o=>o.indexOf(")")>-1)){const o=a.findIndex(c=>c.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,c)=>{var u;const{formatName:l,formatOptions:f}=Fn(c);if(this.formats[l]){let d=o;try{const m=((u=s==null?void 0:s.formatParams)==null?void 0:u[s.interpolationkey])||{},p=m.locale||m.lng||s.locale||s.lng||n;d=this.formats[l](o,p,{...f,...s,...m})}catch(m){this.logger.warn(m)}return d}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const Un=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Wn extends ut{constructor(e,t,n,s={}){var a,i;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ye.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},i={},o={},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?i[d]===void 0&&(i[d]=!0):(this.state[d]=1,f=!1,i[d]===void 0&&(i[d]=!0),a[d]===void 0&&(a[d]=!0),c[u]===void 0&&(c[u]=!0)))}),f||(o[l]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}loaded(e,t,n){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&n&&this.store.addResourceBundle(a,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(c=>{Dn(c.loaded,[a],i),Un(c,e),t&&c.errors.push(t),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{o[l]||(o[l]={});const f=c.loaded[l];f.length&&f.forEach(u=>{o[l][u]===void 0&&(o[l][u]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(c=>!c.done)}read(e,t,n,s=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(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,i)},a);return}i(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=>o(null,f)).catch(o):o(null,l)}catch(l){o(l)}return}return c(e,t,o)}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();q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),q(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}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,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,n,s,a,i={},o=()=>{}){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 m={...i,isUpdate:a},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(e,t,n,s,m):v=p(e,t,n,s),v&&typeof v.then=="function"?v.then(b=>o(null,b)).catch(o):o(null,v)}catch(v){o(v)}else p(e,t,n,s,o,m)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const mr=()=>({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]),q(r[1])&&(e.defaultValue=r[1]),q(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}),gr=r=>{var e,t;return q(r.ns)&&(r.ns=[r.ns]),q(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),q(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},ze=()=>{},Bn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ve extends ut{constructor(e={},t){if(super(),this.options=gr(e),this.services={},this.logger=ye,this.modules={external:[]},Bn(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&&(q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=mr();this.options={...n,...this.options,...gr(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?ye.init(s(this.modules.logger),this.options):ye.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=Yn;const f=new ur(this.options);this.store=new or(this.options.resources,this.options);const u=this.services;u.logger=ye,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new Nn(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 Mn(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Wn(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...m)=>{this.emit(d,...m)}),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 at(this.services,this.options),this.translator.on("*",(d,...m)=>{this.emit(d,...m)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ze),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 o=Ie(),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),o.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),o}loadResources(e,t=ze){var a,i;let n=t;const s=q(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 o=[],c=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?c(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>c(f)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,l=>c(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(l)})}else n(null)}reloadResources(e,t,n){const s=Ie();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=ze),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"&&Pr.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=Ie();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,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(o,(...l)=>this.t(...l))},i=o=>{var f,u;!e&&!o&&this.services.languageDetector&&(o=[]);const c=q(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(q(o)?[o]:o);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?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),n}getFixedT(e,t,n){const s=(a,i,...o)=>{let c;typeof i!="object"?c=this.options.overloadTranslationOptionHandler([a,i].concat(o)):c={...i},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 q(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 i=(o,c)=>{const l=this.services.backendConnector.state[`${o}|${c}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const n=Ie();return this.options.ns?(q(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=Ie();q(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{n.resolve(),t&&t(i)}),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 ur(mr());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ve(e,t)}cloneInstance(e={},t=ze){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ve(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const o=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 or(o,s),a.services.resourceStore=a.store}return a.translator=new at(a.services,s),a.translator.on("*",(o,...c)=>{a.emit(o,...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 ae=Ve.createInstance();ae.createInstance=Ve.createInstance;ae.createInstance;ae.dir;ae.init;ae.loadResources;ae.reloadResources;ae.use;ae.changeLanguage;ae.getFixedT;ae.t;ae.exists;ae.setDefaultNamespace;ae.hasLoadedNamespace;ae.loadNamespaces;ae.loadLanguages;const Hn={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},Gn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Kn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido"},qn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Hn,Month:Gn,Generic:Kn},zn={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"},Jn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},Xn={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid"},Zn={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:zn,Month:Jn,Generic:Xn};function yr(r,e){return new RegExp(Qn(r),e)}function Qn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const es=(r,e,t)=>{let n=r;return isNaN(n)||(e!=null&&(n=Math.max(n,e)),t!=null&&(n=Math.min(n,t))),n},ts=(r,e)=>{var i,o;const n=Intl.NumberFormat(r).formatToParts(1000.1),s=((i=n.find(c=>c.type==="group"))==null?void 0:i.value)??",",a=e??((o=n.find(c=>c.type==="decimal"))==null?void 0:o.value)??".";return{groupingChar:s,decimalChar:a}};function rs(r,e,t,n){let s=e;const a=as(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=is(s);return new Intl.NumberFormat(n,i).format(a)}const ns=(r,e,t)=>{const n=r.lastIndexOf(t);if(n!==-1)return r.length-n-1;const s=t==="."?",":".",a=r.lastIndexOf(s);return a!==-1&&!(s===e&&r.length-a-1===3)?r.length-a-1:0},ss=(r,e,t)=>{if(!r)return NaN;let n=r.replace(/\s/g,""),s=t;const a=(n.match(/\./g)||[]).length,i=(n.match(/,/g)||[]).length;if(a&&i)s=n.lastIndexOf(".")>n.lastIndexOf(",")?".":",";else if(!n.includes(t)){const c=n.includes(".")?".":",",l=c==="."?a:i;l>1||l===1&&c===e&&n.length-n.lastIndexOf(c)-1===3||(s=c)}const o=s==="."?",":".";return n=n.replace(new RegExp(`\\${o}`,"g"),""),s!=="."&&(n=n.replace(new RegExp(`\\${s}`,"g"),".")),parseFloat(n)};function as(r,e,t,n,s){let a=r;if(typeof a!="number"){let o;e&&n===void 0?o=",":o=".";const c=o=="."?",":".";a=a.replace(yr(c,"g"),""),a=a.replace(yr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function is(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}ae.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 rs(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Zn},it:{translation:qn}}});const os=(r,e,t,n)=>ae.format(r,e,t||ae.language,n),ls=(r,e)=>ae.t(r,e);function Pe(){const r=j.useCallback((n,s,a,i)=>os(n,s,a||void 0,i),[]),e=j.useCallback(()=>ae.languages[0],[]),t=j.useCallback((n,s)=>ls(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var ft=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",r))(ft||{}),le=(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))(le||{}),ue=(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))(ue||{}),Ot=(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))(Ot||{});const cs={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1lf9g_1"};function us({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Pe(),i=()=>{if(!n)return;const M=new Date(n);return isNaN(M.getTime())?void 0:M},[o]=j.useState(new Date),[c,l]=j.useState(r||i()||new Date),[f,u]=j.useState(c?c.getMonth():new Date().getMonth()),[d,m]=j.useState(c?c.getFullYear():new Date().getFullYear()),[p,v]=j.useState(c?c.getDate():null),b=j.useRef(null),w=j.useRef([]),S=[a(ue.JANUARY),a(ue.FEBRUARY),a(ue.MARCH),a(ue.APRIL),a(ue.MAY),a(ue.JUNE),a(ue.JULY),a(ue.AUGUST),a(ue.SEPTEMBER),a(ue.OCTOBER),a(ue.NOVEMBER),a(ue.DECEMBER)],T=[{value:a(le.SUNDAY_SHORT),full:a(le.SUNDAY)},{value:a(le.MONDAY_SHORT),full:a(le.MONDAY)},{value:a(le.TUESDAY_SHORT),full:a(le.TUESDAY)},{value:a(le.WEDNESDAY_SHORT),full:a(le.WEDNESDAY)},{value:a(le.THURSDAY_SHORT),full:a(le.THURSDAY)},{value:a(le.FRIDAY_SHORT),full:a(le.FRIDAY)},{value:a(le.SATURDAY_SHORT),full:a(le.SATURDAY)}],R=M=>t.some(h=>{const x=h.start.getTime(),_=h.end.getTime(),L=M.getTime();return L>=x&&L<=_}),g=M=>{R(M)||(l(M),v(M.getDate()),e&&e(Zr(M)))},k=()=>{f===0?(u(11),m(d-1)):u(f-1),v(1)},E=()=>{f===11?(u(0),m(d+1)):u(f+1),v(1)},O=(M,h)=>new Date(M,h+1,0).getDate(),$=(M,h)=>new Date(M,h,1).getDay(),A=M=>{var x;const h=F.findIndex(_=>_!==null&&_.getDate()===M);h!==-1&&w.current[h]&&((x=w.current[h])==null||x.focus(),v(M))},B=(M,h)=>{const x=F[h];if(!x)return;const _=O(d,f),L=x.getDate();switch(M.key){case"ArrowRight":M.preventDefault();{let C=L+1,I=new Date(d,f,C);if(C>_){const Y=f===11?d+1:d,U=f===11?0:f+1;C=1,I=new Date(Y,U,C),E(),setTimeout(()=>{P(1,"forward")},0);return}R(I)?P(C,"forward"):A(C)}break;case"Tab":break;case"ArrowLeft":M.preventDefault();{let C=L-1,I=new Date(d,f,C);if(C<1){const Y=f===0?d-1:d,U=f===0?11:f-1,V=O(Y,U);C=V,I=new Date(Y,U,C),k(),setTimeout(()=>{P(V,"backward")},0);return}R(I)?P(C,"backward"):A(C)}break;case"ArrowUp":M.preventDefault();{let C=L-7,I=new Date(d,f,C);if(C<1){const Y=f===0?d-1:d,U=f===0?11:f-1;C=O(Y,U)+C,I=new Date(Y,U,C),k(),setTimeout(()=>{P(C,"backward")},0);return}R(I)?P(C,"backward"):A(C)}break;case"ArrowDown":M.preventDefault();{let C=L+7,I=new Date(d,f,C);if(C>_){const Y=f===11?d+1:d,U=f===11?0:f+1;C=C-_,I=new Date(Y,U,C),E(),setTimeout(()=>{P(C,"forward")},0);return}R(I)?P(C,"forward"):A(C)}break;case"Home":M.preventDefault(),P(1,"forward");break;case"End":M.preventDefault(),P(_,"backward");break;case"PageUp":M.preventDefault(),k(),setTimeout(()=>{const C=O(f===0?d-1:d,f===0?11:f-1),I=Math.min(L,C);P(I,"forward")},0);break;case"PageDown":M.preventDefault(),E(),setTimeout(()=>{const C=O(f===11?d+1:d,f===11?0:f+1),I=Math.min(L,C);P(I,"forward")},0);break;case" ":case"Space":if(R(x))return;v(x.getDate()),l(x);break;case"Enter":M.preventDefault(),g(x);break}},P=(M,h)=>{const x=O(d,f);if(h==="forward"){for(let _=M;_<=x;_++){const L=new Date(d,f,_);if(!R(L)){A(_);return}}E(),setTimeout(()=>{P(1,"forward")},0)}else{for(let I=M;I>=1;I--){const Y=new Date(d,f,I);if(!R(Y)){A(I);return}}const _=f===0?d-1:d,L=f===0?11:f-1,C=O(_,L);k(),setTimeout(()=>{P(C,"backward")},0)}},F=(()=>{const M=O(d,f),h=$(d,f),x=[];for(let _=0;_<h;_++)x.push(null);for(let _=1;_<=M;_++){const L=new Date(d,f,_);x.push(L)}return x})(),H=[];let G=[];F.forEach((M,h)=>{if(G.push(M),G.length===7||h===F.length-1){for(;G.length<7;)G.push(null);H.push(G),G=[]}}),j.useEffect(()=>{var M;if(p!==null){const h=F.findIndex(x=>x!==null&&x.getDate()===p);h!==-1&&w.current[h]&&((M=w.current[h])==null||M.focus())}},[f,d,p,F]);const z={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${cs["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(M,h,x,_)=>`smp-datepickercalendar-td
46
- ${M?"smp-datepickercalendar-td-today":""}
44
+ */var ht,zt;function pn(){if(zt)return ht;zt=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 i={},o=0;o<10;o++)i["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(i).map(function(c){return i[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ht=s()?Object.assign:function(a,i){for(var o,l=n(a),u,c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var f in o)e.call(o,f)&&(l[f]=o[f]);if(r){u=r(o);for(var d=0;d<u.length;d++)t.call(o,u[d])&&(l[u[d]]=o[u[d]])}}return l},ht}var mt,Gt;function Rt(){if(Gt)return mt;Gt=1;var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return mt=r,mt}var gt,Kt;function jr(){return Kt||(Kt=1,gt=Function.call.bind(Object.prototype.hasOwnProperty)),gt}var yt,qt;function hn(){if(qt)return yt;qt=1;var r=function(){};if(process.env.NODE_ENV!=="production"){var e=Rt(),t={},n=jr();r=function(a){var i="Warning: "+a;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(a,i,o,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(n(a,c)){var f;try{if(typeof a[c]!="function"){var d=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}f=a[c](i,c,l,o,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&r((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in t)){t[f.message]=!0;var m=u?u():"";r("Failed "+o+" type: "+f.message+(m??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},yt=s,yt}var vt,Jt;function mn(){if(Jt)return vt;Jt=1;var r=Or(),e=pn(),t=Rt(),n=jr(),s=hn(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return vt=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(h){var b=h&&(u&&h[u]||h[c]);if(typeof b=="function")return b}var d="<<anonymous>>",m={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:x(),arrayOf:D,element:E(),elementType:g(),instanceOf:$,node:k(),objectOf:S,oneOf:L,oneOfType:O,shape:P,exact:R};function p(h,b){return h===b?h!==0||1/h===1/b:h!==h&&b!==b}function v(h,b){this.message=h,this.data=b&&typeof b=="object"?b:{},this.stack=""}v.prototype=Error.prototype;function T(h){if(process.env.NODE_ENV!=="production")var b={},_=0;function A(N,U,W,Y,J,G,se){if(Y=Y||d,G=G||W,se!==t){if(l){var I=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 I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var B=Y+":"+W;!b[B]&&_<3&&(a("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+Y+"`. 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."),b[B]=!0,_++)}}return U[W]==null?N?U[W]===null?new v("The "+J+" `"+G+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new v("The "+J+" `"+G+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:h(U,W,Y,J,G)}var C=A.bind(null,!1);return C.isRequired=A.bind(null,!0),C}function w(h){function b(_,A,C,N,U,W){var Y=_[A],J=z(Y);if(J!==h){var G=q(Y);return new v("Invalid "+N+" `"+U+"` of type "+("`"+G+"` supplied to `"+C+"`, expected ")+("`"+h+"`."),{expectedType:h})}return null}return T(b)}function x(){return T(i)}function D(h){function b(_,A,C,N,U){if(typeof h!="function")return new v("Property `"+U+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var W=_[A];if(!Array.isArray(W)){var Y=z(W);return new v("Invalid "+N+" `"+U+"` of type "+("`"+Y+"` supplied to `"+C+"`, expected an array."))}for(var J=0;J<W.length;J++){var G=h(W,J,C,N,U+"["+J+"]",t);if(G instanceof Error)return G}return null}return T(b)}function E(){function h(b,_,A,C,N){var U=b[_];if(!o(U)){var W=z(U);return new v("Invalid "+C+" `"+N+"` of type "+("`"+W+"` supplied to `"+A+"`, expected a single ReactElement."))}return null}return T(h)}function g(){function h(b,_,A,C,N){var U=b[_];if(!r.isValidElementType(U)){var W=z(U);return new v("Invalid "+C+" `"+N+"` of type "+("`"+W+"` supplied to `"+A+"`, expected a single ReactElement type."))}return null}return T(h)}function $(h){function b(_,A,C,N,U){if(!(_[A]instanceof h)){var W=h.name||d,Y=V(_[A]);return new v("Invalid "+N+" `"+U+"` of type "+("`"+Y+"` supplied to `"+C+"`, expected ")+("instance of `"+W+"`."))}return null}return T(b)}function L(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),i;function b(_,A,C,N,U){for(var W=_[A],Y=0;Y<h.length;Y++)if(p(W,h[Y]))return null;var J=JSON.stringify(h,function(se,I){var B=q(I);return B==="symbol"?String(I):I});return new v("Invalid "+N+" `"+U+"` of value `"+String(W)+"` "+("supplied to `"+C+"`, expected one of "+J+"."))}return T(b)}function S(h){function b(_,A,C,N,U){if(typeof h!="function")return new v("Property `"+U+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var W=_[A],Y=z(W);if(Y!=="object")return new v("Invalid "+N+" `"+U+"` of type "+("`"+Y+"` supplied to `"+C+"`, expected an object."));for(var J in W)if(n(W,J)){var G=h(W,J,C,N,U+"."+J,t);if(G instanceof Error)return G}return null}return T(b)}function O(h){if(!Array.isArray(h))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var b=0;b<h.length;b++){var _=h[b];if(typeof _!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(_)+" at index "+b+"."),i}function A(C,N,U,W,Y){for(var J=[],G=0;G<h.length;G++){var se=h[G],I=se(C,N,U,W,Y,t);if(I==null)return null;I.data&&n(I.data,"expectedType")&&J.push(I.data.expectedType)}var B=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new v("Invalid "+W+" `"+Y+"` supplied to "+("`"+U+"`"+B+"."))}return T(A)}function k(){function h(b,_,A,C,N){return F(b[_])?null:new v("Invalid "+C+" `"+N+"` supplied to "+("`"+A+"`, expected a ReactNode."))}return T(h)}function M(h,b,_,A,C){return new v((h||"React class")+": "+b+" type `"+_+"."+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function P(h){function b(_,A,C,N,U){var W=_[A],Y=z(W);if(Y!=="object")return new v("Invalid "+N+" `"+U+"` of type `"+Y+"` "+("supplied to `"+C+"`, expected `object`."));for(var J in h){var G=h[J];if(typeof G!="function")return M(C,N,U,J,q(G));var se=G(W,J,C,N,U+"."+J,t);if(se)return se}return null}return T(b)}function R(h){function b(_,A,C,N,U){var W=_[A],Y=z(W);if(Y!=="object")return new v("Invalid "+N+" `"+U+"` of type `"+Y+"` "+("supplied to `"+C+"`, expected `object`."));var J=e({},_[A],h);for(var G in J){var se=h[G];if(n(h,G)&&typeof se!="function")return M(C,N,U,G,q(se));if(!se)return new v("Invalid "+N+" `"+U+"` key `"+G+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(_[A],null," ")+`
45
+ Valid keys: `+JSON.stringify(Object.keys(h),null," "));var I=se(W,G,C,N,U+"."+G,t);if(I)return I}return null}return T(b)}function F(h){switch(typeof h){case"number":case"string":case"undefined":return!0;case"boolean":return!h;case"object":if(Array.isArray(h))return h.every(F);if(h===null||o(h))return!0;var b=f(h);if(b){var _=b.call(h),A;if(b!==h.entries){for(;!(A=_.next()).done;)if(!F(A.value))return!1}else for(;!(A=_.next()).done;){var C=A.value;if(C&&!F(C[1]))return!1}}else return!1;return!0;default:return!1}}function H(h,b){return h==="symbol"?!0:b?b["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&b instanceof Symbol:!1}function z(h){var b=typeof h;return Array.isArray(h)?"array":h instanceof RegExp?"object":H(b,h)?"symbol":b}function q(h){if(typeof h>"u"||h===null)return""+h;var b=z(h);if(b==="object"){if(h instanceof Date)return"date";if(h instanceof RegExp)return"regexp"}return b}function Z(h){var b=q(h);switch(b){case"array":case"object":return"an "+b;case"boolean":case"date":case"regexp":return"a "+b;default:return b}}function V(h){return!h.constructor||!h.constructor.name?d:h.constructor.name}return m.checkPropTypes=s,m.resetWarningCache=s.resetWarningCache,m.PropTypes=m,m},vt}var bt,Xt;function gn(){if(Xt)return bt;Xt=1;var r=Rt();function e(){}function t(){}return t.resetWarningCache=e,bt=function(){function n(i,o,l,u,c,f){if(f!==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},bt}var Zt;function yn(){if(Zt)return He.exports;if(Zt=1,process.env.NODE_ENV!=="production"){var r=Or(),e=!0;He.exports=mn()(r.isElement,e)}else He.exports=gn()();return He.exports}var ie=yn(),vn=function(e){var t=(e==null?void 0:e.ownerDocument)||document;return t.defaultView||window},bn=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},xn=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Ge="http://www.w3.org/2000/svg",Qt="http://www.w3.org/1999/xlink",_e=function(r){function e(){for(var n,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];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(o){n.reactWrapper=o},n}en(e,r);var t=e.prototype;return t.renderSVG=function(){var s=this;if(this.reactWrapper instanceof vn(this.reactWrapper).Node){var a=this.props,i=a.desc,o=a.evalScripts,l=a.httpRequestWithCredentials,u=a.renumerateIRIElements,c=a.src,f=a.title,d=a.useRequestCache,m=this.props.onError,p=this.props.beforeInjection,v=this.props.afterInjection,T=this.props.wrapper,w,x;T==="svg"?(w=document.createElementNS(Ge,T),w.setAttribute("xmlns",Ge),w.setAttribute("xmlns:xlink",Qt),x=document.createElementNS(Ge,T)):(w=document.createElement(T),x=document.createElement(T)),w.appendChild(x),x.dataset.src=c,this.nonReactWrapper=this.reactWrapper.appendChild(w);var D=function(L){if(s.removeSVG(),!s._isMounted){m(L);return}s.setState(function(){return{hasError:!0,isLoading:!1}},function(){m(L)})},E=function(L,S){if(L){D(L);return}s._isMounted&&s.setState(function(){return{isLoading:!1}},function(){try{v(S)}catch(O){D(O)}})},g=function(L){if(L.setAttribute("role","img"),i){var S=L.querySelector(":scope > desc");S&&L.removeChild(S);var O=document.createElement("desc");O.innerHTML=i,L.prepend(O)}if(f){var k=L.querySelector(":scope > title");k&&L.removeChild(k);var M=document.createElement("title");M.innerHTML=f,L.prepend(M)}try{p(L)}catch(P){D(P)}};un(x,{afterEach:E,beforeEach:g,cacheRequests:d,evalScripts:o,httpRequestWithCredentials:l,renumerateIRIElements:u})}},t.removeSVG=function(){var s;(s=this.nonReactWrapper)!=null&&s.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},t.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},t.componentDidUpdate=function(s){var a=this;bn(rt({},s),this.props)&&this.setState(function(){return a.initialState},function(){a.removeSVG(),a.renderSVG()})},t.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},t.render=function(){var s=this.props;s.afterInjection,s.beforeInjection,s.desc,s.evalScripts;var a=s.fallback;s.httpRequestWithCredentials;var i=s.loading;s.renumerateIRIElements,s.src,s.title,s.useRequestCache;var o=s.wrapper,l=Qr(s,xn),u=o;return Ye.createElement(u,rt({},l,{ref:this.refCallback},o==="svg"?{xmlns:Ge,xmlnsXlink:Qt}:{}),this.state.isLoading&&i&&Ye.createElement(i,null),this.state.hasError&&a&&Ye.createElement(a,null))},e}(Ye.Component);_e.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};_e.propTypes={afterInjection:ie.func,beforeInjection:ie.func,desc:ie.string,evalScripts:ie.oneOf(["always","once","never"]),fallback:ie.oneOfType([ie.func,ie.object,ie.string]),httpRequestWithCredentials:ie.bool,loading:ie.oneOfType([ie.func,ie.object,ie.string]),onError:ie.func,renumerateIRIElements:ie.bool,src:ie.string.isRequired,title:ie.string,useRequestCache:ie.bool,wrapper:ie.oneOf(["div","span","svg"])};let Et={assets:"/"};const Sn=r=>{Et={...Et,...r}},er=r=>`${Et.assets}/${r}`.replace(/\/+/g,"/"),oe=j.memo(({icon:r,width:e,height:t,placeholderIcon:n,color:s,disabled:a,state:i="base",rotated:o=!1,onClick:l,isInteractable:u=!1,spin:c=!1,title:f,tabIndex:d})=>{const[m,p]=j.useState(r),v=(r==null?void 0:r.startsWith("http"))||(r==null?void 0:r.startsWith("/")),T=v&&(r==null?void 0:r.toLowerCase().endsWith(".svg")),w=er(`assets/svg/${r}.svg`),x=er(`assets/svg/${n}.svg`),D={img:`${u?"smp-image-interactable":""}`,svg:`smp-icon ${i?`smp-icon-${i}`:""} ${o?"smp-icon-rotated":""} ${u?"smp-icon-interactable":""} ${c?"smp-icon-spin":""}`},E=()=>{!a&&u&&l&&l()},g=$=>{!a&&u&&($.key==="Enter"||$.key===" ")&&($.preventDefault(),E())};return y.jsx(y.Fragment,{children:T?y.jsx(_e,{src:r,fallback:()=>y.jsx(_e,{src:x,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:f,role:"application",fill:s,"aria-disabled":a,className:D.svg,onClick:E,onKeyDown:g,tabIndex:d}):v?y.jsx("img",{src:m,width:e||"16px",height:t||"auto",alt:f,onError:()=>p(x),onClick:E,className:D.img,title:f,onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&E()}}):y.jsx(_e,{src:w,fallback:()=>y.jsx(_e,{src:x,wrapper:"svg"}),width:e||"1rem",height:t||"1rem",wrapper:"svg",title:f,role:"application",fill:s,"aria-disabled":a,className:D.svg,onClick:E,onKeyDown:g,tabIndex:d})})}),he={"smp-textfield-wrapper":"_smp-textfield-wrapper_c1jbz_4","smp-textfield":"_smp-textfield_c1jbz_4","smp-textfield-extraSmall":"_smp-textfield-extraSmall_c1jbz_30","smp-textfield-small":"_smp-textfield-small_c1jbz_35","smp-textfield-medium":"_smp-textfield-medium_c1jbz_40","smp-textfield-large":"_smp-textfield-large_c1jbz_45","smp-textfield-extraLarge":"_smp-textfield-extraLarge_c1jbz_50","smp-textfield-input":"_smp-textfield-input_c1jbz_56","smp-textfield-outlined":"_smp-textfield-outlined_c1jbz_79","smp-textfield-danger":"_smp-textfield-danger_c1jbz_90","smp-textfield-readOnly":"_smp-textfield-readOnly_c1jbz_94","smp-textfield-variant-notSelectable":"_smp-textfield-variant-notSelectable_c1jbz_99","smp-textfield-disabled":"_smp-textfield-disabled_c1jbz_109","smp-textfield-fullWidth":"_smp-textfield-fullWidth_c1jbz_118","smp-textfield-top-right-indicator":"_smp-textfield-top-right-indicator_c1jbz_122"},xe=({disabled:r,bindValue:e,icon:t,onBlur:n,onChange:s,placeholder:a,isEditable:i=!0,shapeIcon:o,sizing:l,state:u,variant:c,tooltip:f=!1,rotatedShapeIcon:d=!1,onShapeIconClick:m,ref:p,inputRef:v,onKeyDown:T,inputType:w="text",ariaLabel:x="input field",label:D,helperText:E=!1,error:g,appearance:$="base",fullWidth:L=!1,_dataComponent:S="textfield",min:O,max:k,step:M,inputMode:P="text",width:R})=>{const F=j.useId(),H=`${F}-helper`,z=g?"danger":u,q=g||u=="danger"?"error":o,Z=E||!!g,V=_=>{s==null||s(_.target.value)},h={wrapper:`${he["smp-textfield-wrapper"]} ${L?he["smp-textfield-fullWidth"]:""}`,container:`${he["smp-textfield"]} ${r?he["smp-textfield-disabled"]:""} ${a?he["smp-textfield-placeholder"]:""} ${l?he[`smp-textfield-${l}`]:""} ${z?he[`smp-textfield-${z}`]:""} ${$?he[`smp-textfield-${$}`]:""} ${i?"":he["smp-textfield-readOnly"]} ${f?he["smp-textfield-top-right-indicator"]:""}`,input:`${he["smp-textfield-input"]}`};if(c&&(c!=="notSelectable"||i)){const _=he[`smp-textfield-variant-${c}`];_&&(h.container+=` ${_}`)}const b=R?{"--smp-textField-width-base":R}:void 0;return y.jsxs("div",{className:h.wrapper,"data-component":S,children:[D&&y.jsx(Te,{label:D,disabled:r,htmlFor:F}),y.jsxs("div",{className:h.container,ref:p,style:b,children:[t&&y.jsx(oe,{icon:t,disabled:r}),y.jsx("input",{id:F,type:w,value:e,placeholder:a,onChange:V,onBlur:n,className:h.input,disabled:r,readOnly:!i,onKeyDown:T,"aria-label":x,ref:v,"aria-describedby":Z?H:void 0,min:O,max:k,step:M,inputMode:P}),q&&y.jsx(oe,{icon:q,disabled:r,state:z,onClick:m,rotated:d,isInteractable:i,tabIndex:0})]}),Z&&y.jsx(wr,{helperText:g,disabled:r,state:z,id:H})]})};function Rr({items:r,itemHeight:e,containerHeight:t,overscan:n=5}){const[s,a]=j.useState(0),i=j.useRef(null),o=r.length*e,l=Math.max(0,Math.floor(s/e)-n),u=Math.min(r.length-1,Math.floor((s+t)/e)+n),c=[];for(let m=l;m<=u;m++)c.push({item:r[m],index:m,offsetTop:m*e});const f=j.useCallback(m=>{const p=m.target.scrollTop;a(p)},[]),d=m=>{if(!i.current)return;const p=m*e,v=p+e,T=i.current,w=T.scrollTop,x=w+t;p<w?T.scrollTop=p:v>x&&(T.scrollTop=v-t)};return{virtualItems:c,containerProps:{ref:i,style:{maxHeight:`${t}px`,overflowY:"auto",position:"relative",willChange:"transform"},onScroll:f},innerProps:{style:{height:`${o}px`,position:"relative",width:"100%"}},scrollInfo:{scrollTop:s,viewportHeight:t,totalHeight:o,startIndex:l,endIndex:u},scrollToIndex:d}}const Ke={"smp-list":"_smp-list_6ni6l_1","smp-list-container":"_smp-list-container_6ni6l_12","smp-list-listItem":"_smp-list-listItem_6ni6l_17"},wn=10,Dr=({id:r,options:e,displayMode:t,ref:n,showFilter:s,selectedIndex:a=null,activeIndex:i=[],width:o,onClick:l,onKeyDown:u,isOpen:c})=>{var P;const[f,d]=j.useState(""),m=24,[p,v]=j.useState(a!==null?a:-1),T=s!==void 0?s:e.length>wn,w=f?e.filter(R=>R.label.toLowerCase().includes(f.toLowerCase())):e,x=R=>{d(R)},{virtualItems:D,containerProps:E,innerProps:g,scrollToIndex:$}=Rr({items:w,itemHeight:m,containerHeight:200,overscan:5});j.useEffect(()=>{a!==null&&a!==p&&v(a)},[a]),j.useEffect(()=>{p>=0&&p<w.length&&$(p)},[p,w]);const L=R=>{if(R.key==="ArrowDown"||R.key==="ArrowUp"){R.preventDefault();let F=p;R.key==="ArrowDown"?F=p<w.length-1?p+1:0:R.key==="ArrowUp"&&(F=p>0?p-1:w.length-1),v(F)}else R.key==="Enter"?p>=0&&p<w.length&&(l==null||l(w[p])):R.key==="Escape"&&(R.preventDefault(),R.stopPropagation());u&&u(R)},S=R=>{L(R)},O=R=>{L(R)},k={wrapper:`${Ke["smp-list"]}`,container:`${Ke["smp-list-container"]}`,virtualScroll:`${Ke["smp-list-virtualScroll"]}`,listItem:`${Ke["smp-list-listItem"]}`},M=j.useRef(null);return j.useEffect(()=>{c&&(M!=null&&M.current)&&M.current.focus()},[c,M]),y.jsxs("div",{id:r,ref:n,className:k.wrapper,"data-component":"list",style:{width:o},children:[T&&y.jsx(xe,{bindValue:f,placeholder:"Search...",onChange:x,onKeyDown:S,inputRef:M}),y.jsx("div",{...E,className:k.container,tabIndex:0,role:"listbox","aria-label":"List",onKeyDown:O,"aria-activedescendant":p>=0&&p<w.length?(P=w[p])==null?void 0:P.id:void 0,children:y.jsx("div",{...g,className:k.virtualScroll,children:D.map(({item:R,index:F,offsetTop:H})=>{const z=i.includes(R.id);return y.jsxs("li",{role:"option",id:R.id,"aria-selected":p===F?"true":"false",tabIndex:-1,className:`${k.listItem} ${p===F?"selected-item":""}`,"aria-label":R.id+"-"+R.label,style:{height:`${m}px`,lineHeight:`calc(${m}px - 2*2px)`,transform:`translateY(${H}px)`},onClick:()=>{l==null||l(R),v(F)},children:[Me(R.id,R.label,t),z&&y.jsx(oe,{icon:"check",width:16})]},R.id)})})})]})},Dt=({displayMode:r,bindValue:e,optionalDisplayValue:t,...n})=>{const[s,a]=j.useState(Me(e,t,r));return j.useEffect(()=>{a(e)},[e]),j.useEffect(()=>{a(Me(e,t,r))},[t,r]),y.jsx(xe,{...n,bindValue:s})},En=r=>{const e=j.useRef(null);return j.useEffect(()=>()=>{e.current&&clearTimeout(e.current)},[]),n=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{n()},r)}};function ct({children:r}){const[e,t]=j.useState(!1);return j.useEffect(()=>{t(!0)},[]),e?Vr.createPortal(r,document.body):null}const _t=({bindValue:r,optionalDisplayValue:e,options:t,displayMode:n,listDisplayMode:s="Both",minimumChars:a=3,isEditable:i=!0,placeholder:o,fun:l,_changeOnEnter:u=!1,onChange:c,onOptionsRequest:f,_multiActiveIndex:d,...m})=>{const p=j.useRef(null),[v,T]=j.useState(r),[w,x]=j.useState(e),[D,E]=j.useState(!1),[g,$]=j.useState(t||[]),[L,S]=j.useState(0),[O,k]=j.useState([r]),{anchorRef:M,targetRef:P,anchorWidth:R}=lt({position:"bottom",enabled:D}),F=j.useCallback(()=>{var h;E(!1),(h=p==null?void 0:p.current)==null||h.focus()},[]);$e(P,()=>F());const H=En(400),z=h=>{h.length>=a?l&&f&&H(async()=>{const b=await f(l,h);$(b),S(b.length>0?0:-1),E(!0)}):F(),T(h),x(e),u||c==null||c(h,e)},q=h=>{u?(T(""),x("")):(T(h.id),x(h.label)),c==null||c(h.id,h.label);const b=g.findIndex(_=>_.id===h.id);S(b),k([h.id]),F()},Z=h=>{h.key==="Escape"&&(F(),S(-1))},V=h=>{if((h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),D)){const b=h.key==="ArrowDown"?(L+1)%g.length:(L-1+g.length)%g.length;S(b)}switch(h.key){case"Enter":L>=0&&L<g.length?q(g[L]):u&&(c==null||c(v,""),F(),T(""),x(""));break;case"Escape":F(),S(-1);break}};return y.jsxs("div",{"data-component":"autocomplete",children:[y.jsx(Dt,{...m,bindValue:v,optionalDisplayValue:w,displayMode:n,isEditable:i,shapeIcon:"magnify",placeholder:o,ref:M,inputRef:p,onChange:z,onKeyDown:V,"aria-autocomplete":"list"}),D&&y.jsx(ct,{children:y.jsx(Dr,{options:g,displayMode:s,onClick:q,ref:P,selectedIndex:L,activeIndex:d||O,width:R,showFilter:!1,onKeyDown:Z,isOpen:D})})]})},tr=r=>({extraSmall:12,small:14,base:18,large:20,extraLarge:24})[r],rr=r=>({primary:"onPrimary",danger:"onDanger",base:"base"})[r],Ce=({label:r,bindValue:e,onClick:t,ariaLabel:n,icon:s,disabled:a,sizing:i="base",variant:o="primary",appearance:l="raised",showIcon:u=!0,showText:c=!0,fullWidth:f=!1,loading:d=!1,justify:m="center",title:p,optionalDisplayValue:v})=>{const T={container:`smp-button smp-button-container ${i?`smp-button-${i}`:""} ${o?`smp-buttonVariant-${o}`:""} ${l?`smp-buttonType-${l}`:""} ${f?"smp-button-fullWidth":""} smp-justifyContent-${m}`};return y.jsx("button",{"data-component":"button",className:T.container,onClick:t,"aria-label":n,disabled:a,"aria-busy":d,title:p||r||v,children:d?y.jsx(oe,{icon:"spinner",state:rr(o),spin:!0}):y.jsxs(y.Fragment,{children:[s&&u&&y.jsx(oe,{icon:s,disabled:a,state:rr(o),width:tr(i),height:tr(i)}),c&&y.jsx("span",{children:v||e})]})})},_r=({options:r,fun:e,direction:t="row",disposition:n="start",sizing:s,variant:a,appearance:i,showText:o,showIcon:l,fullWidth:u,disabled:c,justify:f,onClick:d,onOptionsRequest:m})=>{const[p,v]=j.useState(r);j.useEffect(()=>{!p&&m&&e&&m(e,void 0).then(x=>v(x)).catch(x=>{console.error("Errore nel caricamento delle opzioni per ButtonList",x)})},[p,e,m]);const T={container:`smp-button-list smp-button-list-${t} smp-justifyContent-${n}`},w=p==null?void 0:p.map((x,D)=>{const E={bindValue:x.id,optionalDisplayValue:x.label,fun:x.fun,icon:x.icon,variant:a,appearance:i,showText:o,showIcon:l,fullWidth:u,disabled:c,sizing:s,justify:f,onClick:()=>{d==null||d(x.id,x.fun)}};return y.jsx(Ce,{...E},`button-${D}`)});return y.jsx("div",{role:"list","data-component":"button-list",className:T.container,children:w})},Tn={"smp-checkbox-wrapper":"_smp-checkbox-wrapper_z14lq_2"},$r=({bindValue:r,_dataComponent:e="checkbox",disabled:t,label:n,isEditable:s=!0,onChange:a,onBlur:i,variant:o="checkbox"})=>{const l=j.useId(),u=f=>{s&&a&&a(f.target.checked)},c={wrapper:`${Tn["smp-checkbox-wrapper"]}`};return y.jsxs("div",{className:c.wrapper,"data-component":e,children:[n&&y.jsx(Te,{label:n,disabled:t,htmlFor:l}),y.jsx("input",{"data-component":"checkbox",type:"checkbox",checked:r,onChange:u,onBlur:i,role:o==="switch"?"switch":"checkbox",id:l})]})},On={titleLarge:"h2",title:"h3",body:"h6",label:"label"},ke=({variant:r="body",bindValue:e,color:t,...n})=>{const s=On[r],a={container:`smp-typography ${r?`smp-typography-${r}`:""} ${n.disabled?"smp-typography-disabled":""}`};return y.jsx(s,{className:a.container,disabled:n.disabled,style:{"--smp-typography-color-base":t},children:e})},$t=({elements:r,isEditable:e=!1,displayMode:t="Both",onChange:n,color:s,backgroundColor:a,isDraggable:i=!1})=>{const[o,l]=j.useState(null),u={container:`${["smp-chips-container"]}`,element:"smp-chips-element"},c=m=>{n==null||n(r.filter((p,v)=>v!==m))},f=m=>{l(m)},d=m=>{if(o===null||o===m)return;const p=[...r],[v]=p.splice(o,1);p.splice(m,0,v),n==null||n(p),l(null)};return y.jsx("div",{className:u.container,role:"list","data-component":"chip",children:r.flatMap((m,p)=>{const v=Me(m.bindValue,m.optionalDisplayValue,t),T=y.jsxs("div",{className:u.element,role:"listitem",draggable:i,onDragStart:()=>f(p),onDragOver:x=>i&&x.preventDefault(),onDrop:()=>i&&d(p),style:{"--smp-chips-backgroundColor-base":a},children:[i&&y.jsx(oe,{icon:"drag_indicator_horizontal",isInteractable:!0}),y.jsx(ke,{variant:"label",bindValue:v,color:s}),e&&y.jsx(oe,{icon:"close",isInteractable:!0,onClick:()=>c(p),color:s})]},`chip-${p}`),w=i&&p<r.length-1?y.jsx(oe,{icon:"chevron-right",color:s},`separator-${p}`):null;return[T,w].filter(Boolean)})})};function Ct(r,e){const t=j.useRef(null);j.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(u=>!u.hasAttribute("disabled")&&u.offsetParent!==null):[];(()=>{const u=s();u.length>0&&requestAnimationFrame(()=>u[0].focus())})();const i=u=>{if(u.key==="Escape"||u.key!=="Tab")return;const c=s();if(c.length===0)return;const f=c[0],d=c[c.length-1];u.shiftKey&&document.activeElement===f?(u.preventDefault(),d.focus()):!u.shiftKey&&document.activeElement===d&&(u.preventDefault(),f.focus())},o=u=>{if(n&&!n.contains(u.target)){u.preventDefault();const c=s();c.length>0&&c[0].focus()}};document.addEventListener("keydown",i),document.addEventListener("mousedown",o);const l=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",o),document.body.style.overflow=l,t.current&&requestAnimationFrame(()=>{var u;(u=t.current)==null||u.focus()})}},[r,e])}const Cr=({bindValue:r,onChange:e,options:t=[],optionalDisplayValue:n,isEditable:s,displayMode:a,listDisplayMode:i="Both",fun:o,onOptionsRequest:l,multiActiveIndex:u,...c})=>{const f=j.useRef(null),[d,m]=j.useState(!1),[p,v]=j.useState(t),[T,w]=j.useState(-1),[x,D]=j.useState([r]),E=j.useId(),{anchorRef:g,targetRef:$,anchorWidth:L}=lt({position:"bottom",enabled:d}),S=j.useCallback(()=>{var R;m(!1),(R=f==null?void 0:f.current)==null||R.focus()},[]);$e($,()=>S()),Ct(d,$);const O=R=>{e==null||e(R.id,R.label);const F=p.findIndex(H=>H.id===R.id);w(F),D([R.id]),S()},k=R=>{R.key==="Escape"&&(S(),w(-1))},M=R=>{(R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),P())},P=()=>{o&&l&&l(o,void 0).then(R=>{v(R),w(R.length>0?0:-1),m(!0)})};return y.jsxs("div",{role:"combobox","aria-expanded":d,"aria-controls":E,"aria-owns":E,"data-component":"combobox",children:[y.jsx(Dt,{...c,bindValue:r,optionalDisplayValue:n,displayMode:a,onShapeIconClick:P,onKeyDown:M,shapeIcon:"arrow_drop_down",rotatedShapeIcon:d,isEditable:s,ref:g,inputRef:f,"aria-autocomplete":"list",variant:"notSelectable"}),d&&y.jsx(ct,{children:y.jsx(Dr,{id:E,options:p,displayMode:i,ref:$,isOpen:d,selectedIndex:T,activeIndex:u||x,width:L,onClick:O,onKeyDown:k})})]})},K=r=>typeof r=="string",Ne=()=>{let r,e;const t=new Promise((n,s)=>{r=n,e=s});return t.resolve=r,t.reject=e,t},nr=r=>r==null?"":""+r,jn=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},Rn=/###/g,sr=r=>r&&r.indexOf("###")>-1?r.replace(Rn,"."):r,ar=r=>!r||K(r),Ie=(r,e,t)=>{const n=K(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(ar(r))return{};const a=sr(n[s]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++s}return ar(r)?{}:{obj:r,k:sr(n[s])}},ir=(r,e,t)=>{const{obj:n,k:s}=Ie(r,e,Object);if(n!==void 0||e.length===1){n[s]=t;return}let a=e[e.length-1],i=e.slice(0,e.length-1),o=Ie(r,i,Object);for(;o.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),o=Ie(r,i,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=t},Dn=(r,e,t,n)=>{const{obj:s,k:a}=Ie(r,e,Object);s[a]=s[a]||[],s[a].push(t)},nt=(r,e)=>{const{obj:t,k:n}=Ie(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},_n=(r,e,t)=>{const n=nt(r,t);return n!==void 0?n:nt(e,t)},kr=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?K(r[n])||r[n]instanceof String||K(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):kr(r[n],e[n],t):r[n]=e[n]);return r},je=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var $n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Cn=r=>K(r)?r.replace(/[&<>"'\/]/g,e=>$n[e]):r;class kn{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 Pn=[" ",",","?","!",";"],An=new kn(20),Ln=(r,e,t)=>{e=e||"",t=t||"";const n=Pn.filter(i=>e.indexOf(i)<0&&t.indexOf(i)<0);if(n.length===0)return!0;const s=An.getRegExp(`(${n.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!s.test(r);if(!a){const i=r.indexOf(t);i>0&&!s.test(r.substring(0,i))&&(a=!0)}return a},Tt=(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 i,o="";for(let l=a;l<n.length;++l)if(l!==a&&(o+=t),o+=n[l],i=s[o],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<n.length-1)continue;a+=l-a+1;break}s=i}return s},Fe=r=>r==null?void 0:r.replace("_","-"),Nn={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 st{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Nn,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:(K(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new st(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new st(this.logger,e)}}var ye=new st;class ut{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 i=0;i<a;i++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let i=0;i<a;i++)s.apply(s,[e,...t])})}}class or extends ut{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 u,c;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):K(n)&&a?o.push(...n.split(a)):o.push(n)));const l=nt(this.data,o);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=o[0],t=o[1],n=o.slice(2).join(".")),l||!i||!K(n)?l:Tt((c=(u=this.data)==null?void 0:u[e])==null?void 0:c[t],n,a)}addResource(e,t,n,s,a={silent:!1}){const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,t];n&&(o=o.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),ir(this.data,o,s),a.silent||this.emit("added",e,t,n,s)}addResources(e,t,n,s={silent:!1}){for(const a in n)(K(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,i={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=n,n=t,t=o[1]),this.addNamespaces(t);let l=nt(this.data,o)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?kr(l,n,a):l={...l,...n},ir(this.data,o,l),i.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 Pr={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,s){return r.forEach(a=>{var i;e=((i=this.processors[a])==null?void 0:i.process(e,t,n,s))??e}),e}};const lr={},cr=r=>!K(r)&&typeof r!="boolean"&&typeof r!="number";class at extends ut{constructor(e,t={}){super(),jn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ye.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 i=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ln(e,n,s);if(i&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:K(a)?[a]:a};const u=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(s)}return{key:e,namespaces:K(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,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],s),u=l[l.length-1];let c=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=s.lng||this.language,d=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return d?a?{res:`${u}${c}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:`${u}${c}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(s)}:o;const m=this.resolve(e,s);let p=m==null?void 0:m.res;const v=(m==null?void 0:m.usedKey)||o,T=(m==null?void 0:m.exactUsedKey)||o,w=["[object Number]","[object Function]","[object RegExp]"],x=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject,E=s.count!==void 0&&!K(s.count),g=at.hasDefaultValue(s),$=E?this.pluralResolver.getSuffix(f,s.count,s):"",L=s.ordinal&&E?this.pluralResolver.getSuffix(f,s.count,{ordinal:!1}):"",S=E&&!s.ordinal&&s.count===0,O=S&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${$}`]||s[`defaultValue${L}`]||s.defaultValue;let k=p;D&&!p&&g&&(k=O);const M=cr(k),P=Object.prototype.toString.apply(k);if(D&&k&&M&&w.indexOf(P)<0&&!(K(x)&&Array.isArray(k))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,k,{...s,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(m.res=R,m.usedParams=this.getUsedParamsDetails(s),m):R}if(i){const R=Array.isArray(k),F=R?[]:{},H=R?T:v;for(const z in k)if(Object.prototype.hasOwnProperty.call(k,z)){const q=`${H}${i}${z}`;g&&!p?F[z]=this.translate(q,{...s,defaultValue:cr(O)?O[z]:void 0,joinArrays:!1,ns:l}):F[z]=this.translate(q,{...s,joinArrays:!1,ns:l}),F[z]===q&&(F[z]=k[z])}p=F}}else if(D&&K(x)&&Array.isArray(p))p=p.join(x),p&&(p=this.extendTranslation(p,e,s,n));else{let R=!1,F=!1;!this.isValidLookup(p)&&g&&(R=!0,p=O),this.isValidLookup(p)||(F=!0,p=o);const z=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:p,q=g&&O!==p&&this.options.updateMissing;if(F||R||q){if(this.logger.log(q?"updateKey":"missingKey",f,u,o,q?O:p),i){const b=this.resolve(o,{...s,keySeparator:!1});b&&b.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 Z=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let b=0;b<V.length;b++)Z.push(V[b]);else this.options.saveMissingTo==="all"?Z=this.languageUtils.toResolveHierarchy(s.lng||this.language):Z.push(s.lng||this.language);const h=(b,_,A)=>{var N;const C=g&&A!==p?A:z;this.options.missingKeyHandler?this.options.missingKeyHandler(b,u,_,C,q,s):(N=this.backendConnector)!=null&&N.saveMissing&&this.backendConnector.saveMissing(b,u,_,C,q,s),this.emit("missingKey",b,u,_,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?Z.forEach(b=>{const _=this.pluralResolver.getSuffixes(b,s);S&&s[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(A=>{h([b],o+A,s[`defaultValue${A}`]||O)})}):h(Z,o,O))}p=this.extendTranslation(p,e,s,m,n),F&&p===o&&this.options.appendNamespaceToMissingKey&&(p=`${u}${c}${o}`),(F||R)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${c}${o}`:o,R?p:void 0,s))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(s),m):p}extendTranslation(e,t,n,s,a){var l,u;if((l=this.i18nFormat)!=null&&l.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 c=K(e)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(c){const m=e.match(this.interpolator.nestingRegexp);f=m&&m.length}let d=n.replace&&!K(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),c){const m=e.match(this.interpolator.nestingRegexp),p=m&&m.length;f<p&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...m)=>(a==null?void 0:a[0])===m[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):this.translate(...m,t),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=K(i)?[i]:i;return e!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(e=Pr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,s,a,i,o;return K(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,t),c=u.key;s=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=t.count!==void 0&&!K(t.count),m=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(K(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(T=>{var w,x;this.isValidLookup(n)||(o=T,!lr[`${v[0]}-${T}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(o))&&(lr[`${v[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),v.forEach(D=>{var $;if(this.isValidLookup(n))return;i=D;const E=[c];if(($=this.i18nFormat)!=null&&$.addLookupKeys)this.i18nFormat.addLookupKeys(E,c,D,T,t);else{let L;d&&(L=this.pluralResolver.getSuffix(D,t.count,t));const S=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(E.push(c+L),t.ordinal&&L.indexOf(O)===0&&E.push(c+L.replace(O,this.options.pluralSeparator)),m&&E.push(c+S)),p){const k=`${c}${this.options.contextSeparator}${t.context}`;E.push(k),d&&(E.push(k+L),t.ordinal&&L.indexOf(O)===0&&E.push(k+L.replace(O,this.options.pluralSeparator)),m&&E.push(k+S))}}let g;for(;g=E.pop();)this.isValidLookup(n)||(a=g,n=this.getResource(D,T,g,t))}))})}),{res:n,usedKey:s,exactUsedKey:a,usedLng:i,usedNS:o}}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&&!K(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 ur{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ye.create("languageUtils")}getScriptPartFromCode(e){if(e=Fe(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=Fe(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(K(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(i=>{if(i===a)return i;if(!(i.indexOf("-")<0&&a.indexOf("-")<0)&&(i.indexOf("-")>0&&a.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===a||i.indexOf(a)===0&&a.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),K(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=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return K(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))):K(e)&&a(this.formatLanguageCode(e)),n.forEach(i=>{s.indexOf(i)<0&&a(this.formatLanguageCode(i))}),s}}const fr={zero:0,one:1,two:2,few:3,many:4,other:5},dr={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class In{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ye.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const n=Fe(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 i;try{i=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),dr;if(!e.match(/-|_/))return dr;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,t)}return this.pluralRulesCache[a]=i,i}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)=>fr[s]-fr[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 pr=(r,e,t,n=".",s=!0)=>{let a=_n(r,e,t);return!a&&s&&K(t)&&(a=Tt(r,t,n),a===void 0&&(a=Tt(e,t,n))),a},xt=r=>r.replace(/\$/g,"$$$$");class Mn{constructor(e={}){var t;this.logger=ye.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:i,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:v,nestingOptionsSeparator:T,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=t!==void 0?t:Cn,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?je(a):i||"{{",this.suffix=o?je(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?je(d):m||je("$t("),this.nestingSuffix=p?je(p):v||je(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!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 m;let a,i,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const x=pr(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,n,{...s,...t,interpolationkey:p}):x}const v=p.split(this.formatSeparator),T=v.shift().trim(),w=v.join(this.formatSeparator).trim();return this.format(pr(t,l,T,this.options.keySeparator,this.options.ignoreJSONStructure),w,n,{...s,...t,interpolationkey:T})};this.resetRegExp();const c=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>xt(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?xt(this.escape(p)):xt(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const v=a[1].trim();if(i=u(v),i===void 0)if(typeof c=="function"){const w=c(e,a,s);i=K(w)?w:""}else if(s&&Object.prototype.hasOwnProperty.call(s,v))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),i="";else!K(i)&&!this.useRawValueToEscape&&(i=nr(i));const T=p.safeValue(i);if(e=e.replace(a[0],T),f?(p.regex.lastIndex+=i.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let s,a,i;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,i);const m=d.match(/'/g),p=d.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{i=JSON.parse(d),u&&(i={...u,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${c}${d}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...n},i=i.replace&&!K(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const c=s[1].split(this.formatSeparator).map(f=>f.trim());s[1]=c.shift(),l=c,u=!0}if(a=t(o.call(this,s[1].trim(),i),i),a&&s[0]===e&&!K(a))return a;K(a)||(a=nr(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((c,f)=>this.format(c,f,n.lng,{...n,interpolationkey:s[1].trim()}),a.trim())),e=e.replace(s[0],a),this.regexp.lastIndex=0}return e}}const Fn=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(i=>{if(i){const[o,...l]=i.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},hr=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 i=n+JSON.stringify(a);let o=e[i];return o||(o=r(Fe(n),s),e[i]=o),o(t)}},Vn=r=>(e,t,n)=>r(Fe(t),n)(e);class Yn{constructor(e={}){this.logger=ye.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const n=t.cacheInBuiltFormats?hr:Vn;this.formats={number:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a});return o=>i.format(o)}),currency:n((s,a)=>{const i=new Intl.NumberFormat(s,{...a,style:"currency"});return o=>i.format(o)}),datetime:n((s,a)=>{const i=new Intl.DateTimeFormat(s,{...a});return o=>i.format(o)}),relativetime:n((s,a)=>{const i=new Intl.RelativeTimeFormat(s,{...a});return o=>i.format(o,a.range||"day")}),list:n((s,a)=>{const i=new Intl.ListFormat(s,{...a});return o=>i.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=hr(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(o=>o.indexOf(")")>-1)){const o=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,l)=>{var f;const{formatName:u,formatOptions:c}=Fn(l);if(this.formats[u]){let d=o;try{const m=((f=s==null?void 0:s.formatParams)==null?void 0:f[s.interpolationkey])||{},p=m.locale||m.lng||s.locale||s.lng||n;d=this.formats[u](o,p,{...c,...s,...m})}catch(m){this.logger.warn(m)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const Un=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Wn extends ut{constructor(e,t,n,s={}){var a,i;super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=ye.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,n,s.backend,s)}queueLoad(e,t,n,s){const a={},i={},o={},l={};return e.forEach(u=>{let c=!0;t.forEach(f=>{const d=`${u}|${f}`;!n.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?i[d]===void 0&&(i[d]=!0):(this.state[d]=1,c=!1,i[d]===void 0&&(i[d]=!0),a[d]===void 0&&(a[d]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(o[u]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const s=e.split("|"),a=s[0],i=s[1];t&&this.emit("failedLoading",a,i,t),!t&&n&&this.store.addResourceBundle(a,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const o={};this.queue.forEach(l=>{Dn(l.loaded,[a],i),Un(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n,s=0,a=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:a,callback:i});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,s+1,a*2,i)},a);return}i(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}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();K(e)&&(e=this.languageUtils.toResolveHierarchy(e)),K(t)&&(t=[t]);const a=this.queueLoad(e,t,n,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}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,(i,o)=>{i&&this.logger.warn(`${t}loading namespace ${a} for language ${s} failed`,i),!i&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${s}`,o),this.loaded(e,i,o)})}saveMissing(e,t,n,s,a,i={},o=()=>{}){var l,u,c,f,d;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((f=(c=this.services)==null?void 0:c.utils)!=null&&f.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 m={...i,isUpdate:a},p=this.backend.create.bind(this.backend);if(p.length<6)try{let v;p.length===5?v=p(e,t,n,s,m):v=p(e,t,n,s),v&&typeof v.then=="function"?v.then(T=>o(null,T)).catch(o):o(null,v)}catch(v){o(v)}else p(e,t,n,s,o,m)}!e||!e[0]||this.store.addResource(e[0],t,n,s)}}}const mr=()=>({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]),K(r[1])&&(e.defaultValue=r[1]),K(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}),gr=r=>{var e,t;return K(r.ns)&&(r.ns=[r.ns]),K(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),K(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},qe=()=>{},Bn=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class Ve extends ut{constructor(e={},t){if(super(),this.options=gr(e),this.services={},this.logger=ye,this.modules={external:[]},Bn(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&&(K(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=mr();this.options={...n,...this.options,...gr(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=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?ye.init(s(this.modules.logger),this.options):ye.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=Yn;const c=new ur(this.options);this.store=new or(this.options.resources,this.options);const f=this.services;f.logger=ye,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new In(c,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(f.formatter=s(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Mn(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Wn(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(d,...m)=>{this.emit(d,...m)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new at(this.services,this.options),this.translator.on("*",(d,...m)=>{this.emit(d,...m)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=qe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...c)=>this.store[u](...c)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...c)=>(this.store[u](...c),this)});const o=Ne(),l=()=>{const u=(c,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(f),t(c,f)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=qe){var a,i;let n=t;const s=K(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 o=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&o.indexOf(f)<0&&o.push(f)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>l(c)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,u=>l(u)),this.services.backendConnector.load(o,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(e,t,n){const s=Ne();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=qe),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"&&Pr.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=Ne();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),t&&t(o,(...u)=>this.t(...u))},i=o=>{var c,f;!e&&!o&&this.services.languageDetector&&(o=[]);const l=K(o)?o:o&&o[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(K(o)?[o]:o);u&&(this.language||s(u),this.translator.language||this.translator.changeLanguage(u),(f=(c=this.services.languageDetector)==null?void 0:c.cacheUserLanguage)==null||f.call(c,u)),this.loadResources(u,d=>{a(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),n}getFixedT(e,t,n){const s=(a,i,...o)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([a,i].concat(o)):l={...i},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||s.keyPrefix);const u=this.options.keySeparator||".";let c;return l.keyPrefix&&Array.isArray(a)?c=a.map(f=>`${l.keyPrefix}${u}${f}`):c=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,this.t(c,l)};return K(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 i=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,i);if(o!==void 0)return o}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!s||i(a,e)))}loadNamespaces(e,t){const n=Ne();return this.options.ns?(K(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=Ne();K(e)&&(e=[e]);const s=this.options.preload||[],a=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=s.concat(a),this.loadResources(i=>{n.resolve(),t&&t(i)}),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 ur(mr());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new Ve(e,t)}cloneInstance(e={},t=qe){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},a=new Ve(s);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const o=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((c,f)=>(c[f]={...l[u][f]},c),l[u]),l),{});a.store=new or(o,s),a.services.resourceStore=a.store}return a.translator=new at(a.services,s),a.translator.on("*",(o,...l)=>{a.emit(o,...l)}),a.init(s,t),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ae=Ve.createInstance();ae.createInstance=Ve.createInstance;ae.createInstance;ae.dir;ae.init;ae.loadResources;ae.reloadResources;ae.use;ae.changeLanguage;ae.getFixedT;ae.t;ae.exists;ae.setDefaultNamespace;ae.hasLoadedNamespace;ae.loadNamespaces;ae.loadLanguages;const Hn={Friday:"Venerdì",FridayShort:"Ven",Monday:"Lunedì",MondayShort:"Lun",Saturday:"Sabato",SaturdayShort:"Sab",Sunday:"Domenica",SundayShort:"Dom",Tuesday:"Martedì",TuesdayShort:"Mar",Thursday:"Giovedì",ThursdayShort:"Gio",Wednesday:"Mercoledì",WednesdayShort:"Mer"},zn={April:"Aprile",August:"Agosto",December:"Dicembre",February:"Febbraio",January:"Gennaio",June:"Giugno",July:"Luglio",March:"Marzo",May:"Maggio",October:"Ottobre",November:"Novembre",September:"Settembre"},Gn={CalendarFor:"Calendario per",Close:"Chiudi",SpotlightDefaultPlaceholder:"Esegui Comando",CheckObjectWrongValidation:"Oggetto non valido"},Kn={Date:{NextDay:"Giorno Successivo",NextMonth:"Mese Successivo",NextWeek:"Settimana Successiva",NextYear:"Anno Successivo",PreviousDay:"Giorno Precedente",PreviousMonth:"Mese Precedente",PreviousWeek:"Settimana Precedente",PreviousYear:"Anno Precedente",Today:"Oggi",Tomorrow:"Domani",Yesterday:"Ieri"},Day:Hn,Month:zn,Generic:Gn},qn={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"},Jn={April:"April",August:"August",December:"December",February:"February",January:"January",July:"July",June:"June",March:"March",May:"May",November:"November",October:"October",September:"September"},Xn={CalendarFor:"Calendar for",Close:"Close",SpotlightDefaultPlaceholder:"Execute Command",CheckObjectWrongValidation:"Object not valid"},Zn={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:qn,Month:Jn,Generic:Xn};function yr(r,e){return new RegExp(Qn(r),e)}function Qn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const es=(r,e,t)=>{let n=r;return isNaN(n)||(e!=null&&(n=Math.max(n,e)),t!=null&&(n=Math.min(n,t))),n},ts=(r,e)=>{var i,o;const n=Intl.NumberFormat(r).formatToParts(1000.1),s=((i=n.find(l=>l.type==="group"))==null?void 0:i.value)??",",a=e??((o=n.find(l=>l.type==="decimal"))==null?void 0:o.value)??".";return{groupingChar:s,decimalChar:a}};function rs(r,e,t,n){let s=e;const a=as(r,t);if(!s){const o=Math.abs(a);o-Math.floor(o)?s="0,0.00":s="0,0"}const i=is(s);return new Intl.NumberFormat(n,i).format(a)}const ns=(r,e,t)=>{const n=r.lastIndexOf(t);if(n!==-1)return r.length-n-1;const s=t==="."?",":".",a=r.lastIndexOf(s);return a!==-1&&!(s===e&&r.length-a-1===3)?r.length-a-1:0},ss=(r,e,t)=>{if(!r)return NaN;let n=r.replace(/\s/g,""),s=t;const a=(n.match(/\./g)||[]).length,i=(n.match(/,/g)||[]).length;if(a&&i)s=n.lastIndexOf(".")>n.lastIndexOf(",")?".":",";else if(!n.includes(t)){const l=n.includes(".")?".":",",u=l==="."?a:i;u>1||u===1&&l===e&&n.length-n.lastIndexOf(l)-1===3||(s=l)}const o=s==="."?",":".";return n=n.replace(new RegExp(`\\${o}`,"g"),""),s!=="."&&(n=n.replace(new RegExp(`\\${s}`,"g"),".")),parseFloat(n)};function as(r,e,t,n,s){let a=r;if(typeof a!="number"){let o;e&&n===void 0?o=",":o=".";const l=o=="."?",":".";a=a.replace(yr(l,"g"),""),a=a.replace(yr(o,"g"),"."),a=Number(a)}const i=Number(a);return isNaN(i)?NaN:i}function is(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}ae.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 rs(r,e,a,t)}}}catch{return r}}},resources:{en:{translation:Zn},it:{translation:Kn}}});const os=(r,e,t,n)=>ae.format(r,e,t||ae.language,n),ls=(r,e)=>ae.t(r,e);function Pe(){const r=j.useCallback((n,s,a,i)=>os(n,s,a||void 0,i),[]),e=j.useCallback(()=>ae.languages[0],[]),t=j.useCallback((n,s)=>ls(n,s),[]);return{format:r,getCurrentLanguage:e,translate:t}}var ft=(r=>(r.CALENDAR_FOR="Date.CalendarFor",r.CLOSE="Generic.Close",r.SPOTLIGHT_DEFAULT_PLACEHOLDER="Generic.SpotlightDefaultPlaceholder",r.CHECK_OBJECT_WRONG_VALIDATION="Generic.CheckObjectWrongValidation",r))(ft||{}),le=(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))(le||{}),ue=(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))(ue||{}),Ot=(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))(Ot||{});const cs={"smp-datepickercalendar-position":"_smp-datepickercalendar-position_1lf9g_1"};function us({selectedDate:r,onDateChange:e,disabledDateRanges:t=[],initialValue:n,targetRef:s}){const{translate:a}=Pe(),i=()=>{if(!n)return;const V=new Date(n);return isNaN(V.getTime())?void 0:V},[o]=j.useState(new Date),[l,u]=j.useState(r||i()||new Date),[c,f]=j.useState(l?l.getMonth():new Date().getMonth()),[d,m]=j.useState(l?l.getFullYear():new Date().getFullYear()),[p,v]=j.useState(l?l.getDate():null),T=j.useRef(null),w=j.useRef([]),x=[a(ue.JANUARY),a(ue.FEBRUARY),a(ue.MARCH),a(ue.APRIL),a(ue.MAY),a(ue.JUNE),a(ue.JULY),a(ue.AUGUST),a(ue.SEPTEMBER),a(ue.OCTOBER),a(ue.NOVEMBER),a(ue.DECEMBER)],D=[{value:a(le.SUNDAY_SHORT),full:a(le.SUNDAY)},{value:a(le.MONDAY_SHORT),full:a(le.MONDAY)},{value:a(le.TUESDAY_SHORT),full:a(le.TUESDAY)},{value:a(le.WEDNESDAY_SHORT),full:a(le.WEDNESDAY)},{value:a(le.THURSDAY_SHORT),full:a(le.THURSDAY)},{value:a(le.FRIDAY_SHORT),full:a(le.FRIDAY)},{value:a(le.SATURDAY_SHORT),full:a(le.SATURDAY)}],E=V=>t.some(h=>{const b=h.start.getTime(),_=h.end.getTime(),A=V.getTime();return A>=b&&A<=_}),g=V=>{E(V)||(u(V),v(V.getDate()),e&&e(Zr(V)))},$=()=>{c===0?(f(11),m(d-1)):f(c-1),v(1)},L=()=>{c===11?(f(0),m(d+1)):f(c+1),v(1)},S=(V,h)=>new Date(V,h+1,0).getDate(),O=(V,h)=>new Date(V,h,1).getDay(),k=V=>{var b;const h=F.findIndex(_=>_!==null&&_.getDate()===V);h!==-1&&w.current[h]&&((b=w.current[h])==null||b.focus(),v(V))},M=(V,h)=>{const b=F[h];if(!b)return;const _=S(d,c),A=b.getDate();switch(V.key){case"ArrowRight":V.preventDefault();{let C=A+1,N=new Date(d,c,C);if(C>_){const U=c===11?d+1:d,W=c===11?0:c+1;C=1,N=new Date(U,W,C),L(),setTimeout(()=>{P(1,"forward")},0);return}E(N)?P(C,"forward"):k(C)}break;case"Tab":break;case"ArrowLeft":V.preventDefault();{let C=A-1,N=new Date(d,c,C);if(C<1){const U=c===0?d-1:d,W=c===0?11:c-1,Y=S(U,W);C=Y,N=new Date(U,W,C),$(),setTimeout(()=>{P(Y,"backward")},0);return}E(N)?P(C,"backward"):k(C)}break;case"ArrowUp":V.preventDefault();{let C=A-7,N=new Date(d,c,C);if(C<1){const U=c===0?d-1:d,W=c===0?11:c-1;C=S(U,W)+C,N=new Date(U,W,C),$(),setTimeout(()=>{P(C,"backward")},0);return}E(N)?P(C,"backward"):k(C)}break;case"ArrowDown":V.preventDefault();{let C=A+7,N=new Date(d,c,C);if(C>_){const U=c===11?d+1:d,W=c===11?0:c+1;C=C-_,N=new Date(U,W,C),L(),setTimeout(()=>{P(C,"forward")},0);return}E(N)?P(C,"forward"):k(C)}break;case"Home":V.preventDefault(),P(1,"forward");break;case"End":V.preventDefault(),P(_,"backward");break;case"PageUp":V.preventDefault(),$(),setTimeout(()=>{const C=S(c===0?d-1:d,c===0?11:c-1),N=Math.min(A,C);P(N,"forward")},0);break;case"PageDown":V.preventDefault(),L(),setTimeout(()=>{const C=S(c===11?d+1:d,c===11?0:c+1),N=Math.min(A,C);P(N,"forward")},0);break;case" ":case"Space":if(E(b))return;v(b.getDate()),u(b);break;case"Enter":V.preventDefault(),g(b);break}},P=(V,h)=>{const b=S(d,c);if(h==="forward"){for(let _=V;_<=b;_++){const A=new Date(d,c,_);if(!E(A)){k(_);return}}L(),setTimeout(()=>{P(1,"forward")},0)}else{for(let N=V;N>=1;N--){const U=new Date(d,c,N);if(!E(U)){k(N);return}}const _=c===0?d-1:d,A=c===0?11:c-1,C=S(_,A);$(),setTimeout(()=>{P(C,"backward")},0)}},F=(()=>{const V=S(d,c),h=O(d,c),b=[];for(let _=0;_<h;_++)b.push(null);for(let _=1;_<=V;_++){const A=new Date(d,c,_);b.push(A)}return b})(),H=[];let z=[];F.forEach((V,h)=>{if(z.push(V),z.length===7||h===F.length-1){for(;z.length<7;)z.push(null);H.push(z),z=[]}}),j.useEffect(()=>{var V;if(p!==null){const h=F.findIndex(b=>b!==null&&b.getDate()===p);h!==-1&&w.current[h]&&((V=w.current[h])==null||V.focus())}},[c,d,p,F]);const q={label:"smp-datepickercalendar-label",wrapper:`smp-datepickercalendar ${cs["smp-datepickercalendar-position"]}`,calendar:"smp-datepickercalendar",table:"smp-datepickercalendar-table",th:"smp-datepickercalendar-th",td:(V,h,b,_)=>`smp-datepickercalendar-td
46
+ ${V?"smp-datepickercalendar-td-today":""}
47
47
  ${h?"smp-datepickercalendar-td-selected":""}
48
- ${x?"smp-datepickercalendar-td-focused":""}
49
- ${_?"smp-datepickercalendar-td-disabled":""}`},Z=()=>`${S[f]} ${d.toString()}`;return y.jsxs("div",{className:z.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[y.jsx(Ce,{onClick:k,ariaLabel:a(Ot.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),y.jsx("div",{"aria-label":Z(),className:z.label,children:Z()}),y.jsx(Ce,{onClick:E,ariaLabel:a(Ot.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),y.jsxs("table",{ref:b,role:"grid","aria-label":`${a(ft.CALENDAR_FOR)} ${S[f]} ${d}`,className:z.table,children:[y.jsx("thead",{children:y.jsx("tr",{children:T.map(M=>y.jsx("th",{scope:"col",abbr:M.full,className:z.th,children:M.value},M.value))})}),y.jsx("tbody",{children:H.map((M,h)=>y.jsx("tr",{children:M.map((x,_)=>{const L=h*7+_;if(x===null)return y.jsx("td",{className:z.td(!1,!1,!1,!0)},`empty-${_}`);const C=x.getDate()===o.getDate()&&x.getMonth()===o.getMonth()&&x.getFullYear()===o.getFullYear(),I=c&&x.getDate()===c.getDate()&&x.getMonth()===c.getMonth()&&x.getFullYear()===c.getFullYear(),Y=p===x.getDate(),U=R(x);return y.jsx("td",{role:"gridcell","aria-selected":I,tabIndex:Y?0:-1,onClick:()=>g(x),onKeyDown:V=>B(V,L),"aria-label":`${x.getDate()} ${S[x.getMonth()]} ${x.getFullYear()}`,"data-selected":I,"aria-disabled":U,ref:V=>{w.current[L]=V},className:z.td(C,I,Y,U),children:x.getDate()},`day-${_}`)})},`week-${h}`))})]})]})}const Ar=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,isEditable:s=!0,...a})=>{const i=j.useRef(null),[o,c]=j.useState(!1),[l,f]=j.useState(r||""),[u,d]=j.useState(""),{anchorRef:m,targetRef:p}=lt({position:"bottom",enabled:o}),v=j.useCallback(()=>{var $;c(!1),($=i==null?void 0:i.current)==null||$.focus()},[]);_e(p,()=>{v()}),_e(m,()=>{if(typeof m=="object"&&m!==null&&"current"in m){const $=m.current.querySelector("input");$&&$===document.activeElement&&R()}v()}),Ct(o,p);const{format:b,getCurrentLanguage:w}=Pe(),S=j.useCallback($=>{const A=$.length>5&&zr($,w())||$,B=b(A,void 0,void 0,{type:"date"}),P=typeof A!="string",D=P&&A.toISOString().substring(0,10)||"";return{isValid:P,formattedDate:B,isoDate:D,normalizedDate:A}},[w,b]);j.useEffect(()=>{const{formattedDate:$,isoDate:A,isValid:B}=S(r);f(B&&A||r),d(B&&$||r)},[r,b,S]);const T=()=>c($=>!$),R=()=>{k(u)},g=$=>{k($),v()},k=$=>{const{isoDate:A,isValid:B}=S($);t&&t(B&&A||$)},E=$=>{d($)},O=$=>{$.key==="Enter"&&($.preventDefault(),k(u))};return y.jsxs("div",{"data-component":"date-picker",children:[y.jsx(be,{...a,bindValue:u,placeholder:e,onBlur:R,onChange:E,onKeyDown:O,shapeIcon:"calendar",onShapeIconClick:T,ref:m,inputRef:i,isEditable:s}),o&&y.jsx(ct,{children:y.jsx(us,{disabledDateRanges:n,onDateChange:g,initialValue:Rt(l)&&l||"",targetRef:p})})]})},fs=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,isEditable:s=!0,placeholder:a,label:i,disabled:o,fun:c,error:l,onOptionsRequest:f,onChange:u,onBlur:d})=>{const m=r.map(b=>b.bindValue),p=(b,w)=>{const S=[...r];if(b=="")S.pop();else{const T=S.findIndex(R=>R.bindValue===b&&R.optionalDisplayValue===w);T>=0?S.splice(T,1):S.push({bindValue:b,optionalDisplayValue:w})}u==null||u(S)},v={container:"smp-multipleAutocomplete-container"};return y.jsxs("div",{className:v.container,"data-component":"multiple-autocomplete",children:[i&&y.jsx(Te,{label:i,disabled:o}),y.jsx(_t,{elements:r,displayMode:e,isEditable:s,onChange:b=>{u==null||u(b)}}),y.jsx($t,{bindValue:"",fun:c,isEditable:s,onChange:p,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:a,onOptionsRequest:f,_multiActiveIndex:m,error:l,onBlur:d})]})},Lr=({...r})=>{const[e,t]=j.useState(!1),n=e?"visibility-off":"visibility";return y.jsx(be,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},ds=({...r})=>{const[e,t]=j.useState(r.bindValue),{translate:n}=Pe(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return y.jsx(be,{...r,placeholder:r.placeholder?r.placeholder:n(ft.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})},ps=({bindValue:r,optionalDisplayValue:e,label:t})=>{const n={wrapper:"smp-text-wrapper"};return t?y.jsxs("div",{className:n.wrapper,children:[y.jsx(Te,{label:t}),y.jsx(ke,{variant:"body",bindValue:e||r})]}):y.jsx(ke,{variant:"body",bindValue:e||r})};class Ee{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ee(e,e.k==""?[]:e.k.split(";"))}static fromString(e){return new Ee({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const De=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t??r.decode,shape:r.shape,fun:r.fun}),vr=r=>{const e=Ee.fromDataObj(r.obj),t=r.decode?Ee.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},hs=(r,e)=>{const t=new Ee(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new Ee(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return De(r,t,n)},ms=({min:r,max:e,step:t=1,inputMode:n="decimal",dSep:s,bindValue:a,onChange:i,onEnter:o,...c})=>{const{getCurrentLanguage:l}=Pe(),f=j.useRef(null),u=l(),{groupingChar:d,decimalChar:m}=j.useMemo(()=>ts(u,s),[u,s]),p=j.useCallback((P,D)=>new Intl.NumberFormat(u,{minimumFractionDigits:D,maximumFractionDigits:D,useGrouping:!0}).format(P),[u]),v=j.useCallback(ss,[d,m]),b=j.useCallback(es,[r,e]),w=a!=null&&a.toString().includes(".")?a.toString().split(".")[1].length:0,[S,T]=j.useState(w),[R,g]=j.useState(a!=null?p(a,S):""),k=j.useRef(a??null);j.useEffect(()=>{if(a==null){g(""),k.current=null;return}const P=a.toString().includes(".")?a.toString().split(".")[1].length:0,D=P===0?S:P;D!==S&&T(D),g(p(a,D)),k.current=a},[a,p]);const E=j.useCallback((P,D=!1)=>{if(P.trim()===""){g(""),k.current=null,i==null||i(void 0,""),D&&(o==null||o(void 0));return}const F=v(P,d,m);if(isNaN(F))if(k.current!=null){const H=p(k.current,S);g(H)}else g("");else{const H=b(F,r,e),G=ns(P,d,m);T(G);const z=p(H,G);g(z),k.current=H,i==null||i(H,z),D&&(o==null||o(H))}},[v,d,m,b,r,e,p,i,o,S]),O=P=>g(P),$=()=>E(R),A=P=>{if(P.key==="Enter"){P.preventDefault(),E(R,!0);return}if(P.key==="ArrowUp"||P.key==="ArrowDown"){P.preventDefault();const D=P.key==="ArrowUp"?1:-1,F=k.current??0,H=b(F+D*t,r,e);E(p(H,S))}},B=P=>{if(!P.currentTarget.contains(document.activeElement))return;P.preventDefault();const D=P.deltaY<0?1:-1,F=k.current??0,H=b(F+D*t,r,e);E(p(H,S))};return _e(f,$),y.jsx("div",{ref:f,"data-component":"input-number",onWheel:B,children:y.jsx(be,{...c,"aria-valuemin":r,"aria-valuemax":e,"aria-valuenow":k.current??void 0,bindValue:R,inputType:"text",inputMode:n,min:r,max:e,step:t,onChange:O,onBlur:$,onKeyDown:A})})};class it{constructor(e,t,n="."){de(this,"class");de(this,"value");de(this,"decimalSeparator");this.class=e,this.value=t,this.decimalSeparator=n}static fromDataObj(e,t){const n=t==="."?",":".",s=e.k.replace(new RegExp(`\\${n}`,"g"),""),a=parseFloat(s.replace(t,"."));return new it(e,a,t)}getLegacyValue(){return this.value.toString().replace(".",this.decimalSeparator)}getValue(){return this.value}}const gs=({disabled:r,bindValue:e,onChange:t,placeholder:n,state:s,appearance:a,isEditable:i,label:o,ariaLabel:c,helperText:l,error:f,onBlur:u,onKeyDown:d})=>{const m=j.useId(),p=`${m}-helper`,v=f?"danger":s,b=l||!!f,w=T=>{t==null||t(T.target.value)},S={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${r?"smp-textarea-disabled":""} ${n?"smp-textarea-placeholder":""} ${v?`smp-textarea-${v}`:""} ${a?`smp-textarea-${a}`:""} ${i?"":"smp-textarea-readOnly"}`};return y.jsxs("div",{className:S.wrapper,"data-component":"textarea",children:[o&&y.jsx(Te,{htmlFor:m,label:o,disabled:r}),y.jsx("textarea",{id:m,value:e,placeholder:n,onChange:w,onBlur:u,className:S.container,disabled:r,readOnly:!i,onKeyDown:d,"aria-label":o?void 0:c,"aria-labelledby":o?m:void 0,"aria-describedby":b?p:void 0}),b&&y.jsx(wr,{id:p,helperText:f,disabled:r,state:v})]})},Je={"smp-radio":"_smp-radio_1vo2u_1","smp-radio-horizontal":"_smp-radio-horizontal_1vo2u_10","smp-radio-element":"_smp-radio-element_1vo2u_14","smp-radio-disabled":"_smp-radio-disabled_1vo2u_20"},ys=({disabled:r=!1,displayMode:e="DescOnly",horizontal:t=!1,options:n,onOptionsRequest:s,fun:a,label:i,...o})=>{const[c,l]=j.useState(n);j.useEffect(()=>{!c&&s&&a&&s(a,void 0).then(p=>l(p)).catch(p=>{console.error("Error during loading options (radio)",p)})},[c,s,a]);const f={container:`${Je["smp-radio"]} ${t?Je["smp-radio-horizontal"]:""}`,option:`${Je["smp-radio-element"]} ${r?Je["smp-radio-disabled"]:""}`},u=()=>{var p;r||(p=o.onBlur)==null||p.call(o)},d=p=>{var v;r||(v=o.onChange)==null||v.call(o,p.id,p.label)},m=j.useId();return y.jsxs("div",{"smp-id":"radio-container",className:f.container,children:[i&&y.jsx(Te,{label:i,disabled:r,htmlFor:""}),c==null?void 0:c.map((p,v)=>y.jsxs("label",{className:f.option,children:[y.jsx("input",{type:"radio",name:m,value:p.id,disabled:r,checked:p.id===o.bindValue,onChange:()=>d(p),onBlur:u}),y.jsx(ke,{variant:"body",bindValue:Me(p.id,p.label,e)})]},v))]})},vs=({value:r,onChange:e,targetRef:t,isOpen:n})=>{const s=j.useRef(null);j.useEffect(()=>{n&&(s!=null&&s.current)&&s.current.focus()},[n,s]);const[a,i,o]=r,c=l=>Array.from({length:l},(f,u)=>y.jsx("option",{value:u,children:u.toString().padStart(2,"0")},u));return y.jsxs("div",{className:"smp-timepicker-widget",ref:t,children:[y.jsx("select",{value:a,ref:s,onChange:l=>e(+l.target.value,i,o),id:"time-picker-hours",children:c(24)}),":",y.jsx("select",{value:i,onChange:l=>e(a,+l.target.value,o),id:"time-picker-minutes",children:c(60)}),":",y.jsx("select",{value:o||0,onChange:l=>e(a,i,+l.target.value),id:"time-picker-seconds",children:c(60)})]})},xr=r=>{const e=r.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!e)return!1;const[,t,n,s]=e,a=parseInt(t,10),i=parseInt(n,10),o=s?parseInt(s,10):0;return a>=0&&a<=23&&i>=0&&i<=59&&(s===void 0||o>=0&&o<=59)},xs=r=>{const e=r.split(":").map(t=>parseInt(t,10));return[e[0]||0,e[1]||0,e[2]||0]},bs=(r,e,t)=>{const n=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"",s=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",a=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"";return n&&s?`${n}:${s}:${a}`:s?`${s}:${a}`:a},Ss=({bindValue:r,placeholder:e="HH:MM:SS",onChange:t,isEditable:n=!0,...s})=>{const a=j.useRef(null),[i,o]=j.useState(!1),[c,l]=j.useState(r||""),[f,u]=j.useState(""),{anchorRef:d,targetRef:m}=lt({position:"bottom",enabled:i}),p=j.useCallback(()=>{var g;o(!1),(g=a==null?void 0:a.current)==null||g.focus()},[]);_e(m,()=>o(!1)),Ct(i,m),j.useEffect(()=>{const g=r||"",k=xr(g)?g:r||"";l(g),u(k)},[r]),j.useEffect(()=>{const g=k=>{k.key==="Escape"&&o(!1)};return i&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[i]);const v=()=>{n&&o(g=>!g)},b=g=>{u(g)},w=(g,k,E)=>{const O=bs(g,k,E);l(O),u(O),t==null||t(O),p()},S=()=>{R(f)},T=g=>{g.key==="Enter"&&(g.preventDefault(),R(f))},R=g=>{if(g.trim()===""){l(""),u(""),t==null||t("");return}xr(g)?(l(g),u(g),t==null||t(g)):u(g)};return y.jsxs("div",{"data-component":"time-picker",children:[y.jsx(Dt,{...s,bindValue:f,placeholder:e,onChange:b,onBlur:S,onKeyDown:T,shapeIcon:"clock",onShapeIconClick:v,isEditable:n,ref:d,inputRef:a}),i&&y.jsx(ct,{children:y.jsx(vs,{value:xs(c),onChange:w,targetRef:m,isOpen:i})})]})};function ws(r){return typeof r=="string"&&/^\d{6}$/.test(r)}class ot{constructor(e,t){de(this,"class");de(this,"time");this.class=e,this.time=t}static fromDataObj(e){const t=br.get(`${e.t}${e.p}`);if(t)return new ot(e,t.legacyToIso(e.k));throw new Error(`time creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=br.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.time}}const br=new Map([["I12",{legacyToIso(r){return ws(r)&&`${r.substring(0,2)}:${r.substring(2,4)}:${r.substring(4,6)}`||r},isoToLegacy(r){return r.replaceAll(":","")||r}}]]),we=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:i,label:o,options:c,onChange:l,onClick:f,onEnter:u,onBlur:d,onOptionsRequest:m,onContextMenu:p,isEditable:v})=>{const b={obj:t,shape:e,decode:r,icon:s,fun:a},w={onBlur:d,onOptionsRequest:m,fun:a,icon:s,label:o,isEditable:v,...n},S=(E,O,$)=>Gr(t)?De(E,new tt(t,O).getLegacyValue()):Kr(t)?De(E,new ot(t,O).getLegacyValue()):De(E,O,$),T=(E,O)=>De(E,new it(t,O,".").getLegacyValue()),R=E=>De(b,new et(t,E).getLegacyValue()),g=E=>hs(b,E),k=()=>{switch(e){case te.AUTOCOMPLETE:{const E={...w,bindValue:t.k,optionalDisplayValue:r,onChange:(O,$)=>{l==null||l(S(b,O,$))}};return y.jsx($t,{...E})}case te.BUTTON:{const E={...w,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{f==null||f(S(b,t.k))}};return y.jsx(Ce,{...E})}case te.BUTTON_LIST:{const E={...w,options:c,onClick:(O,$)=>{const A={...b,fun:$};f==null||f(S(A,O))}};return y.jsx($r,{...E})}case te.CHIP:{const E={...w,elements:vr(b)};return y.jsx(_t,{...E})}case te.CHECKBOX:case te.SWITCH:{const E=e===te.SWITCH,O={...w,bindValue:et.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:$=>{l==null||l(R($))},...E&&{variant:"switch"}};return y.jsx(_r,{...O})}case te.COMBOBOX:{const E={...w,bindValue:t.k,optionalDisplayValue:r,onChange:(O,$)=>{l==null||l(S(b,O,$))}};return y.jsx(Cr,{...E})}case te.DATE:{const E={...w,bindValue:tt.fromDataObj(t).getValue(),onChange:O=>{l==null||l(S(b,O))}};return y.jsx(Ar,{...E})}case te.ICON:case te.IMAGE:{const E={...w,icon:s,placeholderIcon:i,isInteractable:!!w.fun,onClick:()=>{f==null||f(S(b,t.k))}};return y.jsx(oe,{...E})}case te.INPUT_NUMBER:{const E={...w,bindValue:it.fromDataObj(t,".").getValue(),onChange:O=>{l==null||l(T(b,O))}};return y.jsx(ms,{...E})}case te.MEMO:{const E={...w,bindValue:t.k,optionalDisplayValue:r,onChange:O=>{l==null||l(S(b,O))}};return y.jsx(gs,{...E})}case te.MULTI_AUTOCOMPLETE:{const E={...w,elements:vr(b),onChange:O=>{l==null||l(g(O))}};return y.jsx(fs,{...E})}case te.PASSWORD:{const E={...w,bindValue:t.k,onChange:O=>{l==null||l(S(b,O))}};return y.jsx(Lr,{...E})}case te.RADIO:{const E={...w,bindValue:t.k,onChange:(O,$)=>{l==null||l(S(b,O,$))}};return y.jsx(ys,{...E})}case te.SPOTLIGHT:{const E={...w,bindValue:t.k,onEnter:O=>{u==null||u(S(b,O))}};return y.jsx(ds,{...E})}case te.TEXT_FIELD:{const E={...w,bindValue:t.k,optionalDisplayValue:r,onChange:O=>{l==null||l(S(b,O))}};return y.jsx(be,{...E})}case te.TIME:{const E={...w,bindValue:ot.fromDataObj(t).getValue(),onChange:O=>{l==null||l(S(b,O))}};return y.jsx(Ss,{...E})}default:{const E={...w,bindValue:t.k,optionalDisplayValue:r};return y.jsx(ps,{...E})}}};return y.jsx("span",{className:"smp-cell-wrapper",onContextMenu:E=>{p&&(E.preventDefault(),p(b,E.currentTarget))},children:k()})},Es=({data:r,onClick:e,onEnter:t,onContextMenu:n})=>{var o,c;const[s,a]=j.useState(),i=j.useCallback(l=>{var u,d;if(!((u=l.rows)!=null&&u.length)||!((d=l.columns)!=null&&d.length))return{};const f=l.rows[0];return l.columns.filter(m=>m.visible).reduce((m,p)=>{const v=f.cells[p.name],b={...v,id:p.name,onChange:w=>{a(S=>S&&{...S,[p.name]:{...S[p.name],obj:{...S[p.name].obj,k:w.obj.k}}})},onClick:()=>{v.fun&&e&&e({...v})},onEnter:w=>{t&&t(w)},onContextMenu:(w,S)=>{n&&n(w,S)}};return{...m,[p.name]:b}},{})},[e,t,n]);return j.useEffect(()=>{r&&a(i(r))},[r,i]),!((o=r==null?void 0:r.rows)!=null&&o.length)||!((c=r.columns)!=null&&c.length)?null:s&&y.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:y.jsx(Qe,{layout:r.rows[0].layout,children:Object.values(s).map(l=>y.jsx(we,{...l}))})})},Ts=r=>{var e;return(e=r.children)!=null&&e.length?r.children.map(t=>{var n,s;return{id:((n=t.obj)==null?void 0:n.k)??"",label:t.decode??t.value??((s=t.obj)==null?void 0:s.k)??"",fun:t.fun,icon:t.icon}}):[]},ce=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,Os=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:i,onClose:o,loadOptions:c})=>{var T,R;const[l,f]=j.useState(),[u,d]=j.useState(t??!0),m=j.useRef(null),p=s.trim()?s:"100vh",v=j.useCallback(g=>{var E,O;if(!((E=g==null?void 0:g.rows)!=null&&E.length)||!((O=g==null?void 0:g.columns)!=null&&O.length))return{};const k=g.rows[0];return g.columns.filter($=>$.visible??!0).reduce(($,A)=>{const B=k.cells[A.name];if(!B||!u&&ce(n)&&B.shape!==te.BUTTON&&B.shape!==te.BUTTON_LIST)return $;const P={...B,id:A.name,onChange:D=>{f(F=>{const H={...F};return H!=null&&H[A.name]&&(H[A.name].obj.k=D.obj.k),H})},onClick:D=>{D.fun&&a&&a(D)},onEnter:D=>{i&&i(D)}};return c&&B.shape==te.BUTTON_LIST&&(P.onOptionsRequest=(D,F)=>c(D,F).then(H=>Ts(H))),!u&&ce(n)&&(P.data={...P.data,showText:!1,justify:"center"}),{...$,[A.name]:P}},{})},[u,n,a,i,c]),b=j.useCallback(()=>{o==null||o()},[o]),w=()=>{ce(n)?d(g=>!g):(d(!1),o==null||o())};if(j.useEffect(()=>{f(v(r))},[r]),j.useEffect(()=>{if(!m.current)return;if(!ce(n)){f(v(r));return}const g=getComputedStyle(m.current).getPropertyValue("--smp-drawer-slide-transition");let k=Number(g);g.endsWith("ms")?k=parseFloat(g):g.endsWith("s")&&(k=parseFloat(g)*1e3),setTimeout(()=>{f(v(r))},k/2)},[u,n]),j.useEffect(()=>{t!==void 0&&!ce(n)&&d(t)},[n,t]),!((T=r==null?void 0:r.rows)!=null&&T.length)||!((R=r.columns)!=null&&R.length))return null;const S={drawer:`smp-drawer ${ce(n)?"smp-drawer-minified":"smp-drawer-fixed"} ${u?"smp-drawer-open":""} ${!ce(n)&&!u?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${u?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${u?"smp-drawer-backdrop-open":""}`};return l&&y.jsxs(y.Fragment,{children:[!ce(n)&&y.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:S.backdrop,onClick:b}),y.jsx("aside",{ref:m,className:S.drawer,style:{height:p},"aria-label":"Drawer","smp-id":"drawer",children:y.jsxs("div",{className:S.container,children:[y.jsxs("div",{className:S.containerHeader,children:[e&&y.jsx("div",{className:S.containerLogo,children:y.jsx(oe,{icon:e,title:"drawer_logo",width:"100%",height:24})}),y.jsx("div",{className:S.containerIcon,children:y.jsx(oe,{icon:ce(n)?"menu_close":"close",title:"drawer_icon",rotated:!u,isInteractable:!0,onClick:w,width:20,height:20})})]}),y.jsx("div",{className:S.containerLayout,children:y.jsx(Qe,{layout:r.rows[0].layout,children:Object.values(l).map(g=>y.jsx(we,{...g}))})})]})})]})},Rs=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:c,IconColName:l,IconColor:f="var(--smp-dashList-color-base)",NumberFormat:u,ForceUM:d,UmColName:m,UmColor:p="var(--smp-dashList-color-base)",ForceValue:v,ValueColName:b,ValueColor:w="var(--smp-dashList-color-base)",SelectLayout:S="1",onClick:T})=>{const R="N/A",g=(e==null?void 0:e.columns)||[],k=(e==null?void 0:e.rows)||[],E=k.length>0,O="--smp-dashList-color",$="smp-layout",A="descr",B="icon",P="um",D="value",F=i||"1em",H="18px",G="--smp-dashList-columns",z="--smp-dashList-fontSize",Z={dash:(W="1")=>{const X=h(W),re=X,ne=x(X,A),fe=x(X,B),ve=x(X,P),he=x(X,D);return{container:re,descr:ne,icon:fe,um:ve,value:he}},dashList:`smp-dash-list ${ce(a)?"smp-dash-list-fill-space":""}
50
- ${ce(o)?"smp-dash-list-horizontal":""}`},{format:M}=Pe(),h=W=>`${$}-${W}`,x=(W,X)=>`${W}__${X}`,_=W=>`${O}-${W}`,L=W=>{const X=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(X.test(W)){const ne=W.match(X)||[];if((ne==null?void 0:ne.length)>3)return"rgb("+ne[1]+","+ne[2]+","+ne[3]+")"}return W},C=W=>{if(!u)return W;const[X,re]=I(u).map(Oe=>parseInt(Oe||"0")),ne="0,0"+(re?"."+"0".repeat(re):""),fe=M(W,ne,"it");if(!X)return fe;const[ve,he]=fe.split(",");return ve+(he?`,${he}`:"")},I=W=>W.includes(";")?W.split(";"):[W],Y=W=>{const X=ne=>{var fe;if(ne)return(fe=W==null?void 0:W.cells[ne])==null?void 0:fe.obj.k},re=ne=>{var fe,ve;if(!(g.length<=ne))return(ve=(fe=W==null?void 0:W.cells[g[ne].name])==null?void 0:fe.obj)==null?void 0:ve.k};return{descr:t||X(n)||re(2)||"",icon:c||X(l)||re(3)||"",um:d||X(m)||re(1)||"",value:v||X(b)||re(0)||""}},U=W=>{T==null||T(W)},V=(W,X)=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),W.stopPropagation(),U(X))},K=(W=>{const X=Z.dash(W);return{className:X,descr:re=>y.jsx("div",{className:X.descr,children:re},`${W}-${A}`),icon:re=>y.jsx("div",{className:X.icon,children:y.jsx(oe,{color:f,height:H,icon:re,width:H})},`${W}-${B}`),um:re=>y.jsx("div",{className:X.um,children:re},`${W}-${P}`),value:re=>y.jsx("div",{className:X.value,children:re},`${W}-${D}`)}})(S),se=W=>{const{descr:X,icon:re,um:ne,value:fe}=Y(W),ve={[_(A)]:L(s),[_(P)]:L(p),[_(D)]:L(w)},he=[],Oe=C(fe);switch(S){case"2":re&&he.push(K.icon(re)),he.push(K.descr(X)),he.push(K.value(ne?Oe+" "+ne:Oe));break;default:case"1":he.push(K.descr(X)),he.push(K.value(ne?Oe+" "+ne:Oe))}return y.jsx("div",{className:K.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>U(W),onKeyDown:Nr=>V(Nr,W),children:he},W.rowId)},N={[G]:String(r),[z]:F};return y.jsx("div",{className:Z.dashList,style:N,children:E?k.map(W=>se(W)):R})},Xe={"smp-table":"_smp-table_1qmju_1","smp-headerCell":"_smp-headerCell_1qmju_35","smp-resizer":"_smp-resizer_1qmju_44"},js="_rowContent_20wit_2",Ds="_clickable_20wit_21",$s="_indent_20wit_26",_s="_toggle_20wit_32",Cs="_cell_20wit_38",ks="_leftSection_20wit_46",Se={rowContent:js,clickable:Ds,indent:$s,toggle:_s,cell:Cs,leftSection:ks};function Ze(r){return!!r&&"children"in r}function Ps(r){return!Ze(r)}function As(r){const e=JSON.stringify(r,Object.keys(r).sort());let t=0,n,s;if(e.length===0)return t.toString();for(n=0;n<e.length;n++)s=e.charCodeAt(n),t=(t<<5)-t+s,t|=0;return Math.abs(t).toString()}const Ir=({row:r,columnWidths:e={},level:t=0,rowHeight:n=26,offsetTop:s})=>{var S;const[a,i]=j.useState(!1),o=Ze(r)&&!!((S=r.children)!=null&&S.length),c=r.cells&&Object.keys(r.cells).length>0,l=o,f=t*20,u=()=>{o&&i(!a)},d={content:`${Se.rowContent} ${o?Se.clickable:""}`,toggle:`${Se.toggle}`,indent:`${Se.indent}`,cell:`${Se.cell}`},m=T=>y.jsx(we,{...T}),p=()=>y.jsx("span",{className:d.toggle,children:l&&y.jsx(oe,{icon:a?"arrow_drop_right":"arrow_drop_down",width:16})}),v=()=>y.jsx("span",{className:d.indent,style:{width:`${f}px`},"aria-hidden":"true"}),b=()=>{const T=Ps(r)?"":r.decode||(c?"":"Untitled"),R=s??n*t;return y.jsxs("tr",{className:d.content,onClick:u,role:o?"button":"row","aria-expanded":o?!a:void 0,style:{height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,transform:`translateY(${R}px)`},children:[Ze(r)&&y.jsxs("td",{className:Se.leftSection,style:{height:`${n}px`},children:[v(),p(),y.jsx("span",{className:Se.rowLabel,children:T})]}),r.cells&&Object.keys(r.cells).length>0&&Object.entries(r.cells).map(([g,k])=>y.jsx("td",{className:d.cell,style:{width:e[g],minWidth:e[g],height:`${n}px`},children:m({...k,id:g})},As(k)||g))]})},w=()=>{var T;return a||!o?null:y.jsx(y.Fragment,{children:Ze(r)&&((T=r.children)==null?void 0:T.map((R,g)=>y.jsx(Ir,{row:R,level:t+1},`child-${g}`)))})};return y.jsxs(y.Fragment,{children:[b(),w()]})},Ls=({label:r,rowHeight:e=28,offsetTop:t=0,level:n=0,onClick:s,isExpanded:a})=>{const i={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return y.jsx("tr",{className:i.tr,style:{height:e,top:t,lineHeight:`${e}px`},onClick:s,children:y.jsxs("td",{className:i.td,style:{paddingLeft:10+n*20},children:[y.jsx(oe,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),y.jsx(ke,{variant:"title",bindValue:r})]})})};function Is(r,e){const t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function Ns(r,e){return r.map(t=>{const n=e.find(s=>s.column===t.bindValue);return{column:t.bindValue,visible:(n==null?void 0:n.visible)??!0}})}function Ms(r,e,t,n){const s=[];let a=0;return i(r,0,[]),{flatRows:s,offset:a};function i(u,d,m){if(d>=e.length){f(u);return}const p=e[d].column,v=o(u,p);for(const[b,w]of v){const S=[...m,b],T=c(S,d),R=n.has(T);s.push(l(b,T,d,R)),a+=t,R&&i(w,d+1,S)}}function o(u,d){var p;const m=new Map;for(const v of u){const b=((p=v.cells[d])==null?void 0:p.decode)??"N/D";m.has(b)||m.set(b,[]),m.get(b).push(v)}return m}function c(u,d){return`group-${u.join("-")}-${d}`}function l(u,d,m,p){return{isGroup:!0,value:u,cells:{},rowId:d,level:m,isExpanded:p}}function f(u){for(const d of u)s.push(d),a+=t}}const Fs=({groups:r=[],isDraggable:e=!0,isEditable:t=!0,onChange:n,onDrop:s,onDragOver:a})=>{const i=r.map(o=>({bindValue:o.column}));return y.jsxs("tr",{className:"smp-groupBar-container",onDragOver:a,onDrop:s,children:[y.jsx("td",{children:y.jsx(oe,{icon:"groups"})}),y.jsx("td",{children:y.jsx(_t,{elements:i,isEditable:t,isDraggable:e,displayMode:"CodeOnly",onChange:n})})]})},Vs=({columns:r,columnWidths:e})=>y.jsx("tfoot",{children:y.jsx("tr",{children:r.map(t=>t.visible&&y.jsx("td",{className:Xe["smp-headerCell"],style:{width:e[t.name],minWidth:e[t.name],maxWidth:e[t.name]}},t.name))})}),Ys=({columns:r,rows:e,containerRef:t,sizingMode:n})=>{const[s,a]=j.useState({});return j.useEffect(()=>{var i,o;if(!(!r||r.length===0)){if(n==="fixed"){const l=Object.fromEntries(r.map(f=>[f.name,120]));a(l)}else if(n==="fit-grid"){const c=((i=t.current)==null?void 0:i.offsetWidth)||800,l=r.filter(d=>d.visible!==!1),f=c/l.length,u=Object.fromEntries(l.map(d=>[d.name,f]));a(u)}else if(n==="fit-content"){const c={};for(const l of r){if(!l.visible)continue;const f=((o=l.title)==null?void 0:o.length)||0,u=Math.max(...e.map(d=>{var m,p,v,b;return`${((p=(m=d.cells)==null?void 0:m[l.name])==null?void 0:p.decode)||((b=(v=d.cells)==null?void 0:v[l.name])==null?void 0:b.value)||""}`.length}),f);c[l.name]=u*8+24}a(c)}}},[r,e,t,n]),[s,a]},Us=({data:r,lineHeight:e=28,TableHeight:t=400,groups:n,columnSizingMode:s="fixed",showGroupBar:a=!0})=>{var E;const[i,o]=j.useState(r??{columns:[],rows:[]}),[c,l]=j.useState(n||[]),[f,u]=j.useState(new Set),d=j.useRef(null),[m,p]=Ys({columns:(i==null?void 0:i.columns)??[],rows:(i==null?void 0:i.rows)??[],containerRef:d,sizingMode:s});j.useEffect(()=>{if(c!=null&&c.length&&r.rows){const{flatRows:O}=Ms(r.rows,c,e,f);o({...r,rows:O})}else o(r)},[r,c,f,e]);const v=O=>{l(Ns(O,c))},b=O=>{O.preventDefault();const $=O.dataTransfer.getData("text/plain");if(!$||c.some(P=>P.column===$))return;const B=[...c,{column:$,visible:!0}];l(B)},w=O=>{O.preventDefault()},{virtualItems:S,containerProps:T,innerProps:R}=jr({items:(i==null?void 0:i.rows)??[],itemHeight:e,containerHeight:t,overscan:5}),g=(O,$)=>{const A=O.clientX,B=m[$],P=F=>{const H=F.clientX-A,G=Math.max(50,B+H);p(z=>({...z,[$]:G}))},D=()=>{window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",D)};window.addEventListener("mousemove",P),window.addEventListener("mouseup",D)},k={smpTable:`${Xe["smp-table"]}`,headerCell:`${Xe["smp-headerCell"]}`,resizer:`${Xe["smp-resizer"]}`};return i&&y.jsx("div",{className:k.smpTable,...T,ref:d,children:y.jsxs("table",{children:[y.jsxs("thead",{children:[(n||a)&&y.jsx(Fs,{groups:c,onChange:v,onDrop:b,onDragOver:w}),y.jsx("tr",{children:i.columns&&((E=i.columns)==null?void 0:E.map(O=>O.visible&&y.jsxs("th",{className:k.headerCell,draggable:!0,onDragStart:$=>{$.dataTransfer.setData("text/plain",O.name)},style:{width:m[O.name],minWidth:m[O.name],maxWidth:m[O.name]},children:[y.jsx(ke,{variant:"title",bindValue:O.title}),y.jsx("div",{className:k.resizer,onMouseDown:$=>g($,O.name),role:"region"})]},O.name)))})]}),y.jsx("tbody",{...R,children:S.map(({item:O,index:$,offsetTop:A})=>{const B=O.rowId||O.value||`${O.isGroup?"group":"row"}-${$}`;return O.isGroup?y.jsx(Ls,{label:O.value||"",rowHeight:e,offsetTop:A,level:O.level,onClick:()=>{const P=O.rowId;P&&u(D=>Is(D,P))},isExpanded:O.isExpanded},`group-${B}`):y.jsx(Ir,{row:O,columnWidths:m,rowHeight:e,offsetTop:A,isGroup:!1},`row-${B}`)})}),y.jsx(Vs,{columns:i.columns,columnWidths:m})]})})},Ws=({data:r,Type:e,ShowSubmit:t=!1,SubmitPosition:n="Right",DefaultValue:s,Label:a,LabelPosition:i="Left",onBlur:o,onClick:c,onOptionsRequest:l})=>{const[f,u]=j.useState();j.useEffect(()=>{u(()=>{if(!r)return;const v={...r};return e&&(v.shape=e),v.shape==null&&(v.shape=te.TEXT_FIELD),s&&(v.obj=qr(s)),v})},[r,s,e]);const m={container:`smp-field-container ${ce(t)?`smp-field-position-${n}`:""}`},p=()=>{ce(t)||o==null||o(f)};if(f)return y.jsxs("div",{className:m.container,children:[y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:y.jsx(we,{...f,id:"FLD",onChange:u,onOptionsRequest:l,fun:r==null?void 0:r.fun,onBlur:p,label:a,labelPosition:i})}),ce(t)&&y.jsx(Ce,{optionalDisplayValue:"Confirm",onClick:()=>c==null?void 0:c(f),bindValue:"Confirm"})]})},Bs=r=>(r==null?void 0:r.type)==="SmeupDataTree",Hs=r=>(r==null?void 0:r.type)==="SmeupDataTable",Gs=r=>Bs(r)?r.children?r.children.map(e=>({id:e.obj.k,label:e.value??""})):[]:Hs(r)?r.rows.map(e=>{const t=e.cells||e.cells,[n,s]=Object.keys(t);return{id:t[n].obj.k,label:t[s].value||t[s].obj.k}}):[],Ks=({data:r,readOnly:e=!1,hiddenSubmitButton:t=!1,updateOnClick:n=!1,optionsHandler:s,onSubmit:a,onCheck:i,onCheckObj:o})=>{var w,S;const[c,l]=j.useState({}),{translate:f}=Pe();j.useEffect(()=>{l(p(r))},[r]);const u=(T,R)=>{l(g=>({...g,[T]:{...g[T],obj:{...g[T].obj,k:R.obj.k},decode:R.decode,data:{...g[T].data,error:void 0}}})),n&&(R.shape==te.CHECKBOX||R.shape==te.SWITCH)&&d()},d=T=>{const R=v();a({value:R,cell:T})},m=async T=>{var R,g;if((R=c[T].inputSettings)!=null&&R.checkObject&&o&&((await o({obj:c[T].obj,fun:c[T].fun,cellId:T})).valid||l(E=>({...E,[T]:{...E[T],data:{...E[T].data,error:f(ft.CHECK_OBJECT_WRONG_VALIDATION)}}}))),(g=c[T].inputSettings)!=null&&g.checkValueOnExit){const k=v();i==null||i({value:k,cell:T})}},p=T=>{var g,k,E;if(!((g=T.rows)!=null&&g.length)||!((k=T.columns)!=null&&k.length))return{};const R=(E=T.rows)==null?void 0:E[0];return T.columns.filter(O=>O.visible??!0).reduce((O,$)=>{const A={...R.cells[$.name],id:$.name,label:$.title};return A.fun&&(A.onOptionsRequest=async(B,P)=>Gs(await s(B,P,r,$.name))),A.isEditable==null&&(A.isEditable=!0),e&&(A.isEditable=!1),A.isEditable&&A.shape==null&&(A.shape=te.TEXT_FIELD),{...O,[$.name]:A}},{})},v=()=>({before:r,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(r.columns)),rows:[{cells:JSON.parse(JSON.stringify(c))}]}}),b=((S=(w=r.setup)==null?void 0:w.commands)==null?void 0:S.map((T,R)=>j.createElement(we,{...T,id:`command-${R}`,key:`command-${R}`,shape:te.BUTTON,onClick:()=>d(T.obj.k)})))||[];return t||b.unshift(y.jsx(we,{onClick:()=>d(),decode:"Confirm",shape:te.BUTTON,id:"",obj:{t:"",p:"",k:""}},"submit-command")),c&&y.jsxs("div",{"data-component":"input-panel",style:{display:"flex",flexDirection:"column",gap:"2rem",padding:"2rem"},children:[y.jsx(Qe,{layout:r.rows[0].layout,children:Object.values(c).map(T=>y.jsx(we,{...T,onChange:R=>u(T.id,R),onBlur:()=>m(T.id)}))}),b.length>0&&y.jsx(Qe,{layout:{sections:[{id:"1",horizontal:!0,justify:"start",content:b.map(T=>({id:T.props.id}))}]},children:b})]})};exports.AppBar=Es;exports.Autocomplete=$t;exports.Button=Ce;exports.ButtonList=$r;exports.Checkbox=_r;exports.Combobox=Cr;exports.DashList=Rs;exports.DataTableComponent=Us;exports.DatePicker=Ar;exports.Drawer=Os;exports.Field=Ws;exports.Icon=oe;exports.InputPanel=Ks;exports.Password=Lr;exports.Textfield=be;exports.configurePaths=Sn;
48
+ ${b?"smp-datepickercalendar-td-focused":""}
49
+ ${_?"smp-datepickercalendar-td-disabled":""}`},Z=()=>`${x[c]} ${d.toString()}`;return y.jsxs("div",{className:q.wrapper,ref:s,role:"dialog",tabIndex:-1,"aria-modal":"true","data-component":"datepicker-calendar",children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px"},children:[y.jsx(Ce,{onClick:$,ariaLabel:a(Ot.PREVIOUS_MONTH),optionalDisplayValue:"<",appearance:"ghost",variant:"base",bindValue:"<"}),y.jsx("div",{"aria-label":Z(),className:q.label,children:Z()}),y.jsx(Ce,{onClick:L,ariaLabel:a(Ot.NEXT_MONTH),bindValue:">",optionalDisplayValue:">",appearance:"ghost",variant:"base"})]}),y.jsxs("table",{ref:T,role:"grid","aria-label":`${a(ft.CALENDAR_FOR)} ${x[c]} ${d}`,className:q.table,children:[y.jsx("thead",{children:y.jsx("tr",{children:D.map(V=>y.jsx("th",{scope:"col",abbr:V.full,className:q.th,children:V.value},V.value))})}),y.jsx("tbody",{children:H.map((V,h)=>y.jsx("tr",{children:V.map((b,_)=>{const A=h*7+_;if(b===null)return y.jsx("td",{className:q.td(!1,!1,!1,!0)},`empty-${_}`);const C=b.getDate()===o.getDate()&&b.getMonth()===o.getMonth()&&b.getFullYear()===o.getFullYear(),N=l&&b.getDate()===l.getDate()&&b.getMonth()===l.getMonth()&&b.getFullYear()===l.getFullYear(),U=p===b.getDate(),W=E(b);return y.jsx("td",{role:"gridcell","aria-selected":N,tabIndex:U?0:-1,onClick:()=>g(b),onKeyDown:Y=>M(Y,A),"aria-label":`${b.getDate()} ${x[b.getMonth()]} ${b.getFullYear()}`,"data-selected":N,"aria-disabled":W,ref:Y=>{w.current[A]=Y},className:q.td(C,N,U,W),children:b.getDate()},`day-${_}`)})},`week-${h}`))})]})]})}const Ar=({bindValue:r,placeholder:e,onChange:t,disabledDateRanges:n,isEditable:s=!0,...a})=>{const i=j.useRef(null),[o,l]=j.useState(!1),[u,c]=j.useState(r||""),[f,d]=j.useState(""),{anchorRef:m,targetRef:p}=lt({position:"bottom",enabled:o}),v=j.useCallback(()=>{var O;l(!1),(O=i==null?void 0:i.current)==null||O.focus()},[]);$e(p,()=>{v()}),$e(m,()=>{if(typeof m=="object"&&m!==null&&"current"in m){const O=m.current.querySelector("input");O&&O===document.activeElement&&E()}v()}),Ct(o,p);const{format:T,getCurrentLanguage:w}=Pe(),x=j.useCallback(O=>{const k=O.length>5&&qr(O,w())||O,M=T(k,void 0,void 0,{type:"date"}),P=typeof k!="string",R=P&&k.toISOString().substring(0,10)||"";return{isValid:P,formattedDate:M,isoDate:R,normalizedDate:k}},[w,T]);j.useEffect(()=>{const{formattedDate:O,isoDate:k,isValid:M}=x(r);c(M&&k||r),d(M&&O||r)},[r,T,x]);const D=()=>l(O=>!O),E=()=>{$(f)},g=O=>{$(O),v()},$=O=>{const{isoDate:k,isValid:M}=x(O);t&&t(M&&k||O)},L=O=>{d(O)},S=O=>{O.key==="Enter"&&(O.preventDefault(),$(f))};return y.jsxs("div",{"data-component":"date-picker",children:[y.jsx(xe,{...a,bindValue:f,placeholder:e,onBlur:E,onChange:L,onKeyDown:S,shapeIcon:"calendar",onShapeIconClick:D,ref:m,inputRef:i,isEditable:s}),o&&y.jsx(ct,{children:y.jsx(us,{disabledDateRanges:n,onDateChange:g,initialValue:jt(u)&&u||"",targetRef:p})})]})},fs=({elements:r,displayMode:e,minimumChars:t,listDisplayMode:n,isEditable:s=!0,placeholder:a,label:i,disabled:o,fun:l,error:u,onOptionsRequest:c,onChange:f,onBlur:d})=>{const m=r.map(T=>T.bindValue),p=(T,w)=>{const x=[...r];if(T=="")x.pop();else{const D=x.findIndex(E=>E.bindValue===T&&E.optionalDisplayValue===w);D>=0?x.splice(D,1):x.push({bindValue:T,optionalDisplayValue:w})}f==null||f(x)},v={container:"smp-multipleAutocomplete-container"};return y.jsxs("div",{className:v.container,"data-component":"multiple-autocomplete",children:[i&&y.jsx(Te,{label:i,disabled:o}),y.jsx($t,{elements:r,displayMode:e,isEditable:s,onChange:T=>{f==null||f(T)}}),y.jsx(_t,{bindValue:"",fun:l,isEditable:s,onChange:p,_changeOnEnter:!0,listDisplayMode:n,minimumChars:t,placeholder:a,onOptionsRequest:c,_multiActiveIndex:m,error:u,onBlur:d})]})},Lr=({...r})=>{const[e,t]=j.useState(!1),n=e?"visibility-off":"visibility";return y.jsx(xe,{...r,inputType:e?"text":"password",shapeIcon:n,onShapeIconClick:()=>t(!e),ariaLabel:"password","data-component":"password"})},ds=({...r})=>{const[e,t]=j.useState(r.bindValue),{translate:n}=Pe(),s=a=>{var i;a.key==="Enter"&&(a.preventDefault(),(i=r.onEnter)==null||i.call(r,e))};return y.jsx(xe,{...r,placeholder:r.placeholder?r.placeholder:n(ft.SPOTLIGHT_DEFAULT_PLACEHOLDER),icon:"magnify",inputType:"search",bindValue:e,onChange:t,onKeyDown:s,ariaLabel:"search bar",_dataComponent:"search-bar"})},ps=({bindValue:r,optionalDisplayValue:e,label:t})=>{const n={wrapper:"smp-text-wrapper"};return t?y.jsxs("div",{className:n.wrapper,children:[y.jsx(Te,{label:t}),y.jsx(ke,{variant:"body",bindValue:e||r})]}):y.jsx(ke,{variant:"body",bindValue:e||r})};class Ee{constructor(e,t){de(this,"class");de(this,"value");this.class=e,this.value=t}static fromDataObj(e){return new Ee(e,e.k==""?[]:e.k.split(";"))}static fromString(e){return new Ee({t:"",p:""},e.split(";"))}getValue(){return this.value}getLegacyValue(){return this.value.join(";")}}const De=(r,e,t)=>({obj:{t:r.obj.t,p:r.obj.p,k:e},decode:t??r.decode,shape:r.shape,fun:r.fun}),vr=r=>{const e=Ee.fromDataObj(r.obj),t=r.decode?Ee.fromString(r.decode).getValue():[];return e.getValue().map((n,s)=>({bindValue:n,optionalDisplayValue:t.length>=s?t[s]:""}))},hs=(r,e)=>{const t=new Ee(r.obj,e.map(s=>s.bindValue)).getLegacyValue(),n=new Ee(r.obj,e.map(s=>s.optionalDisplayValue?s.optionalDisplayValue:"")).getLegacyValue();return De(r,t,n)},ms=({min:r,max:e,step:t=1,inputMode:n="decimal",dSep:s,bindValue:a,onChange:i,onEnter:o,...l})=>{const{getCurrentLanguage:u}=Pe(),c=j.useRef(null),f=u(),{groupingChar:d,decimalChar:m}=j.useMemo(()=>ts(f,s),[f,s]),p=j.useCallback((P,R)=>new Intl.NumberFormat(f,{minimumFractionDigits:R,maximumFractionDigits:R,useGrouping:!0}).format(P),[f]),v=j.useCallback(ss,[d,m]),T=j.useCallback(es,[r,e]),w=a!=null&&a.toString().includes(".")?a.toString().split(".")[1].length:0,[x,D]=j.useState(w),[E,g]=j.useState(a!=null?p(a,x):""),$=j.useRef(a??null);j.useEffect(()=>{if(a==null){g(""),$.current=null;return}const P=a.toString().includes(".")?a.toString().split(".")[1].length:0,R=P===0?x:P;R!==x&&D(R),g(p(a,R)),$.current=a},[a,p]);const L=j.useCallback((P,R=!1)=>{if(P.trim()===""){g(""),$.current=null,i==null||i(void 0,""),R&&(o==null||o(void 0));return}const F=v(P,d,m);if(isNaN(F))if($.current!=null){const H=p($.current,x);g(H)}else g("");else{const H=T(F,r,e),z=ns(P,d,m);D(z);const q=p(H,z);g(q),$.current=H,i==null||i(H,q),R&&(o==null||o(H))}},[v,d,m,T,r,e,p,i,o,x]),S=P=>g(P),O=()=>L(E),k=P=>{if(P.key==="Enter"){P.preventDefault(),L(E,!0);return}if(P.key==="ArrowUp"||P.key==="ArrowDown"){P.preventDefault();const R=P.key==="ArrowUp"?1:-1,F=$.current??0,H=T(F+R*t,r,e);L(p(H,x))}},M=P=>{if(!P.currentTarget.contains(document.activeElement))return;P.preventDefault();const R=P.deltaY<0?1:-1,F=$.current??0,H=T(F+R*t,r,e);L(p(H,x))};return $e(c,O),y.jsx("div",{ref:c,"data-component":"input-number",onWheel:M,children:y.jsx(xe,{...l,"aria-valuemin":r,"aria-valuemax":e,"aria-valuenow":$.current??void 0,bindValue:E,inputType:"text",inputMode:n,min:r,max:e,step:t,onChange:S,onBlur:O,onKeyDown:k})})};class it{constructor(e,t,n="."){de(this,"class");de(this,"value");de(this,"decimalSeparator");this.class=e,this.value=t,this.decimalSeparator=n}static fromDataObj(e,t){const n=t==="."?",":".",s=e.k.replace(new RegExp(`\\${n}`,"g"),""),a=parseFloat(s.replace(t,"."));return new it(e,a,t)}getLegacyValue(){return this.value.toString().replace(".",this.decimalSeparator)}getValue(){return this.value}}const gs=({disabled:r,bindValue:e,onChange:t,placeholder:n,state:s,appearance:a,isEditable:i,label:o,ariaLabel:l,helperText:u,error:c,onBlur:f,onKeyDown:d})=>{const m=j.useId(),p=`${m}-helper`,v=c?"danger":s,T=u||!!c,w=D=>{t==null||t(D.target.value)},x={wrapper:"smp-textarea-wrapper",container:`smp-textarea ${r?"smp-textarea-disabled":""} ${n?"smp-textarea-placeholder":""} ${v?`smp-textarea-${v}`:""} ${a?`smp-textarea-${a}`:""} ${i?"":"smp-textarea-readOnly"}`};return y.jsxs("div",{className:x.wrapper,"data-component":"textarea",children:[o&&y.jsx(Te,{htmlFor:m,label:o,disabled:r}),y.jsx("textarea",{id:m,value:e,placeholder:n,onChange:w,onBlur:f,className:x.container,disabled:r,readOnly:!i,onKeyDown:d,"aria-label":o?void 0:l,"aria-labelledby":o?m:void 0,"aria-describedby":T?p:void 0}),T&&y.jsx(wr,{id:p,helperText:c,disabled:r,state:v})]})},Je={"smp-radio":"_smp-radio_1vo2u_1","smp-radio-horizontal":"_smp-radio-horizontal_1vo2u_10","smp-radio-element":"_smp-radio-element_1vo2u_14","smp-radio-disabled":"_smp-radio-disabled_1vo2u_20"},ys=({disabled:r=!1,displayMode:e="DescOnly",horizontal:t=!1,options:n,onOptionsRequest:s,fun:a,label:i,...o})=>{const[l,u]=j.useState(n);j.useEffect(()=>{!l&&s&&a&&s(a,void 0).then(p=>u(p)).catch(p=>{console.error("Error during loading options (radio)",p)})},[l,s,a]);const c={container:`${Je["smp-radio"]} ${t?Je["smp-radio-horizontal"]:""}`,option:`${Je["smp-radio-element"]} ${r?Je["smp-radio-disabled"]:""}`},f=()=>{var p;r||(p=o.onBlur)==null||p.call(o)},d=p=>{var v;r||(v=o.onChange)==null||v.call(o,p.id,p.label)},m=j.useId();return y.jsxs("div",{"smp-id":"radio-container",className:c.container,children:[i&&y.jsx(Te,{label:i,disabled:r,htmlFor:""}),l==null?void 0:l.map((p,v)=>y.jsxs("label",{className:c.option,children:[y.jsx("input",{type:"radio",name:m,value:p.id,disabled:r,checked:p.id===o.bindValue,onChange:()=>d(p),onBlur:f}),y.jsx(ke,{variant:"body",bindValue:Me(p.id,p.label,e)})]},v))]})},vs=({value:r,onChange:e,targetRef:t,isOpen:n})=>{const s=j.useRef(null);j.useEffect(()=>{n&&(s!=null&&s.current)&&s.current.focus()},[n,s]);const[a,i,o]=r,l=u=>Array.from({length:u},(c,f)=>y.jsx("option",{value:f,children:f.toString().padStart(2,"0")},f));return y.jsxs("div",{className:"smp-timepicker-widget",ref:t,children:[y.jsx("select",{value:a,ref:s,onChange:u=>e(+u.target.value,i,o),id:"time-picker-hours",children:l(24)}),":",y.jsx("select",{value:i,onChange:u=>e(a,+u.target.value,o),id:"time-picker-minutes",children:l(60)}),":",y.jsx("select",{value:o||0,onChange:u=>e(a,i,+u.target.value),id:"time-picker-seconds",children:l(60)})]})},br=r=>{const e=r.match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!e)return!1;const[,t,n,s]=e,a=parseInt(t,10),i=parseInt(n,10),o=s?parseInt(s,10):0;return a>=0&&a<=23&&i>=0&&i<=59&&(s===void 0||o>=0&&o<=59)},bs=r=>{const e=r.split(":").map(t=>parseInt(t,10));return[e[0]||0,e[1]||0,e[2]||0]},xs=(r,e,t)=>{const n=r!=null&&!isNaN(r)?r.toString().padStart(2,"0"):"",s=e!=null&&!isNaN(e)?e.toString().padStart(2,"0"):"",a=t!=null&&!isNaN(t)?t.toString().padStart(2,"0"):"";return n&&s?`${n}:${s}:${a}`:s?`${s}:${a}`:a},Ss=({bindValue:r,placeholder:e="HH:MM:SS",onChange:t,isEditable:n=!0,...s})=>{const a=j.useRef(null),[i,o]=j.useState(!1),[l,u]=j.useState(r||""),[c,f]=j.useState(""),{anchorRef:d,targetRef:m}=lt({position:"bottom",enabled:i}),p=j.useCallback(()=>{var g;o(!1),(g=a==null?void 0:a.current)==null||g.focus()},[]);$e(m,()=>o(!1)),Ct(i,m),j.useEffect(()=>{const g=r||"",$=br(g)?g:r||"";u(g),f($)},[r]),j.useEffect(()=>{const g=$=>{$.key==="Escape"&&o(!1)};return i&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[i]);const v=()=>{n&&o(g=>!g)},T=g=>{f(g)},w=(g,$,L)=>{const S=xs(g,$,L);u(S),f(S),t==null||t(S),p()},x=()=>{E(c)},D=g=>{g.key==="Enter"&&(g.preventDefault(),E(c))},E=g=>{if(g.trim()===""){u(""),f(""),t==null||t("");return}br(g)?(u(g),f(g),t==null||t(g)):f(g)};return y.jsxs("div",{"data-component":"time-picker",children:[y.jsx(Dt,{...s,bindValue:c,placeholder:e,onChange:T,onBlur:x,onKeyDown:D,shapeIcon:"clock",onShapeIconClick:v,isEditable:n,ref:d,inputRef:a}),i&&y.jsx(ct,{children:y.jsx(vs,{value:bs(l),onChange:w,targetRef:m,isOpen:i})})]})};function ws(r){return typeof r=="string"&&/^\d{6}$/.test(r)}class ot{constructor(e,t){de(this,"class");de(this,"time");this.class=e,this.time=t}static fromDataObj(e){const t=xr.get(`${e.t}${e.p}`);if(t)return new ot(e,t.legacyToIso(e.k));throw new Error(`time creation from ${e.t}${e.p} not implemented yet`)}getLegacyValue(){const e=xr.get(`${this.class.t}${this.class.p}`);if(e)return e.isoToLegacy(this.time);throw new Error(`Time object not implemented ${this.class.t}${this.class.p}`)}getValue(){return this.time}}const xr=new Map([["I12",{legacyToIso(r){return ws(r)&&`${r.substring(0,2)}:${r.substring(2,4)}:${r.substring(4,6)}`||r},isoToLegacy(r){return r.replaceAll(":","")||r}}]]),we=({decode:r,shape:e,obj:t,data:n,icon:s,fun:a,placeholderIcon:i,label:o,tooltip:l,options:u,onChange:c,onClick:f,onEnter:d,onBlur:m,onOptionsRequest:p,onContextMenu:v,isEditable:T})=>{const w={obj:t,shape:e,decode:r,icon:s,fun:a},x={onBlur:m,onOptionsRequest:p,fun:a,icon:s,tooltip:l,label:o,isEditable:T,...n},D=(S,O,k)=>zr(t)?De(S,new tt(t,O).getLegacyValue()):Gr(t)?De(S,new ot(t,O).getLegacyValue()):De(S,O,k),E=(S,O)=>De(S,new it(t,O,".").getLegacyValue()),g=S=>De(w,new et(t,S).getLegacyValue()),$=S=>hs(w,S),L=()=>{switch(e){case te.AUTOCOMPLETE:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:(O,k)=>{c==null||c(D(w,O,k))}};return y.jsx(_t,{...S})}case te.BUTTON:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onClick:()=>{f==null||f(D(w,t.k))}};return y.jsx(Ce,{...S})}case te.BUTTON_LIST:{const S={...x,options:u,onClick:(O,k)=>{const M={...w,fun:k};f==null||f(D(M,O))}};return y.jsx(_r,{...S})}case te.CHIP:{const S={...x,elements:vr(w)};return y.jsx($t,{...S})}case te.CHECKBOX:case te.SWITCH:{const S=e===te.SWITCH,O={...x,bindValue:et.fromDataObj(t).getValue(),optionalDisplayValue:r,onChange:k=>{c==null||c(g(k))},...S&&{variant:"switch"}};return y.jsx($r,{...O})}case te.COMBOBOX:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:(O,k)=>{c==null||c(D(w,O,k))}};return y.jsx(Cr,{...S})}case te.DATE:{const S={...x,bindValue:tt.fromDataObj(t).getValue(),onChange:O=>{c==null||c(D(w,O))}};return y.jsx(Ar,{...S})}case te.ICON:case te.IMAGE:{const S={...x,icon:s,placeholderIcon:i,isInteractable:!!x.fun,onClick:()=>{f==null||f(D(w,t.k))}};return y.jsx(oe,{...S})}case te.INPUT_NUMBER:{const S={...x,bindValue:it.fromDataObj(t,".").getValue(),onChange:O=>{c==null||c(E(w,O))}};return y.jsx(ms,{...S})}case te.MEMO:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:O=>{c==null||c(D(w,O))}};return y.jsx(gs,{...S})}case te.MULTI_AUTOCOMPLETE:{const S={...x,elements:vr(w),onChange:O=>{c==null||c($(O))}};return y.jsx(fs,{...S})}case te.PASSWORD:{const S={...x,bindValue:t.k,onChange:O=>{c==null||c(D(w,O))}};return y.jsx(Lr,{...S})}case te.RADIO:{const S={...x,bindValue:t.k,onChange:(O,k)=>{c==null||c(D(w,O,k))}};return y.jsx(ys,{...S})}case te.SPOTLIGHT:{const S={...x,bindValue:t.k,onEnter:O=>{d==null||d(D(w,O))}};return y.jsx(ds,{...S})}case te.TEXT_FIELD:{const S={...x,bindValue:t.k,optionalDisplayValue:r,onChange:O=>{c==null||c(D(w,O))}};return y.jsx(xe,{...S})}case te.TIME:{const S={...x,bindValue:ot.fromDataObj(t).getValue(),onChange:O=>{c==null||c(D(w,O))}};return y.jsx(Ss,{...S})}default:{const S={...x,bindValue:t.k,optionalDisplayValue:r};return y.jsx(ps,{...S})}}};return y.jsx("span",{className:"smp-cell-wrapper",onContextMenu:S=>{v&&l&&(S.preventDefault(),v(w,S.currentTarget))},children:L()})},Es=({data:r,onClick:e,onEnter:t,onContextMenu:n})=>{var o,l;const[s,a]=j.useState(),i=j.useCallback(u=>{var f,d;if(!((f=u.rows)!=null&&f.length)||!((d=u.columns)!=null&&d.length))return{};const c=u.rows[0];return u.columns.filter(m=>m.visible).reduce((m,p)=>{const v=c.cells[p.name],T={...v,id:p.name,onChange:w=>{a(x=>x&&{...x,[p.name]:{...x[p.name],obj:{...x[p.name].obj,k:w.obj.k}}})},onClick:()=>{v.fun&&e&&e({...v})},onEnter:w=>{t&&t(w)},onContextMenu:(w,x)=>{n&&n(w,x)}};return{...m,[p.name]:T}},{})},[e,t,n]);return j.useEffect(()=>{r&&a(i(r))},[r,i]),!((o=r==null?void 0:r.rows)!=null&&o.length)||!((l=r.columns)!=null&&l.length)?null:s&&y.jsx("header",{className:"smp-appbar","aria-label":"App Bar",children:y.jsx(Qe,{layout:r.rows[0].layout,children:Object.values(s).map(u=>y.jsx(we,{...u}))})})},Ts=r=>{var e;return(e=r.children)!=null&&e.length?r.children.map(t=>{var n,s;return{id:((n=t.obj)==null?void 0:n.k)??"",label:t.decode??t.value??((s=t.obj)==null?void 0:s.k)??"",fun:t.fun,icon:t.icon}}):[]},ce=r=>r==null?!1:typeof r=="string"?r.toLocaleLowerCase()=="yes":r,Os=({data:r,logo:e,open:t,minifiedOnClose:n=!0,customHeight:s="100vh",onClick:a,onEnter:i,onClose:o,loadOptions:l})=>{var D,E;const[u,c]=j.useState(),[f,d]=j.useState(t??!0),m=j.useRef(null),p=s.trim()?s:"100vh",v=j.useCallback(g=>{var L,S;if(!((L=g==null?void 0:g.rows)!=null&&L.length)||!((S=g==null?void 0:g.columns)!=null&&S.length))return{};const $=g.rows[0];return g.columns.filter(O=>O.visible??!0).reduce((O,k)=>{const M=$.cells[k.name];if(!M||!f&&ce(n)&&M.shape!==te.BUTTON&&M.shape!==te.BUTTON_LIST)return O;const P={...M,id:k.name,onChange:R=>{c(F=>{const H={...F};return H!=null&&H[k.name]&&(H[k.name].obj.k=R.obj.k),H})},onClick:R=>{R.fun&&a&&a(R)},onEnter:R=>{i&&i(R)}};return l&&M.shape==te.BUTTON_LIST&&(P.onOptionsRequest=(R,F)=>l(R,F).then(H=>Ts(H))),!f&&ce(n)&&(P.data={...P.data,showText:!1,justify:"center"}),{...O,[k.name]:P}},{})},[f,n,a,i,l]),T=j.useCallback(()=>{o==null||o()},[o]),w=()=>{ce(n)?d(g=>!g):(d(!1),o==null||o())};if(j.useEffect(()=>{c(v(r))},[r]),j.useEffect(()=>{if(!m.current)return;if(!ce(n)){c(v(r));return}const g=getComputedStyle(m.current).getPropertyValue("--smp-drawer-slide-transition");let $=Number(g);g.endsWith("ms")?$=parseFloat(g):g.endsWith("s")&&($=parseFloat(g)*1e3),setTimeout(()=>{c(v(r))},$/2)},[f,n]),j.useEffect(()=>{t!==void 0&&!ce(n)&&d(t)},[n,t]),!((D=r==null?void 0:r.rows)!=null&&D.length)||!((E=r.columns)!=null&&E.length))return null;const x={drawer:`smp-drawer ${ce(n)?"smp-drawer-minified":"smp-drawer-fixed"} ${f?"smp-drawer-open":""} ${!ce(n)&&!f?"smp-drawer-no-border":""}`,container:"smp-drawer-container",containerHeader:"smp-drawer-container-header",containerIcon:`${f?"":"smp-drawer-container-icon-close"} smp-drawer-container-icon`,containerLayout:"smp-drawer-container-layout",containerLogo:"smp-drawer-container-logo",backdrop:`smp-drawer-backdrop ${f?"smp-drawer-backdrop-open":""}`};return u&&y.jsxs(y.Fragment,{children:[!ce(n)&&y.jsx("div",{"aria-hidden":"true","aria-label":"drawer-backdrop",className:x.backdrop,onClick:T}),y.jsx("aside",{ref:m,className:x.drawer,style:{height:p},"aria-label":"Drawer","smp-id":"drawer",children:y.jsxs("div",{className:x.container,children:[y.jsxs("div",{className:x.containerHeader,children:[e&&y.jsx("div",{className:x.containerLogo,children:y.jsx(oe,{icon:e,title:"drawer_logo",width:"100%",height:24})}),y.jsx("div",{className:x.containerIcon,children:y.jsx(oe,{icon:ce(n)?"menu_close":"close",title:"drawer_icon",rotated:!f,isInteractable:!0,onClick:w,width:20,height:20})})]}),y.jsx("div",{className:x.containerLayout,children:y.jsx(Qe,{layout:r.rows[0].layout,children:Object.values(u).map(g=>y.jsx(we,{...g}))})})]})})]})},js=({ColumnsNumber:r=1,data:e={},ForceText:t,TextColName:n,TextColor:s="var(--smp-dashList-color-base)",Fillspace:a,FontSize:i,Horizontal:o,ForceIcon:l,IconColName:u,IconColor:c="var(--smp-dashList-color-base)",NumberFormat:f,ForceUM:d,UmColName:m,UmColor:p="var(--smp-dashList-color-base)",ForceValue:v,ValueColName:T,ValueColor:w="var(--smp-dashList-color-base)",SelectLayout:x="1",onClick:D})=>{const E="N/A",g=(e==null?void 0:e.columns)||[],$=(e==null?void 0:e.rows)||[],L=$.length>0,S="--smp-dashList-color",O="smp-layout",k="descr",M="icon",P="um",R="value",F=i||"1em",H="18px",z="--smp-dashList-columns",q="--smp-dashList-fontSize",Z={dash:(B="1")=>{const X=h(B),re=X,ne=b(X,k),fe=b(X,M),ve=b(X,P),me=b(X,R);return{container:re,descr:ne,icon:fe,um:ve,value:me}},dashList:`smp-dash-list ${ce(a)?"smp-dash-list-fill-space":""}
50
+ ${ce(o)?"smp-dash-list-horizontal":""}`},{format:V}=Pe(),h=B=>`${O}-${B}`,b=(B,X)=>`${B}__${X}`,_=B=>`${S}-${B}`,A=B=>{const X=/R(\d{1,3})G(\d{1,3})B(\d{1,3})/;if(X.test(B)){const ne=B.match(X)||[];if((ne==null?void 0:ne.length)>3)return"rgb("+ne[1]+","+ne[2]+","+ne[3]+")"}return B},C=B=>{if(!f)return B;const[X,re]=N(f).map(Oe=>parseInt(Oe||"0")),ne="0,0"+(re?"."+"0".repeat(re):""),fe=V(B,ne,"it");if(!X)return fe;const[ve,me]=fe.split(",");return ve+(me?`,${me}`:"")},N=B=>B.includes(";")?B.split(";"):[B],U=B=>{const X=ne=>{var fe;if(ne)return(fe=B==null?void 0:B.cells[ne])==null?void 0:fe.obj.k},re=ne=>{var fe,ve;if(!(g.length<=ne))return(ve=(fe=B==null?void 0:B.cells[g[ne].name])==null?void 0:fe.obj)==null?void 0:ve.k};return{descr:t||X(n)||re(2)||"",icon:l||X(u)||re(3)||"",um:d||X(m)||re(1)||"",value:v||X(T)||re(0)||""}},W=B=>{D==null||D(B)},Y=(B,X)=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),B.stopPropagation(),W(X))},G=(B=>{const X=Z.dash(B);return{className:X,descr:re=>y.jsx("div",{className:X.descr,children:re},`${B}-${k}`),icon:re=>y.jsx("div",{className:X.icon,children:y.jsx(oe,{color:c,height:H,icon:re,width:H})},`${B}-${M}`),um:re=>y.jsx("div",{className:X.um,children:re},`${B}-${P}`),value:re=>y.jsx("div",{className:X.value,children:re},`${B}-${R}`)}})(x),se=B=>{const{descr:X,icon:re,um:ne,value:fe}=U(B),ve={[_(k)]:A(s),[_(P)]:A(p),[_(R)]:A(w)},me=[],Oe=C(fe);switch(x){case"2":re&&me.push(G.icon(re)),me.push(G.descr(X)),me.push(G.value(ne?Oe+" "+ne:Oe));break;default:case"1":me.push(G.descr(X)),me.push(G.value(ne?Oe+" "+ne:Oe))}return y.jsx("div",{className:G.className.container,role:"button",style:ve,tabIndex:0,onClick:()=>W(B),onKeyDown:Ir=>Y(Ir,B),children:me},B.rowId)},I={[z]:String(r),[q]:F};return y.jsx("div",{className:Z.dashList,style:I,children:L?$.map(B=>se(B)):E})},Xe={"smp-table":"_smp-table_1qmju_1","smp-headerCell":"_smp-headerCell_1qmju_35","smp-resizer":"_smp-resizer_1qmju_44"},Rs="_rowContent_20wit_2",Ds="_clickable_20wit_21",_s="_indent_20wit_26",$s="_toggle_20wit_32",Cs="_cell_20wit_38",ks="_leftSection_20wit_46",Se={rowContent:Rs,clickable:Ds,indent:_s,toggle:$s,cell:Cs,leftSection:ks};function Ze(r){return!!r&&"children"in r}function Ps(r){return!Ze(r)}function As(r){const e=JSON.stringify(r,Object.keys(r).sort());let t=0,n,s;if(e.length===0)return t.toString();for(n=0;n<e.length;n++)s=e.charCodeAt(n),t=(t<<5)-t+s,t|=0;return Math.abs(t).toString()}const Nr=({row:r,columnWidths:e={},level:t=0,rowHeight:n=26,offsetTop:s})=>{var x;const[a,i]=j.useState(!1),o=Ze(r)&&!!((x=r.children)!=null&&x.length),l=r.cells&&Object.keys(r.cells).length>0,u=o,c=t*20,f=()=>{o&&i(!a)},d={content:`${Se.rowContent} ${o?Se.clickable:""}`,toggle:`${Se.toggle}`,indent:`${Se.indent}`,cell:`${Se.cell}`},m=D=>y.jsx(we,{...D}),p=()=>y.jsx("span",{className:d.toggle,children:u&&y.jsx(oe,{icon:a?"arrow_drop_right":"arrow_drop_down",width:16})}),v=()=>y.jsx("span",{className:d.indent,style:{width:`${c}px`},"aria-hidden":"true"}),T=()=>{const D=Ps(r)?"":r.decode||(l?"":"Untitled"),E=s??n*t;return y.jsxs("tr",{className:d.content,onClick:f,role:o?"button":"row","aria-expanded":o?!a:void 0,style:{height:`${n}px`,lineHeight:`calc(${n}px - 2*2px)`,transform:`translateY(${E}px)`},children:[Ze(r)&&y.jsxs("td",{className:Se.leftSection,style:{height:`${n}px`},children:[v(),p(),y.jsx("span",{className:Se.rowLabel,children:D})]}),r.cells&&Object.keys(r.cells).length>0&&Object.entries(r.cells).map(([g,$])=>y.jsx("td",{className:d.cell,style:{width:e[g],minWidth:e[g],height:`${n}px`},children:m({...$,id:g})},As($)||g))]})},w=()=>{var D;return a||!o?null:y.jsx(y.Fragment,{children:Ze(r)&&((D=r.children)==null?void 0:D.map((E,g)=>y.jsx(Nr,{row:E,level:t+1},`child-${g}`)))})};return y.jsxs(y.Fragment,{children:[T(),w()]})},Ls=({label:r,rowHeight:e=28,offsetTop:t=0,level:n=0,onClick:s,isExpanded:a})=>{const i={tr:"smp-groupRow-tr",td:"smp-groupRow-td"};return y.jsx("tr",{className:i.tr,style:{height:e,top:t,lineHeight:`${e}px`},onClick:s,children:y.jsxs("td",{className:i.td,style:{paddingLeft:10+n*20},children:[y.jsx(oe,{icon:a?"arrow_drop_down":"arrow_drop_right",width:16}),y.jsx(ke,{variant:"title",bindValue:r})]})})};function Ns(r,e){const t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t}function Is(r,e){return r.map(t=>{const n=e.find(s=>s.column===t.bindValue);return{column:t.bindValue,visible:(n==null?void 0:n.visible)??!0}})}function Ms(r,e,t,n){const s=[];let a=0;return i(r,0,[]),{flatRows:s,offset:a};function i(f,d,m){if(d>=e.length){c(f);return}const p=e[d].column,v=o(f,p);for(const[T,w]of v){const x=[...m,T],D=l(x,d),E=n.has(D);s.push(u(T,D,d,E)),a+=t,E&&i(w,d+1,x)}}function o(f,d){var p;const m=new Map;for(const v of f){const T=((p=v.cells[d])==null?void 0:p.decode)??"N/D";m.has(T)||m.set(T,[]),m.get(T).push(v)}return m}function l(f,d){return`group-${f.join("-")}-${d}`}function u(f,d,m,p){return{isGroup:!0,value:f,cells:{},rowId:d,level:m,isExpanded:p}}function c(f){for(const d of f)s.push(d),a+=t}}const Fs=({groups:r=[],isDraggable:e=!0,isEditable:t=!0,onChange:n,onDrop:s,onDragOver:a})=>{const i=r.map(o=>({bindValue:o.column}));return y.jsxs("tr",{className:"smp-groupBar-container",onDragOver:a,onDrop:s,children:[y.jsx("td",{children:y.jsx(oe,{icon:"groups"})}),y.jsx("td",{children:y.jsx($t,{elements:i,isEditable:t,isDraggable:e,displayMode:"CodeOnly",onChange:n})})]})},Vs=({columns:r,columnWidths:e})=>y.jsx("tfoot",{children:y.jsx("tr",{children:r.map(t=>t.visible&&y.jsx("td",{className:Xe["smp-headerCell"],style:{width:e[t.name],minWidth:e[t.name],maxWidth:e[t.name]}},t.name))})}),Ys=({columns:r,rows:e,containerRef:t,sizingMode:n})=>{const[s,a]=j.useState({});return j.useEffect(()=>{var i,o;if(!(!r||r.length===0)){if(n==="fixed"){const u=Object.fromEntries(r.map(c=>[c.name,120]));a(u)}else if(n==="fit-grid"){const l=((i=t.current)==null?void 0:i.offsetWidth)||800,u=r.filter(d=>d.visible!==!1),c=l/u.length,f=Object.fromEntries(u.map(d=>[d.name,c]));a(f)}else if(n==="fit-content"){const l={};for(const u of r){if(!u.visible)continue;const c=((o=u.title)==null?void 0:o.length)||0,f=Math.max(...e.map(d=>{var m,p,v,T;return`${((p=(m=d.cells)==null?void 0:m[u.name])==null?void 0:p.decode)||((T=(v=d.cells)==null?void 0:v[u.name])==null?void 0:T.value)||""}`.length}),c);l[u.name]=f*8+24}a(l)}}},[r,e,t,n]),[s,a]},Us=({data:r,lineHeight:e=28,TableHeight:t=400,groups:n,columnSizingMode:s="fixed",showGroupBar:a=!0})=>{var L;const[i,o]=j.useState(r??{columns:[],rows:[]}),[l,u]=j.useState(n||[]),[c,f]=j.useState(new Set),d=j.useRef(null),[m,p]=Ys({columns:(i==null?void 0:i.columns)??[],rows:(i==null?void 0:i.rows)??[],containerRef:d,sizingMode:s});j.useEffect(()=>{if(l!=null&&l.length&&r.rows){const{flatRows:S}=Ms(r.rows,l,e,c);o({...r,rows:S})}else o(r)},[r,l,c,e]);const v=S=>{u(Is(S,l))},T=S=>{S.preventDefault();const O=S.dataTransfer.getData("text/plain");if(!O||l.some(P=>P.column===O))return;const M=[...l,{column:O,visible:!0}];u(M)},w=S=>{S.preventDefault()},{virtualItems:x,containerProps:D,innerProps:E}=Rr({items:(i==null?void 0:i.rows)??[],itemHeight:e,containerHeight:t,overscan:5}),g=(S,O)=>{const k=S.clientX,M=m[O],P=F=>{const H=F.clientX-k,z=Math.max(50,M+H);p(q=>({...q,[O]:z}))},R=()=>{window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",R)};window.addEventListener("mousemove",P),window.addEventListener("mouseup",R)},$={smpTable:`${Xe["smp-table"]}`,headerCell:`${Xe["smp-headerCell"]}`,resizer:`${Xe["smp-resizer"]}`};return i&&y.jsx("div",{className:$.smpTable,...D,ref:d,children:y.jsxs("table",{children:[y.jsxs("thead",{children:[(n||a)&&y.jsx(Fs,{groups:l,onChange:v,onDrop:T,onDragOver:w}),y.jsx("tr",{children:i.columns&&((L=i.columns)==null?void 0:L.map(S=>S.visible&&y.jsxs("th",{className:$.headerCell,draggable:!0,onDragStart:O=>{O.dataTransfer.setData("text/plain",S.name)},style:{width:m[S.name],minWidth:m[S.name],maxWidth:m[S.name]},children:[y.jsx(ke,{variant:"title",bindValue:S.title}),y.jsx("div",{className:$.resizer,onMouseDown:O=>g(O,S.name),role:"region"})]},S.name)))})]}),y.jsx("tbody",{...E,children:x.map(({item:S,index:O,offsetTop:k})=>{const M=S.rowId||S.value||`${S.isGroup?"group":"row"}-${O}`;return S.isGroup?y.jsx(Ls,{label:S.value||"",rowHeight:e,offsetTop:k,level:S.level,onClick:()=>{const P=S.rowId;P&&f(R=>Ns(R,P))},isExpanded:S.isExpanded},`group-${M}`):y.jsx(Nr,{row:S,columnWidths:m,rowHeight:e,offsetTop:k,isGroup:!1},`row-${M}`)})}),y.jsx(Vs,{columns:i.columns,columnWidths:m})]})})},Ws=({data:r,Type:e,ShowSubmit:t=!1,SubmitPosition:n="Right",DefaultValue:s,Label:a,LabelPosition:i="Left",onBlur:o,onClick:l,onOptionsRequest:u})=>{const[c,f]=j.useState();j.useEffect(()=>{f(()=>{if(!r)return;const v={...r};return e&&(v.shape=e),v.shape==null&&(v.shape=te.TEXT_FIELD),s&&(v.obj=Kr(s)),v})},[r,s,e]);const m={container:`smp-field-container ${ce(t)?`smp-field-position-${n}`:""}`},p=()=>{ce(t)||o==null||o(c)};if(c)return y.jsxs("div",{className:m.container,children:[y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px",font:"var(--smp-fontLabel-base)"},children:y.jsx(we,{...c,id:"FLD",onChange:f,onOptionsRequest:u,fun:r==null?void 0:r.fun,onBlur:p,label:a,labelPosition:i})}),ce(t)&&y.jsx(Ce,{optionalDisplayValue:"Confirm",onClick:()=>l==null?void 0:l(c),bindValue:"Confirm"})]})},Bs=r=>(r==null?void 0:r.type)==="SmeupDataTree",Hs=r=>(r==null?void 0:r.type)==="SmeupDataTable",zs=r=>Bs(r)?r.children?r.children.map(e=>({id:e.obj.k,label:e.value??""})):[]:Hs(r)?r.rows.map(e=>{const t=e.cells||e.cells,[n,s]=Object.keys(t);return{id:t[n].obj.k,label:t[s].value||t[s].obj.k}}):[],Gs=({data:r,readOnly:e=!1,hiddenSubmitButton:t=!1,updateOnClick:n=!1,optionsHandler:s,onSubmit:a,onCheck:i,onCheckObj:o,onContextMenu:l})=>{var x,D;const[u,c]=j.useState({}),{translate:f}=Pe();j.useEffect(()=>{c(v(r))},[r]);const d=(E,g)=>{c($=>({...$,[E]:{...$[E],obj:{...$[E].obj,k:g.obj.k},decode:g.decode,data:{...$[E].data,error:void 0},value:g.obj.k}})),n&&(g.shape==te.CHECKBOX||g.shape==te.SWITCH)&&m()},m=E=>{const g=T();a({value:g,cell:E})},p=async E=>{var g,$;if(u[E].obj.k!=r.rows[0].cells[E].obj.k&&((g=u[E].inputSettings)!=null&&g.checkObject&&o&&((await o({obj:u[E].obj,fun:u[E].fun,cellId:E})).valid||c(S=>({...S,[E]:{...S[E],data:{...S[E].data,error:f(ft.CHECK_OBJECT_WRONG_VALIDATION)}}}))),($=u[E].inputSettings)!=null&&$.checkValueOnExit)){const L=T();i==null||i({value:L,cell:E})}},v=E=>{var $,L,S;if(!(($=E.rows)!=null&&$.length)||!((L=E.columns)!=null&&L.length))return{};const g=(S=E.rows)==null?void 0:S[0];return E.columns.filter(O=>O.visible??!0).reduce((O,k)=>{const M={...g.cells[k.name],id:k.name,label:k.title};return M.fun&&(M.onOptionsRequest=async(P,R)=>zs(await s(P,R,r,k.name))),M.isEditable==null&&(M.isEditable=!0),e&&(M.isEditable=!1),M.isEditable&&M.shape==null&&(M.shape=te.TEXT_FIELD),{...O,[k.name]:M}},{})},T=()=>({before:r,after:{type:"SmeupDataTable",columns:JSON.parse(JSON.stringify(r.columns)),rows:[{cells:JSON.parse(JSON.stringify(u))}]}}),w=((D=(x=r.setup)==null?void 0:x.commands)==null?void 0:D.map((E,g)=>j.createElement(we,{...E,decode:E.value,id:`command-${g}`,key:`command-${g}`,shape:te.BUTTON,onClick:()=>m(E.obj.k)})))||[];return t||w.unshift(y.jsx(we,{onClick:()=>m(),decode:"Confirm",shape:te.BUTTON,id:"",obj:{t:"",p:"",k:""}},"submit-command")),u&&y.jsxs("div",{"data-component":"input-panel",children:[y.jsx("div",{style:{padding:"1em 0"},children:y.jsx(Qe,{layout:r.rows[0].layout,children:Object.values(u).map(E=>y.jsx(we,{...E,onChange:g=>d(E.id,g),onBlur:()=>p(E.id),onContextMenu:l}))})}),w.length>0&&y.jsx(Qe,{layout:{sections:[{id:"1",horizontal:!0,justify:"start",content:w.map(E=>({id:E.props.id}))}]},children:w})]})};exports.AppBar=Es;exports.Autocomplete=_t;exports.Button=Ce;exports.ButtonList=_r;exports.Checkbox=$r;exports.Combobox=Cr;exports.DashList=js;exports.DataTableComponent=Us;exports.DatePicker=Ar;exports.Drawer=Os;exports.Field=Ws;exports.Icon=oe;exports.InputPanel=Gs;exports.Password=Lr;exports.Textfield=xe;exports.configurePaths=Sn;