asma-core-ui 3.1.46 → 3.1.47

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.
@@ -35,4 +35,4 @@ var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,c
35
35
  * This source code is licensed under the MIT license found in the
36
36
  * LICENSE file in the root directory of this source tree.
37
37
  */
38
- "production"===process.env.NODE_ENV?al.exports=function(){if(ol)return sl;ol=1;var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)o.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return sl.Fragment=n,sl.jsx=s,sl.jsxs=s,sl}():al.exports=(il||(il=1,"production"!==process.env.NODE_ENV&&function(){var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator",y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=y.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,o)}(0,e,n)}var b;function x(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case f:var r=e,h=r._payload,m=r._init;try{return w(m(h))}catch{return null}}return null}b=Symbol.for("react.module.reference");var k,C,j,N,_,E,S,O=Object.assign,I=0;function T(){}T.__reactDisabledLog=!0;var M,R=y.ReactCurrentDispatcher;function D(e,t,n){if(void 0===M)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);M=r&&r[1]||""}return"\n"+M+e}var P,z=!1,A="function"==typeof WeakMap?WeakMap:Map;function L(e,t){if(!e||z)return"";var n,r=P.get(e);if(void 0!==r)return r;z=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=R.current,R.current=null,function(){if(0===I){k=console.log,C=console.info,j=console.warn,N=console.error,_=console.group,E=console.groupCollapsed,S=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),l=n.stack.split("\n"),c=s.length-1,u=l.length-1;c>=1&&u>=0&&s[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(s[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||s[c]!==l[u]){var d="\n"+s[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&P.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{z=!1,R.current=o,function(){if(0==--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:k}),info:O({},e,{value:C}),warn:O({},e,{value:j}),error:O({},e,{value:N}),group:O({},e,{value:_}),groupCollapsed:O({},e,{value:E}),groupEnd:O({},e,{value:S})})}I<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",f=p?D(p):"";return"function"==typeof e&&P.set(e,f),f}function $(e,t,n){if(null==e)return"";if("function"==typeof e)return L(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return D(e);switch(e){case u:return D("Suspense");case d:return D("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return function(e,t,n){return L(e,!1)}(e.render);case p:return $(e.type,t,n);case f:var o=e,i=o._payload,a=o._init;try{return $(a(i),t,n)}catch{}}return""}P=new A;var F=Object.prototype.hasOwnProperty,V={},B=y.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,n=$(e.type,e._source,t?t.type:null);B.setExtraStackFrame(n)}else B.setExtraStackFrame(null)}var H=Array.isArray;function U(e){return H(e)}function W(e){return""+e}function K(e){if(function(e){try{return W(e),!1}catch{return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",(t=e,"function"==typeof Symbol&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object")),W(e);var t}var G,Y,X,J=y.ReactCurrentOwner,Z={key:!0,ref:!0,__self:!0,__source:!0};X={};var Q=function(e,n,r,o,i,a,s){var l={$$typeof:t,type:e,key:n,ref:r,props:s,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};var ee,te=y.ReactCurrentOwner,ne=y.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,n=$(e.type,e._source,t?t.type:null);ne.setExtraStackFrame(n)}else ne.setExtraStackFrame(null)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ie(){if(te.current){var e=w(te.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ee=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ie();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==te.current&&(r=" It was passed a child from "+w(e._owner.type)+"."),re(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),re(null)}}}function le(e,t){if("object"==typeof e)if(U(e))for(var n=0;n<e.length;n++){var r=e[n];oe(r)&&se(r,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[g];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)oe(i.value)&&se(i.value,t)}}function ce(e,n,r,m,g,y){var x,k=!("string"!=typeof(x=e)&&"function"!=typeof x&&x!==o&&x!==a&&x!==i&&x!==u&&x!==d&&x!==h&&("object"!=typeof x||null===x||x.$$typeof!==f&&x.$$typeof!==p&&x.$$typeof!==s&&x.$$typeof!==l&&x.$$typeof!==c&&x.$$typeof!==b&&void 0===x.getModuleId));if(!k){var C="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var j,N=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(g);C+=N||ie(),null===e?j="null":U(e)?j="array":void 0!==e&&e.$$typeof===t?(j="<"+(w(e.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,C)}var _=function(e,t,n,r,o){var i,a,s,l,c={},u=null,d=null;for(i in void 0!==n&&(K(n),u=""+n),function(e){if(F.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(K(t.key),u=""+t.key),function(e){if(F.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(d=t.ref,function(e,t){if("string"==typeof e.ref&&J.current&&t&&J.current.stateNode!==t){var n=w(J.current.type);X[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(J.current.type),e.ref),X[n]=!0)}}(t,o)),t)F.call(t,i)&&!Z.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps){var p=e.defaultProps;for(i in p)void 0===c[i]&&(c[i]=p[i])}if(u||d){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;u&&(a=c,s=f,(l=function(){G||(G=!0,v("%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://reactjs.org/link/special-props)",s))}).isReactWarning=!0,Object.defineProperty(a,"key",{get:l,configurable:!0})),d&&function(e,t){var n=function(){Y||(Y=!0,v("%s: `ref` 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://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(c,f)}return Q(e,u,d,o,r,J.current,c)}(e,n,r,g,y);if(null==_)return _;if(k){var E=n.children;if(void 0!==E)if(m)if(U(E)){for(var S=0;S<E.length;S++)le(E[S],e);Object.freeze&&Object.freeze(E)}else v("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 le(E,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){re(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),re(null);break}}null!==e.ref&&(re(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(_):function(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=w(n);!function(e,t,n,r,o){var i=Function.call.bind(F);for(var a in e)if(i(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}s&&!(s instanceof Error)&&(q(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),q(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,q(o),v("Failed %s type: %s",n,s.message),q(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||ee||(ee=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(n)||"Unknown"));"function"==typeof n.getDefaultProps&&!n.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}(_),_}ll.Fragment=o,ll.jsx=function(e,t,n){return ce(e,t,n,!1)},ll.jsxs=function(e,t,n){return ce(e,t,n,!0)}}()),ll);var cl=al.exports;function ul(e){return cl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:cl.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,children:[cl.jsx("path",{strokeDasharray:60,strokeDashoffset:60,strokeOpacity:.3,d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z",children:cl.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"1.3s",values:"60;0"})}),cl.jsxs("path",{strokeDasharray:15,strokeDashoffset:15,d:"M12 3C16.9706 3 21 7.02944 21 12",children:[cl.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.3s",values:"15;0"}),cl.jsx("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})]})]})})}function dl(e){return cl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:cl.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}function pl(e){return cl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:cl.jsx("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})})}function fl(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:ve.jsx("path",{d:"M5.83398 10.8332V9.1665H14.1673V10.8332H5.83398Z",fill:"currentColor"})})}const hl=({dataTest:e,disabled:t,...n})=>ve.jsx(S,{...n,disabled:t,"data-test":e,checkedIcon:ve.jsx("div",{className:(t?"bg-gama-300":"bg-gama-500")+" rounded-full flex items-center justify-center w-5 h-5",children:ve.jsx(dl,{color:"white",height:14,width:14,className:"rounded-full"})}),icon:ve.jsx("div",{className:(t?"bg-delta-50":"bg-delta-10")+" rounded-full outline outline-1 outline-delta-200 flex items-center justify-center w-5 h-5",children:ve.jsx(fl,{color:"var(--colors-delta-600)",height:20,width:20,className:"rounded-full"})}),sx:{"& .MuiButtonBase-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"& .MuiSwitch-track":{backgroundColor:"var(--colors-delta-400) !important",opacity:"1 !important"},"& .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-500) !important"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-200) !important"},"& .PrivateSwitchBase-input.MuiSwitch-input":{height:"100% !important"},"& .MuiSwitch-input:not(:checked) ~ .MuiSwitch-thumb":{backgroundColor:"var(--colors-gray-10) !important",outline:"1px solid var(--colors-delta-200) !important",outlineOffset:"0px !important"},"& .MuiSwitch-switchBase.Mui-disabled + .MuiSwitch-track":{backgroundColor:"var(--colors-delta-200) !important",opacity:"1 !important"},"& .MuiSwitch-switchBase.Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-delta-50) !important",opacity:"1 !important"},"& .MuiSwitch-switchBase.Mui-checked.Mui-disabled + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-100) !important",opacity:"1 !important"},"& .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-300) !important",opacity:"1 !important"}}}),ml=({dataTest:e,...t})=>ve.jsx(O,{...t,"data-test":e,sx:{"&":{color:"var(--colors-delta-500)"},"& input":{height:"100% !important",width:"100% !important"},"&.Mui-checked":{color:"var(--colors-gama-500)"}}}),gl=({dataTest:e,...t})=>ve.jsx(I,{"data-test":e,...t}),yl=({children:e,onClick:t,className:n,dataTest:r,style:o})=>ve.jsx("div",{className:ui("_styled-label_1fp95_1",n),style:o,onClick:t,"data-test":r,children:e}),vl=e=>ve.jsx(T,{...e,sx:{...e.sx,"& label.MuiInputLabel-shrink":{background:"white !important",color:"var(--colors-delta-500) !important"},"& label.MuiInputLabel-shrink.Mui-focused":{background:"white !important",color:"var(--colors-gama-500) !important"},"& label.MuiInputLabel-shrink.Mui-error.Mui-focused":{background:"white !important",color:"var(--colors-red-500) !important"}}}),bl=({sx:e,...t})=>ve.jsx(M,{...t,sx:{color:"var(--colors-delta-800)",margin:0,"& .MuiFormControlLabel-label":{fontSize:"14px",lineHeight:"20px"},"&.Mui-disabled .MuiFormControlLabel-label":{color:"var(--colors-delta-300)"},...e}}),xl=e=>ve.jsx(R,{...e}),wl=e=>ve.jsx(D,{...e}),kl=e=>ve.jsx(P,{...e}),Cl=e=>ve.jsx(z,{...e}),jl=e=>{var t,n;return ve.jsx(A,{...e,classes:{paper:ui("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(t=e.classes)?void 0:t.paper),list:ui("py-1",null==(n=e.classes)?void 0:n.list),...e.classes}})},Nl=e=>{var t;return ve.jsx(j,{...e,classes:{selected:"bg-gama-50",root:ui("px-3 py-2.5 hover:bg-delta-50",null==(t=e.classes)?void 0:t.root),...e.classes}})},_l=e=>ve.jsx(L,{...e}),El="_styled-link_hyb3l_1",Sl="_styled-link-disabled_hyb3l_16",Ol="_styled-link-xs_hyb3l_32",Il="_styled-link-small_hyb3l_37",Tl="_styled-link-large_hyb3l_42",Ml=({href:e,disabled:t,size:n="large",dataTest:r,reflink:o,className:i,content:a,contentNode:s,...l})=>{let c=Tl;switch(n){case"small":c=Il;break;case"xs":c=Ol;break;default:c=Tl}return t?ve.jsxs("span",{className:ui(El,Sl,c,i),children:[a,s]}):ve.jsxs("a",{...l,"data-test":r,ref:o,href:e,className:ui(El,c,i),children:[a,s]})},Rl=e=>ve.jsx($,{...e,sx:{letterSpacing:"normal","&.MuiTab-textColorPrimary.Mui-selected":{color:"var(--colors-gama-500)"},"&.MuiTab-textColorPrimary":{color:"var(--colors-gray-500)"},"&.MuiTab-textColorPrimary.Mui-disabled":{color:"var(--colors-gray-300)"}}}),Dl=e=>ve.jsx(F,{...e,TabIndicatorProps:{style:{background:"var(--colors-gama-500)",color:"var(--colors-gama-500)"}},sx:{"& .MuiTabs-scrollButtons":{border:"1px solid var(--colors-delta-500)",width:40,height:40,borderRadius:"10%",display:"none",justifyContent:"center",alignItems:"center",position:"relative",top:2,"& svg":{fontSize:24,color:"var(--colors-delta-700)"},"&:hover":{backgroundColor:"var(--colors-gama-50)"},"&:first-of-type":{marginRight:"8px"},"&:last-of-type":{marginLeft:"8px"},transition:"opacity 0.3s ease, transform 0.3s ease",opacity:0,transform:"scale(0)"},"& .MuiTabs-scrollButtons.Mui-disabled":{display:"none"},"& .MuiTabs-scrollButtons:not(.Mui-disabled)":{display:"flex",opacity:1,transform:"scale(1)"}}});function Pl(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}let zl;function Al(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");zl.has(t)||(zl.add(t),console.warn(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(zl=new Set);const Ll="ArrowUp",$l="ArrowDown",Fl="ArrowLeft",Vl="ArrowRight",Bl=n.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function ql(e){const{children:t,elementsRef:r,labelsRef:o,onMapChange:i}=e,a=n.useRef(0),s=za(Ul).current,l=za(Hl).current,[c,u]=n.useState(0),d=n.useRef(c),p=is(((e,t)=>{l.set(e,t??null),d.current+=1,u(d.current)})),f=is((e=>{l.delete(e),d.current+=1,u(d.current)})),h=n.useMemo((()=>{const e=new Map;return Array.from(l.keys()).sort(Wl).forEach(((t,n)=>{const r=l.get(t)??{};e.set(t,{...r,index:n})})),e}),[l,c]);ls((()=>{d.current===c&&(r.current.length!==h.size&&(r.current.length=h.size),o&&o.current.length!==h.size&&(o.current.length=h.size)),null==i||i(h)}),[i,h,r,o,c,d]);const m=is((e=>(s.add(e),()=>{s.delete(e)})));ls((()=>{s.forEach((e=>e(h)))}),[s,h]);const g=n.useMemo((()=>({register:p,unregister:f,subscribeMapChange:m,elementsRef:r,labelsRef:o,nextIndexRef:a})),[p,f,m,r,o,a]);return ve.jsx(Bl.Provider,{value:g,children:t})}function Hl(){return new Map}function Ul(){return new Set}function Wl(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}"production"!==process.env.NODE_ENV&&(Bl.displayName="CompositeListContext");const Kl=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Kl.displayName="DirectionContext");const Gl=n.createContext(void 0);function Yl(){const e=n.useContext(Gl);if(void 0===e)throw new Error("Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.");return e}"production"!==process.env.NODE_ENV&&(Gl.displayName="AccordionRootContext");const Xl=new Set([$l,Ll,Vl,Fl,"Home","End"]),Jl={value:()=>null};const Zl=n.forwardRef((function(e,t){const{className:r,disabled:o=!1,hiddenUntilFound:i,keepMounted:a,loop:s=!0,onValueChange:l,openMultiple:c=!0,orientation:u="vertical",value:d,defaultValue:p,...f}=e,h=function(e=!0){const t=n.useContext(Kl);if(void 0===t&&!e)throw new Error("Base UI: DirectionContext is missing.");return(null==t?void 0:t.direction)??"ltr"}();"production"!==process.env.NODE_ENV&&ls((()=>{i&&!1===a&&Al("The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.")}),[i,a]);const m=n.useMemo((()=>{if(void 0===d)return p??[]}),[d,p]),g=is(l),y=n.useRef([]),[v,b]=es({controlled:d,default:m,name:"Accordion",state:"value"}),x=n.useCallback(((e,t)=>{if(c)if(t){const t=v.slice();t.push(e),b(t),g(t)}else{const t=v.filter((t=>t!==e));b(t),g(t)}else{const t=v[0]===e?[]:[e];b(t),g(t)}}),[g,c,b,v]),w="rtl"===h,k="horizontal"===u,C=n.useMemo((()=>({value:v,disabled:o,orientation:u})),[v,o,u]),j=n.useMemo((()=>({accordionItemRefs:y,direction:h,disabled:o,handleValueChange:x,hiddenUntilFound:i??!1,keepMounted:a??!1,orientation:u,state:C,value:v})),[h,o,x,i,a,u,C,v]),N=Za("div",e,{state:C,ref:t,props:[{dir:h,role:"region",onKeyDown(e){if(!Xl.has(e.key))return;!function(e){e.preventDefault(),e.stopPropagation()}(e);const t=function(e){const{current:t}=e,n=[];for(let e=0;e<t.length;e+=1){const r=t[e];if(!Pl(r)){const e=null==r?void 0:r.querySelector('[type="button"]');Pl(e)||n.push(e)}}return n}(y),n=t.length-1;let r=-1;const o=t.indexOf(e.target);function i(){r=s?o+1>n?0:o+1:Math.min(o+1,n)}function a(){r=s&&0===o?n:o-1}switch(e.key){case $l:k||i();break;case Ll:k||a();break;case Vl:k&&(w?a():i());break;case Fl:k&&(w?i():a());break;case"Home":r=0;break;case"End":r=n}r>-1&&t[r].focus()}},f],customStyleHookMapping:Jl});return ve.jsx(Gl.Provider,{value:j,children:ve.jsx(ql,{elementsRef:y,children:N})})}));"production"!==process.env.NODE_ENV&&(Zl.displayName="AccordionRoot");const Ql=n.createContext(void 0);function ec(){const e=n.useContext(Ql);if(void 0===e)throw new Error("Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.");return e}"production"!==process.env.NODE_ENV&&(Ql.displayName="CollapsibleRootContext");let tc=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function nc(e={}){const{label:t,metadata:r,textRef:o,indexGuessBehavior:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=n.useContext(Bl),p=n.useRef(-1),[f,h]=n.useState(i===tc.GuessFromOrder?()=>{if(-1===p.current){const e=d.current;d.current+=1,p.current=e}return p.current}:-1),m=n.useRef(null),g=n.useCallback((e=>{var n;if(m.current=e,-1!==f&&null!==e&&(c.current[f]=e,u)){const r=void 0!==t;u.current[f]=r?t:(null==(n=null==o?void 0:o.current)?void 0:n.textContent)??e.textContent}}),[f,c,u,t,o]);return ls((()=>{const e=m.current;if(e)return a(e,r),()=>{s(e)}}),[a,s,r]),ls((()=>l((e=>{var t;const n=m.current?null==(t=e.get(m.current))?void 0:t.index:null;null!=n&&h(n)}))),[l,h]),n.useMemo((()=>({ref:g,index:f})),[f,g])}const rc=n.createContext(void 0);function oc(){const e=n.useContext(rc);if(void 0===e)throw new Error("Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.");return e}"production"!==process.env.NODE_ENV&&(rc.displayName="AccordionItemContext");let ic=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fs.startingStyle]="startingStyle",e[e.endingStyle=Fs.endingStyle]="endingStyle",e}({}),ac=function(e){return e.panelOpen="data-panel-open",e}({});const sc={[ic.open]:""},lc={[ic.closed]:""},cc={open:e=>e?{[ac.panelOpen]:""}:null},uc={open:e=>e?sc:lc};let dc=function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e}({});const pc={...uc,index:e=>Number.isInteger(e)?{[dc.index]:String(e)}:null,...qs,value:()=>null},fc=n.forwardRef((function(e,t){const{className:r,disabled:o=!1,onOpenChange:i,render:a,value:s,...l}=e,{ref:c,index:u}=nc(),d=Aa(t,c),{disabled:p,handleValueChange:f,state:h,value:m}=Yl(),g=s??u,y=o||p,v=n.useMemo((()=>{if(!m)return!1;for(let e=0;e<m.length;e+=1)if(m[e]===g)return!0;return!1}),[m,g]),b=is((e=>{f(g,e),null==i||i(e)})),x=function(e){const{open:t,defaultOpen:r,onOpenChange:o,disabled:i}=e,a=void 0!==t,[s,l]=es({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=$s(s,!0,!0),[p,f]=n.useState(s),[{height:h,width:m},g]=n.useState({height:void 0,width:void 0}),y=Da(),[v,b]=n.useState(),x=v??y,[w,k]=n.useState(!1),[C,j]=n.useState(!1),N=n.useRef(null),_=n.useRef(null),E=n.useRef(null),S=n.useRef(null),O=As(S,!1),I=is((()=>{const e=!s,t=S.current;"css-animation"===_.current&&null!=t&&t.style.removeProperty("animation-name"),!w&&!C&&(null!=_.current&&"css-animation"!==_.current&&!c&&e&&u(!0),"css-animation"===_.current&&(!p&&e&&f(!0),!c&&e&&u(!0))),l(e),o(e),"none"===_.current&&c&&!e&&u(!1)}));return ls((()=>{a&&"none"===_.current&&!C&&!s&&u(!1)}),[a,C,s,t,u]),n.useMemo((()=>({abortControllerRef:N,animationTypeRef:_,disabled:i,handleTrigger:I,height:h,mounted:c,open:s,panelId:x,panelRef:S,runOnceAnimationsFinish:O,setDimensions:g,setHiddenUntilFound:k,setKeepMounted:j,setMounted:u,setOpen:l,setPanelIdState:b,setVisible:f,transitionDimensionRef:E,transitionStatus:d,visible:p,width:m})),[N,_,i,I,h,c,s,x,S,O,g,k,j,u,l,f,E,d,p,m])}({open:v,onOpenChange:b,disabled:y}),w=n.useMemo((()=>({open:x.open,disabled:x.disabled,hidden:!x.mounted})),[x.open,x.disabled,x.mounted]),k=n.useMemo((()=>({...x,onOpenChange:b,state:w,transitionStatus:x.transitionStatus})),[x,w,b]),C=n.useMemo((()=>({...h,index:u,disabled:y,open:v})),[y,u,v,h]),[j,N]=n.useState(Da()),_=n.useMemo((()=>({open:v,state:C,setTriggerId:N,triggerId:j})),[v,C,N,j]),E=Za("div",e,{state:C,ref:d,props:l,customStyleHookMapping:pc});return ve.jsx(Ql.Provider,{value:k,children:ve.jsx(rc.Provider,{value:_,children:E})})}));"production"!==process.env.NODE_ENV&&(fc.displayName="AccordionItem");const hc=n.forwardRef((function(e,t){const{render:n,className:r,...o}=e,{state:i}=oc();return Za("h3",e,{state:i,ref:t,props:o,customStyleHookMapping:pc})}));"production"!==process.env.NODE_ENV&&(hc.displayName="AccordionHeader");const mc=n.forwardRef((function(e,t){const{disabled:r,className:o,id:i,render:a,nativeButton:s=!0,...l}=e,{panelId:c,open:u,handleTrigger:d,disabled:p}=ec(),f=r??p,{getButtonProps:h,buttonRef:m}=ds({disabled:f,focusableWhenDisabled:!0,native:s}),{state:g,setTriggerId:y,triggerId:v}=oc();ls((()=>(i&&y(i),()=>{y(void 0)})),[i,y]);return Za("button",e,{state:g,ref:[t,m],props:[n.useMemo((()=>({"aria-controls":u?c:void 0,"aria-expanded":u,disabled:f,id:v,onClick:d})),[c,f,v,u,d]),l,h],customStyleHookMapping:cc})}));"production"!==process.env.NODE_ENV&&(mc.displayName="AccordionTrigger");let gc=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});let yc=function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e}({});const vc=n.forwardRef((function(e,t){const{className:r,hiddenUntilFound:o,keepMounted:i,id:a,render:s,...l}=e,{hiddenUntilFound:c,keepMounted:u}=Yl(),{abortControllerRef:d,animationTypeRef:p,height:f,mounted:h,onOpenChange:m,open:g,panelId:y,panelRef:v,runOnceAnimationsFinish:b,setDimensions:x,setHiddenUntilFound:w,setKeepMounted:k,setMounted:C,setOpen:j,setVisible:N,transitionDimensionRef:_,visible:E,width:S,setPanelIdState:O,transitionStatus:I}=ec(),T=o??c,M=i??u;"production"!==process.env.NODE_ENV&&ls((()=>{!1===i&&T&&Al("The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.")}),[T,i]),ls((()=>{if(a)return O(a),()=>{O(void 0)}}),[a,O]),ls((()=>{w(T)}),[w,T]),ls((()=>{k(M)}),[k,M]),Ls({open:g,ref:v,onComplete(){g&&x({width:void 0,height:void 0})}});const{props:R}=function(e){const{abortControllerRef:t,animationTypeRef:r,externalRef:o,height:i,hiddenUntilFound:a,keepMounted:s,id:l,mounted:c,onOpenChange:u,open:d,panelRef:p,runOnceAnimationsFinish:f,setDimensions:h,setMounted:m,setOpen:g,setVisible:y,transitionDimensionRef:v,visible:b,width:x}=e,w=n.useRef(!1),k=n.useRef(null),C=n.useRef(d),j=n.useRef(d),N=n.useMemo((()=>"css-animation"===r.current?!b:!d&&!c),[d,c,b,r]),_=is((e=>{if(!e)return;if(null==r.current||null==v.current){const t=getComputedStyle(e),n="none"!==t.animationName&&""!==t.animationName,o="0s"!==t.transitionDuration&&""!==t.transitionDuration;n&&o?"production"!==process.env.NODE_ENV&&Al("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):"none"===t.animationName&&"0s"!==t.transitionDuration?r.current="css-transition":"none"!==t.animationName&&"0s"===t.transitionDuration?r.current="css-animation":r.current="none","horizontal"===e.getAttribute(gc.orientation)||t.transitionProperty.indexOf("width")>-1?v.current="width":v.current="height"}if("css-transition"!==r.current)return;e.style.setProperty("display","block","important"),(void 0===i||void 0===x)&&(h({height:e.scrollHeight,width:e.scrollWidth}),e.style.removeProperty("display"),j.current&&e.style.setProperty("transition-duration","0s"));let t=-1,n=-1;return t=zs.request((()=>{j.current=!1,n=zs.request((()=>{setTimeout((()=>{e.style.removeProperty("transition-duration")}))}))})),()=>{zs.cancel(t),zs.cancel(n)}})),E=Aa(o,p,_);return ls((()=>{if("css-transition"!==r.current)return;const e=p.current;if(!e)return;let n=-1;if(null!=t.current&&(t.current.abort(),t.current=null),!d){h({height:e.scrollHeight,width:e.scrollWidth}),t.current=new AbortController;const n=t.current.signal;let r=-1;const o=zs.request((()=>{r=zs.request((()=>{f((()=>{h({height:0,width:0}),e.style.removeProperty("content-visibility"),e.style.removeProperty("display"),m(!1),t.current=null}),n)}))}));return()=>{zs.cancel(o),zs.cancel(r)}}return e.style.setProperty("display","block","important"),!j.current&&!s&&e.setAttribute(ic.startingStyle,""),h({height:e.scrollHeight,width:e.scrollWidth}),n=zs.request((()=>{e.style.removeProperty("display")})),()=>{zs.cancel(n)}}),[t,r,a,s,c,d,p,f,h,m,v]),ls((()=>{if("css-animation"!==r.current)return;const e=p.current;e&&(k.current=e.style.animationName||k.current,e.style.setProperty("animation-name","none"),h({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!w.current&&e.style.removeProperty("animation-name"),d?(null!=t.current&&(t.current.abort(),t.current=null),m(!0),y(!0)):(t.current=new AbortController,f((()=>{m(!1),y(!1),t.current=null}),t.current.signal)))}),[t,r,d,p,f,h,m,y,b]),bs((()=>{const e=zs.request((()=>{C.current=!1}));return()=>zs.cancel(e)})),ls((()=>{if(!a)return;const e=p.current;if(!e)return;let t=-1,n=-1;return d&&w.current&&(e.style.transitionDuration="0s",h({height:e.scrollHeight,width:e.scrollWidth}),t=zs.request((()=>{w.current=!1,n=zs.request((()=>{setTimeout((()=>{e.style.removeProperty("transition-duration")}))}))}))),()=>{zs.cancel(t),zs.cancel(n)}}),[a,d,p,h]),ls((()=>{const e=p.current;e&&a&&N&&(e.setAttribute("hidden","until-found"),"css-transition"===r.current&&e.setAttribute(ic.startingStyle,""))}),[a,N,r,p]),n.useEffect((function(){const e=p.current;if(e)return e.addEventListener("beforematch",t),()=>{e.removeEventListener("beforematch",t)};function t(){w.current=!0,g(!0),u(!0)}}),[u,p,g]),n.useMemo((()=>({props:{hidden:N,id:l,ref:E}})),[N,l,E])}({abortControllerRef:d,animationTypeRef:p,externalRef:t,height:f,hiddenUntilFound:T,id:a??y,keepMounted:M,mounted:h,onOpenChange:m,open:g,panelRef:v,runOnceAnimationsFinish:b,setDimensions:x,setMounted:C,setOpen:j,setVisible:N,transitionDimensionRef:_,visible:E,width:S}),{state:D,triggerId:P}=oc(),z=Za("div",e,{state:n.useMemo((()=>({...D,transitionStatus:I})),[D,I]),ref:[t,v],props:[R,{"aria-labelledby":P,role:"region",style:{[yc.accordionPanelHeight]:void 0===f?"auto":`${f}px`,[yc.accordionPanelWidth]:void 0===S?"auto":`${S}px`}},l],customStyleHookMapping:pc});return M||T||!M&&h?z:null}));"production"!==process.env.NODE_ENV&&(vc.displayName="AccordionPanel");const bc={AccordionRoot:"_AccordionRoot_1ukl7_1",Header:"_Header_1ukl7_7",Trigger:"_Trigger_1ukl7_12",TriggerIcon:"_TriggerIcon_1ukl7_29",Panel:"_Panel_1ukl7_40",Content:"_Content_1ukl7_51"},xc=({className:e,children:t,expanded:n,defaultExpanded:r,onChange:o,...i})=>{const a="item",s={...i,type:"single",className:xa(bc.AccordionRoot,e),onValueChange:e=>{null==o||o(e.includes(a))},...void 0!==n?{value:n?[a]:[]}:{defaultValue:r?[a]:[]}};return ve.jsx(Zl,{...s,children:ve.jsx(fc,{value:a,className:bc.Item,children:t})})},wc=({size:e="large",className:t,sx:n,children:r,...o})=>{const i="small"===e,a={"--trigger-height":i?"48px":"72px","--trigger-padding-x":i?"8px":"16px","--trigger-font-size":i?"14px":"18px","--chevron-size":i?"20px":"24px",...n};return ve.jsx(hc,{className:bc.Header,children:ve.jsxs(mc,{...o,className:ui(bc.Trigger,t),style:a,children:[ve.jsx(Bn,{className:bc.TriggerIcon,"data-state-icon":!0}),r]})})},kc=({children:e,...t})=>ve.jsx(vc,{...t,className:bc.Panel,children:ve.jsx("div",{className:bc.Content,children:e})}),Cc=e=>ve.jsx(V,{...e}),jc=({filterIsActive:e,label:t,size:n="large",variant:r="outlined",...o})=>ve.jsx(ve.Fragment,{children:ve.jsxs("div",{className:"w-fit h-fit relative",children:[ve.jsx(la,{...o,type:"button",startIcon:ve.jsx(er,{width:"large"===n?24:20,height:"large"===n?24:20}),variant:r,size:n,children:t||"Filter"}),e&&ve.jsx("div",{className:ui("h-2 w-2 bg-gama-400 rounded-full absolute","large"===n?"top-2 right-2":"top-1 right-1")})]})}),Nc=()=>{const[e,t]=a(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:r=>{e?n():(e=>{t((()=>e.currentTarget))})(r)}}},_c=e=>r.isValidElement(e)||"string"==typeof e||"number"==typeof e||null===e||Array.isArray(e),Ec=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:i="large",variant:a="outlined",popoverProps:s,anchorNode:l,label:c})=>{const{onAnchorClick:u,onClose:d,anchorEl:p}=Nc();return ve.jsxs(ve.Fragment,{children:[ve.jsxs("div",{className:"w-fit h-fit relative",children:[l?r.cloneElement(l({isOpen:!!p,onClose:d}),{onClick:u}):ve.jsx(la,{type:"button",disabled:o,variant:a,startIcon:ve.jsx(er,{width:"large"===i?24:20,height:"large"===i?24:20}),onClick:u,size:i,dataTest:n,children:c||"Filter"}),e&&ve.jsx("div",{className:ui("h-2 w-2 bg-gama-400 rounded-full absolute","large"===i?"top-2 right-2":"top-1 right-1")})]}),ve.jsx(Cc,{...s,open:!!p,anchorEl:p,onClose:d,anchorOrigin:(null==s?void 0:s.anchorOrigin)||{vertical:"bottom",horizontal:"right"},transformOrigin:(null==s?void 0:s.transformOrigin)||{vertical:"top",horizontal:"right"},className:(null==s?void 0:s.className)||"my-1",children:_c(t)?t:t({isOpen:!!p,onClose:d})})]})},Sc=({className:e,contentToCopy:t,locale:n,messageInfo:r,text:o})=>{const i="en"===n?"Copy":"Kopier",a=ma();return ve.jsx(Qi,{title:i,children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"copy-button",className:e,size:"small",variant:"text",startIcon:ve.jsx(pl,{width:20,height:20}),onClick:()=>{navigator.clipboard.writeText(t).then((()=>{r("no"===n?"Kopieres til utklippstavlen":"Copied to clipboard")}))},children:!a&&(o||i)})})})},Oc="_copy-wrapper_1gjzc_1",Ic="_hidden-copy_1gjzc_1",Tc=({className:e,contentToCopy:t,locale:n,messageInfo:r,children:o})=>ve.jsxs("div",{className:xa("flex items-center hover:text-gama-500",Oc,e),children:[o,ve.jsx(Qi,{title:"no"===n?"Kopier":"Copy",className:Ic,children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"copy-button",size:"small",variant:"text",className:"cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),navigator.clipboard.writeText(t).then((()=>{r("no"===n?"Kopieres til utklippstavlen":"Copied to clipboard")}))},startIcon:ve.jsx(pl,{width:20,height:20})})})})]}),Mc="_styled-widget-title_1gze6_1",Rc=function(e){return ve.jsx("div",{className:Mc,children:e.children})},Dc="_styled-widget-header_1qk88_1",Pc=({actions:e,title:t,containerClassname:n,actionsClassname:r})=>ve.jsxs("div",{className:xa(Dc,n),children:[ve.jsx(Rc,{children:t}),ve.jsx("div",{className:r,children:e})]}),zc="_asma-core-ui-styled-widget_cb7kt_1",Ac="_widget-header_cb7kt_13",Lc="_widget-content_cb7kt_19",$c="_widget-footer_cb7kt_29",Fc="_widget-link_cb7kt_34";function Vc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"})})}function Bc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}const qc=({children:e,title:t,icon:n,link:r,viewMore:o,persistKey:i,isLoading:l,isEmpty:c,emptyText:u})=>{const[d,p]=a(!1);return s((()=>{if(i){const e=localStorage.getItem(i);p("true"===e)}}),[i]),s((()=>{i&&localStorage.setItem(i,String(d))}),[d,i]),ve.jsxs("div",{className:zc,children:[ve.jsxs("div",{className:Ac,children:[n,ve.jsx(Rc,{children:t})]}),ve.jsx("div",{className:Lc,children:ve.jsxs(ve.Fragment,{children:[e,ve.jsx(Oa,{isLoading:l}),ve.jsx(Ea,{isEmpty:c,emptyText:u})]})}),ve.jsxs("div",{className:$c,children:[!o||null!=o&&o.hide?ve.jsx("div",{}):ve.jsx(la,{disabled:o.disabled,dataTest:"view-more",variant:"text",endIcon:d?ve.jsx(Vc,{width:20,height:20}):ve.jsx(Bc,{width:20,height:20}),onClick:()=>{var e;p(!d),null==(e=null==o?void 0:o.onClick)||e.call(o)},children:d?o.viewLessText:o.viewMoreText}),r&&!r.hide?ve.jsx(Ml,{dataTest:"go-to-button",className:Fc,size:"small",href:r.href,onClick:r.onClick,content:r.content}):ve.jsx("div",{})]})]})},Hc="_styled-module-title_174mo_1",Uc=function(e){return ve.jsx("h1",{"data-test":e.dataTest,className:Hc,children:e.children})},Wc="_dialog_erjok_1",Kc="_hidden_erjok_9";function Gc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M10 21v-2H6.41l4.5-4.5l-1.41-1.41l-4.5 4.5V14H3v7zm4.5-10.09l4.5-4.5V10h2V3h-7v2h3.59l-4.5 4.5z"})})}function Yc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M19.5 3.09L15 7.59V4h-2v7h7V9h-3.59l4.5-4.5zM4 13v2h3.59l-4.5 4.5l1.41 1.41l4.5-4.5V20h2v-7z"})})}const Xc="object"==typeof global&&global&&global.Object===Object&&global;var Jc="object"==typeof self&&self&&self.Object===Object&&self;const Zc=(Xc||Jc||Function("return this")()).Symbol;var Qc=Object.prototype,eu=Qc.hasOwnProperty,tu=Qc.toString,nu=Zc?Zc.toStringTag:void 0;var ru=Object.prototype.toString;var ou="[object Null]",iu="[object Undefined]",au=Zc?Zc.toStringTag:void 0;function su(e){return null==e?void 0===e?iu:ou:au&&au in Object(e)?function(e){var t=eu.call(e,nu),n=e[nu];try{e[nu]=void 0;var r=!0}catch{}var o=tu.call(e);return r&&(t?e[nu]=n:delete e[nu]),o}(e):function(e){return ru.call(e)}(e)}const lu=Array.isArray;function cu(e){if(!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(e))return!1;var t=su(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}const uu=({onCloseText:e="",onMinimizeText:t="",onExpandText:n="",onFullScreenText:r="",showCloseIcon:o=!0,showMinimizeIcon:i=!0,showExpandIcon:s=!0,showFullScreenIcon:l=!0,title:c,label:d,children:p,open:f,onClose:h,className:m="",primaryButtonText:g,primaryButtonLoading:y=!1,secondaryButtonText:v,onPrimaryButtonClick:b,onSecondaryButtonClick:x,dataTest:w,actionNode:k,extraActions:C,extraActionsText:j,btnContainerClassName:N,footerClassName:_,footerInfo:E,locale:S="en",enableFullscreen:O=!0,fullScreenState:I,handleFullScreenState:T})=>{const[M,R]=a(!1),[D,P]=a(!1),{open:z,anchorEl:A,handleOpen:L,handleClose:$}=(()=>{const[e,t]=a(null),n=!!e,r=u((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:u((()=>{t(null)}),[]),handleOpen:r,anchorEl:e}})();if(!f)return null;const F=void 0!==I?I:D,V=g||y,B=V||v,q=()=>{R(!M)};return ve.jsxs(ve.Fragment,{children:[F&&!M&&ve.jsx("div",{className:"z-[51] fixed inset-0 bg-[rgb(98,110,126)] bg-opacity-70"}),ve.jsx("div",{style:{zIndex:51},className:xa(Wc,!M&&Kc),children:ve.jsxs("div",{className:ui("flex items-center justify-between",!M&&"hidden"),"data-test":w,children:[ve.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:c}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[s&&ve.jsx(Qi,{title:"en"===S?"Expand":"Utvid",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"minimize-button",variant:"text",size:"small",onClick:q,endIcon:s&&ve.jsx(br,{height:20,width:20,color:"text-gama-500"}),children:n})})}),o&&ve.jsx(Qi,{title:"en"===S?"Close":"Lukk",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"close-button",variant:"textGray",size:"small",onClick:h,endIcon:o&&ve.jsx(Hn,{height:20,width:20,color:"text-delta-700"}),children:e})})})]})]})}),ve.jsxs("div",{className:xa("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",m&&!M?m:"",M&&"!h-0 !w-0 opacity-0 duration-0",F&&!M&&"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-[1000px] h-[95dvh] duration-0"),"data-test":w,children:[ve.jsxs("div",{className:"flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[ve.jsxs("div",{className:"flex items-center justify-between",children:[d?ve.jsx("div",{className:"text-sm text-delta-700",children:d}):ve.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:c}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[k,i&&ve.jsx(Qi,{title:"en"===S?"Minimize":"Minimer",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:q,endIcon:i&&ve.jsx(vr,{height:20,width:20,color:"text-delta-700"}),children:t})})}),O&&l&&ve.jsx(Qi,{title:F?"en"===S?"Exit full screen":"Avslutt fullskjerm":"en"===S?"Full screen":"Fullskjerm",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"fullscreen-button",variant:"textGray",size:"small",onClick:()=>{void 0!==I&&T?T():P(!D)},endIcon:F?ve.jsx(Yc,{width:20,height:20,color:"text-delta-700"}):ve.jsx(Gc,{width:20,height:20,color:"text-delta-700"}),children:r})})}),o&&ve.jsx(Qi,{title:"en"===S?"Close":"Lukk",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"close-button",variant:"textGray",size:"small",onClick:h,endIcon:ve.jsx(Hn,{height:20,width:20,color:"text-delta-700"}),children:e})})})]})]}),d&&ve.jsx("div",{className:"text-2xl font-semibold text-delta-800 truncate",children:c})]}),ve.jsxs("div",{className:ui("flex flex-col",F&&!M&&"h-[87dvh]"),children:[ve.jsx("div",{className:"flex-grow overflow-y-auto",children:"function"==typeof p?p({fullScreen:F}):p}),(lu(C)&&null!=C&&C.length||cu(C))&&j||E?ve.jsxs("div",{className:xa("flex items-center justify-between p-4 border-0 border-t-[1px] border-solid border-delta-200 bg-white",_),children:[lu(C)&&null!=C&&C.length&&j?ve.jsxs(ve.Fragment,{children:[ve.jsx(la,{dataTest:"extra-actions-button",variant:"textGray",startIcon:ve.jsx(Dn,{width:24,height:24}),onClick:L,children:j}),ve.jsx(jl,{open:z,anchorEl:A,onClose:$,children:C.map((e=>ve.jsx(Nl,{className:e.className,onClick:e.onClick,children:e.label},e.label)))})]}):j&&cu(C)&&ve.jsx(la,{dataTest:"extra-action-button",variant:"text",onClick:C,children:j})," ",E,B?ve.jsxs("div",{className:xa("flex justify-end gap-x-4",N),children:[v&&x&&ve.jsx(la,{dataTest:"cancel-button",variant:"outlined",onClick:x,children:v}),V&&b&&ve.jsx(la,{dataTest:"save-button",startIcon:y&&ve.jsx(ul,{width:24,height:24}),onClick:b,children:g})]}):null]}):ve.jsx(ve.Fragment,{children:B?ve.jsxs("div",{className:xa("flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",N),children:[v&&x&&ve.jsx(la,{dataTest:"cancel-button",variant:"outlined",onClick:x,children:v}),V&&b&&ve.jsx(la,{dataTest:"save-button",startIcon:y&&ve.jsx(ul,{width:24,height:24}),onClick:b,children:g})]}):null})]})]})]})},du=({showCloseIcon:e,tooltipTitle:t,onClick:n,title:r})=>e?ve.jsx("div",{children:ve.jsx(Qi,{title:t,placement:"top",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"close-button",variant:"textGray",size:"small",onClick:n,endIcon:ve.jsx(Hn,{height:20,width:20,color:"text-delta-700"}),children:r})})})}):null,pu=({visibility:e,tooltipTitle:t,onClick:n,title:r,type:o})=>{if(!e)return null;const i="minimize"===o;return"expand"===o?ve.jsx("div",{children:ve.jsx(Qi,{title:t,placement:"top",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"toggle-minimize-btn",variant:"text",size:"small",onClick:n,endIcon:ve.jsx(br,{height:20,width:20,color:"text-gama-500"}),children:r})})})}):i?ve.jsx("div",{children:ve.jsx(Qi,{title:t,placement:"top",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"toggle-minimize-btn",variant:"textGray",size:"small",onClick:n,endIcon:ve.jsx(vr,{height:20,width:20,color:"text-delta-700"}),children:r})})})}):null},fu="_minimized-dialog_1fc5p_5",hu="_dialog_1fc5p_1",mu="_hidden_1fc5p_27",gu=({fullScreen:e,showFullScreenIcon:t,title:n,tooltipTitle:r,onClick:o})=>t?ve.jsx(ve.Fragment,{children:t&&ve.jsx(Qi,{title:r,children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"fullscreen-button",variant:"textGray",size:"small",onClick:o,endIcon:e?ve.jsx(Yc,{width:20,height:20,color:"text-delta-700"}):ve.jsx(Gc,{width:20,height:20,color:"text-delta-700"}),children:n})})})}):null,yu=({onCloseText:e="",onMinimizeText:t="",onExpandText:n="",onFullScreenText:r="",showCloseIcon:o=!0,showMinimizeIcon:i=!0,showExpandIcon:l=!0,enableFullscreen:u=!0,fullScreenState:d,handleFullScreenState:p,title:f,label:h,children:m,open:g,onClose:y,classNameOverrides:v={maximized:"",minimized:"",fullscreen:""},dataTest:b,actionNode:x,tooltipOverrides:w={maximized:"",minimized:"",close:"",enterFullScreen:"",exitFullScreen:""},style:k})=>{const[C,j]=a(!1),[N,_]=a(!1),E=c(null),S=void 0!==d?d:N;if(s((()=>{if(!S)return;const e=e=>E.current&&!E.current.contains(e.target)&&(void 0!==d&&p?p():_(!1));return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[S,p,d]),!g)return null;const O=()=>{j(!C)};return ve.jsxs(ve.Fragment,{children:[ve.jsx("div",{style:{zIndex:51,...k},className:xa(fu,!C&&mu,v.minimized),children:ve.jsxs("div",{className:ui("flex items-center justify-between",!C&&"hidden"),"data-test":b,children:[ve.jsx("div",{className:"truncate max-w-[303px] text-lg font-semibold text-delta-800 pr-1",children:ve.jsx(Qi,{title:f,placement:"top",children:ve.jsx("div",{className:"truncate",children:f})})}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[ve.jsx(pu,{type:"expand",visibility:l,onClick:O,title:n,tooltipTitle:w.maximized||"Expand"}),ve.jsx(du,{showCloseIcon:o,onClick:y,title:e,tooltipTitle:w.close||"Close"})]})]})}),S&&!C&&ve.jsx("div",{className:"z-[51] fixed inset-0 bg-[rgb(98,110,126)] bg-opacity-70"}),ve.jsxs("div",{ref:E,style:{zIndex:51,...k},className:xa(hu,C&&mu,v.maximized,S&&!C&&"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-[1000px] h-[95dvh] duration-0",S&&v.fullscreen),children:[ve.jsxs("div",{className:"flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[ve.jsxs("div",{className:"flex items-center justify-between",children:[h?ve.jsx("div",{className:"text-sm text-delta-700",children:h}):ve.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:f}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[x,ve.jsx(pu,{visibility:i,type:"minimize",onClick:O,title:t,tooltipTitle:w.minimized||"Minimize"}),ve.jsx(gu,{showFullScreenIcon:u,fullScreen:S,onClick:()=>{var e;null==(e=document.activeElement)||e.blur(),void 0!==d&&p?p():_(!N)},title:r,tooltipTitle:S?w.exitFullScreen||"Exit full screen":w.enterFullScreen||"Full screen"}),ve.jsx(du,{showCloseIcon:o,onClick:y,title:e,tooltipTitle:w.close||"Close"})]})]}),h&&ve.jsx("div",{className:"text-2xl font-semibold text-delta-800 truncate",children:f})]}),ve.jsx("div",{className:xa(C&&"hidden","flex flex-grow flex-col overflow-y-auto"),children:m})]})]})};function vu({config:e,MAX_DIALOG_WIDTH:t=600}){const n=d(void 0);return{DialogStackProvider:({children:r})=>{const[o,i]=a([]),l=function(){const[e,t]=a((()=>window.innerWidth));return s((()=>{const e=()=>t(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}(),c=u((e=>{const n=e.length||1,r=Math.min(t,(l-16*(n+1))/n);return e.map(((e,t)=>({...e,width:r,position:{right:16+t*(r+16)}})))}),[l]),d=u((t=>{var n;const r=null==(n=e[t])?void 0:n.dependencies;i((e=>{const n=e.find((e=>e.id===t)),o={id:t,open:!0,width:0,position:{right:0},dependencies:r},i=n?e.map((e=>e.id===t?{...e,open:!0,dependencies:r}:e)):[...e,o];return c(i.filter((e=>e.open)))}))}),[c]),p=u((e=>{i((t=>{var n;const r=new Set([e]);let o;do{o=!1;for(const e of t)null!=(n=e.dependencies)&&n.some((e=>r.has(e)))&&!r.has(e.id)&&(r.add(e.id),o=!0)}while(o);return c(t.filter((e=>!r.has(e.id))))}))}),[c]),f=u((e=>o.find((t=>t.id===e))),[o]);return ve.jsx(n.Provider,{value:{dialogs:o,openDialog:d,closeDialog:p,getDialogState:f},children:r})},useDialogStack:function(){const e=p(n);if(!e)throw new Error("useDialogStack must be used within DialogStackProvider");return e}}}export{$n as ArchiveIcon,wn as AssignmentIcon,kn as AssignmentOutlineIcon,B as Avatar,wr as BadgeIcon,nn as BellIcon,tn as BellOutlineIcon,ir as CalendarBlankOutlineIcon,vn as CalendarIcon,xn as CalendarRangeIcon,Vn as CheckBoxCheckedIcon,yn as CheckFactIcon,gn as CheckFactOutlineIcon,Un as CheckIcon,mn as CheckOutlineIcon,sn as ChevronDoubleLeftIcon,ln as ChevronDoubleRightIcon,Bn as ChevronDownIcon,an as ChevronLeftIcon,on as ChevronRightIcon,qn as ChevronUpIcon,q as ClickAwayListener,Hn as CloseIcon,yr as ConsentsIcon,H as Container,Sc as CopyButton,Tc as CopyWrapper,dn as DashboardViewIcon,pn as DashboardViewOutlineIcon,Qn as DeleteOutlineIcon,Dn as DotsVerticalIcon,Fn as DownloadIcon,Jn as DragHorizontalIcon,Ln as DropDownIcon,An as DropUpIcon,nr as DvrIcon,pr as EarthIcon,kr as EditSquareIcon,rr as ErrorOutlineIcon,U as Fade,sr as FastCheckOutlineIcon,Zn as FilePdfIcon,er as FilterIcon,In as FindReplaceIcon,Tn as FindReplacePeopleIcon,W as FormLabel,rn as HamburgerIcon,_r as HandymanIcon,Nr as HandymanOutlineIcon,Gn as InboxOutboxIcon,Yn as InboxOutboxOutlineIcon,Ws as IndeterminateIcon,br as KeyboardCapslockIcon,ar as LinkOutlineIcon,Cn as ListNumberedIcon,dr as ListSettingsLineIcon,cr as ListStatusIcon,zn as LoadingIcon,tr as LockIcon,jn as MessageProcessingIcon,Nn as MessageProcessingOutlineIcon,xr as MessageReplyIcon,uu as MinimizableDialog,yu as MinimizableDialogV2,vr as MinimizeIcon,bn as NewCalendarIcon,gr as OutlineCalendarMonth,K as Paper,un as PdfIcon,hr as PencilOutlineIcon,hn as PeopleIcon,fn as PeopleOutlineIcon,Wn as PermMediaIcon,Kn as PermMediaOutline,Mn as PersonIcon,Rn as PersonOutlineIcon,Er as PinIcon,Cr as PlusIcon,jr as PlusIconCircle,G as Popper,cn as QnrIcon,or as ReplayIcon,_n as ReportBoxIcon,En as ReportBoxOutlineIcon,Pn as SearchIcon,Sn as SettingsIcon,fr as SettingsMenuHorizontalIcon,On as SettingsOutlineIcon,Y as Skeleton,X as Stack,xc as StyledAccordion,kc as StyledAccordionDetails,wc as StyledAccordionSummary,be as StyledBadge,la as StyledButton,Ks as StyledCheckbox,Or as StyledChip,ga as StyledDialog,wa as StyledDialogActions,Ca as StyledDialogContent,Na as StyledDialogTitle,Cl as StyledDrawer,Ea as StyledEmptyPage,jc as StyledFilterButton,Ec as StyledFilterMenu,vl as StyledFormControl,bl as StyledFormControlLabel,kl as StyledFormGroup,xl as StyledFormHelperText,ia as StyledFormLabel,Gs as StyledInputField,wl as StyledInputLabel,Tr as StyledInteractiveChip,yl as StyledLabel,Ml as StyledLink,Oa as StyledLoading,jl as StyledMenu,Nl as StyledMenuItem,_l as StyledMenuList,Uc as StyledModuleTitle,Cc as StyledPopover,ml as StyledRadio,gl as StyledRadioGroup,Ys as StyledSearchField,Zs as StyledSelect,nl as StyledSelectAutocomplete,Qs as StyledSelectItem,rl as StyledSlider,hl as StyledSwitch,Rl as StyledTab,Dl as StyledTabs,Js as StyledTextarea,Qi as StyledTooltip,ea as StyledTypography,qc as StyledWidget,Pc as StyledWidgetHeader,Rc as StyledWidgetTitle,ur as TextBoxCheckOutlineIcon,Xn as TopicIcon,lr as UnknownDocumentOutlineRoundedIcon,mr as WarningAmberOutlineIcon,Sr as WorkIcon,vu as createDialogStack,ne as omit,pe as prepareForSlot,ue as setMidnightTime,de as setZeroTime};
38
+ "production"===process.env.NODE_ENV?al.exports=function(){if(ol)return sl;ol=1;var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var s,l={},c=null,u=null;for(s in void 0!==r&&(c=""+r),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)o.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return sl.Fragment=n,sl.jsx=s,sl.jsxs=s,sl}():al.exports=(il||(il=1,"production"!==process.env.NODE_ENV&&function(){var e=r,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.iterator,g="@@iterator",y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=y.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(t+="%s",n=n.concat([r]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+t),Function.prototype.apply.call(console.error,console,o)}(0,e,n)}var b;function x(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case l:return x(e)+".Consumer";case s:return x(e._context)+".Provider";case c:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:w(e.type)||"Memo";case f:var r=e,h=r._payload,m=r._init;try{return w(m(h))}catch{return null}}return null}b=Symbol.for("react.module.reference");var k,C,j,N,_,E,S,O=Object.assign,I=0;function T(){}T.__reactDisabledLog=!0;var M,R=y.ReactCurrentDispatcher;function D(e,t,n){if(void 0===M)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);M=r&&r[1]||""}return"\n"+M+e}var P,z=!1,A="function"==typeof WeakMap?WeakMap:Map;function L(e,t){if(!e||z)return"";var n,r=P.get(e);if(void 0!==r)return r;z=!0;var o,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=R.current,R.current=null,function(){if(0===I){k=console.log,C=console.info,j=console.warn,N=console.error,_=console.group,E=console.groupCollapsed,S=console.groupEnd;var e={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}I++}();try{if(t){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var s=t.stack.split("\n"),l=n.stack.split("\n"),c=s.length-1,u=l.length-1;c>=1&&u>=0&&s[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(s[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||s[c]!==l[u]){var d="\n"+s[c].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),"function"==typeof e&&P.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{z=!1,R.current=o,function(){if(0==--I){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:k}),info:O({},e,{value:C}),warn:O({},e,{value:j}),error:O({},e,{value:N}),group:O({},e,{value:_}),groupCollapsed:O({},e,{value:E}),groupEnd:O({},e,{value:S})})}I<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=e?e.displayName||e.name:"",f=p?D(p):"";return"function"==typeof e&&P.set(e,f),f}function $(e,t,n){if(null==e)return"";if("function"==typeof e)return L(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return D(e);switch(e){case u:return D("Suspense");case d:return D("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return function(e,t,n){return L(e,!1)}(e.render);case p:return $(e.type,t,n);case f:var o=e,i=o._payload,a=o._init;try{return $(a(i),t,n)}catch{}}return""}P=new A;var F=Object.prototype.hasOwnProperty,V={},B=y.ReactDebugCurrentFrame;function q(e){if(e){var t=e._owner,n=$(e.type,e._source,t?t.type:null);B.setExtraStackFrame(n)}else B.setExtraStackFrame(null)}var H=Array.isArray;function U(e){return H(e)}function W(e){return""+e}function K(e){if(function(e){try{return W(e),!1}catch{return!0}}(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",(t=e,"function"==typeof Symbol&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object")),W(e);var t}var G,Y,X,J=y.ReactCurrentOwner,Z={key:!0,ref:!0,__self:!0,__source:!0};X={};var Q=function(e,n,r,o,i,a,s){var l={$$typeof:t,type:e,key:n,ref:r,props:s,_owner:a,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};var ee,te=y.ReactCurrentOwner,ne=y.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,n=$(e.type,e._source,t?t.type:null);ne.setExtraStackFrame(n)}else ne.setExtraStackFrame(null)}function oe(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}function ie(){if(te.current){var e=w(te.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}ee=!1;var ae={};function se(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=ie();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==te.current&&(r=" It was passed a child from "+w(e._owner.type)+"."),re(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),re(null)}}}function le(e,t){if("object"==typeof e)if(U(e))for(var n=0;n<e.length;n++){var r=e[n];oe(r)&&se(r,t)}else if(oe(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e[g];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,a=o.call(e);!(i=a.next()).done;)oe(i.value)&&se(i.value,t)}}function ce(e,n,r,m,g,y){var x,k=!("string"!=typeof(x=e)&&"function"!=typeof x&&x!==o&&x!==a&&x!==i&&x!==u&&x!==d&&x!==h&&("object"!=typeof x||null===x||x.$$typeof!==f&&x.$$typeof!==p&&x.$$typeof!==s&&x.$$typeof!==l&&x.$$typeof!==c&&x.$$typeof!==b&&void 0===x.getModuleId));if(!k){var C="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var j,N=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(g);C+=N||ie(),null===e?j="null":U(e)?j="array":void 0!==e&&e.$$typeof===t?(j="<"+(w(e.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):j=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",j,C)}var _=function(e,t,n,r,o){var i,a,s,l,c={},u=null,d=null;for(i in void 0!==n&&(K(n),u=""+n),function(e){if(F.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(K(t.key),u=""+t.key),function(e){if(F.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(d=t.ref,function(e,t){if("string"==typeof e.ref&&J.current&&t&&J.current.stateNode!==t){var n=w(J.current.type);X[n]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(J.current.type),e.ref),X[n]=!0)}}(t,o)),t)F.call(t,i)&&!Z.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps){var p=e.defaultProps;for(i in p)void 0===c[i]&&(c[i]=p[i])}if(u||d){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;u&&(a=c,s=f,(l=function(){G||(G=!0,v("%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://reactjs.org/link/special-props)",s))}).isReactWarning=!0,Object.defineProperty(a,"key",{get:l,configurable:!0})),d&&function(e,t){var n=function(){Y||(Y=!0,v("%s: `ref` 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://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(c,f)}return Q(e,u,d,o,r,J.current,c)}(e,n,r,g,y);if(null==_)return _;if(k){var E=n.children;if(void 0!==E)if(m)if(U(E)){for(var S=0;S<E.length;S++)le(E[S],e);Object.freeze&&Object.freeze(E)}else v("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 le(E,e)}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){re(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),re(null);break}}null!==e.ref&&(re(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}(_):function(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=w(n);!function(e,t,n,r,o){var i=Function.call.bind(F);for(var a in e)if(i(e,a)){var s=void 0;try{if("function"!=typeof e[a]){var l=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}s=e[a](t,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){s=e}s&&!(s instanceof Error)&&(q(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof s),q(null)),s instanceof Error&&!(s.message in V)&&(V[s.message]=!0,q(o),v("Failed %s type: %s",n,s.message),q(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||ee||(ee=!0,v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(n)||"Unknown"));"function"==typeof n.getDefaultProps&&!n.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}(_),_}ll.Fragment=o,ll.jsx=function(e,t,n){return ce(e,t,n,!1)},ll.jsxs=function(e,t,n){return ce(e,t,n,!0)}}()),ll);var cl=al.exports;function ul(e){return cl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:cl.jsxs("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:2,children:[cl.jsx("path",{strokeDasharray:60,strokeDashoffset:60,strokeOpacity:.3,d:"M12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3Z",children:cl.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"1.3s",values:"60;0"})}),cl.jsxs("path",{strokeDasharray:15,strokeDashoffset:15,d:"M12 3C16.9706 3 21 7.02944 21 12",children:[cl.jsx("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.3s",values:"15;0"}),cl.jsx("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})]})]})})}function dl(e){return cl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:cl.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}function pl(e){return cl.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:cl.jsx("path",{fill:"currentColor",d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"})})}function fl(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...e,children:ve.jsx("path",{d:"M5.83398 10.8332V9.1665H14.1673V10.8332H5.83398Z",fill:"currentColor"})})}const hl=({dataTest:e,disabled:t,...n})=>ve.jsx(S,{...n,disabled:t,"data-test":e,checkedIcon:ve.jsx("div",{className:(t?"bg-gama-300":"bg-gama-500")+" rounded-full flex items-center justify-center w-5 h-5",children:ve.jsx(dl,{color:"white",height:14,width:14,className:"rounded-full"})}),icon:ve.jsx("div",{className:(t?"bg-delta-50":"bg-delta-10")+" rounded-full outline outline-1 outline-delta-200 flex items-center justify-center w-5 h-5",children:ve.jsx(fl,{color:"var(--colors-delta-600)",height:20,width:20,className:"rounded-full"})}),sx:{"& .MuiButtonBase-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"& .MuiSwitch-track":{backgroundColor:"var(--colors-delta-400) !important",opacity:"1 !important"},"& .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-500) !important"},"& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-200) !important"},"& .PrivateSwitchBase-input.MuiSwitch-input":{height:"100% !important"},"& .MuiSwitch-input:not(:checked) ~ .MuiSwitch-thumb":{backgroundColor:"var(--colors-gray-10) !important",outline:"1px solid var(--colors-delta-200) !important",outlineOffset:"0px !important"},"& .MuiSwitch-switchBase.Mui-disabled + .MuiSwitch-track":{backgroundColor:"var(--colors-delta-200) !important",opacity:"1 !important"},"& .MuiSwitch-switchBase.Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-delta-50) !important",opacity:"1 !important"},"& .MuiSwitch-switchBase.Mui-checked.Mui-disabled + .MuiSwitch-track":{backgroundColor:"var(--colors-gama-100) !important",opacity:"1 !important"},"& .MuiSwitch-switchBase.Mui-checked.Mui-disabled .MuiSwitch-thumb":{backgroundColor:"var(--colors-gama-300) !important",opacity:"1 !important"}}}),ml=({dataTest:e,...t})=>ve.jsx(O,{...t,"data-test":e,sx:{"&":{color:"var(--colors-delta-500)"},"& input":{height:"100% !important",width:"100% !important"},"&.Mui-checked":{color:"var(--colors-gama-500)"}}}),gl=({dataTest:e,...t})=>ve.jsx(I,{"data-test":e,...t}),yl=({children:e,onClick:t,className:n,dataTest:r,style:o})=>ve.jsx("div",{className:ui("_styled-label_1fp95_1",n),style:o,onClick:t,"data-test":r,children:e}),vl=e=>ve.jsx(T,{...e,sx:{...e.sx,"& label.MuiInputLabel-shrink":{background:"white !important",color:"var(--colors-delta-500) !important"},"& label.MuiInputLabel-shrink.Mui-focused":{background:"white !important",color:"var(--colors-gama-500) !important"},"& label.MuiInputLabel-shrink.Mui-error.Mui-focused":{background:"white !important",color:"var(--colors-red-500) !important"}}}),bl=({sx:e,...t})=>ve.jsx(M,{...t,sx:{color:"var(--colors-delta-800)",margin:0,"& .MuiFormControlLabel-label":{fontSize:"14px",lineHeight:"20px"},"&.Mui-disabled .MuiFormControlLabel-label":{color:"var(--colors-delta-300)"},...e}}),xl=e=>ve.jsx(R,{...e}),wl=e=>ve.jsx(D,{...e}),kl=e=>ve.jsx(P,{...e}),Cl=e=>ve.jsx(z,{...e}),jl=e=>{var t,n;return ve.jsx(A,{...e,classes:{paper:ui("border border-solid border-delta-300 shadow-[0px_2px_4px_0px_rgba(34,_33,_51,_0.15)]",null==(t=e.classes)?void 0:t.paper),list:ui("py-1",null==(n=e.classes)?void 0:n.list),...e.classes}})},Nl=e=>{var t;return ve.jsx(j,{...e,classes:{selected:"bg-gama-50",root:ui("px-3 py-2.5 hover:bg-delta-50",null==(t=e.classes)?void 0:t.root),...e.classes}})},_l=e=>ve.jsx(L,{...e}),El="_styled-link_hyb3l_1",Sl="_styled-link-disabled_hyb3l_16",Ol="_styled-link-xs_hyb3l_32",Il="_styled-link-small_hyb3l_37",Tl="_styled-link-large_hyb3l_42",Ml=({href:e,disabled:t,size:n="large",dataTest:r,reflink:o,className:i,content:a,contentNode:s,...l})=>{let c=Tl;switch(n){case"small":c=Il;break;case"xs":c=Ol;break;default:c=Tl}return t?ve.jsxs("span",{className:ui(El,Sl,c,i),children:[a,s]}):ve.jsxs("a",{...l,"data-test":r,ref:o,href:e,className:ui(El,c,i),children:[a,s]})},Rl=e=>ve.jsx($,{...e,sx:{letterSpacing:"normal","&.MuiTab-textColorPrimary.Mui-selected":{color:"var(--colors-gama-500)"},"&.MuiTab-textColorPrimary":{color:"var(--colors-gray-500)"},"&.MuiTab-textColorPrimary.Mui-disabled":{color:"var(--colors-gray-300)"}}}),Dl=e=>ve.jsx(F,{...e,TabIndicatorProps:{style:{background:"var(--colors-gama-500)",color:"var(--colors-gama-500)"}},sx:{"& .MuiTabs-scrollButtons":{border:"1px solid var(--colors-delta-500)",width:40,height:40,borderRadius:"10%",display:"none",justifyContent:"center",alignItems:"center",position:"relative",top:2,"& svg":{fontSize:24,color:"var(--colors-delta-700)"},"&:hover":{backgroundColor:"var(--colors-gama-50)"},"&:first-of-type":{marginRight:"8px"},"&:last-of-type":{marginLeft:"8px"},transition:"opacity 0.3s ease, transform 0.3s ease",opacity:0,transform:"scale(0)"},"& .MuiTabs-scrollButtons.Mui-disabled":{display:"none"},"& .MuiTabs-scrollButtons:not(.Mui-disabled)":{display:"flex",opacity:1,transform:"scale(1)"}}});function Pl(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}let zl;function Al(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");zl.has(t)||(zl.add(t),console.warn(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(zl=new Set);const Ll="ArrowUp",$l="ArrowDown",Fl="ArrowLeft",Vl="ArrowRight",Bl=n.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function ql(e){const{children:t,elementsRef:r,labelsRef:o,onMapChange:i}=e,a=n.useRef(0),s=za(Ul).current,l=za(Hl).current,[c,u]=n.useState(0),d=n.useRef(c),p=is(((e,t)=>{l.set(e,t??null),d.current+=1,u(d.current)})),f=is((e=>{l.delete(e),d.current+=1,u(d.current)})),h=n.useMemo((()=>{const e=new Map;return Array.from(l.keys()).sort(Wl).forEach(((t,n)=>{const r=l.get(t)??{};e.set(t,{...r,index:n})})),e}),[l,c]);ls((()=>{d.current===c&&(r.current.length!==h.size&&(r.current.length=h.size),o&&o.current.length!==h.size&&(o.current.length=h.size)),null==i||i(h)}),[i,h,r,o,c,d]);const m=is((e=>(s.add(e),()=>{s.delete(e)})));ls((()=>{s.forEach((e=>e(h)))}),[s,h]);const g=n.useMemo((()=>({register:p,unregister:f,subscribeMapChange:m,elementsRef:r,labelsRef:o,nextIndexRef:a})),[p,f,m,r,o,a]);return ve.jsx(Bl.Provider,{value:g,children:t})}function Hl(){return new Map}function Ul(){return new Set}function Wl(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}"production"!==process.env.NODE_ENV&&(Bl.displayName="CompositeListContext");const Kl=n.createContext(void 0);"production"!==process.env.NODE_ENV&&(Kl.displayName="DirectionContext");const Gl=n.createContext(void 0);function Yl(){const e=n.useContext(Gl);if(void 0===e)throw new Error("Base UI: AccordionRootContext is missing. Accordion parts must be placed within <Accordion.Root>.");return e}"production"!==process.env.NODE_ENV&&(Gl.displayName="AccordionRootContext");const Xl=new Set([$l,Ll,Vl,Fl,"Home","End"]),Jl={value:()=>null};const Zl=n.forwardRef((function(e,t){const{className:r,disabled:o=!1,hiddenUntilFound:i,keepMounted:a,loop:s=!0,onValueChange:l,openMultiple:c=!0,orientation:u="vertical",value:d,defaultValue:p,...f}=e,h=function(e=!0){const t=n.useContext(Kl);if(void 0===t&&!e)throw new Error("Base UI: DirectionContext is missing.");return(null==t?void 0:t.direction)??"ltr"}();"production"!==process.env.NODE_ENV&&ls((()=>{i&&!1===a&&Al("The `keepMounted={false}` prop on a Accordion.Root will be ignored when using `hiddenUntilFound` since it requires Panels to remain mounted when closed.")}),[i,a]);const m=n.useMemo((()=>{if(void 0===d)return p??[]}),[d,p]),g=is(l),y=n.useRef([]),[v,b]=es({controlled:d,default:m,name:"Accordion",state:"value"}),x=n.useCallback(((e,t)=>{if(c)if(t){const t=v.slice();t.push(e),b(t),g(t)}else{const t=v.filter((t=>t!==e));b(t),g(t)}else{const t=v[0]===e?[]:[e];b(t),g(t)}}),[g,c,b,v]),w="rtl"===h,k="horizontal"===u,C=n.useMemo((()=>({value:v,disabled:o,orientation:u})),[v,o,u]),j=n.useMemo((()=>({accordionItemRefs:y,direction:h,disabled:o,handleValueChange:x,hiddenUntilFound:i??!1,keepMounted:a??!1,orientation:u,state:C,value:v})),[h,o,x,i,a,u,C,v]),N=Za("div",e,{state:C,ref:t,props:[{dir:h,role:"region",onKeyDown(e){if(!Xl.has(e.key))return;!function(e){e.preventDefault(),e.stopPropagation()}(e);const t=function(e){const{current:t}=e,n=[];for(let e=0;e<t.length;e+=1){const r=t[e];if(!Pl(r)){const e=null==r?void 0:r.querySelector('[type="button"]');Pl(e)||n.push(e)}}return n}(y),n=t.length-1;let r=-1;const o=t.indexOf(e.target);function i(){r=s?o+1>n?0:o+1:Math.min(o+1,n)}function a(){r=s&&0===o?n:o-1}switch(e.key){case $l:k||i();break;case Ll:k||a();break;case Vl:k&&(w?a():i());break;case Fl:k&&(w?i():a());break;case"Home":r=0;break;case"End":r=n}r>-1&&t[r].focus()}},f],customStyleHookMapping:Jl});return ve.jsx(Gl.Provider,{value:j,children:ve.jsx(ql,{elementsRef:y,children:N})})}));"production"!==process.env.NODE_ENV&&(Zl.displayName="AccordionRoot");const Ql=n.createContext(void 0);function ec(){const e=n.useContext(Ql);if(void 0===e)throw new Error("Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.");return e}"production"!==process.env.NODE_ENV&&(Ql.displayName="CollapsibleRootContext");let tc=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function nc(e={}){const{label:t,metadata:r,textRef:o,indexGuessBehavior:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=n.useContext(Bl),p=n.useRef(-1),[f,h]=n.useState(i===tc.GuessFromOrder?()=>{if(-1===p.current){const e=d.current;d.current+=1,p.current=e}return p.current}:-1),m=n.useRef(null),g=n.useCallback((e=>{var n;if(m.current=e,-1!==f&&null!==e&&(c.current[f]=e,u)){const r=void 0!==t;u.current[f]=r?t:(null==(n=null==o?void 0:o.current)?void 0:n.textContent)??e.textContent}}),[f,c,u,t,o]);return ls((()=>{const e=m.current;if(e)return a(e,r),()=>{s(e)}}),[a,s,r]),ls((()=>l((e=>{var t;const n=m.current?null==(t=e.get(m.current))?void 0:t.index:null;null!=n&&h(n)}))),[l,h]),n.useMemo((()=>({ref:g,index:f})),[f,g])}const rc=n.createContext(void 0);function oc(){const e=n.useContext(rc);if(void 0===e)throw new Error("Base UI: AccordionItemContext is missing. Accordion parts must be placed within <Accordion.Item>.");return e}"production"!==process.env.NODE_ENV&&(rc.displayName="AccordionItemContext");let ic=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Fs.startingStyle]="startingStyle",e[e.endingStyle=Fs.endingStyle]="endingStyle",e}({}),ac=function(e){return e.panelOpen="data-panel-open",e}({});const sc={[ic.open]:""},lc={[ic.closed]:""},cc={open:e=>e?{[ac.panelOpen]:""}:null},uc={open:e=>e?sc:lc};let dc=function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e}({});const pc={...uc,index:e=>Number.isInteger(e)?{[dc.index]:String(e)}:null,...qs,value:()=>null},fc=n.forwardRef((function(e,t){const{className:r,disabled:o=!1,onOpenChange:i,render:a,value:s,...l}=e,{ref:c,index:u}=nc(),d=Aa(t,c),{disabled:p,handleValueChange:f,state:h,value:m}=Yl(),g=s??u,y=o||p,v=n.useMemo((()=>{if(!m)return!1;for(let e=0;e<m.length;e+=1)if(m[e]===g)return!0;return!1}),[m,g]),b=is((e=>{f(g,e),null==i||i(e)})),x=function(e){const{open:t,defaultOpen:r,onOpenChange:o,disabled:i}=e,a=void 0!==t,[s,l]=es({controlled:t,default:r,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=$s(s,!0,!0),[p,f]=n.useState(s),[{height:h,width:m},g]=n.useState({height:void 0,width:void 0}),y=Da(),[v,b]=n.useState(),x=v??y,[w,k]=n.useState(!1),[C,j]=n.useState(!1),N=n.useRef(null),_=n.useRef(null),E=n.useRef(null),S=n.useRef(null),O=As(S,!1),I=is((()=>{const e=!s,t=S.current;"css-animation"===_.current&&null!=t&&t.style.removeProperty("animation-name"),!w&&!C&&(null!=_.current&&"css-animation"!==_.current&&!c&&e&&u(!0),"css-animation"===_.current&&(!p&&e&&f(!0),!c&&e&&u(!0))),l(e),o(e),"none"===_.current&&c&&!e&&u(!1)}));return ls((()=>{a&&"none"===_.current&&!C&&!s&&u(!1)}),[a,C,s,t,u]),n.useMemo((()=>({abortControllerRef:N,animationTypeRef:_,disabled:i,handleTrigger:I,height:h,mounted:c,open:s,panelId:x,panelRef:S,runOnceAnimationsFinish:O,setDimensions:g,setHiddenUntilFound:k,setKeepMounted:j,setMounted:u,setOpen:l,setPanelIdState:b,setVisible:f,transitionDimensionRef:E,transitionStatus:d,visible:p,width:m})),[N,_,i,I,h,c,s,x,S,O,g,k,j,u,l,f,E,d,p,m])}({open:v,onOpenChange:b,disabled:y}),w=n.useMemo((()=>({open:x.open,disabled:x.disabled,hidden:!x.mounted})),[x.open,x.disabled,x.mounted]),k=n.useMemo((()=>({...x,onOpenChange:b,state:w,transitionStatus:x.transitionStatus})),[x,w,b]),C=n.useMemo((()=>({...h,index:u,disabled:y,open:v})),[y,u,v,h]),[j,N]=n.useState(Da()),_=n.useMemo((()=>({open:v,state:C,setTriggerId:N,triggerId:j})),[v,C,N,j]),E=Za("div",e,{state:C,ref:d,props:l,customStyleHookMapping:pc});return ve.jsx(Ql.Provider,{value:k,children:ve.jsx(rc.Provider,{value:_,children:E})})}));"production"!==process.env.NODE_ENV&&(fc.displayName="AccordionItem");const hc=n.forwardRef((function(e,t){const{render:n,className:r,...o}=e,{state:i}=oc();return Za("h3",e,{state:i,ref:t,props:o,customStyleHookMapping:pc})}));"production"!==process.env.NODE_ENV&&(hc.displayName="AccordionHeader");const mc=n.forwardRef((function(e,t){const{disabled:r,className:o,id:i,render:a,nativeButton:s=!0,...l}=e,{panelId:c,open:u,handleTrigger:d,disabled:p}=ec(),f=r??p,{getButtonProps:h,buttonRef:m}=ds({disabled:f,focusableWhenDisabled:!0,native:s}),{state:g,setTriggerId:y,triggerId:v}=oc();ls((()=>(i&&y(i),()=>{y(void 0)})),[i,y]);return Za("button",e,{state:g,ref:[t,m],props:[n.useMemo((()=>({"aria-controls":u?c:void 0,"aria-expanded":u,disabled:f,id:v,onClick:d})),[c,f,v,u,d]),l,h],customStyleHookMapping:cc})}));"production"!==process.env.NODE_ENV&&(mc.displayName="AccordionTrigger");let gc=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});let yc=function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e}({});const vc=n.forwardRef((function(e,t){const{className:r,hiddenUntilFound:o,keepMounted:i,id:a,render:s,...l}=e,{hiddenUntilFound:c,keepMounted:u}=Yl(),{abortControllerRef:d,animationTypeRef:p,height:f,mounted:h,onOpenChange:m,open:g,panelId:y,panelRef:v,runOnceAnimationsFinish:b,setDimensions:x,setHiddenUntilFound:w,setKeepMounted:k,setMounted:C,setOpen:j,setVisible:N,transitionDimensionRef:_,visible:E,width:S,setPanelIdState:O,transitionStatus:I}=ec(),T=o??c,M=i??u;"production"!==process.env.NODE_ENV&&ls((()=>{!1===i&&T&&Al("The `keepMounted={false}` prop on a Accordion.Panel will be ignored when using `contextHiddenUntilFound` on the Panel or the Root since it requires the panel to remain mounted when closed.")}),[T,i]),ls((()=>{if(a)return O(a),()=>{O(void 0)}}),[a,O]),ls((()=>{w(T)}),[w,T]),ls((()=>{k(M)}),[k,M]),Ls({open:g,ref:v,onComplete(){g&&x({width:void 0,height:void 0})}});const{props:R}=function(e){const{abortControllerRef:t,animationTypeRef:r,externalRef:o,height:i,hiddenUntilFound:a,keepMounted:s,id:l,mounted:c,onOpenChange:u,open:d,panelRef:p,runOnceAnimationsFinish:f,setDimensions:h,setMounted:m,setOpen:g,setVisible:y,transitionDimensionRef:v,visible:b,width:x}=e,w=n.useRef(!1),k=n.useRef(null),C=n.useRef(d),j=n.useRef(d),N=n.useMemo((()=>"css-animation"===r.current?!b:!d&&!c),[d,c,b,r]),_=is((e=>{if(!e)return;if(null==r.current||null==v.current){const t=getComputedStyle(e),n="none"!==t.animationName&&""!==t.animationName,o="0s"!==t.transitionDuration&&""!==t.transitionDuration;n&&o?"production"!==process.env.NODE_ENV&&Al("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):"none"===t.animationName&&"0s"!==t.transitionDuration?r.current="css-transition":"none"!==t.animationName&&"0s"===t.transitionDuration?r.current="css-animation":r.current="none","horizontal"===e.getAttribute(gc.orientation)||t.transitionProperty.indexOf("width")>-1?v.current="width":v.current="height"}if("css-transition"!==r.current)return;e.style.setProperty("display","block","important"),(void 0===i||void 0===x)&&(h({height:e.scrollHeight,width:e.scrollWidth}),e.style.removeProperty("display"),j.current&&e.style.setProperty("transition-duration","0s"));let t=-1,n=-1;return t=zs.request((()=>{j.current=!1,n=zs.request((()=>{setTimeout((()=>{e.style.removeProperty("transition-duration")}))}))})),()=>{zs.cancel(t),zs.cancel(n)}})),E=Aa(o,p,_);return ls((()=>{if("css-transition"!==r.current)return;const e=p.current;if(!e)return;let n=-1;if(null!=t.current&&(t.current.abort(),t.current=null),!d){h({height:e.scrollHeight,width:e.scrollWidth}),t.current=new AbortController;const n=t.current.signal;let r=-1;const o=zs.request((()=>{r=zs.request((()=>{f((()=>{h({height:0,width:0}),e.style.removeProperty("content-visibility"),e.style.removeProperty("display"),m(!1),t.current=null}),n)}))}));return()=>{zs.cancel(o),zs.cancel(r)}}return e.style.setProperty("display","block","important"),!j.current&&!s&&e.setAttribute(ic.startingStyle,""),h({height:e.scrollHeight,width:e.scrollWidth}),n=zs.request((()=>{e.style.removeProperty("display")})),()=>{zs.cancel(n)}}),[t,r,a,s,c,d,p,f,h,m,v]),ls((()=>{if("css-animation"!==r.current)return;const e=p.current;e&&(k.current=e.style.animationName||k.current,e.style.setProperty("animation-name","none"),h({height:e.scrollHeight,width:e.scrollWidth}),!C.current&&!w.current&&e.style.removeProperty("animation-name"),d?(null!=t.current&&(t.current.abort(),t.current=null),m(!0),y(!0)):(t.current=new AbortController,f((()=>{m(!1),y(!1),t.current=null}),t.current.signal)))}),[t,r,d,p,f,h,m,y,b]),bs((()=>{const e=zs.request((()=>{C.current=!1}));return()=>zs.cancel(e)})),ls((()=>{if(!a)return;const e=p.current;if(!e)return;let t=-1,n=-1;return d&&w.current&&(e.style.transitionDuration="0s",h({height:e.scrollHeight,width:e.scrollWidth}),t=zs.request((()=>{w.current=!1,n=zs.request((()=>{setTimeout((()=>{e.style.removeProperty("transition-duration")}))}))}))),()=>{zs.cancel(t),zs.cancel(n)}}),[a,d,p,h]),ls((()=>{const e=p.current;e&&a&&N&&(e.setAttribute("hidden","until-found"),"css-transition"===r.current&&e.setAttribute(ic.startingStyle,""))}),[a,N,r,p]),n.useEffect((function(){const e=p.current;if(e)return e.addEventListener("beforematch",t),()=>{e.removeEventListener("beforematch",t)};function t(){w.current=!0,g(!0),u(!0)}}),[u,p,g]),n.useMemo((()=>({props:{hidden:N,id:l,ref:E}})),[N,l,E])}({abortControllerRef:d,animationTypeRef:p,externalRef:t,height:f,hiddenUntilFound:T,id:a??y,keepMounted:M,mounted:h,onOpenChange:m,open:g,panelRef:v,runOnceAnimationsFinish:b,setDimensions:x,setMounted:C,setOpen:j,setVisible:N,transitionDimensionRef:_,visible:E,width:S}),{state:D,triggerId:P}=oc(),z=Za("div",e,{state:n.useMemo((()=>({...D,transitionStatus:I})),[D,I]),ref:[t,v],props:[R,{"aria-labelledby":P,role:"region",style:{[yc.accordionPanelHeight]:void 0===f?"auto":`${f}px`,[yc.accordionPanelWidth]:void 0===S?"auto":`${S}px`}},l],customStyleHookMapping:pc});return M||T||!M&&h?z:null}));"production"!==process.env.NODE_ENV&&(vc.displayName="AccordionPanel");const bc={AccordionRoot:"_AccordionRoot_1ukl7_1",Header:"_Header_1ukl7_7",Trigger:"_Trigger_1ukl7_12",TriggerIcon:"_TriggerIcon_1ukl7_29",Panel:"_Panel_1ukl7_40",Content:"_Content_1ukl7_51"},xc=({className:e,children:t,expanded:n,defaultExpanded:r,onChange:o,...i})=>{const a="item",s={...i,type:"single",className:xa(bc.AccordionRoot,e),onValueChange:e=>{null==o||o(e.includes(a))},...void 0!==n?{value:n?[a]:[]}:{defaultValue:r?[a]:[]}};return ve.jsx(Zl,{...s,children:ve.jsx(fc,{value:a,className:bc.Item,children:t})})},wc=({size:e="large",className:t,sx:n,children:r,...o})=>{const i="small"===e,a={"--trigger-height":i?"48px":"72px","--trigger-padding-x":i?"8px":"16px","--trigger-font-size":i?"14px":"18px","--chevron-size":i?"20px":"24px",...n};return ve.jsx(hc,{className:bc.Header,children:ve.jsxs(mc,{...o,className:ui(bc.Trigger,t),style:a,children:[ve.jsx(Bn,{className:bc.TriggerIcon,"data-state-icon":!0}),r]})})},kc=({children:e,...t})=>ve.jsx(vc,{...t,className:bc.Panel,children:ve.jsx("div",{className:bc.Content,children:e})}),Cc=e=>ve.jsx(V,{...e}),jc=({filterIsActive:e,label:t,size:n="large",variant:r="outlined",...o})=>ve.jsx(ve.Fragment,{children:ve.jsxs("div",{className:"w-fit h-fit relative",children:[ve.jsx(la,{...o,type:"button",startIcon:ve.jsx(er,{width:"large"===n?24:20,height:"large"===n?24:20}),variant:r,size:n,children:t||"Filter"}),e&&ve.jsx("div",{className:ui("h-2 w-2 bg-gama-400 rounded-full absolute","large"===n?"top-2 right-2":"top-1 right-1")})]})}),Nc=()=>{const[e,t]=a(null),n=()=>{t((()=>null))};return{anchorEl:e,onClose:n,onAnchorClick:r=>{e?n():(e=>{t((()=>e.currentTarget))})(r)}}},_c=e=>r.isValidElement(e)||"string"==typeof e||"number"==typeof e||null===e||Array.isArray(e),Ec=({filterIsActive:e,popoverContent:t,dataTest:n,disabled:o,size:i="large",variant:a="outlined",popoverProps:s,anchorNode:l,label:c})=>{const{onAnchorClick:u,onClose:d,anchorEl:p}=Nc();return ve.jsxs(ve.Fragment,{children:[ve.jsxs("div",{className:"w-fit h-fit relative",children:[l?r.cloneElement(l({isOpen:!!p,onClose:d}),{onClick:u}):ve.jsx(la,{type:"button",disabled:o,variant:a,startIcon:ve.jsx(er,{width:"large"===i?24:20,height:"large"===i?24:20}),onClick:u,size:i,dataTest:n,children:c||"Filter"}),e&&ve.jsx("div",{className:ui("h-2 w-2 bg-gama-400 rounded-full absolute","large"===i?"top-2 right-2":"top-1 right-1")})]}),ve.jsx(Cc,{...s,open:!!p,anchorEl:p,onClose:d,anchorOrigin:(null==s?void 0:s.anchorOrigin)||{vertical:"bottom",horizontal:"right"},transformOrigin:(null==s?void 0:s.transformOrigin)||{vertical:"top",horizontal:"right"},className:(null==s?void 0:s.className)||"my-1",children:_c(t)?t:t({isOpen:!!p,onClose:d})})]})},Sc=({className:e,contentToCopy:t,locale:n,messageInfo:r,text:o})=>{const i="en"===n?"Copy":"Kopier",a=ma();return ve.jsx(Qi,{title:i,children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"copy-button",className:e,size:"small",variant:"text",startIcon:ve.jsx(pl,{width:20,height:20}),onClick:()=>{navigator.clipboard.writeText(t).then((()=>{r("no"===n?"Kopieres til utklippstavlen":"Copied to clipboard")}))},children:!a&&(o||i)})})})},Oc="_copy-wrapper_1gjzc_1",Ic="_hidden-copy_1gjzc_1",Tc=({className:e,contentToCopy:t,locale:n,messageInfo:r,children:o})=>ve.jsxs("div",{className:xa("flex items-center hover:text-gama-500",Oc,e),children:[o,ve.jsx(Qi,{title:"no"===n?"Kopier":"Copy",className:Ic,children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"copy-button",size:"small",variant:"text",className:"cursor-pointer",onClick:e=>{e.preventDefault(),e.stopPropagation(),navigator.clipboard.writeText(t).then((()=>{r("no"===n?"Kopieres til utklippstavlen":"Copied to clipboard")}))},startIcon:ve.jsx(pl,{width:20,height:20})})})})]}),Mc="_styled-widget-title_1gze6_1",Rc=function(e){return ve.jsx("div",{className:Mc,children:e.children})},Dc="_styled-widget-header_1qk88_1",Pc=({actions:e,title:t,containerClassname:n,actionsClassname:r})=>ve.jsxs("div",{className:xa(Dc,n),children:[ve.jsx(Rc,{children:t}),ve.jsx("div",{className:r,children:e})]}),zc="_asma-core-ui-styled-widget_cb7kt_1",Ac="_widget-header_cb7kt_13",Lc="_widget-content_cb7kt_19",$c="_widget-footer_cb7kt_29",Fc="_widget-link_cb7kt_34";function Vc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"})})}function Bc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}const qc=({children:e,title:t,icon:n,link:r,viewMore:o,persistKey:i,isLoading:l,isEmpty:c,emptyText:u})=>{const[d,p]=a(!1);return s((()=>{if(i){const e=localStorage.getItem(i);p("true"===e)}}),[i]),s((()=>{i&&localStorage.setItem(i,String(d))}),[d,i]),ve.jsxs("div",{className:zc,children:[ve.jsxs("div",{className:Ac,children:[n,ve.jsx(Rc,{children:t})]}),ve.jsx("div",{className:Lc,children:ve.jsxs(ve.Fragment,{children:[e,ve.jsx(Oa,{isLoading:l}),ve.jsx(Ea,{isEmpty:c,emptyText:u})]})}),ve.jsxs("div",{className:$c,children:[!o||null!=o&&o.hide?ve.jsx("div",{}):ve.jsx(la,{disabled:o.disabled,dataTest:"view-more",variant:"text",endIcon:d?ve.jsx(Vc,{width:20,height:20}):ve.jsx(Bc,{width:20,height:20}),onClick:()=>{var e;p(!d),null==(e=null==o?void 0:o.onClick)||e.call(o)},children:d?o.viewLessText:o.viewMoreText}),r&&!r.hide?ve.jsx(Ml,{dataTest:"go-to-button",className:Fc,size:"small",href:r.href,onClick:r.onClick,content:r.content}):ve.jsx("div",{})]})]})},Hc="_styled-module-title_174mo_1",Uc=function(e){return ve.jsx("h1",{"data-test":e.dataTest,className:Hc,children:e.children})},Wc="_dialog_erjok_1",Kc="_hidden_erjok_9";function Gc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M10 21v-2H6.41l4.5-4.5l-1.41-1.41l-4.5 4.5V14H3v7zm4.5-10.09l4.5-4.5V10h2V3h-7v2h3.59l-4.5 4.5z"})})}function Yc(e){return ve.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...e,children:ve.jsx("path",{fill:"currentColor",d:"M19.5 3.09L15 7.59V4h-2v7h7V9h-3.59l4.5-4.5zM4 13v2h3.59l-4.5 4.5l1.41 1.41l4.5-4.5V20h2v-7z"})})}const Xc="object"==typeof global&&global&&global.Object===Object&&global;var Jc="object"==typeof self&&self&&self.Object===Object&&self;const Zc=(Xc||Jc||Function("return this")()).Symbol;var Qc=Object.prototype,eu=Qc.hasOwnProperty,tu=Qc.toString,nu=Zc?Zc.toStringTag:void 0;var ru=Object.prototype.toString;var ou="[object Null]",iu="[object Undefined]",au=Zc?Zc.toStringTag:void 0;function su(e){return null==e?void 0===e?iu:ou:au&&au in Object(e)?function(e){var t=eu.call(e,nu),n=e[nu];try{e[nu]=void 0;var r=!0}catch{}var o=tu.call(e);return r&&(t?e[nu]=n:delete e[nu]),o}(e):function(e){return ru.call(e)}(e)}const lu=Array.isArray;function cu(e){if(!function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}(e))return!1;var t=su(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}const uu=({onCloseText:e="",onMinimizeText:t="",onExpandText:n="",onFullScreenText:r="",showCloseIcon:o=!0,showMinimizeIcon:i=!0,showExpandIcon:s=!0,showFullScreenIcon:l=!0,title:c,label:d,children:p,open:f,onClose:h,className:m="",primaryButtonText:g,primaryButtonLoading:y=!1,secondaryButtonText:v,onPrimaryButtonClick:b,onSecondaryButtonClick:x,dataTest:w,actionNode:k,extraActions:C,extraActionsText:j,btnContainerClassName:N,footerClassName:_,footerInfo:E,locale:S="en",enableFullscreen:O=!0,fullScreenState:I,handleFullScreenState:T})=>{const[M,R]=a(!1),[D,P]=a(!1),{open:z,anchorEl:A,handleOpen:L,handleClose:$}=(()=>{const[e,t]=a(null),n=!!e,r=u((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:u((()=>{t(null)}),[]),handleOpen:r,anchorEl:e}})();if(!f)return null;const F=void 0!==I?I:D,V=g||y,B=V||v,q=()=>{R(!M)};return ve.jsxs(ve.Fragment,{children:[F&&!M&&ve.jsx("div",{className:"z-[51] fixed inset-0 bg-[rgb(98,110,126)] bg-opacity-70"}),ve.jsx("div",{style:{zIndex:51},className:xa(Wc,!M&&Kc),children:ve.jsxs("div",{className:ui("flex items-center justify-between",!M&&"hidden"),"data-test":w,children:[ve.jsx("div",{className:"truncate text-lg font-semibold text-delta-800",children:c}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[s&&ve.jsx(Qi,{title:"en"===S?"Expand":"Utvid",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"minimize-button",variant:"text",size:"small",onClick:q,endIcon:s&&ve.jsx(br,{height:20,width:20,color:"text-gama-500"}),children:n})})}),o&&ve.jsx(Qi,{title:"en"===S?"Close":"Lukk",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"close-button",variant:"textGray",size:"small",onClick:h,endIcon:o&&ve.jsx(Hn,{height:20,width:20,color:"text-delta-700"}),children:e})})})]})]})}),ve.jsxs("div",{className:xa("fixed bottom-4 right-4 z-[51] rounded-lg bg-white shadow-[0_4px_40px_0px_rgba(34,33,51,0.4)] transition-all duration-300",m&&!M?m:"",M&&"!h-0 !w-0 opacity-0 duration-0",F&&!M&&"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-[1000px] h-[95dvh] duration-0"),"data-test":w,children:[ve.jsxs("div",{className:"flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[ve.jsxs("div",{className:"flex items-center justify-between",children:[d?ve.jsx("div",{className:"text-sm text-delta-700",children:d}):ve.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:c}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[k,i&&ve.jsx(Qi,{title:"en"===S?"Minimize":"Minimer",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"minimize-button",variant:"textGray",size:"small",onClick:q,endIcon:i&&ve.jsx(vr,{height:20,width:20,color:"text-delta-700"}),children:t})})}),O&&l&&ve.jsx(Qi,{title:F?"en"===S?"Exit full screen":"Avslutt fullskjerm":"en"===S?"Full screen":"Fullskjerm",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"fullscreen-button",variant:"textGray",size:"small",onClick:()=>{void 0!==I&&T?T():P(!D)},endIcon:F?ve.jsx(Yc,{width:20,height:20,color:"text-delta-700"}):ve.jsx(Gc,{width:20,height:20,color:"text-delta-700"}),children:r})})}),o&&ve.jsx(Qi,{title:"en"===S?"Close":"Lukk",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"close-button",variant:"textGray",size:"small",onClick:h,endIcon:ve.jsx(Hn,{height:20,width:20,color:"text-delta-700"}),children:e})})})]})]}),d&&ve.jsx("div",{className:"text-2xl font-semibold text-delta-800 truncate",children:c})]}),ve.jsxs("div",{className:ui("flex flex-col",F&&!M&&"h-[87dvh]"),children:[ve.jsx("div",{className:"flex-grow overflow-y-auto",children:"function"==typeof p?p({fullScreen:F}):p}),(lu(C)&&null!=C&&C.length||cu(C))&&j||E?ve.jsxs("div",{className:xa("flex items-center justify-between p-4 border-0 border-t-[1px] border-solid border-delta-200 bg-white",_),children:[lu(C)&&null!=C&&C.length&&j?ve.jsxs(ve.Fragment,{children:[ve.jsx(la,{dataTest:"extra-actions-button",variant:"textGray",startIcon:ve.jsx(Dn,{width:24,height:24}),onClick:L,children:j}),ve.jsx(jl,{open:z,anchorEl:A,onClose:$,children:C.map((e=>ve.jsx(Nl,{className:e.className,onClick:e.onClick,children:e.label},e.label)))})]}):j&&cu(C)&&ve.jsx(la,{dataTest:"extra-action-button",variant:"text",onClick:C,children:j})," ",E,B?ve.jsxs("div",{className:xa("flex justify-end gap-x-4",N),children:[v&&x&&ve.jsx(la,{dataTest:"cancel-button",variant:"outlined",onClick:x,children:v}),V&&b&&ve.jsx(la,{dataTest:"save-button",startIcon:y&&ve.jsx(ul,{width:24,height:24}),onClick:b,children:g})]}):null]}):ve.jsx(ve.Fragment,{children:B?ve.jsxs("div",{className:xa("flex justify-end gap-x-4 border-t-[1px] border-delta-200 p-4",N),children:[v&&x&&ve.jsx(la,{dataTest:"cancel-button",variant:"outlined",onClick:x,children:v}),V&&b&&ve.jsx(la,{dataTest:"save-button",startIcon:y&&ve.jsx(ul,{width:24,height:24}),onClick:b,children:g})]}):null})]})]})]})},du=({showCloseIcon:e,tooltipTitle:t,onClick:n,title:r})=>e?ve.jsx("div",{children:ve.jsx(Qi,{title:t,placement:"top",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"close-button",variant:"textGray",size:"small",onClick:n,endIcon:ve.jsx(Hn,{height:20,width:20,color:"text-delta-700"}),children:r})})})}):null,pu=({visibility:e,tooltipTitle:t,onClick:n,title:r,type:o})=>{if(!e)return null;const i="minimize"===o;return"expand"===o?ve.jsx("div",{children:ve.jsx(Qi,{title:t,placement:"top",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"toggle-minimize-btn",variant:"text",size:"small",onClick:n,endIcon:ve.jsx(br,{height:20,width:20,color:"text-gama-500"}),children:r})})})}):i?ve.jsx("div",{children:ve.jsx(Qi,{title:t,placement:"top",children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"toggle-minimize-btn",variant:"textGray",size:"small",onClick:n,endIcon:ve.jsx(vr,{height:20,width:20,color:"text-delta-700"}),children:r})})})}):null},fu="_minimized-dialog_1fc5p_5",hu="_dialog_1fc5p_1",mu="_hidden_1fc5p_27",gu=({fullScreen:e,showFullScreenIcon:t,title:n,tooltipTitle:r,onClick:o})=>t?ve.jsx(ve.Fragment,{children:t&&ve.jsx(Qi,{title:r,children:ve.jsx("div",{children:ve.jsx(la,{dataTest:"fullscreen-button",variant:"textGray",size:"small",onClick:o,endIcon:e?ve.jsx(Yc,{width:20,height:20,color:"text-delta-700"}):ve.jsx(Gc,{width:20,height:20,color:"text-delta-700"}),children:n})})})}):null,yu=({onCloseText:e="",onMinimizeText:t="",onExpandText:n="",onFullScreenText:r="",showCloseIcon:o=!0,showMinimizeIcon:i=!0,showExpandIcon:l=!0,enableFullscreen:u=!0,fullScreenState:d,handleFullScreenState:p,title:f,label:h,children:m,open:g,onClose:y,classNameOverrides:v={maximized:"",minimized:"",fullscreen:""},dataTest:b,actionNode:x,tooltipOverrides:w={maximized:"",minimized:"",close:"",enterFullScreen:"",exitFullScreen:""},style:k})=>{const[C,j]=a(!1),[N,_]=a(!1),E=c(null),S=void 0!==d?d:N;if(s((()=>{if(!S)return;const e=e=>E.current&&!E.current.contains(e.target)&&(void 0!==d&&p?p():_(!1));return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)}),[S,p,d]),!g)return null;const O=()=>{j(!C)};return ve.jsxs(ve.Fragment,{children:[ve.jsx("div",{style:{zIndex:51,...k},className:xa(fu,!C&&mu,v.minimized),children:ve.jsxs("div",{className:ui("flex items-center justify-between",!C&&"hidden"),"data-test":b,children:[ve.jsx("div",{className:"truncate max-w-[303px] text-lg font-semibold text-delta-800 pr-1",children:ve.jsx(Qi,{title:f,placement:"top",children:ve.jsx("div",{className:"truncate",children:f})})}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[ve.jsx(pu,{type:"expand",visibility:l,onClick:O,title:n,tooltipTitle:w.maximized||"Expand"}),ve.jsx(du,{showCloseIcon:o,onClick:y,title:e,tooltipTitle:w.close||"Close"})]})]})}),S&&!C&&ve.jsx("div",{className:"z-[51] fixed inset-0 bg-[rgb(98,110,126)] bg-opacity-70"}),ve.jsxs("div",{ref:E,style:{zIndex:51,...k},className:xa(hu,C&&mu,v.maximized,S&&!C&&"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full max-w-[1000px] h-[95dvh] duration-0",S&&v.fullscreen),children:[ve.jsxs("div",{className:"flex flex-col gap-y-2 p-4 border-b-[1px] border-delta-200",children:[ve.jsxs("div",{className:"flex items-center justify-between",children:[h?ve.jsx("div",{className:"text-sm text-delta-700",children:h}):ve.jsx("div",{className:"text-2xl font-semibold text-delta-800",children:f}),ve.jsxs("div",{className:"flex items-center gap-x-1",children:[x,ve.jsx(pu,{visibility:i,type:"minimize",onClick:O,title:t,tooltipTitle:w.minimized||"Minimize"}),ve.jsx(gu,{showFullScreenIcon:u,fullScreen:S,onClick:()=>{var e;null==(e=document.activeElement)||e.blur(),void 0!==d&&p?p():_(!N)},title:r,tooltipTitle:S?w.exitFullScreen||"Exit full screen":w.enterFullScreen||"Full screen"}),ve.jsx(du,{showCloseIcon:o,onClick:y,title:e,tooltipTitle:w.close||"Close"})]})]}),h&&ve.jsx("div",{className:"text-2xl font-semibold text-delta-800 truncate",children:f})]}),ve.jsx("div",{className:xa(C&&"hidden","flex flex-grow flex-col overflow-y-auto"),children:m})]})]})};function vu({config:e,MAX_DIALOG_WIDTH:t=600}){const n=d(void 0);return{DialogStackProvider:({children:r})=>{const[o,i]=a([]),l=function(){const[e,t]=a((()=>window.innerWidth));return s((()=>{const e=()=>t(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}(),c=u((e=>{const n=[...e].sort(((e,t)=>e.order-t.order)),r=n.length||1,o=Math.min(t,(l-16*(r+1))/r);return n.map(((e,t)=>({...e,width:o,position:{right:16+t*(o+16)}})))}),[l]),d=u(((t,n)=>{var r,o;const a=null==(r=e[t])?void 0:r.dependencies,s=(null==(o=e[t])?void 0:o.order)??1/0,l=n??s;i((e=>{const n=e.find((e=>e.id===t)),r={id:t,open:!0,width:0,position:{right:0},dependencies:a,order:l},o=n?e.map((e=>e.id===t?{...e,open:!0,dependencies:a}:e)):[...e,r];return c(o.filter((e=>e.open)))}))}),[c]),p=u((e=>{i((t=>{var n;const r=new Set([e]);let o;do{o=!1;for(const e of t)null!=(n=e.dependencies)&&n.some((e=>r.has(e)))&&!r.has(e.id)&&(r.add(e.id),o=!0)}while(o);return c(t.filter((e=>!r.has(e.id))))}))}),[c]),f=u((e=>o.find((t=>t.id===e))),[o]);return ve.jsx(n.Provider,{value:{dialogs:o,openDialog:d,closeDialog:p,getDialogState:f},children:r})},useDialogStack:function(){const e=p(n);if(!e)throw new Error("useDialogStack must be used within DialogStackProvider");return e}}}export{$n as ArchiveIcon,wn as AssignmentIcon,kn as AssignmentOutlineIcon,B as Avatar,wr as BadgeIcon,nn as BellIcon,tn as BellOutlineIcon,ir as CalendarBlankOutlineIcon,vn as CalendarIcon,xn as CalendarRangeIcon,Vn as CheckBoxCheckedIcon,yn as CheckFactIcon,gn as CheckFactOutlineIcon,Un as CheckIcon,mn as CheckOutlineIcon,sn as ChevronDoubleLeftIcon,ln as ChevronDoubleRightIcon,Bn as ChevronDownIcon,an as ChevronLeftIcon,on as ChevronRightIcon,qn as ChevronUpIcon,q as ClickAwayListener,Hn as CloseIcon,yr as ConsentsIcon,H as Container,Sc as CopyButton,Tc as CopyWrapper,dn as DashboardViewIcon,pn as DashboardViewOutlineIcon,Qn as DeleteOutlineIcon,Dn as DotsVerticalIcon,Fn as DownloadIcon,Jn as DragHorizontalIcon,Ln as DropDownIcon,An as DropUpIcon,nr as DvrIcon,pr as EarthIcon,kr as EditSquareIcon,rr as ErrorOutlineIcon,U as Fade,sr as FastCheckOutlineIcon,Zn as FilePdfIcon,er as FilterIcon,In as FindReplaceIcon,Tn as FindReplacePeopleIcon,W as FormLabel,rn as HamburgerIcon,_r as HandymanIcon,Nr as HandymanOutlineIcon,Gn as InboxOutboxIcon,Yn as InboxOutboxOutlineIcon,Ws as IndeterminateIcon,br as KeyboardCapslockIcon,ar as LinkOutlineIcon,Cn as ListNumberedIcon,dr as ListSettingsLineIcon,cr as ListStatusIcon,zn as LoadingIcon,tr as LockIcon,jn as MessageProcessingIcon,Nn as MessageProcessingOutlineIcon,xr as MessageReplyIcon,uu as MinimizableDialog,yu as MinimizableDialogV2,vr as MinimizeIcon,bn as NewCalendarIcon,gr as OutlineCalendarMonth,K as Paper,un as PdfIcon,hr as PencilOutlineIcon,hn as PeopleIcon,fn as PeopleOutlineIcon,Wn as PermMediaIcon,Kn as PermMediaOutline,Mn as PersonIcon,Rn as PersonOutlineIcon,Er as PinIcon,Cr as PlusIcon,jr as PlusIconCircle,G as Popper,cn as QnrIcon,or as ReplayIcon,_n as ReportBoxIcon,En as ReportBoxOutlineIcon,Pn as SearchIcon,Sn as SettingsIcon,fr as SettingsMenuHorizontalIcon,On as SettingsOutlineIcon,Y as Skeleton,X as Stack,xc as StyledAccordion,kc as StyledAccordionDetails,wc as StyledAccordionSummary,be as StyledBadge,la as StyledButton,Ks as StyledCheckbox,Or as StyledChip,ga as StyledDialog,wa as StyledDialogActions,Ca as StyledDialogContent,Na as StyledDialogTitle,Cl as StyledDrawer,Ea as StyledEmptyPage,jc as StyledFilterButton,Ec as StyledFilterMenu,vl as StyledFormControl,bl as StyledFormControlLabel,kl as StyledFormGroup,xl as StyledFormHelperText,ia as StyledFormLabel,Gs as StyledInputField,wl as StyledInputLabel,Tr as StyledInteractiveChip,yl as StyledLabel,Ml as StyledLink,Oa as StyledLoading,jl as StyledMenu,Nl as StyledMenuItem,_l as StyledMenuList,Uc as StyledModuleTitle,Cc as StyledPopover,ml as StyledRadio,gl as StyledRadioGroup,Ys as StyledSearchField,Zs as StyledSelect,nl as StyledSelectAutocomplete,Qs as StyledSelectItem,rl as StyledSlider,hl as StyledSwitch,Rl as StyledTab,Dl as StyledTabs,Js as StyledTextarea,Qi as StyledTooltip,ea as StyledTypography,qc as StyledWidget,Pc as StyledWidgetHeader,Rc as StyledWidgetTitle,ur as TextBoxCheckOutlineIcon,Xn as TopicIcon,lr as UnknownDocumentOutlineRoundedIcon,mr as WarningAmberOutlineIcon,Sr as WorkIcon,vu as createDialogStack,ne as omit,pe as prepareForSlot,ue as setMidnightTime,de as setZeroTime};
@@ -1,6 +1,7 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  export type DialogConfigMap = Record<string, {
3
3
  dependencies?: readonly string[];
4
+ order?: number;
4
5
  }>;
5
6
  type DialogId<Config extends DialogConfigMap> = Extract<keyof Config, string>;
6
7
  interface DialogState<Id extends string> {
@@ -11,6 +12,7 @@ interface DialogState<Id extends string> {
11
12
  right: number;
12
13
  };
13
14
  dependencies?: readonly Id[];
15
+ order: number;
14
16
  }
15
17
  interface DialogStackContextType<Config extends DialogConfigMap> {
16
18
  dialogs: DialogState<DialogId<Config>>[];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.1.46",
6
+ "version": "3.1.47",
7
7
  "type": "module",
8
8
  "files": [
9
9
  "dist/**/*",