@cc-openmrs/cc-esm-active-prescriptions 1.0.68 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/464.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 464.js.LICENSE.txt */
2
- "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[464],{793(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,l=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw l}}}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,l,o,a=[],s=!0,c=!1;try{if(l=(n=n.call(e)).next,0===t);else for(;!(s=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function a(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{$nd:()=>ae,Sc0:()=>Ze,a32:()=>br,OuH:()=>Tr,jeF:()=>Pr,ozo:()=>si,wbY:()=>oi,KpK:()=>ui,T2N:()=>di,tUM:()=>li,fs1:()=>pi,ksK:()=>bi});var s={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?s.enableCssCustomProperties=!0:s.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?s.enableCssGrid=!0:s.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?s.enableV11Release=!0:s.enableV11Release=!1:s.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?s.enableExperimentalTileContrast=!0:s.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_TILE_CONTRAST?s.enableTileContrast=!0:s.enableTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?s.enableV12TileDefaultIcons=!0:s.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_RADIO_ICONS?s.enableV12TileRadioIcons=!0:s.enableV12TileRadioIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?s.enableV12Overflowmenu=!0:s.enableV12Overflowmenu=!1,process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE&&"true"===process.env.CARBON_ENABLE_TREEVIEW_CONTROLLABLE?s.enableTreeviewControllable=!0:s.enableTreeviewControllable=!1,process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS&&"true"===process.env.CARBON_ENABLE_V12_STRUCTURED_LIST_VISIBLE_ICONS?s.enableV12StructuredListVisibleIcons=!0:s.enableV12StructuredListVisibleIcons=!1,process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_FOCUS_WRAP_WITHOUT_SENTINELS?s.enableExperimentalFocusWrapWithoutSentinels=!0:s.enableExperimentalFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS&&"true"===process.env.CARBON_ENABLE_FOCUS_WRAP_WITHOUT_SENTINELS?s.enableFocusWrapWithoutSentinels=!0:s.enableFocusWrapWithoutSentinels=!1,process.env.CARBON_ENABLE_DIALOG_ELEMENT&&"true"===process.env.CARBON_ENABLE_DIALOG_ELEMENT?s.enableDialogElement=!0:s.enableDialogElement=!1,process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES&&"true"===process.env.CARBON_ENABLE_V12_DYNAMIC_FLOATING_STYLES?s.enableV12DynamicFloatingStyles=!0:s.enableV12DynamicFloatingStyles=!1,process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING&&"true"===process.env.CARBON_ENABLE_V12_TOGGLE_REDUCED_LABEL_SPACING?s.enableV12ToggleReducedLabelSpacing=!0:s.enableV12ToggleReducedLabelSpacing=!1,process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER&&"true"===process.env.CARBON_ENABLE_ENHANCED_FILE_UPLOADER?s.enableEnhancedFileUploader=!0:s.enableEnhancedFileUploader=!1,process.env.CARBON_ENABLE_PRESENCE&&"true"===process.env.CARBON_ENABLE_PRESENCE?s.enablePresence=!0:s.enablePresence=!1}catch(e){s.enableCssCustomProperties=!1,s.enableCssGrid=!1,s.enableV11Release=!0,s.enableExperimentalTileContrast=!1,s.enableTileContrast=!1,s.enableV12TileDefaultIcons=!1,s.enableV12TileRadioIcons=!1,s.enableV12Overflowmenu=!1,s.enableTreeviewControllable=!1,s.enableV12StructuredListVisibleIcons=!1,s.enableExperimentalFocusWrapWithoutSentinels=!1,s.enableFocusWrapWithoutSentinels=!1,s.enableDialogElement=!1,s.enableV12DynamicFloatingStyles=!1,s.enableV12ToggleReducedLabelSpacing=!1,s.enableEnhancedFileUploader=!1,s.enablePresence=!1}var c=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:s.enableCssCustomProperties},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:s.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:s.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Deprecated, use enable-tile-contrast instead\n",enabled:s.enableExperimentalTileContrast},{name:"enable-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:s.enableTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:s.enableV12TileDefaultIcons},{name:"enable-v12-tile-radio-icons",description:"Enable rendering of radio icons in the RadioTile component\n",enabled:s.enableV12TileRadioIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:s.enableV12Overflowmenu},{name:"enable-treeview-controllable",description:"Enable the new TreeView controllable API\n",enabled:s.enableTreeviewControllable},{name:"enable-v12-structured-list-visible-icons",description:"Enable rendering of radio icons in the StructuredList component\n",enabled:s.enableV12StructuredListVisibleIcons},{name:"enable-experimental-focus-wrap-without-sentinels",description:"Deprecated, use enable-focus-wrap-without-sentinels instead\n",enabled:s.enableExperimentalFocusWrapWithoutSentinels},{name:"enable-focus-wrap-without-sentinels",description:"Enable the new focus wrap behavior that doesn't use sentinel nodes\n",enabled:s.enableFocusWrapWithoutSentinels},{name:"enable-dialog-element",description:"Enable components to utilize the native dialog element\n",enabled:s.enableDialogElement},{name:"enable-v12-dynamic-floating-styles",description:"Enable dynamic setting of floating styles for components like Popover, Tooltip, etc.\n",enabled:s.enableV12DynamicFloatingStyles},{name:"enable-v12-toggle-reduced-label-spacing",description:"Enable a reduced spacing between the toggle control and its label\n",enabled:s.enableV12ToggleReducedLabelSpacing},{name:"enable-enhanced-file-uploader",description:"Enable enhanced functionality for the FileUploader component, including richer callback data and expanded trigger events for onChange and onDelete.\n",enabled:s.enableEnhancedFileUploader},{name:"enable-presence",description:"Enable components to remain unmounted in closed state and mount in open state.\n",enabled:s.enablePresence}],u=function(){return function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach(function(e){n.flags.set(e,t[e])})},[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.flags.set(n,e[n])})}},{key:"mergeWithScope",value:function(e){var t,n=i(e.flags);try{for(n.s();!(t=n.n()).done;){var r=l(t.value,2),o=r[0],a=r[1];this.flags.has(o)||this.flags.set(o,a)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){var t;return this.checkForFlag(e),null!==(t=this.flags.get(e))&&void 0!==t&&t}}])}(),d=function(){var e,t,n=new u(t),r=i(c);try{for(r.s();!(e=r.n()).done;){var l=e.value;n.add(l.name,l.enabled)}}catch(e){r.e(e)}finally{r.f()}return n}();function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}d.add.bind(d),d.enable.bind(d),d.disable.bind(d),d.enabled.bind(d),d.merge.bind(d)({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1,"enable-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1});var p=n(5556),m=n.n(p),h=n(6072),g=n(6942),b=n.n(g);const v={},w=(e,t,n)=>(r,i,l,...o)=>{if(void 0===r[i])return null;if(!v[l]||!v[l][i]){v[l]={...v[l],[i]:!0};const e=r[i];n&&n(e);t&&!t.includes(e)&&(n||t.join(", "))}return e(r,i,l,...o)},E="undefined"!=typeof window?h.useLayoutEffect:h.useEffect,y=e=>{const t=(0,h.useMemo)(()=>e,e);return(0,h.useCallback)(e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},[t])},x=h.createContext("cds");function I(){return h.useContext(x)}const _=(e,t,n)=>{const r=(0,h.useRef)(null);(0,h.useEffect)(()=>{r.current=n},[n]),(0,h.useEffect)(()=>{const n="current"in e?e.current:e;if(!n)return;const i=e=>{r.current&&r.current(e)};return n.addEventListener(t,i),()=>{n.removeEventListener(t,i)}},[e,t])},C=(e,t)=>{const n=(0,h.useRef)(null);(0,h.useEffect)(()=>{n.current=t},[t]),(0,h.useEffect)(()=>{const t=e=>{n.current&&n.current(e)};return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[e])},N={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"},$=e=>N[e]??e;var T=n(3245),O=n(4743),S=n(76);const R=new Map,L=(e,t)=>(t,n,r,...i)=>{if(void 0===t[n])return;R.has(r)||R.set(r,new Set);const l=R.get(r);return l&&!l.has(n)&&l.add(n),e(t,n,r,...i)},k=(0,h.createContext)(d);m().node,L(m().objectOf(m().bool)),m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool,m().bool;const M=e=>(0,h.useContext)(k).enabled(e),A=h.createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),D=h.forwardRef(function({isTabTip:e,align:t=(e?"bottom-start":"bottom"),as:n="span",autoAlign:r=!1,autoAlignBoundary:i,backgroundToken:l="layer",caret:o=!e,className:a,children:s,border:c=!1,dropShadow:u=!0,highContrast:d=!1,onRequestClose:p,open:m,alignmentAxisOffset:g,...v},w){const x=I(),N=(0,h.useRef)(null),R=(0,h.useRef)(null),L=(0,h.useRef)(null),k=M("enable-v12-dynamic-floating-styles")||r,D=(0,h.useRef)(!1);let V=$(t);_(L,"mousedown",e=>{const t=e.target;D.current=F.floating.current?.contains(t)||!1,D.current&&setTimeout(()=>{D.current=!1},0)}),_(L,"focusout",e=>{const t=e.relatedTarget;if(t){if(t&&!L.current?.contains(t)){const e=!k||!F.floating.current||!F.floating.current.contains(t),n=t&&L.current&&t.contains(L.current);e&&!n&&p?.()}}else{if(D.current)return void(D.current=!1);p?.()}}),C("click",({target:e})=>{m&&e instanceof Node&&!L.current?.contains(e)&&p?.()});const P=h.Children.toArray(s).some(e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label"))?7:6,z=(0,h.useRef)({offset:10,caretHeight:P});E(()=>{if(o&&L.current){const e=window.getComputedStyle(L.current,null),t=e.getPropertyValue(`--${x}-popover-offset`),n=e.getPropertyValue(`--${x}-popover-caret-height`);t&&(z.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&(z.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}});const{refs:F,floatingStyles:W,placement:H,middlewareData:j,elements:q,update:K}=(0,T.we)(k?{placement:V,strategy:"fixed",middleware:[(0,O.cY)(e?0:{alignmentAxis:g,mainAxis:o?z?.current?.offset:4}),r&&(0,O.UU)({fallbackPlacements:e?V.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]:V.includes("bottom")?["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"]:["top","top-start","top-end","left","left-start","left-end","right","right-start","right-end","bottom","bottom-start","bottom-end"],fallbackStrategy:"initialPlacement",fallbackAxisSideDirection:"start",boundary:i}),(0,O.UE)({element:R,padding:16}),r&&(0,O.jD)()]}:{});(0,h.useEffect)(()=>{if(k&&m&&q.reference&&q.floating)return(0,S.ll)(q.reference,q.floating,K)},[k,m,q,K]);const U=(0,h.useMemo)(()=>({floating:N,setFloating:F.setFloating,caretRef:R,autoAlign:r}),[F.setFloating,r]);e&&(["bottom-start","bottom-end"].includes(V)||(V="bottom-start")),(0,h.useEffect)(()=>{if(k){const e={...W,visibility:j.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach(t=>{F.floating.current&&(F.floating.current.style[t]=e[t])}),o&&j&&j.arrow&&R?.current){const{x:e,y:t}=j.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[H.split("-")[0]];R.current.style.left=null!=e?`${e}px`:"",R.current.style.top=null!=t?`${t}px`:"",R.current.style.right="",R.current.style.bottom="",n&&(R.current.style[n]=-z?.current?.caretHeight+"px")}}},[W,F.floating,k,j,H,o]);const Z=y([w,L]),G=r&&H!==V?H:V,Y=b()({[`${x}--popover-container`]:!0,[`${x}--popover--caret`]:o,[`${x}--popover--drop-shadow`]:u,[`${x}--popover--border`]:c,[`${x}--popover--high-contrast`]:d,[`${x}--popover--open`]:m,[`${x}--popover--auto-align ${x}--autoalign`]:k,[`${x}--popover--${G}`]:!0,[`${x}--popover--tab-tip`]:e,[`${x}--popover--background-token__background`]:"background"===l&&!d},a),X=h.Children.map(s,t=>{const n=t,r=n?.type?.displayName,i="button"===n?.type,l=k&&r&&["ToggletipButton"].includes(r),o=k&&!["ToggletipContent","PopoverContent"].includes(r);if(h.isValidElement(n)&&(i||l||o)){const t=n?.props?.className,r=(n?.props).ref,i=b()(`${x}--popover--tab-tip__button`,t);return h.cloneElement(n,{className:e&&"button"===n?.type?i:t||"",ref:e=>{(k&&n?.type!==B||k&&"ToggletipButton"===n?.type.displayName)&&F.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return n});return h.createElement(A.Provider,{value:U},h.createElement(n,f({},v,{className:Y,ref:Z}),k||e?X:s))});D.propTypes={align:w(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],$),alignmentAxisOffset:m().number,as:m().oneOfType([m().string,m().elementType]),autoAlign:m().bool,backgroundToken:m().oneOf(["layer","background"]),autoAlignBoundary:m().oneOfType([m().oneOf(["clippingAncestors"]),m().elementType,m().arrayOf(m().elementType),m().exact({x:m().number.isRequired,y:m().number.isRequired,width:m().number.isRequired,height:m().number.isRequired})]),caret:m().bool,border:m().bool,children:m().node,className:m().string,dropShadow:m().bool,highContrast:m().bool,isTabTip:m().bool,onRequestClose:m().func,open:m().bool.isRequired};const B=(0,h.forwardRef)((e,t)=>{const{className:n,children:r,...i}=e,l=I(),{setFloating:o,caretRef:a,autoAlign:s}=h.useContext(A),c=y([o,t]),u=M("enable-v12-dynamic-floating-styles")||s;return h.createElement("span",f({},i,{className:`${l}--popover`}),h.createElement("span",{className:b()(`${l}--popover-content`,n),ref:c},r,u&&h.createElement("span",{className:b()({[`${l}--popover-caret`]:!0,[`${l}--popover--auto-align`]:!0}),ref:a})),!u&&h.createElement("span",{className:b()({[`${l}--popover-caret`]:!0}),ref:a}))});B.displayName="PopoverContent",B.propTypes={children:m().node,className:m().string};const V={key:"Enter",which:13,keyCode:13,code:"Enter"},P={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},z={key:" ",which:32,keyCode:32,code:"Space"},F={key:"End",which:35,keyCode:35,code:"Numpad1"},W={key:"Home",which:36,keyCode:36,code:"Numpad7"},H={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},j={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},q={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},K=(e,{key:t,which:n,keyCode:r,code:i})=>"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?t.includes(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===i,U=h.createContext(null);function Z(){return h.useContext(U)}const G={...h},Y=(()=>{let e=0;return()=>++e})();let X=!1;const J=G.useId?function(e="id"){const t=Z();return`${t?`${t}-`:""}${e}-${G.useId()}`}:function(e="id"){const t=Z(),[n,r]=(0,h.useState)(()=>X?`${t?`${t}-`:""}${e}-${Y()}`:null);return E(()=>{null===n&&r(`${t?`${t}-`:""}${e}-${Y()}`)},[Y]),(0,h.useEffect)(()=>{!1===X&&(X=!0)},[]),n},Q=(e,t="component should have no interactive child nodes")=>{(0,h.useEffect)(()=>{},[t,e])},ee=new Set(["mouseup","touchend","touchcancel"]),te=h.forwardRef(({as:e,align:t="top",className:n,children:r,label:i,description:l,enterDelayMs:o=100,leaveDelayMs:a=300,defaultOpen:s=!1,closeOnActivation:c=!1,dropShadow:u=!1,highContrast:d=!0,...p},m)=>{const g=(0,h.useRef)(null),[v,w]=function(e){const[t,n]=(0,h.useState)(e),r=(0,h.useRef)(null),i=(0,h.useCallback)((e,t=0)=>{window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout(()=>{n(e),r.current=null},t):n(e)},[]);return(0,h.useEffect)(()=>()=>{window.clearTimeout(r.current??void 0)},[]),[t,i]}(s),[y,x]=(0,h.useState)(!1),[_,C]=(0,h.useState)(!1),[N,$]=(0,h.useState)(!1),T=J("tooltip"),O=I(),S=h.Children.only(r),{"aria-labelledby":R,"aria-describedby":L}=S?.props??{},k=!!i,M={onFocus:()=>!_&&w(!0),onBlur:()=>{w(!1),C(!1)},onClick:()=>c&&w(!1),onMouseEnter:F,onMouseLeave:W,onMouseDown:function(){C(!0),H()},onMouseMove:function(e){1===e.buttons?x(!0):x(!1)},onTouchStart:H,"aria-labelledby":R??(k?T:void 0),"aria-describedby":L??(k?void 0:T)},A=(0,h.useCallback)(e=>{v&&K(e,P)&&(e.stopPropagation(),w(!1)),v&&c&&(K(e,V)||K(e,z))&&w(!1)},[c,v,w]);function F(){p?.onMouseEnter||($(!0),w(!0,o))}function W(){$(!1),y||w(!1,a)}function H(){x(!0)}E(()=>{if(v)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){K(e,P)&&A(e)}},[v,A]);const j=(0,h.useCallback)(()=>{x(!1),N||w(!1,a)},[N,a,w]);return Q(g,"The Tooltip component must have no interactive content rendered by the`label` or `description` prop"),(0,h.useEffect)(()=>(y&&ee.forEach(e=>{document.addEventListener(e,j)}),()=>{ee.forEach(e=>{document.removeEventListener(e,j)})}),[y,j]),h.createElement(D,f({as:e,ref:m},p,{align:t,className:b()(`${O}--tooltip`,n),dropShadow:u,highContrast:d,onKeyDown:A,onMouseLeave:W,open:v}),h.createElement("div",{className:`${O}--tooltip-trigger__wrapper`},void 0!==S?h.cloneElement(S,{...M,...function(e){const t=Object.keys(M).filter(e=>e.startsWith("on")),n={};return t.forEach(t=>{n[t]=n=>{M[t](n),e?.[t]&&e?.[t](n)}}),n}(S.props)}):null),h.createElement(B,{"aria-hidden":v?"false":"true",className:`${O}--tooltip-content`,id:T,onMouseEnter:F,role:"tooltip"},i||l))});te.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,description:m().node,dropShadow:m().bool,enterDelayMs:m().number,highContrast:m().bool,label:m().node,leaveDelayMs:m().number};const ne=h.forwardRef(function({as:e,children:t,className:n,dangerDescription:r="danger",disabled:i=!1,hasIconOnly:l=!1,href:o,iconDescription:a,isExpressive:s=!1,isSelected:c,kind:u="primary",onBlur:d,onClick:f,onFocus:p,onMouseEnter:m,onMouseLeave:g,renderIcon:v,size:w,tabIndex:E,type:y="button",...x},_){const C=I(),N={tabIndex:E,className:b()(n,{[`${C}--btn`]:!0,[`${C}--btn--xs`]:"xs"===w&&!s,[`${C}--btn--sm`]:"sm"===w&&!s,[`${C}--btn--md`]:"md"===w&&!s,[`${C}--btn--lg`]:"lg"===w&&!s,[`${C}--btn--xl`]:"xl"===w,[`${C}--btn--2xl`]:"2xl"===w,[`${C}--layout--size-${w}`]:w,[`${C}--btn--${u}`]:u,[`${C}--btn--disabled`]:i,[`${C}--btn--expressive`]:s,[`${C}--btn--icon-only`]:l,[`${C}--btn--selected`]:l&&c&&"ghost"===u}),ref:_},$=v?h.createElement(v,{"aria-label":a,className:`${C}--btn__icon`,"aria-hidden":"true"}):null,T=["danger","danger--tertiary","danger--ghost"];let O="button";const S=J("danger-description"),{"aria-pressed":R,"aria-describedby":L}=x;let k={disabled:i,type:y,"aria-describedby":T.includes(u)?S:L||void 0,"aria-pressed":R??(l&&"ghost"===u?c:void 0)};const M={href:o};let A=null;return T.includes(u)&&(A=h.createElement("span",{id:S,className:`${C}--visually-hidden`},r)),e?(O=e,k={...k,...M}):o&&!i&&(O="a",k=M),h.createElement(O,{onMouseEnter:m,onMouseLeave:g,onFocus:p,onBlur:d,onClick:f,...x,...N,...k},A,t,$)}),re=(0,h.forwardRef)((e,t)=>{const{className:n,count:r,...i}=e,l=I(),o=b()(`${l}--badge-indicator`,n,{[`${l}--badge-indicator--count`]:r}),a=r&&r>999?"999+":r;return h.createElement("div",f({className:o,ref:t},i),a)});re.propTypes={className:m().string,count:m().number,id:m().string};const ie=["primary","secondary","ghost","tertiary"],le=(0,h.forwardRef)(({align:e,autoAlign:t=!1,badgeCount:n,children:r,className:i,closeOnActivation:l=!0,defaultOpen:o=!1,disabled:a,dropShadow:s=!1,enterDelayMs:c=100,highContrast:u=!0,kind:d,label:p,leaveDelayMs:m=100,wrapperClasses:g,size:v,isSelected:w,...E},y)=>{const x=I(),_=b()(g,`${x}--icon-tooltip`,{[`${x}--icon-tooltip--disabled`]:a});!n||"ghost"===d&&"lg"===v||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const C=J("badge-indicator");return h.createElement(te,{align:e,autoAlign:t,closeOnActivation:l,className:_,defaultOpen:o,dropShadow:s,enterDelayMs:c,highContrast:u,label:p,leaveDelayMs:m},h.createElement(ne,f({},E,{disabled:a,kind:d,ref:y,size:v,isSelected:w,hasIconOnly:!0,className:i,"aria-describedby":E["aria-describedby"]||n&&C}),r,!a&&void 0!==n&&h.createElement(re,{id:C,count:n>0?n:void 0})))});le.propTypes={align:w(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],$),autoAlign:m().bool,badgeCount:m().number,href:m().string,children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,dropShadow:m().bool,disabled:m().bool,enterDelayMs:m().number,isSelected:m().bool,highContrast:m().bool,kind:m().oneOf(ie),label:m().node.isRequired,leaveDelayMs:m().number,rel:m().string,size:m().oneOf(["sm","md","lg"]),target:m().string,wrapperClasses:m().string};const oe=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],ae=h.forwardRef((e,t)=>{const{as:n,autoAlign:r=!1,children:i,hasIconOnly:l=!1,tooltipHighContrast:o=!0,tooltipDropShadow:a=!1,iconDescription:s,kind:c="primary",onBlur:u,onClick:d,onFocus:p,onMouseEnter:m,onMouseLeave:g,renderIcon:b,size:v,tooltipAlignment:w="center",tooltipPosition:E="top",...y}=e;!b||i||s||console.error("Button: renderIcon property specified without also providing an iconDescription property. This may impact accessibility for screen reader users.");const x=b?h.createElement(b,null):null;if(function(e){return!0===e}(l)){let e;return"top"!==E&&"bottom"!==E||("center"===w&&(e=E),"end"===w&&(e=`${E}-end`),"start"===w&&(e=`${E}-start`)),"right"!==E&&"left"!==E||(e=E),h.createElement(le,f({},y,{ref:t,as:n,align:e,label:s,kind:c,size:v,highContrast:o,dropShadow:a,onMouseEnter:m,onMouseLeave:g,onFocus:p,onBlur:u,autoAlign:r,onClick:d,renderIcon:x?null:b}),x??i)}{const{tooltipAlignment:n,...r}=e;return h.createElement(ne,f({ref:t},r))}});ae.displayName="Button",ae.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),autoAlign:m().bool,children:m().node,className:m().string,dangerDescription:m().string,disabled:m().bool,hasIconOnly:m().bool,href:m().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:m().bool,isSelected:m().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,i=r?ie:oe;return void 0===e[t]||i.includes(e[t])?null:new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Expected one of ${i.join(", ")}.`)},onBlur:m().func,onClick:m().func,onFocus:m().func,onMouseEnter:m().func,onMouseLeave:m().func,rel:m().string,renderIcon:m().oneOfType([m().func,m().object]),role:m().string,size:m().oneOf(["xs","sm","md","lg","xl","2xl"]),tabIndex:m().number,target:m().string,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipDropShadow:m().bool,tooltipHighContrast:m().bool,tooltipPosition:m().oneOf(["top","right","bottom","left"]),type:m().oneOf(["button","reset","submit"])};const se=(0,h.createContext)({direction:"auto",getTextDirection:{current:void 0}}),ce=(0,h.forwardRef)(({as:e,children:t,dir:n="auto",...r},i)=>{const l=(0,h.useContext)(se),o={},a=e??"span",s={...l};if(l){const{direction:e,getTextDirection:r}=l;if(r&&r.current){const n=ue(t),i=r.current(n);e!==i?(o.dir=i,s.direction=i):"auto"===e&&(o.dir=i)}else e!==n?(o.dir=n,s.direction=n):"auto"===e&&(o.dir=n)}else o.dir=n,s.direction=n;return h.createElement(se.Provider,{value:s},h.createElement(a,f({ref:i},r,o),t))});ce.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,dir:m().oneOf(["ltr","rtl","auto"])};const ue=e=>{if("string"==typeof e)return e;const t=h.Children.map(e,e=>"string"==typeof e?e:null)?.filter(e=>null!==e);return 1===t?.length?t[0]:t};function de(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach(function(t){de(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function me(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var he=["width","height","viewBox"],ge=["tabindex"],be={focusable:"false",preserveAspectRatio:"xMidYMid meet"};const ve=(0,h.forwardRef)(function({className:e,children:t,tabIndex:n,xmlns:r="http://www.w3.org/2000/svg",preserveAspectRatio:i="xMidYMid meet",...l},o){const{tabindex:a,...s}=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=e.height,r=e.viewBox,i=void 0===r?"0 0 ".concat(t," ").concat(n):r,l=me(e,he),o=l.tabindex,a=me(l,ge),s=pe(pe(pe({},be),a),{},{width:t,height:n,viewBox:i});return s["aria-label"]||s["aria-labelledby"]?(s.role="img",null!=o&&(s.focusable="true",s.tabindex=o)):s["aria-hidden"]=!0,s}({...l,tabindex:n}),c=s;return e&&(c.className=e),null!=a&&(c.tabIndex="number"==typeof a?a:Number(n)),o&&(c.ref=o),r&&(c.xmlns=r),i&&(c.preserveAspectRatio=i),h.createElement("svg",c,t)});var we,Ee,ye,xe,Ie,_e,Ce,Ne,$e,Te,Oe;ve.displayName="Icon",ve.propTypes={"aria-hidden":m().oneOfType([m().bool,m().oneOf(["true","false"])]),"aria-label":m().string,"aria-labelledby":m().string,children:m().node,className:m().string,height:m().oneOfType([m().number,m().string]),preserveAspectRatio:m().string,tabIndex:m().oneOfType([m().number,m().string]),viewBox:m().string,width:m().oneOfType([m().number,m().string]),xmlns:m().string};const Se=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},we||(we=h.createElement("path",{fill:"none",d:"M16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Zm-1.125-5h2.25V12h-2.25Z","data-icon-path":"inner-path"})),Ee||(Ee=h.createElement("path",{d:"M16.002,6.1714h-.004L4.6487,27.9966,4.6506,28H27.3494l.0019-.0034ZM14.875,12h2.25v9h-2.25ZM16,26a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,16,26Z"})),ye||(ye=h.createElement("path",{d:"M29,30H3a1,1,0,0,1-.8872-1.4614l13-25a1,1,0,0,1,1.7744,0l13,25A1,1,0,0,1,29,30ZM4.6507,28H27.3493l.002-.0033L16.002,6.1714h-.004L4.6487,27.9967Z"})),e)}),Re=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},xe||(xe=h.createElement("path",{d:"M8,1C4.2,1,1,4.2,1,8s3.2,7,7,7s7-3.1,7-7S11.9,1,8,1z M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2 c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z"})),Ie||(Ie=h.createElement("path",{d:"M7.5,4h1v5h-1C7.5,9,7.5,4,7.5,4z M8,12.2c-0.4,0-0.8-0.4-0.8-0.8s0.3-0.8,0.8-0.8 c0.4,0,0.8,0.4,0.8,0.8S8.4,12.2,8,12.2z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},_e||(_e=h.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1 s1,0.4,1,1S10.6,16,10,16z"})),Ce||(Ce=h.createElement("path",{d:"M9.2,5h1.5v7H9.2V5z M10,16c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S10.6,16,10,16z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Ne||(Ne=h.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11C23,5.9,18.1,1,12,1z M11.1,6h1.8v8h-1.8V6z M12,19.2 c-0.7,0-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2s1.2,0.6,1.2,1.2S12.7,19.2,12,19.2z"})),$e||($e=h.createElement("path",{fill:"none",d:"M13.2,18c0,0.7-0.6,1.2-1.2,1.2s-1.2-0.6-1.2-1.2s0.6-1.2,1.2-1.2S13.2,17.3,13.2,18z M12.9,6 h-1.8v8h1.8V6z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Te||(Te=h.createElement("path",{d:"M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14C30,8.3,23.7,2,16,2z M14.9,8h2.2v11h-2.2V8z M16,25 c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22c0.8,0,1.5,0.7,1.5,1.5S16.8,25,16,25z"})),Oe||(Oe=h.createElement("path",{fill:"none",d:"M17.5,23.5c0,0.8-0.7,1.5-1.5,1.5c-0.8,0-1.5-0.7-1.5-1.5S15.2,22,16,22 C16.8,22,17.5,22.7,17.5,23.5z M17.1,8h-2.2v11h2.2V8z","data-icon-path":"inner-path",opacity:"0"})),e)}),Le=()=>{};m().elementType,m().node,m().string;const ke=h.createContext(void 0);function Me(){return(0,h.useContext)(ke)}function Ae({align:e,as:t,autoAlign:n,className:r,children:i,defaultOpen:l=!1,...o}){const a=(0,h.useRef)(null),[s,c]=(0,h.useState)(l),u=I(),d=J(),p=b()(`${u}--toggletip`,r,{[`${u}--toggletip--open`]:s,[`${u}--autoalign`]:n}),m={toggle:()=>{c(!s)},close:()=>{c(!1)}},g={buttonProps:{"aria-expanded":s,"aria-controls":d,"aria-describedby":s?d:void 0,onClick:m.toggle},contentProps:{id:d},onClick:{onClick:m.toggle}};return C("blur",()=>{s&&m.close()}),(0,h.useEffect)(()=>{if(!a.current)return;const e=a.current.ownerDocument||document,t="PointerEvent"in window?"pointerdown":"mousedown",n=e=>{const t=e.target;s&&t&&!a.current?.contains(t)&&c(!1)},r={capture:!0};return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}},[s]),h.createElement(ke.Provider,{value:g},h.createElement(D,f({align:e,as:t,caret:!0,className:p,dropShadow:!1,highContrast:!0,open:s,onKeyDown:e=>{if(s&&K(e,P)){e.stopPropagation(),m.close();const t=a.current?.children[0];t instanceof HTMLButtonElement&&t.focus()}},onBlur:e=>{s&&null===e.relatedTarget||e.currentTarget.contains(e.relatedTarget)||m.close()},ref:a,autoAlign:n},o),i))}const{open:De,...Be}=D.propTypes??{};Ae.propTypes={...Be,defaultOpen:m().bool};const Ve=(0,h.forwardRef)(function({children:e,className:t,label:n="Show information",as:r,...i},l){const o=Me(),a=I(),s=b()(`${a}--toggletip-button`,t),c=r??"button";return"button"!==c?h.createElement(c,f({},o?.onClick,{className:s},i),e):h.createElement("button",f({},o?.buttonProps,{"aria-label":n,type:"button",className:s,ref:l},i),e)});Ve.propTypes={children:m().node,className:m().string,label:m().string},Ve.displayName="ToggletipButton";const Pe=(0,h.forwardRef)((e,t)=>{const{children:n,className:r}=e,i=Me(),l=I();return h.createElement(B,f({className:r},i?.contentProps,{ref:t}),h.createElement("div",{className:`${l}--toggletip-content`},n))});function ze({children:e,className:t}){const n=I(),r=b()(`${n}--toggletip-actions`,t);return h.createElement("div",{className:r},e)}var Fe;Pe.propTypes={children:m().node,className:m().string},Pe.displayName="ToggletipContent",ze.propTypes={children:m().node,className:m().string};const We=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Fe||(Fe=h.createElement("path",{d:"M20,10H7.8149l3.5874-3.5859L10,5,4,11,10,17l1.4023-1.4146L7.8179,12H20a6,6,0,0,1,0,12H12v2h8a8,8,0,0,0,0-16Z"})),e)});var He;const je=h.forwardRef(function({className:e,children:t},n){const r=I(),i=b()(e,{[`${r}--ai-label-content`]:!0,[`${r}--ai-label-content--with-actions`]:!1});return h.createElement(Pe,{className:i},t)});je.displayName="AILabelContent",je.propTypes={children:m().node,className:m().string};const qe=h.forwardRef(function({className:e,children:t},n){const r=I(),i=b()(e,{[`${r}--ai-label-actions`]:!0});return h.createElement(ze,{className:i},t)});qe.displayName="AILabelActions",qe.propTypes={children:m().node,className:m().string};const Ke=h.forwardRef(function({aiText:e="AI",aiTextLabel:t,textLabel:n,align:r,autoAlign:i=!0,children:l,className:o,kind:a="default",onRevertClick:s,revertActive:c,revertLabel:u="Revert to AI input",slugLabel:d="Show information","aria-label":p="Show information",size:m="xs",...g},v){const w=I(),E=J("AILabel"),y=b()(o,{[`${w}--ai-label`]:!0,[`${w}--ai-label--revert`]:c}),x=b()({[`${w}--ai-label__button`]:!0,[`${w}--ai-label__button--${m}`]:m,[`${w}--ai-label__button--${a}`]:a,[`${w}--ai-label__button--inline-with-content`]:"inline"===a&&(t||n)}),_=t||n?`${e} ${t||n}`:`${e} ${d||p}`,C=["xs","2xs","mini"].includes(m);return h.createElement("div",{className:y,ref:v,id:E},c?h.createElement(le,f({onClick:e=>{s&&s(e)},kind:"ghost",size:"sm",label:u},g),He||(He=h.createElement(We,null))):h.createElement(Ae,f({align:r,autoAlign:i,alignmentAxisOffset:C?-24:0},g),h.createElement(Ve,{className:x,label:"inline"===a?"":_},h.createElement("span",{className:`${w}--ai-label__text`},e),"inline"===a&&(t||n)&&h.createElement("span",{className:`${w}--ai-label__additional-text`},t||n)),l))});Ke.displayName="AILabel",Ke.propTypes={...Ae.propTypes,AILabelContent:m().node,aiText:m().string,aiTextLabel:L(m().string),"aria-label":m().string,kind:m().oneOf(["default","inline"]),onRevertClick:m().func,revertActive:m().bool,revertLabel:m().string,size:m().oneOf(["mini","2xs","xs","sm","md","lg","xl"]),slugLabel:L(m().string),textLabel:m().string};const Ue=(e,t)=>(0,h.isValidElement)(e)&&e.type===t,Ze=h.forwardRef(({className:e,decorator:t,helperText:n,id:r,labelText:i,onChange:l=Le,onClick:o,indeterminate:a=!1,invalid:s,invalidText:c,hideLabel:u,readOnly:d,title:p="",warn:m,warnText:g,slug:v,...w},E)=>{const y=I(),x=!d&&!s&&m,_=!s&&!m,C=J(),N=null!=n,$=N?`checkbox-helper-text-${C}`:void 0,T=N&&h.createElement("div",{id:$,className:`${y}--form__helper-text`},n),O=b()(`${y}--form-item`,`${y}--checkbox-wrapper`,e,{[`${y}--checkbox-wrapper--readonly`]:d,[`${y}--checkbox-wrapper--invalid`]:!d&&s,[`${y}--checkbox-wrapper--warning`]:x,[`${y}--checkbox-wrapper--slug`]:v,[`${y}--checkbox-wrapper--decorator`]:t}),S=b()(`${y}--checkbox-label-text`,{[`${y}--visually-hidden`]:u}),R=v??t,L=Ue(R,Ke)?(0,h.cloneElement)(R,{size:"inline"===R.props.kind?"md":"mini"}):R;return h.createElement("div",{className:O},h.createElement("input",f({},w,{type:"checkbox","data-invalid":!!s||void 0,onChange:e=>{!d&&l&&l(e,{checked:e.target.checked,id:r})},className:`${y}--checkbox`,id:r,ref:e=>{e&&(e.indeterminate=a??!1),"function"==typeof E?E(e):E&&"current"in E&&(E.current=e)},"aria-readonly":d,onClick:e=>{d&&e.preventDefault(),o&&o(e)}})),h.createElement("label",{htmlFor:r,className:`${y}--checkbox-label`,title:p},h.createElement(ce,{as:"div",className:S},i,v?L:t?h.createElement("div",{className:`${y}--checkbox-wrapper-inner--decorator`},L):"")),h.createElement("div",{className:`${y}--checkbox__validation-msg`},!d&&s&&h.createElement(h.Fragment,null,h.createElement(Re,{className:`${y}--checkbox__invalid-icon`}),h.createElement("div",{className:`${y}--form-requirement`},c)),x&&h.createElement(h.Fragment,null,h.createElement(Se,{className:`${y}--checkbox__invalid-icon ${y}--checkbox__invalid-icon--warning`}),h.createElement("div",{className:`${y}--form-requirement`},g))),_&&T)});function Ge(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ye.apply(null,arguments)}Ze.propTypes={checked:m().bool,className:m().string,decorator:m().node,defaultChecked:m().bool,disabled:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,indeterminate:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,onChange:m().func,readOnly:m().bool,slug:L(m().node),title:m().string,warn:m().bool,warnText:m().node},Ze.displayName="Checkbox",n(4353);const Xe=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Je=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Qe=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Je(n.overflowY,t)||Je(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},et=(e,t,n,r,i,l,o,a)=>l<e&&o>t||l>e&&o<t?0:l<=e&&a<=n||o>=t&&a>=n?l-e-r:o>t&&a<n||l<e&&a>n?o-t+i:0,tt=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t};var nt=function(){return nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},nt.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError;var rt=0;function it(){}function lt(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function ot(e,t){var n;function r(){n&&clearTimeout(n)}function i(){for(var i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];r(),n=setTimeout(function(){n=null,e.apply(void 0,l)},t)}return i.cancel=r,i}function at(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some(function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault})}}function st(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach(function(t){"function"==typeof t?t(e):t&&(t.current=e)})}}function ct(e,t){return e&&t?Object.keys(e).reduce(function(n,r){return n[r]=ut(t,r)?t[r]:e[r],n},{}):e}function ut(e,t){return void 0!==e[t]}function dt(e,t,n,r,i){void 0===i&&(i=!1);var l=n.length;if(0===l)return-1;var o=l-1;("number"!=typeof e||e<0||e>o)&&(e=t>0?-1:o+1);var a=e+t;a<0?a=i?o:0:a>o&&(a=i?0:o);var s=ft(a,t<0,n,r,i);return-1===s?e>=l?-1:e:s}function ft(e,t,n,r,i){void 0===i&&(i=!1);var l=n.length;if(t){for(var o=e;o>=0;o--)if(!r(n[o],o))return o}else for(var a=e;a<l;a++)if(!r(n[a],a))return a;return i?ft(t?l-1:0,t,n,r):-1}function pt(e,t,n,r){return void 0===r&&(r=!0),n&&t.some(function(t){return t&&(lt(t,e,n)||r&&lt(t,n.document.activeElement,n))})}var mt=ot(function(e){ht(e).textContent=""},500);function ht(e){var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var gt={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};var bt=ot(function(e,t){!function(e,t){e&&t&&(ht(t).textContent=e,mt(t))}(e,t)},200),vt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?h.useLayoutEffect:h.useEffect,wt="useId"in h?function(e){var t=e.id,n=e.labelId,r=e.menuId,i=e.getItemId,l=e.toggleButtonId,o=e.inputId,a="downshift-"+h.useId();return t||(t=a),(0,h.useRef)({labelId:n||t+"-label",menuId:r||t+"-menu",getItemId:i||function(e){return t+"-item-"+e},toggleButtonId:l||t+"-toggle-button",inputId:o||t+"-input"}).current}:function(e){var t=e.id,n=void 0===t?"downshift-"+String(rt++):t,r=e.labelId,i=e.menuId,l=e.getItemId,o=e.toggleButtonId,a=e.inputId;return(0,h.useRef)({labelId:r||n+"-label",menuId:i||n+"-menu",getItemId:l||function(e){return n+"-item-"+e},toggleButtonId:o||n+"-toggle-button",inputId:a||n+"-input"}).current};function Et(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function yt(e){var t=(0,h.useRef)(e);return t.current=e,t}function xt(e,t,n,r){var i=(0,h.useRef)(),l=(0,h.useRef)(),o=(0,h.useCallback)(function(t,n){l.current=n,t=ct(t,n.props);var r=e(t,n);return n.props.stateReducer(t,Ye({},n,{changes:r}))},[e]),a=(0,h.useReducer)(o,t,n),s=a[0],c=a[1],u=yt(t),d=(0,h.useCallback)(function(e){return c(Ye({props:u.current},e))},[u]),f=l.current;return(0,h.useEffect)(function(){var e=ct(i.current,null==f?void 0:f.props);f&&i.current&&!r(e,s)&&function(e,t,n){var r=e.props,i=e.type,l={};Object.keys(t).forEach(function(r){!function(e,t,n,r){var i=t.props,l=t.type,o="on"+Et(e)+"Change";i[o]&&void 0!==r[e]&&r[e]!==n[e]&&i[o](Ye({type:l},r))}(r,e,t,n),n[r]!==t[r]&&(l[r]=n[r])}),r.onStateChange&&Object.keys(l).length&&r.onStateChange(Ye({type:i},l))}(f,e,s),i.current=s},[s,f,r]),[s,d]}var It={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:function(e,t){return t.changes},scrollIntoView:function(e,t){if(e){var n=((e,t)=>{var n,r,i,l;if("undefined"==typeof document)return[];const{scrollMode:o,block:a,inline:s,boundary:c,skipOverflowHiddenElements:u}=t,d="function"==typeof c?c:e=>e!==c;if(!Xe(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let m=e;for(;Xe(m)&&d(m);){if(m=tt(m),m===f){p.push(m);break}null!=m&&m===document.body&&Qe(m)&&!Qe(document.documentElement)||null!=m&&Qe(m,u)&&p.push(m)}const h=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,g=null!=(l=null==(i=window.visualViewport)?void 0:i.height)?l:innerHeight,{scrollX:b,scrollY:v}=window,{height:w,width:E,top:y,right:x,bottom:I,left:_}=e.getBoundingClientRect(),{top:C,right:N,bottom:$,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let O="start"===a||"nearest"===a?y-C:"end"===a?I+$:y+w/2-C+$,S="center"===s?_+E/2-T+N:"end"===s?x+N:_-T;const R=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:i,right:l,bottom:c,left:u}=t.getBoundingClientRect();if("if-needed"===o&&y>=0&&_>=0&&I<=g&&x<=h&&(t===f&&!Qe(t)||y>=i&&I<=c&&_>=u&&x<=l))return R;const d=getComputedStyle(t),m=parseInt(d.borderLeftWidth,10),C=parseInt(d.borderTopWidth,10),N=parseInt(d.borderRightWidth,10),$=parseInt(d.borderBottomWidth,10);let T=0,L=0;const k="offsetWidth"in t?t.offsetWidth-t.clientWidth-m-N:0,M="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-$:0,A="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,D="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)T="start"===a?O:"end"===a?O-g:"nearest"===a?et(v,v+g,g,C,$,v+O,v+O+w,w):O-g/2,L="start"===s?S:"center"===s?S-h/2:"end"===s?S-h:et(b,b+h,h,m,N,b+S,b+S+E,E),T=Math.max(0,T+v),L=Math.max(0,L+b);else{T="start"===a?O-i-C:"end"===a?O-c+$+M:"nearest"===a?et(i,c,n,C,$+M,O,O+w,w):O-(i+n/2)+M/2,L="start"===s?S-u-m:"center"===s?S-(u+r/2)+k/2:"end"===s?S-l+N+k:et(u,l,r,m,N+k,S,S+E,E);const{scrollLeft:e,scrollTop:o}=t;T=0===D?0:Math.max(0,Math.min(o+T/D,t.scrollHeight-n/D+M)),L=0===A?0:Math.max(0,Math.min(e+L/A,t.scrollWidth-r/A+k)),O+=o-T,S+=e-L}R.push({el:t,top:T,left:L})}return R})(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});n.forEach(function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r})}},environment:"undefined"==typeof window?void 0:window};function _t(e,t,n){void 0===n&&(n=gt);var r=e["default"+Et(t)];return void 0!==r?r:n[t]}function Ct(e,t,n){void 0===n&&(n=gt);var r=e[t];if(void 0!==r)return r;var i=e["initial"+Et(t)];return void 0!==i?i:_t(e,t,n)}function Nt(e,t,n){var r=e.items,i=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,o=e.isItemDisabled,a=e.itemToKey,s=t.selectedItem,c=t.highlightedIndex;return 0===r.length?-1:void 0===i||c!==i||o(r[i],i)?void 0===l||o(r[l],l)?s?r.findIndex(function(e){return a(s)===a(e)}):n<0&&!o(r[r.length-1],r.length-1)?r.length-1:n>0&&!o(r[0],0)?0:-1:l:i}var $t=it;function Tt(e,t,n){var r;return void 0===n&&(n=!0),Ye({isOpen:!1,highlightedIndex:-1},(null==(r=e.items)?void 0:r.length)&&t>=0&&Ye({selectedItem:e.items[t],isOpen:_t(e,"isOpen"),highlightedIndex:_t(e,"highlightedIndex")},n&&{inputValue:e.itemToString(e.items[t])}))}function Ot(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function St(){var e=h.useRef(!0);return h.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Rt(e){var t=_t(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var Lt=Ye({},{environment:m().shape({addEventListener:m().func.isRequired,removeEventListener:m().func.isRequired,document:m().shape({createElement:m().func.isRequired,getElementById:m().func.isRequired,activeElement:m().any.isRequired,body:m().any.isRequired}).isRequired,Node:m().func.isRequired}),itemToString:m().func,itemToKey:m().func,stateReducer:m().func},{getA11yStatusMessage:m().func,highlightedIndex:m().number,defaultHighlightedIndex:m().number,initialHighlightedIndex:m().number,isOpen:m().bool,defaultIsOpen:m().bool,initialIsOpen:m().bool,selectedItem:m().any,initialSelectedItem:m().any,defaultSelectedItem:m().any,id:m().string,labelId:m().string,menuId:m().string,getItemId:m().func,toggleButtonId:m().string,onSelectedItemChange:m().func,onHighlightedIndexChange:m().func,onStateChange:m().func,onIsOpenChange:m().func,scrollIntoView:m().func});nt(nt({},Lt),{items:m().array.isRequired,isItemDisabled:m().func}),nt(nt({},It),{isItemDisabled:function(){return!1}});var kt=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:22,FunctionCloseMenu:17,FunctionOpenMenu:16,FunctionReset:21,FunctionSelectItem:19,FunctionSetHighlightedIndex:18,FunctionSetInputValue:20,FunctionToggleMenu:15,InputBlur:9,InputChange:8,InputClick:10,InputKeyDownArrowDown:0,InputKeyDownArrowUp:1,InputKeyDownEnd:4,InputKeyDownEnter:7,InputKeyDownEscape:2,InputKeyDownHome:3,InputKeyDownPageDown:6,InputKeyDownPageUp:5,ItemClick:13,ItemMouseMove:12,MenuMouseLeave:11,ToggleButtonClick:14});function Mt(e){var t=function(e){var t=Ct(e,"selectedItem"),n=Ct(e,"isOpen"),r=function(e){var t=Ct(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}(e),i=Ct(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):r,isOpen:n,selectedItem:t,inputValue:i}}(e),n=t.selectedItem,r=t.inputValue;return""===r&&n&&void 0===e.defaultInputValue&&void 0===e.initialInputValue&&void 0===e.inputValue&&(r=e.itemToString(n)),Ye({},t,{inputValue:r})}Ye({},Lt,{items:m().array.isRequired,isItemDisabled:m().func,inputValue:m().string,defaultInputValue:m().string,initialInputValue:m().string,inputId:m().string,onInputValueChange:m().func});var At=it,Dt=Ye({},It,{isItemDisabled:function(){return!1}});function Bt(e,t){var n,r,i=t.type,l=t.props,o=t.altKey;switch(i){case 13:r={isOpen:_t(l,"isOpen"),highlightedIndex:Rt(l),selectedItem:l.items[t.index],inputValue:l.itemToString(l.items[t.index])};break;case 0:r=e.isOpen?{highlightedIndex:dt(e.highlightedIndex,1,l.items,l.isItemDisabled,!0)}:{highlightedIndex:o&&null==e.selectedItem?-1:Nt(l,e,1),isOpen:l.items.length>=0};break;case 1:r=e.isOpen?o?Tt(l,e.highlightedIndex):{highlightedIndex:dt(e.highlightedIndex,-1,l.items,l.isItemDisabled,!0)}:{highlightedIndex:Nt(l,e,-1),isOpen:l.items.length>=0};break;case 7:r=Tt(l,e.highlightedIndex);break;case 2:r=Ye({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case 5:r={highlightedIndex:dt(e.highlightedIndex,-10,l.items,l.isItemDisabled,!0)};break;case 6:r={highlightedIndex:dt(e.highlightedIndex,10,l.items,l.isItemDisabled,!0)};break;case 3:r={highlightedIndex:ft(0,!1,l.items,l.isItemDisabled)};break;case 4:r={highlightedIndex:ft(l.items.length-1,!0,l.items,l.isItemDisabled)};break;case 9:r=Ye({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&(null==(n=l.items)?void 0:n.length)&&t.selectItem&&{selectedItem:l.items[e.highlightedIndex],inputValue:l.itemToString(l.items[e.highlightedIndex])});break;case 8:r={isOpen:!0,highlightedIndex:Rt(l),inputValue:t.inputValue};break;case 10:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Nt(l,e,0)};break;case 19:r={selectedItem:t.selectedItem,inputValue:l.itemToString(t.selectedItem)};break;case 22:r={inputValue:t.inputValue};break;default:return function(e,t,n){var r,i=t.type,l=t.props;switch(i){case n.ItemMouseMove:r={highlightedIndex:t.disabled?-1:t.index};break;case n.MenuMouseLeave:r={highlightedIndex:-1};break;case n.ToggleButtonClick:case n.FunctionToggleMenu:r={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Nt(l,e,0)};break;case n.FunctionOpenMenu:r={isOpen:!0,highlightedIndex:Nt(l,e,0)};break;case n.FunctionCloseMenu:r={isOpen:!1};break;case n.FunctionSetHighlightedIndex:r={highlightedIndex:l.isItemDisabled(l.items[t.highlightedIndex],t.highlightedIndex)?-1:t.highlightedIndex};break;case n.FunctionSetInputValue:r={inputValue:t.inputValue};break;case n.FunctionReset:r={highlightedIndex:Rt(l),isOpen:_t(l,"isOpen"),selectedItem:_t(l,"selectedItem"),inputValue:_t(l,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Ye({},e,r)}(e,t,kt)}return Ye({},e,r)}var Vt,Pt,zt,Ft,Wt,Ht,jt,qt,Kt,Ut,Zt,Gt,Yt,Xt,Jt,Qt,en,tn,nn,rn,ln,on,an=["onMouseLeave","refKey","ref"],sn=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],cn=["onClick","onPress","refKey","ref"],un=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];function dn(e){void 0===e&&(e={}),At(e,dn);var t=Ye({},Dt,e),n=t.items,r=t.scrollIntoView,i=t.environment,l=t.getA11yStatusMessage,o=function(e,t,n,r){var i=(0,h.useRef)(),l=xt(e,t,n,r),o=l[0],a=l[1],s=St();return(0,h.useEffect)(function(){ut(t,"selectedItem")&&(s||t.itemToKey(t.selectedItem)!==t.itemToKey(i.current)&&a({type:22,inputValue:t.itemToString(t.selectedItem)}),i.current=o.selectedItem===i.current?t.selectedItem:o.selectedItem)},[o.selectedItem,t.selectedItem]),[ct(o,t),a]}(Bt,t,Mt,Ot),a=o[0],s=o[1],c=a.isOpen,u=a.highlightedIndex,d=a.selectedItem,f=a.inputValue,p=(0,h.useRef)(null),m=(0,h.useRef)({}),g=(0,h.useRef)(null),b=(0,h.useRef)(null),v=St(),w=wt(t),E=(0,h.useRef)(),y=yt({state:a,props:t}),x=(0,h.useCallback)(function(e){return m.current[w.getItemId(e)]},[w]);!function(e,t,n,r){void 0===r&&(r={});var i=r.document,l=St();(0,h.useEffect)(function(){if(e&&!l&&i){var n=e(t);bt(n,i)}},n),(0,h.useEffect)(function(){return function(){var e,t;bt.cancel(),(t=null==(e=i)?void 0:e.getElementById("a11y-status-message"))&&t.remove()}},[i])}(l,a,[c,u,d,f],i);var I=function(e){var t=e.highlightedIndex,n=e.isOpen,r=e.itemRefs,i=e.getItemNodeFromIndex,l=e.menuElement,o=e.scrollIntoView,a=(0,h.useRef)(!0);return vt(function(){t<0||!n||!Object.keys(r.current).length||(!1===a.current?a.current=!0:o(i(t),l))},[t]),a}({menuElement:p.current,highlightedIndex:u,isOpen:c,itemRefs:m,scrollIntoView:r,getItemNodeFromIndex:x});$t({props:t,state:a}),(0,h.useEffect)(function(){Ct(t,"isOpen")&&g.current&&g.current.focus()},[]),(0,h.useEffect)(function(){v||(E.current=n.length)});var _=function(e,t,n){var r=(0,h.useRef)({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1});return(0,h.useEffect)(function(){if(!e)return it;var i=n.map(function(e){return e.current});function l(){r.current.isTouchEnd=!1,r.current.isMouseDown=!0}function o(n){r.current.isMouseDown=!1,pt(n.target,i,e)||t()}function a(){r.current.isTouchEnd=!1,r.current.isTouchMove=!1}function s(){r.current.isTouchMove=!0}function c(n){r.current.isTouchEnd=!0,r.current.isTouchMove||pt(n.target,i,e,!1)||t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",o),e.addEventListener("touchstart",a),e.addEventListener("touchmove",s),e.addEventListener("touchend",c),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",o),e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",c)}},[n,e,t]),r.current}(i,(0,h.useCallback)(function(){y.current.state.isOpen&&s({type:9,selectItem:!1})},[s,y]),(0,h.useMemo)(function(){return[p,b,g]},[p.current,b.current,g.current])),C=it;(0,h.useEffect)(function(){c||(m.current={})},[c]),(0,h.useEffect)(function(){var e;c&&null!=i&&i.document&&null!=g&&null!=(e=g.current)&&e.focus&&i.document.activeElement!==g.current&&g.current.focus()},[c,i]);var N=(0,h.useMemo)(function(){return{ArrowDown:function(e){e.preventDefault(),s({type:0,altKey:e.altKey})},ArrowUp:function(e){e.preventDefault(),s({type:1,altKey:e.altKey})},Home:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:3}))},End:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:4}))},Escape:function(e){var t=y.current.state;(t.isOpen||t.inputValue||t.selectedItem||t.highlightedIndex>-1)&&(e.preventDefault(),s({type:2}))},Enter:function(e){y.current.state.isOpen&&229!==e.which&&(e.preventDefault(),s({type:7}))},PageUp:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:5}))},PageDown:function(e){y.current.state.isOpen&&(e.preventDefault(),s({type:6}))}}},[s,y]),$=(0,h.useCallback)(function(e){return Ye({id:w.labelId,htmlFor:w.inputId},e)},[w]),T=(0,h.useCallback)(function(e,t){var n,r=void 0===e?{}:e,i=r.onMouseLeave,l=r.refKey,o=void 0===l?"ref":l,a=r.ref,c=Ge(r,an),u=(void 0===t?{}:t).suppressRefError;return C("getMenuProps",void 0!==u&&u,o,p),Ye(((n={})[o]=st(a,function(e){p.current=e}),n.id=w.menuId,n.role="listbox",n["aria-labelledby"]=c&&c["aria-label"]?void 0:""+w.labelId,n.onMouseLeave=at(i,function(){s({type:11})}),n),c)},[s,C,w]),O=(0,h.useCallback)(function(e){var t,n,r=void 0===e?{}:e,i=r.item,l=r.index,o=r.refKey,a=void 0===o?"ref":o,c=r.ref,u=r.onMouseMove,d=r.onMouseDown,f=r.onClick;r.onPress;var p=r.disabled,h=Ge(r,sn);void 0!==p&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var g=y.current,b=g.props,v=g.state,E=function(e,t,n,r){var i,l;if(void 0===e){if(void 0===t)throw new Error(r);i=n[t],l=t}else l=void 0===t?n.indexOf(e):t,i=e;return[i,l]}(i,l,b.items,"Pass either item or index to getItemProps!"),x=E[0],C=E[1],N=b.isItemDisabled(x,C),$=f;return Ye(((t={})[a]=st(c,function(e){e&&(m.current[w.getItemId(C)]=e)}),t["aria-disabled"]=N,t["aria-selected"]=C===v.highlightedIndex,t.id=w.getItemId(C),t.role="option",t),!N&&((n={}).onClick=at($,function(){s({type:13,index:C})}),n),{onMouseMove:at(u,function(){_.isTouchEnd||C===v.highlightedIndex||(I.current=!1,s({type:12,index:C,disabled:N}))}),onMouseDown:at(d,function(e){return e.preventDefault()})},h)},[s,w,y,_,I]),S=(0,h.useCallback)(function(e){var t,n=void 0===e?{}:e,r=n.onClick;n.onPress;var i=n.refKey,l=void 0===i?"ref":i,o=n.ref,a=Ge(n,cn),c=y.current.state;return Ye(((t={})[l]=st(o,function(e){b.current=e}),t["aria-controls"]=w.menuId,t["aria-expanded"]=c.isOpen,t.id=w.toggleButtonId,t.tabIndex=-1,t),!a.disabled&&Ye({},{onClick:at(r,function(){s({type:14})})}),a)},[s,y,w]),R=(0,h.useCallback)(function(e,t){var n,r=void 0===e?{}:e,l=r.onKeyDown,o=r.onChange,a=r.onInput,c=r.onBlur;r.onChangeText;var u=r.onClick,d=r.refKey,f=void 0===d?"ref":d,p=r.ref,m=Ge(r,un),h=(void 0===t?{}:t).suppressRefError;C("getInputProps",void 0!==h&&h,f,g);var b,v=y.current.state,E={};return m.disabled||((b={}).onChange=at(o,a,function(e){s({type:8,inputValue:e.target.value})}),b.onKeyDown=at(l,function(e){var t=function(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}(e);t&&N[t]&&N[t](e)}),b.onBlur=at(c,function(e){if(null!=i&&i.document&&v.isOpen&&!_.isMouseDown){var t=null===e.relatedTarget&&i.document.activeElement!==i.document.body;s({type:9,selectItem:!t})}}),b.onClick=at(u,function(){s({type:10})}),E=b),Ye(((n={})[f]=st(p,function(e){g.current=e}),n["aria-activedescendant"]=v.isOpen&&v.highlightedIndex>-1?w.getItemId(v.highlightedIndex):"",n["aria-autocomplete"]="list",n["aria-controls"]=w.menuId,n["aria-expanded"]=v.isOpen,n["aria-labelledby"]=m&&m["aria-label"]?void 0:w.labelId,n.autoComplete="off",n.id=w.inputId,n.role="combobox",n.value=v.inputValue,n),E,m)},[s,w,i,N,y,_,C]),L=(0,h.useCallback)(function(){s({type:15})},[s]),k=(0,h.useCallback)(function(){s({type:17})},[s]),M=(0,h.useCallback)(function(){s({type:16})},[s]),A=(0,h.useCallback)(function(e){s({type:18,highlightedIndex:e})},[s]),D=(0,h.useCallback)(function(e){s({type:19,selectedItem:e})},[s]);return{getItemProps:O,getLabelProps:$,getMenuProps:T,getInputProps:R,getToggleButtonProps:S,toggleMenu:L,openMenu:M,closeMenu:k,setHighlightedIndex:A,setInputValue:(0,h.useCallback)(function(e){s({type:20,inputValue:e})},[s]),selectItem:D,reset:(0,h.useCallback)(function(){s({type:21})},[s]),highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:f}}dn.stateChangeTypes=kt,m().array,m().array,m().array,m().func,m().number,m().number,m().number,m().func,m().func,m().string,m().string;const fn=h.forwardRef(function({children:e,size:t=16,...n},r){return 20===t||"20"===t||"20px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Vt||(Vt=h.createElement("path",{d:"M8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"})),Pt||(Pt=h.createElement("path",{d:"M15.6 5.6 8 13.2 3.6 8.8 2.7 9.7 7.1 14.1 8 15 16.5 6.5 15.6 5.6z"})),e):24===t||"24"===t||"24px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},zt||(zt=h.createElement("path",{d:"M10 15.9 4.7 10.6 3.6 11.6 8.9 16.9 10 18 20.6 7.4 19.5 6.3z"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Ft||(Ft=h.createElement("path",{d:"M13 24 4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"})),e)}),pn=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Wt||(Wt=h.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8c0,3.9,3.1,7,7,7s7-3.1,7-7C15,4.1,11.9,1,8,1z M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z"})),Ht||(Ht=h.createElement("path",{d:"M7,11L4.3,8.3l0.9-0.8L7,9.3l4-3.9l0.9,0.8L7,11z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},jt||(jt=h.createElement("path",{d:"M10,1c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4,9-9S15,1,10,1z M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z"})),qt||(qt=h.createElement("path",{fill:"none",d:"M8.7,13.5l-3.2-3.2l1-1l2.2,2.2l4.8-4.8l1,1L8.7,13.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},Kt||(Kt=h.createElement("path",{d:"M12,1C6,1,1,6,1,12s5,11,11,11s11-4.9,11-11S18.1,1,12,1z M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z"})),Ut||(Ut=h.createElement("path",{fill:"none",d:"M10.4,16.3l-3.9-3.9l1.3-1.2l2.7,2.7l5.8-5.8l1.3,1.3L10.4,16.3z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Zt||(Zt=h.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2ZM14,21.5908l-5-5L10.5906,15,14,18.4092,21.41,11l1.5957,1.5859Z"})),Gt||(Gt=h.createElement("path",{fill:"none",d:"M14 21.591 9 16.591 10.591 15 14 18.409 21.41 11 23.005 12.585 14 21.591z","data-icon-path":"inner-path"})),e)}),mn=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 6",fill:"currentColor",...n},Yt||(Yt=h.createElement("path",{d:"M5 6 0 1 .7.3 5 4.6 9.3.3 10 1z"})),e):16===t||"16"===t||"16px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},Xt||(Xt=h.createElement("path",{d:"M8 11 3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Jt||(Jt=h.createElement("path",{d:"M16 22 6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"})),e)}),hn=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},Qt||(Qt=h.createElement("path",{d:"M0 5 5 0 5.7.7 1.4 5 5.7 9.3 5 10z"})),e):16===t||"16"===t||"16px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},en||(en=h.createElement("path",{d:"M5 8 10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},tn||(tn=h.createElement("path",{d:"M10 16 20 6 21.4 7.4 12.8 16 21.4 24.6 20 26z"})),e)}),gn=h.forwardRef(function({children:e,size:t=16,...n},r){return"glyph"===t||"glyph"===t||"glyphpx"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 10",fill:"currentColor",...n},nn||(nn=h.createElement("path",{d:"M6 5 1 10 .3 9.3 4.6 5 .3.7 1 0z"})),e):16===t||"16"===t||"16px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},rn||(rn=h.createElement("path",{d:"M11 8 6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},ln||(ln=h.createElement("path",{d:"M22 16 12 26 10.6 24.6 19.2 16 10.6 7.4 12 6z"})),e)}),bn=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},on||(on=h.createElement("path",{d:"M17.4141 16 24 9.4141 22.5859 8 16 14.5859 9.4143 8 8 9.4141 14.5859 16 8 22.5859 9.4143 24 16 17.4141 22.5859 24 24 22.5859 17.4141 16z"})),e)});var vn=n(115),wn=n.n(vn);const En=m().oneOf(["default","inline"]),yn=m().oneOf(["sm","md","lg"]),xn=(0,h.createContext)({isFluid:!1}),In=e=>{27===e.keyCode&&e.stopPropagation()},_n=e=>{e.preventDefault(),e.stopPropagation()},Cn=(0,h.forwardRef)((e,t)=>{const{children:n,className:r,disabled:i=!1,type:l="default",size:o,invalid:a,invalidText:s,invalidTextId:c,warn:u,warnText:d,warnTextId:p,light:m,isOpen:g,...v}=e,w=I(),{isFluid:E}=(0,h.useContext)(xn),y=!a&&u,x=b()({...r&&{[r]:!0},[`${w}--list-box`]:!0,[`${w}--list-box--${o}`]:o,[`${w}--list-box--inline`]:"inline"===l,[`${w}--list-box--disabled`]:i,[`${w}--list-box--light`]:m,[`${w}--list-box--expanded`]:g,[`${w}--list-box--invalid`]:a,[`${w}--list-box--warning`]:y});return h.createElement(h.Fragment,null,h.createElement("div",f({},v,{className:x,ref:t,onKeyDown:In,onClick:_n,"data-invalid":a||void 0}),n),E&&h.createElement("hr",{className:`${w}--list-box__divider`}),a?h.createElement("div",{className:`${w}--form-requirement`,id:c},s):null,y?h.createElement("div",{className:`${w}--form-requirement`,id:p},d):null)});function Nn({children:e,disabled:t,tabIndex:n,...r}){const i=I();return h.createElement("div",f({className:`${i}--list-box__field`,tabIndex:!t&&n||-1},r),e)}Cn.displayName="ListBox",Cn.propTypes={children:m().node,className:m().string,disabled:m().bool,invalid:m().bool,invalidText:m().node,invalidTextId:m().string,isOpen:m().bool,light:L(m().bool),size:yn,type:En,warn:m().bool,warnText:m().string,warnTextId:m().string},Nn.propTypes={"aria-haspopup":m().oneOfType([m().string,m().bool]),children:m().node,disabled:m().bool,role:m().string,tabIndex:m().oneOfType([m().number,m().string])};const $n=(0,h.forwardRef)(({children:e,isActive:t=!1,isHighlighted:n=!1,title:r,...i},l)=>{const o=I(),a=l&&"function"!=typeof l?l.menuItemOptionRef:void 0,{isTruncated:s,ref:c}=((e,t=[])=>{const n=(0,h.useRef)(null),r=y([...e?[e]:[],n]),[i,l]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{const e=n.current;if(e){const{offsetWidth:t,scrollWidth:n}=e;l(t<n)}},[n,...t]),{isTruncated:i,ref:r}})(a,[e]),u=b()(`${o}--list-box__menu-item`,{[`${o}--list-box__menu-item--active`]:t,[`${o}--list-box__menu-item--highlighted`]:n});return h.createElement("li",f({},i,{className:u,title:s?r:void 0}),h.createElement("div",{className:`${o}--list-box__menu-item__option`,ref:c},e))});$n.displayName="ListBoxMenuItem",$n.propTypes={children:m().node,disabled:m().bool,isActive:m().bool,isHighlighted:m().bool,title:m().string};const Tn=(0,h.forwardRef)(({children:e,id:t,...n},r)=>{const i=I();return h.createElement("ul",f({ref:r,id:t,className:`${i}--list-box__menu`,role:"listbox"},n),e)});Tn.displayName="ListBoxMenu",Tn.propTypes={children:m().oneOfType([m().node,m().arrayOf(m().oneOf([$n])),m().shape({type:m().oneOf([$n])}),m().bool]),id:m().string.isRequired};const On="close.menu",Sn="open.menu",Rn={[On]:"Close menu",[Sn]:"Open menu"},Ln=e=>Rn[e],kn=({isOpen:e,translateWithId:t=Ln})=>{const n=I(),r=b()(`${n}--list-box__menu-icon`,{[`${n}--list-box__menu-icon--open`]:e}),i=t(e?"close.menu":"open.menu");return h.createElement("div",{className:r},h.createElement(mn,{name:"chevron--down","aria-label":i},h.createElement("title",null,i)))};var Mn,An;kn.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const Dn="clear.all",Bn="clear.selection",Vn={[Dn]:"Clear all selected items",[Bn]:"Clear selected item"},Pn=e=>Vn[e],zn=({clearSelection:e,selectionCount:t,translateWithId:n=Pn,disabled:r,onClearSelection:i,readOnly:l})=>{const o=I(),a=b()(`${o}--list-box__selection`,{[`${o}--tag--filter`]:t,[`${o}--list-box__selection--multi`]:t}),s=t=>{t.stopPropagation(),r||l||(e(t),i&&i(t))},c=n(t?"clear.all":"clear.selection"),u=b()(`${o}--tag`,`${o}--tag--filter`,`${o}--tag--high-contrast`,{[`${o}--tag--disabled`]:r});return t?h.createElement("div",{className:u},h.createElement("span",{className:`${o}--tag__label`,title:`${t}`},t),h.createElement("div",{role:"button",tabIndex:-1,className:`${o}--tag__close-icon`,onClick:s,"aria-label":n("clear.all"),title:c,"aria-disabled":!!l||void 0},Mn||(Mn=h.createElement(bn,null)))):h.createElement("div",{role:"button",className:a,tabIndex:-1,onClick:s,"aria-label":c,title:c},t,An||(An=h.createElement(bn,null)))};zn.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,onClearSelection:m().func,readOnly:m().bool,selectionCount:m().number,translateWithId:m().func};const Fn=Object.assign(Cn,{Field:Nn,Menu:Tn,MenuIcon:kn,MenuItem:$n,Selection:zn});var Wn,Hn;const jn="clear.all",qn="clear.selection",Kn={[jn]:"Clear all selected items",[qn]:"Clear selected item"},Un=e=>Kn[e];function Zn({clearSelection:e,selectionCount:t,translateWithId:n=Un,disabled:r,readOnly:i,onClearSelection:l,...o}){const a=I(),s=b()(`${a}--list-box__selection`,{[`${a}--tag--filter`]:t,[`${a}--list-box__selection--multi`]:t}),c=n(t?"clear.all":"clear.selection"),u=b()(`${a}--tag`,`${a}--tag--filter`,`${a}--tag--high-contrast`,{[`${a}--tag--disabled`]:r});function d(t){t.stopPropagation(),r||i||(e(t),l&&l(t))}return t?h.createElement("div",{className:u},h.createElement("span",{className:`${a}--tag__label`,title:t?.toString()},t),h.createElement("button",{"aria-label":c,className:`${a}--tag__close-icon`,disabled:r||i,onClick:d,tabIndex:-1,title:c,type:"button","aria-disabled":!!i||void 0},Wn||(Wn=h.createElement(bn,null)))):h.createElement("button",f({},o,{"aria-label":c,className:s,disabled:r||i,onClick:d,tabIndex:-1,title:c,type:"button","aria-disabled":!!i||void 0}),Hn||(Hn=h.createElement(bn,null)))}var Gn;Zn.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,readOnly:m().bool,onClearSelection:m().func,onClick:m().func,onMouseUp:m().func,onKeyDown:m().func,selectionCount:m().number,translateWithId:m().func};const Yn="close.menu",Xn="open.menu",Jn={[Yn]:"Close",[Xn]:"Open"},Qn=e=>Jn[e],er=h.forwardRef(({isOpen:e,translateWithId:t=Qn,...n},r)=>{const i=I(),l=b()({[`${i}--list-box__menu-icon`]:!0,[`${i}--list-box__menu-icon--open`]:e}),o=t(e?"close.menu":"open.menu");return h.createElement("button",f({},n,{"aria-label":o,title:o,className:l,type:"button",tabIndex:-1,ref:r}),Gn||(Gn=h.createElement(mn,null)))});er.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const tr=(...e)=>t=>{e.forEach(e=>{e&&("function"==typeof e?e(t):"object"==typeof e&&"current"in e&&(e.current=t))})},nr=({id:e,readOnly:t,disabled:n,invalid:r,invalidText:i,warn:l,warnText:o})=>{const a=I(),s={disabled:!t&&n,invalid:!t&&!n&&r,invalidId:`${e}-error-msg`,warn:!t&&!r&&!n&&l,warnId:`${e}-warn-msg`,validation:null,icon:null,helperId:`${e}-helper-text`};return s.invalid?(s.icon=Re,s.validation=h.createElement(ce,{as:"div",className:`${a}--form-requirement`,id:s.invalidId},i)):s.warn&&(s.icon=Se,s.validation=h.createElement(ce,{as:"div",className:`${a}--form-requirement`,id:s.warnId},o)),s},rr=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:e&&"object"==typeof e&&"label"in e&&"string"==typeof e.label?e.label:"",{InputBlur:ir,InputKeyDownEnter:lr,FunctionToggleMenu:or,ToggleButtonClick:ar,ItemMouseMove:sr,InputKeyDownArrowUp:cr,InputKeyDownArrowDown:ur,MenuMouseLeave:dr,ItemClick:fr,FunctionSelectItem:pr}=dn.stateChangeTypes,mr=()=>!0,hr=({item:e,inputValue:t})=>{if(null===t||""===t)return!0;const n=e.toLowerCase(),r=t.toLowerCase();return n.startsWith(r)},gr=({initialSelectedItem:e,itemToString:t,selectedItem:n,prevSelectedItem:r})=>null!=n?t(n):void 0===r&&null!=e?t(e):"",br=(0,h.forwardRef)((e,t)=>{const n=(0,h.useRef)(0),r=(0,h.useRef)(null),{"aria-label":i="Choose an item",ariaLabel:l,autoAlign:o=!1,className:a,decorator:s,direction:c="bottom",disabled:u=!1,downshiftActions:d,downshiftProps:p,helperText:m,id:g,initialSelectedItem:v,invalid:w,invalidText:E,items:y,itemToElement:x=null,itemToString:_=rr,light:C,onChange:N,onInputChange:$,onToggleClick:R,placeholder:L,readOnly:k,selectedItem:A,shouldFilterItem:D=mr,size:B,titleText:H,translateWithId:j,typeahead:q=!1,warn:U,warnText:Z,allowCustomValue:G=!1,slug:Y,inputProps:X,...Q}=e,ee=M("enable-v12-dynamic-floating-styles")||o,{refs:te,floatingStyles:ne,middlewareData:re}=(0,T.we)(ee?{placement:c,strategy:"fixed",middleware:o?[(0,O.UU)(),(0,O.jD)()]:void 0,whileElementsMounted:S.ll}:{}),ie=te?.reference?.current,le=ie instanceof HTMLElement?ie.clientWidth:void 0;(0,h.useEffect)(()=>{if(ee){const e={...ne,visibility:re.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{te.floating.current&&(te.floating.current.style[t]=e[t])}),le&&te.floating.current&&(te.floating.current.style.width=le+"px")}},[ee,ne,te.floating,le]);const[oe,ae]=(0,h.useState)(gr({initialSelectedItem:v,itemToString:_,selectedItem:A})),[se,ue]=(0,h.useState)("");(0,h.useEffect)(()=>{if(q){if(oe.length>=n.current)if(oe){const e=y.filter(e=>hr({item:_(e),inputValue:oe}));if(e.length>0){const t=_(e[0]);ue(t.slice(oe.length))}else ue("")}else ue("");else ue("");n.current=oe.length}},[q,oe,y,_,hr]);const de=(0,h.useRef)(!1),fe=(0,h.useRef)(""),[pe,me]=(0,h.useState)(!1),he=I(),{isFluid:ge}=(0,h.useContext)(xn),be=(0,h.useRef)(null),ve=J(),[we,Ee]=(0,h.useState)(!1),ye=(0,h.useRef)(oe),xe=(0,h.useRef)(A);(0,h.useEffect)(()=>{de.current=pe,pe&&me(!1)},[pe]),(0,h.useEffect)(()=>{if(xe.current!==A){const e=gr({initialSelectedItem:v,itemToString:_,selectedItem:A,prevSelectedItem:xe.current});oe!==e&&(ae(e),N({selectedItem:A,inputValue:e})),xe.current=A}},[A]);const Ie=(e,t,n)=>e.filter(e=>q?hr({item:t(e),inputValue:n}):D?D({item:e,itemToString:t,inputValue:n}):mr());(0,h.useEffect)(()=>{ye.current!==oe&&(ye.current=oe,$?.(oe))},[oe]);const _e=()=>{be?.current&&be.current.focus()},Ce=e=>Ie(y,_,e||null),Ne=t=>(({items:e,itemToString:t=rr},n)=>{if(!n)return-1;const r=n.toLowerCase();for(let n=0;n<e.length;n++){const i=t(e[n]).toLowerCase();if(!e[n].disabled&&-1!==i.indexOf(r))return n}return-1})({...e,items:Ce(t)},t),$e=(0,h.useCallback)((e,t)=>{const{type:n,changes:r}=t,{highlightedIndex:i}=r;switch(n){case ir:if(G&&-1===i){const t=e.inputValue??"",n=void 0===r.selectedItem?e.selectedItem:r.selectedItem;if(null!=n&&_(n)===t&&y.some(e=>wn()(e,n)))return r;const i=""===t?null:y.find(e=>_(e)===t)??t,l="string"==typeof i&&""!==i&&!y.some(e=>wn()(e,i));return!wn()(n,i)&&N&&(N({selectedItem:i,inputValue:t}),fe.current=l?t:""),{...r,selectedItem:i}}if(e.inputValue&&-1===i&&r.selectedItem)return{...r,inputValue:_(r.selectedItem)};if(!G){const t=e.inputValue??"";if(!t||!y.some(e=>_(e)===t)){const t=null!==e.selectedItem?_(e.selectedItem):"";return{...r,inputValue:t}}}return r;case lr:if(!G)if(-1!==e.highlightedIndex){const t=Ie(y,_,oe)[e.highlightedIndex];if(t&&!t.disabled)return{...r,selectedItem:t,inputValue:_(t)}}else{const t=Ne(oe);if(-1!==t){const e=y[t];if(e&&!e.disabled)return{...r,selectedItem:e,inputValue:_(e)}}if(null!==e.selectedItem)return{...r,selectedItem:null,inputValue:oe}}return{...r,isOpen:!0};case or:case ar:if(e.isOpen&&!r.isOpen&&!G){const t=e.inputValue??"";if(!t||!y.some(e=>_(e)===t)){const t=null!==e.selectedItem?_(e.selectedItem):"";return{...r,inputValue:t}}}return r;case dr:return{...r,highlightedIndex:e.highlightedIndex};case cr:case ur:return-1===i?{...r,highlightedIndex:0}:r;case sr:return{...r,highlightedIndex:e.highlightedIndex};default:return r}},[G,oe,_,y,N]),Te=nr({id:g,readOnly:k,disabled:u||!1,invalid:w||!1,invalidText:E,warn:U||!1,warnText:Z}),Oe=b()(`${he}--combo-box`,{[`${he}--combo-box--invalid--focused`]:w&&we,[`${he}--list-box--up`]:"top"===c,[`${he}--combo-box--warning`]:Te.warn,[`${he}--combo-box--readonly`]:k,[`${he}--autoalign`]:ee}),Le=b()(`${he}--label`,{[`${he}--label--disabled`]:u}),ke=`combobox-helper-text-${ve}`,Me=`combobox-warn-text-${ve}`,Ae=`combobox-invalid-text-${ve}`,De=b()(`${he}--form__helper-text`,{[`${he}--form__helper-text--disabled`]:u}),Be=b()(`${he}--list-box__wrapper`,[a,{[`${he}--list-box__wrapper--fluid--invalid`]:ge&&w,[`${he}--list-box__wrapper--slug`]:Y,[`${he}--list-box__wrapper--decorator`]:s}]),Ve=b()(`${he}--text-input`,{[`${he}--text-input--empty`]:!oe,[`${he}--combo-box--input--focus`]:we}),Pe=Y??s,ze=Ue(Pe,Ke),Fe=ze?(0,h.cloneElement)(Pe,{size:"mini"}):Pe,{getInputProps:We,getItemProps:He,getLabelProps:je,getMenuProps:qe,getToggleButtonProps:Ze,isOpen:Ge,highlightedIndex:Ye,selectedItem:Xe,closeMenu:Je,openMenu:Qe,reset:et,selectItem:tt,setHighlightedIndex:nt,setInputValue:rt,toggleMenu:it}=dn({items:Ie(y,_,oe),inputValue:oe,itemToString:e=>_(e),onInputValueChange({inputValue:e}){const t=e||"";ae(t),nt(Ne(t))},onHighlightedIndexChange:({highlightedIndex:e})=>{if(e>-1){const t=document.querySelectorAll(`li.${he}--list-box__menu-item[role="option"]`)[e];t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})}},initialSelectedItem:v,inputId:g,stateReducer:$e,isItemDisabled:(e,t)=>e?.disabled,...p,onStateChange:({type:e,selectedItem:t})=>{p?.onStateChange?.({type:e,selectedItem:t}),de.current||e!==fr&&e!==pr&&e!==lr||void 0===t||wn()(A,t)||(y.some(e=>wn()(e,t))&&(fe.current=""),N({selectedItem:t}))}}),lt=void 0!==A?A:Xe;(0,h.useEffect)(()=>{d&&(d.current={closeMenu:Je,openMenu:Qe,reset:et,selectItem:tt,setHighlightedIndex:nt,setInputValue:rt,toggleMenu:it})},[Je,Qe,et,tt,nt,rt,it]);const ot=Ze({disabled:u||k,onClick:(e=>t=>{if(R&&R(t),k)return t.preventDownshiftDefault=!0,void t?.persist?.();t.target===be.current&&e&&(t.preventDownshiftDefault=!0,t?.persist?.())})(Ge),onMouseUp(e){Ge&&e.stopPropagation()}}),at=e=>{Ee("focus"===e.type),r.current?.value||"blur"!==e.type||tt(null)},st=k?{onKeyDown:e=>{"Tab"!==e.key&&e.preventDefault()},onClick:e=>{e.preventDefault(),e.currentTarget.focus()}}:{},ct=Te.invalid&&E&&Ae||Te.warn&&Z&&Me||m&&!ge&&ke||void 0,ut=(0,h.useMemo)(()=>qe({ref:ee?te.setFloating:null}),[ee,l,i,qe,te.setFloating]);return(0,h.useEffect)(()=>{if(be.current&&r.current&&se){const e=oe.length,t=e+se.length;r.current.value=oe+se,r.current.setSelectionRange(e,t)}},[oe,se]),h.createElement("div",{className:Be},H&&h.createElement(ce,f({as:"label",className:Le},je()),H),h.createElement(Fn,{onFocus:at,onBlur:at,className:Oe,disabled:u,invalid:Te.invalid,invalidText:E,invalidTextId:Ae,isOpen:Ge,light:C,size:B,warn:Te.warn,ref:ee?te.setReference:null,warnText:Z,warnTextId:Me},h.createElement("div",{className:`${he}--list-box__field`},h.createElement("input",f({disabled:u,className:Ve,type:"text",tabIndex:0,"aria-haspopup":"listbox",title:be?.current?.value},We({"aria-label":H?void 0:l||i,"aria-controls":ut.id,placeholder:L,value:oe,...X,onChange:e=>{const t=e.target.value,n=G&&fe.current&&oe===fe.current&&""===t;ae(t),rt(t),n&&(me(!0),N({selectedItem:null,inputValue:""}),tt(null),fe.current="")},ref:tr(be,t,r),onKeyDown:e=>{if(K(e,z)&&e.stopPropagation(),!K(e,V)||oe&&!G||(it(),-1!==Ye&&tt(Ie(y,_,oe)[Ye]),G&&Ge&&oe&&-1===Ye&&(fe.current=oe,N({selectedItem:null,inputValue:oe})),e.preventDownshiftDefault=!0,e?.persist?.()),K(e,P)&&oe&&e.target===be.current&&Ge&&(it(),e.preventDownshiftDefault=!0,e?.persist?.()),K(e,W)&&"Numpad7"!==e.code&&e.target.setSelectionRange(0,0),K(e,F)&&"Numpad1"!==e.code&&e.target.setSelectionRange(e.target.value.length,e.target.value.length),e.altKey&&"ArrowDown"==e.key&&(e.preventDownshiftDefault=!0,Ge||it()),e.altKey&&"ArrowUp"==e.key&&(e.preventDownshiftDefault=!0,Ge&&it()),oe||-1!=Ye||"Enter"!=e.key||(Ge||it(),tt(null),e.preventDownshiftDefault=!0,"false"===e.currentTarget.ariaExpanded&&Qe()),q&&"Tab"===e.key){const e=y.find(e=>_(e).toLowerCase().startsWith(oe.toLowerCase()));if(e){const t=_(e);rt(t),tt(e)}}}}),Q,st,{readOnly:k,"aria-describedby":ct})),Te.invalid&&h.createElement(Re,{className:`${he}--list-box__invalid-icon`}),Te.warn&&h.createElement(Se,{className:`${he}--list-box__invalid-icon ${he}--list-box__invalid-icon--warning`}),oe&&h.createElement(Zn,{clearSelection:()=>{me(!0),ae(""),N({selectedItem:null}),tt(null),fe.current="",_e()},translateWithId:j,disabled:u||k,onClearSelection:_e,selectionCount:0}),h.createElement(er,f({},ot,{isOpen:Ge,translateWithId:j}))),Y?Fe:s?h.createElement("div",{className:`${he}--list-box__inner-wrapper--decorator`},ze?Fe:h.createElement("span",null,Fe)):"",h.createElement(Fn.Menu,ut,Ge?Ie(y,_,oe).map((e,t)=>{const n=null!==e&&"object"==typeof e&&"text"in e&&x?e.text?.toString():_(e),r=He({item:e,index:t}),i=r["aria-disabled"],{"aria-disabled":l,"aria-selected":o,...a}=r,s=wn()(lt,e);return h.createElement(Fn.MenuItem,f({key:r.id,isActive:s,isHighlighted:Ye===t,title:n,disabled:i},a,{"aria-selected":s}),x?x(e):_(e),s&&h.createElement(fn,{className:`${he}--list-box__menu-item__selected-icon`}))}):null)),m&&!Te.invalid&&!Te.warn&&!ge&&h.createElement(ce,{as:"div",id:ke,className:De},m))});var vr,wr,Er,yr,xr,Ir,_r,Cr;br.displayName="ComboBox",br.propTypes={allowCustomValue:m().bool,"aria-label":m().string,ariaLabel:L(m().string),autoAlign:m().bool,className:m().string,decorator:m().node,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().object,downshiftActions:m().exact({current:m().any}),helperText:m().node,id:m().string.isRequired,initialSelectedItem:m().oneOfType([m().object,m().string,m().number]),invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,light:L(m().bool),onChange:m().func.isRequired,onInputChange:m().func,onToggleClick:m().func,placeholder:m().string,readOnly:m().bool,selectedItem:m().oneOfType([m().object,m().string,m().number]),shouldFilterItem:m().func,size:yn,slug:L(m().node),titleText:m().node,translateWithId:m().func,typeahead:m().bool,warn:m().bool,warnText:m().node,inputProps:m().object};const Nr=h.forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},vr||(vr=h.createElement("path",{d:"M8,1C4.1,1,1,4.1,1,8s3.1,7,7,7s7-3.1,7-7S11.9,1,8,1z M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z"})),wr||(wr=h.createElement("path",{fill:"none",d:"M10.7,11.5L4.5,5.3l0.8-0.8l6.2,6.2L10.7,11.5z","data-icon-path":"inner-path",opacity:"0"})),e):20===t||"20"===t||"20px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",...n},Er||(Er=h.createElement("path",{d:"M10,1c-5,0-9,4-9,9s4,9,9,9s9-4,9-9S15,1,10,1z M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z"})),yr||(yr=h.createElement("path",{d:"M13.5,14.5l-8-8l1-1l8,8L13.5,14.5z","data-icon-path":"inner-path",opacity:"0"})),e):24===t||"24"===t||"24px"===t?h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...n},xr||(xr=h.createElement("path",{d:"M12,1C5.9,1,1,5.9,1,12s4.9,11,11,11s11-4.9,11-11S18.1,1,12,1z M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z"})),Ir||(Ir=h.createElement("path",{fill:"none",d:"M16.3,17.5L6.5,7.7l1.2-1.2l9.8,9.8L16.3,17.5z","data-icon-path":"inner-path",opacity:"0"})),e):h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},_r||(_r=h.createElement("path",{fill:"none",d:"M14.9 7.2H17.1V24.799H14.9z","data-icon-path":"inner-path",transform:"rotate(-45 16 16)"})),Cr||(Cr=h.createElement("path",{d:"M16,2A13.914,13.914,0,0,0,2,16,13.914,13.914,0,0,0,16,30,13.914,13.914,0,0,0,30,16,13.914,13.914,0,0,0,16,2Zm5.4449,21L9,10.5557,10.5557,9,23,21.4448Z"})),e)});function $r({active:e=!0,className:t,withOverlay:n=!0,small:r=!1,description:i="loading",...l}){const o=I(),a=b()(t,{[`${o}--loading`]:!0,[`${o}--loading--small`]:r,[`${o}--loading--stop`]:!e}),s=b()({[`${o}--loading-overlay`]:!0,[`${o}--loading-overlay--stop`]:!e}),c=h.createElement("div",f({},l,{"aria-atomic":"true","aria-live":e?"assertive":"off",className:a}),h.createElement("svg",{className:`${o}--loading__svg`,viewBox:"0 0 100 100",role:"img","aria-label":i},h.createElement("title",null,i),r?h.createElement("circle",{className:`${o}--loading__background`,cx:"50%",cy:"50%",r:"42"}):null,h.createElement("circle",{className:`${o}--loading__stroke`,cx:"50%",cy:"50%",r:r?"42":"44"})));return n?h.createElement("div",{className:s},c):c}$r.propTypes={active:m().bool,className:m().string,description:m().string,id:L(m().string),small:m().bool,withOverlay:m().bool};const Tr=({className:e,status:t="active",iconDescription:n,description:r,onSuccess:i,successDelay:l=1500,...o})=>{const a=I(),s=b()(`${a}--inline-loading`,e),c=(0,h.useRef)(null);(0,h.useEffect)(()=>("finished"===t&&(c.current=setTimeout(()=>{i&&i()},l)),()=>{c.current&&(clearTimeout(c.current),c.current=null)}),[t,i,l]);const u=r&&h.createElement("div",{className:`${a}--inline-loading__text`},r),d=(()=>{let e=n||t;if("error"===t)return h.createElement(Nr,{className:`${a}--inline-loading--error`},h.createElement("title",null,e));if("finished"===t)return h.createElement(pn,{className:`${a}--inline-loading__checkmark-container`},h.createElement("title",null,e));if("inactive"===t||"active"===t){if("inactive"===t)return;return n||(e="loading"),h.createElement($r,{small:!0,description:e,withOverlay:!1,active:"active"===t})}})(),p=d&&h.createElement("div",{className:`${a}--inline-loading__animation`},d);return h.createElement("div",f({className:s},o,{"aria-live":o["aria-live"]??("inactive"===t?"off":"assertive")}),p,u)};var Or,Sr,Rr,Lr;Tr.propTypes={className:m().string,description:m().node,iconDescription:m().string,onSuccess:m().func,status:m().oneOf(["inactive","active","finished","error"]),successDelay:m().number};const kr=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Or||(Or=h.createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),Sr||(Sr=h.createElement("path",{d:"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,6a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),e)}),Mr=h.forwardRef(function({children:e,size:t=16,...n},r){return h.createElement(ve,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},Rr||(Rr=h.createElement("path",{fill:"none",d:"M16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,13.875H17.125v-8H13v2.25h1.875v5.75H12v2.25h8Z","data-icon-path":"inner-path"})),Lr||(Lr=h.createElement("path",{d:"M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM16,8a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,16,8Zm4,16.125H12v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z"})),e)});function Ar({children:e,className:t,onClick:n,inline:r,...i}){const l=I(),o=b()(t,{[`${l}--actionable-notification__action-button`]:!0});return h.createElement(ae,f({className:o,kind:r?"ghost":"tertiary",onClick:n,size:"sm"},i),e)}function Dr({"aria-label":e="close notification",ariaLabel:t,className:n,type:r="button",renderIcon:i=bn,name:l,notificationType:o="toast",...a}){const s=I(),c=b()(n,{[`${s}--${o}-notification__close-button`]:o}),u=b()({[`${s}--${o}-notification__close-icon`]:o});return h.createElement("button",f({},a,{type:r,"aria-label":t||e,title:t||e,className:c}),i&&h.createElement(i,{className:u,name:l}))}n(9054),"undefined"!=typeof Node&&(Node.DOCUMENT_POSITION_PRECEDING,Node.DOCUMENT_POSITION_CONTAINS),"undefined"!=typeof Node&&(Node.DOCUMENT_POSITION_FOLLOWING,Node.DOCUMENT_POSITION_CONTAINED_BY),Ar.propTypes={children:m().node,className:m().string,inline:m().bool,onClick:m().func},Dr.propTypes={"aria-label":m().string,ariaLabel:L(m().string),className:m().string,name:m().string,notificationType:m().oneOf(["toast","inline","actionable"]),renderIcon:m().oneOfType([m().func,m().object]),type:m().string};const Br={error:Nr,success:pn,warning:Re,"warning-alt":Se,info:kr,"info-square":Mr};function Vr({iconDescription:e,kind:t,notificationType:n}){const r=I(),i=Br[t];return i?h.createElement(i,{className:`${r}--${n}-notification__icon`,size:20},h.createElement("title",null,e)):null}function Pr({"aria-label":e,children:t,title:n,subtitle:r,role:i="status",onClose:l,onCloseButtonClick:o=Le,statusIconDescription:a,className:s,kind:c="error",lowContrast:u,hideCloseButton:d=!1,...p}){const[m,g]=(0,h.useState)(!0),v=I(),w=b()(s,{[`${v}--inline-notification`]:!0,[`${v}--inline-notification--low-contrast`]:u,[`${v}--inline-notification--${c}`]:c,[`${v}--inline-notification--hide-close-button`]:d}),E=(0,h.useRef)(null);Q(E);const y=(0,h.useRef)(null);return m?h.createElement("div",f({ref:y},p,{role:i,className:w}),h.createElement("div",{className:`${v}--inline-notification__details`},h.createElement(Vr,{notificationType:"inline",kind:c,iconDescription:a||`${c} icon`}),h.createElement("div",{ref:E,className:`${v}--inline-notification__text-wrapper`},n&&h.createElement(ce,{as:"div",className:`${v}--inline-notification__title`},n),r&&h.createElement(ce,{as:"div",className:`${v}--inline-notification__subtitle`},r),t)),!d&&h.createElement(Dr,{notificationType:"inline",onClick:function(e){o(e),l&&!1===l(e)||g(!1)},"aria-label":e})):null}Vr.propTypes={iconDescription:m().string.isRequired,kind:m().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:m().oneOf(["inline","toast"]).isRequired},m().string,L(m().string),m().string,m().node,m().string,m().bool,m().oneOf(["error","info","info-square","success","warning","warning-alt"]),m().bool,m().func,m().func,m().oneOf(["alert","log","status"]),m().string,m().string,m().number,m().string,Pr.propTypes={"aria-label":m().string,children:m().node,className:m().string,hideCloseButton:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onClose:m().func,onCloseButtonClick:m().func,role:m().oneOf(["alert","log","status"]),statusIconDescription:m().string,subtitle:m().string,title:m().string},m().string,m().string,L(m().string),m().string,m().node,m().string,m().bool,L(m().bool),m().bool,m().bool,m().oneOf(["error","info","info-square","success","warning","warning-alt"]),m().bool,m().func,m().func,m().func,m().string,m().string,m().node,m().string;const zr={error:"warning",success:"info"};function Fr(e){return"".concat(e/16,"rem")}m().string,m().node,m().string,w(m().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],e=>zr[e]),m().bool,m().func,m().string,m().node,m().string,m().string;Fr(320);var Wr={width:Fr(672),columns:8,margin:Fr(16)},Hr={width:Fr(1056),columns:16,margin:Fr(16)};Fr(1312),Fr(16),Fr(1584),Fr(24);function jr(e){return Fr(8*e)}jr(.25),jr(.5),jr(1),jr(1.5),jr(2),jr(3),jr(4),jr(5),jr(6),jr(8),jr(10),jr(12),jr(20),jr(2),jr(3),jr(4),jr(6),jr(8),jr(12),jr(20),jr(3),jr(4),jr(5),jr(6),jr(8),Fr(24),Fr(32),Fr(40),Fr(48),Fr(64),Fr(80);const qr=h.createContext({mode:"flexbox",subgrid:!1}),Kr=({children:e,mode:t,subgrid:n=!1})=>{const r=h.useMemo(()=>({mode:t,subgrid:n}),[t,n]);return h.createElement(qr.Provider,{value:r},e)};Kr.propTypes={children:m().node,mode:m().oneOf(["flexbox","css-grid"]).isRequired,subgrid:m().bool};const Ur=h.forwardRef(({align:e,as:t,children:n,className:r,condensed:i=!1,fullWidth:l=!1,narrow:o=!1,...a},s)=>{const c=I(),{subgrid:u}=h.useContext(qr);let d="wide";if(o?d="narrow":i&&(d="condensed"),u)return h.createElement(Kr,{mode:"css-grid",subgrid:!0},h.createElement(Zr,f({ref:s,as:t,className:r,mode:d},a),n));const p=b()(r,{[`${c}--css-grid`]:!0,[`${c}--css-grid--condensed`]:"condensed"===d,[`${c}--css-grid--narrow`]:"narrow"===d,[`${c}--css-grid--full-width`]:l,[`${c}--css-grid--start`]:"start"===e,[`${c}--css-grid--end`]:"end"===e}),m=t||"div";return h.createElement(Kr,{mode:"css-grid",subgrid:!0},h.createElement(m,f({className:p,ref:s},a),n))});Ur.propTypes={as:m().oneOfType([m().string,m().elementType]),align:m().oneOf(["start","center","end"]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool};const Zr=h.forwardRef(({as:e,className:t,children:n,mode:r,...i},l)=>{const o=I(),a=b()(t,{[`${o}--subgrid`]:!0,[`${o}--subgrid--condensed`]:"condensed"===r,[`${o}--subgrid--narrow`]:"narrow"===r,[`${o}--subgrid--wide`]:"wide"===r}),s=e||"div";return h.createElement(s,f({},i,{ref:l,className:a}),n)});Zr.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,mode:m().oneOf(["wide","narrow","condensed"])};const Gr=h.forwardRef(({as:e,condensed:t=!1,narrow:n=!1,fullWidth:r=!1,className:i,children:l,...o},a)=>{const s=I(),c=b()(i,{[`${s}--grid`]:!0,[`${s}--grid--condensed`]:t,[`${s}--grid--narrow`]:n,[`${s}--grid--full-width`]:r}),u=e||"div";return h.createElement(Kr,{mode:"flexbox",subgrid:!1},h.createElement(u,f({className:c,ref:a},o),l))});Gr.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool};m().oneOf(["start","center","end"]),m().oneOfType([m().string,m().elementType]),m().node,m().string,m().bool,m().bool,m().bool;const Yr=(e,{onPress:t,onPressIn:n,onPressOut:r,onLongPress:i,delayLongPressMs:l=500}={})=>{const o=(0,h.useRef)(t),a=(0,h.useRef)(n),s=(0,h.useRef)(r),c=(0,h.useRef)(i),[u,d]=(0,h.useState)(!1),[f,p]=(0,h.useState)(!1),m=(0,h.useRef)({longPress:!1});(0,h.useEffect)(()=>{o.current=t},[t]),(0,h.useEffect)(()=>{a.current=n},[n]),(0,h.useEffect)(()=>{s.current=r},[r]),(0,h.useEffect)(()=>{c.current=i},[i]),(0,h.useEffect)(()=>{const t=e.current;if(!t)return;const n=e=>{d(!0),a.current?.(),e.preventDefault()},r=()=>{d(!1),p(!1),s.current?.(m.current)},i=()=>{d(!1),p(!1),s.current?.(m.current),m.current.longPress=!1},l=()=>{d(!1),p(!1),s.current?.(m.current),m.current.longPress=!1},c=()=>{p(!1),d(!1),o.current?.(m.current),m.current.longPress=!1},u=e=>{e.preventDefault()};return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",i),t.addEventListener("pointerleave",l),t.addEventListener("click",c),t.addEventListener("contextmenu",u),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",i),t.removeEventListener("pointerleave",l),t.removeEventListener("click",c),t.removeEventListener("contextmenu",u)}},[e]),(0,h.useEffect)(()=>{if(u){const e=setTimeout(()=>{d(!1),p(!0)},l);return()=>{clearTimeout(e)}}},[u,l]),(0,h.useEffect)(()=>{if(f)return m.current.longPress=!0,c.current?.()},[f])};function Xr(e,t=0,n={}){"object"!=typeof n&&(n={});const{signal:r,leading:i=!1,trailing:l=!0,maxWait:o}=n,a=Array(2);let s;i&&(a[0]="leading"),l&&(a[1]="trailing");let c=null;const u=function(e,t,{signal:n,edges:r}={}){let i,l=null;const o=null!=r&&r.includes("leading"),a=null==r||r.includes("trailing"),s=()=>{null!==l&&(e.apply(i,l),i=void 0,l=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,a&&s(),f()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null)},f=()=>{d(),i=void 0,l=null},p=function(...e){if(n?.aborted)return;i=this,l=e;const t=null==c;u(),o&&t&&s()};return p.schedule=u,p.cancel=f,p.flush=()=>{d(),s()},n?.addEventListener("abort",f,{once:!0}),p}(function(...t){s=e.apply(this,t),c=null},t,{signal:r,edges:a}),d=function(...t){if(null!=o)if(null===c)c=Date.now();else if(Date.now()-c>=o)return s=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),s;return u.apply(this,t),s};return d.cancel=u.cancel,d.flush=()=>(u.flush(),s),d}var Jr,Qr,ei;const ti=h.createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),ni=h.createContext({index:0,hasSecondaryLabel:!1}),ri=`(min-width: ${Hr.width})`,ii=(Wr.width,h.createContext(0));function li({children:e,defaultSelectedIndex:t=0,onChange:n,selectedIndex:r,dismissable:i,onTabCloseRequest:l}){const o=J("ccs");i&&!l&&console.error("dismissable property specified without also providing an onTabCloseRequest property.");const[a,s]=(0,h.useState)(t),[c,u]=(({defaultValue:e,name:t="custom",onChange:n,value:r})=>{const[i,l]=(0,h.useState)(void 0!==r?r:e),o=(0,h.useRef)(null);null===o.current&&(o.current=void 0!==r);const a=e=>{const t="function"==typeof e?e(i):e;!1===o.current&&l(t),n&&n(t)};return(0,h.useEffect)(()=>{o.current,o.current},[t,r]),!0===o.current?[r,a,o.current]:[i,a,o.current]})({value:r,defaultValue:t,onChange:e=>n?.({selectedIndex:e})}),d={baseId:o,activeIndex:a,defaultSelectedIndex:t,dismissable:i,onTabCloseRequest:l,setActiveIndex:s,selectedIndex:c,setSelectedIndex:u};return h.createElement(ti.Provider,{value:d},e)}function oi({activation:e="automatic","aria-label":t,children:n,className:r,contained:i=!1,fullWidth:l=!1,iconSize:o,leftOverflowButtonProps:a,light:s,rightOverflowButtonProps:c,scrollDebounceWait:u=200,scrollIntoView:d,...p}){const{activeIndex:m,selectedIndex:g,setSelectedIndex:v,setActiveIndex:w,dismissable:y}=h.useContext(ti),x=I(),_=(0,h.useRef)(null),C=(0,h.useRef)(null),N=(0,h.useRef)(null),[$,T]=(0,h.useState)(!1),[O,S]=(0,h.useState)(0),R=i&&h.Children.toArray(n).some(e=>Ue(e,si)&&void 0!==e.props.secondaryLabel),L=((e,t=!1)=>{const[n,r]=(0,h.useState)(t);return(0,h.useEffect)(()=>{const t=e=>{r(e.matches)},n=window.matchMedia(e);return n.addEventListener("change",t),r(n.matches),()=>{n.removeEventListener("change",t)}},[e]),n})(ri),k=l&&i&&L&&h.Children.toArray(n).length<9,M=b()(`${x}--tabs`,{[`${x}--tabs--contained`]:i,[`${x}--tabs--light`]:s,[`${x}--tabs__icon--default`]:"default"===o,[`${x}--tabs__icon--lg`]:"lg"===o,[`${x}--layout--size-lg`]:"lg"===o,[`${x}--tabs--tall`]:R,[`${x}--tabs--full-width`]:k,[`${x}--tabs--dismissable`]:y},r),A=44,[D,B]=(0,h.useState)(!!_.current&&O+A+_.current.clientWidth<_.current.scrollWidth),V=!!_.current&&$&&O>0,P=b()(`${x}--tab--overflow-nav-button`,`${x}--tab--overflow-nav-button--previous`,{[`${x}--tab--overflow-nav-button--hidden`]:!V}),z=b()(`${x}--tab--overflow-nav-button`,`${x}--tab--overflow-nav-button--next`,{[`${x}--tab--overflow-nav-button--hidden`]:!D}),q=(0,h.useRef)([]),U=(0,h.useCallback)(()=>{Xr(()=>{_.current&&S(_.current.scrollLeft)},u)()},[u]);function Z(e){if($&&_.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,i=_.current.scrollLeft+A,l=_.current.scrollLeft+_.current.clientWidth-A;n<i&&S(n-A),r>l&&S(r+A-_.current.clientWidth)}}return(0,h.useEffect)(()=>{const e=q.current[g];d&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})},[]),(0,h.useEffect)(()=>{B(!!_.current&&O+A+_.current.clientWidth+1<_.current.scrollWidth),y&&_.current&&T(_.current.scrollWidth>_.current.clientWidth+1)},[n,y,O]),(0,h.useEffect)(()=>{if(q.current[g]?.disabled){const e=q.current.filter(e=>!e.disabled);if(e.length>0){const t=e[0];v(q.current.indexOf(t))}}},[]),E(()=>{_.current&&T(_.current.scrollWidth>_.current.clientWidth+1);const e=Xr(function(){_.current&&T(_.current.scrollWidth>_.current.clientWidth+1)},200);return window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[]),E(()=>{null!==O&&_.current&&(_.current.scrollLeft=O)},[O]),E(()=>{Z("manual"===e?q.current[m]:q.current[g])},[e,m]),E(()=>{Z(q.current[g])},[g,$,n]),Yr(C,{onPress({longPress:e}){!e&&_.current&&S(Math.max(O-_.current.scrollWidth/q.current.length*1.5,0))},onLongPress:()=>ai(_,"backward",S)}),Yr(N,{onPress({longPress:e}){!e&&_.current&&S(Math.min(O+_.current.scrollWidth/q.current.length*1.5,_.current.scrollWidth-_.current.clientWidth))},onLongPress:()=>ai(_,"forward",S)}),h.createElement("div",{className:M},h.createElement("button",f({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll left",ref:C,className:P,type:"button"},a),Jr||(Jr=h.createElement(hn,null))),h.createElement("div",f({},p,{"aria-label":t,ref:_,role:"tablist",className:`${x}--tab--list`,onScroll:U,onKeyDown:function(t){if(((e,t)=>{for(let n=0;n<t.length;n++)if(K(e,t[n]))return!0;return!1})(t,[j,H,W,F])){t.preventDefault();const n=q.current.filter(e=>null!==e).filter(e=>!e.disabled),r=n.indexOf(q.current["automatic"===e?g:m]),i=q.current.indexOf(n[function(e,t,n){switch(!0){case K(e,j):return(n+1)%t;case K(e,H):return(t+n-1)%t;case K(e,W):return 0;case K(e,F):return t-1;default:return n}}(t,n.length,r)]);"automatic"===e?v(i):"manual"===e&&w(i),q.current[i]?.focus()}},onBlur:function({relatedTarget:t}){_.current?.contains(t)||"manual"===e&&w(g)}}),h.Children.map(n,(e,t)=>(0,h.isValidElement)(e)?h.createElement(ni.Provider,{value:{index:t,hasSecondaryLabel:R,contained:i}},(0,h.cloneElement)(e,{ref:e=>{e&&(q.current[t]=e)}})):null)),h.createElement("button",f({"aria-hidden":"true",tabIndex:-1,"aria-label":"Scroll right",ref:N,className:z,type:"button"},c),Qr||(Qr=h.createElement(gn,null))))}function ai(e,t,n){const r=e.current;if(!r)return()=>{};const i=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const l="forward"===t?5:-5;let o=null;return o=requestAnimationFrame(function e(){r&&(r.scrollLeft=r.scrollLeft+l,o=requestAnimationFrame(e))}),()=>{r.style["scroll-behavior"]=i,n(r.scrollLeft),o&&cancelAnimationFrame(o)}}li.propTypes={children:m().node,defaultSelectedIndex:m().number,dismissable:m().bool,onChange:m().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:m().number},m().node,m().number,m().string,m().func,m().number,oi.propTypes={activation:m().oneOf(["automatic","manual"]),"aria-label":m().string,children:m().node,className:m().string,contained:m().bool,fullWidth:m().bool,iconSize:m().oneOf(["default","lg"]),leftOverflowButtonProps:m().object,light:L(m().bool),rightOverflowButtonProps:m().object,scrollDebounceWait:m().number,scrollIntoView:m().bool},m().oneOf(["automatic","manual"]),m().string,m().node,m().string;const si=(0,h.forwardRef)(({as:e="button",children:t,className:n,disabled:r,onClick:i,onKeyDown:l,secondaryLabel:o,renderIcon:a,...s},c)=>{const u=I(),{selectedIndex:d,setSelectedIndex:p,baseId:m,dismissable:g,onTabCloseRequest:v}=h.useContext(ti),{index:w,hasSecondaryLabel:x,contained:C}=h.useContext(ni),{badgeIndicator:N}=h.useContext(ci)||{},$=(0,h.useRef)(null),T=(0,h.useRef)(null),O=y([c,T]),[S,R]=(0,h.useState)(!1),L=`${m}-tab-${w}`,k=`${m}-tabpanel-${w}`,[M,A]=(0,h.useState)(!1),D=b()(`${u}--tabs__nav-item`,`${u}--tabs__nav-link`,{[`${u}--tabs__nav-item--selected`]:d===w,[`${u}--tabs__nav-item--disabled`]:r,[`${u}--tabs__nav-item--hover-off`]:S},n),B=e;_($,"mouseover",e=>{C&&T.current&&(e.stopPropagation(),R(!0),T.current.classList.add(`${u}--tabs__nav-item--hover-off`))}),_($,"mouseleave",()=>{C&&T.current&&(T.current.classList.remove(`${u}--tabs__nav-item--hover-off`),R(!1))}),E(()=>{function e(){const e=document.getElementById(`${L}`)||T.current;if(e?.closest(`.${u}--tabs--vertical`)){const n=e?.getElementsByClassName(`${u}--tabs__nav-item-label`)[0];A((t=n).offsetHeight<t.scrollHeight),t.offsetHeight,t.scrollHeight}var t}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[u,L]);const V=e=>{if(e.stopPropagation(),v?.(w),T.current&&T.current.parentElement){const e=Array.from(T.current.parentElement.childNodes).filter(e=>e instanceof HTMLElement&&e.classList.contains(`${u}--tabs__nav-link`)&&!e.classList.contains(`${u}--tabs__nav-item--disabled`)).length;if(T.current&&w+1!==e)T.current.focus();else{const t=2*(e-2),n=T.current.parentElement.childNodes[t];n instanceof HTMLElement&&n.focus()}}},P=e=>{g&&K(e,q)&&V(e),l?.(e)},z=h.createElement("div",{className:b()({[`${u}--tabs__nav-item--close`]:g,[`${u}--tabs__nav-item--close--hidden`]:!g})},h.createElement("button",{type:"button",tabIndex:-1,"aria-disabled":r,"aria-hidden":d===w&&g?"false":"true",disabled:r,className:b()({[`${u}--tabs__nav-item--close-icon`]:g,[`${u}--visually-hidden`]:!g,[`${u}--tabs__nav-item--close-icon--selected`]:d===w,[`${u}--tabs__nav-item--close-icon--disabled`]:r}),onClick:V,title:`Remove ${"string"==typeof t?t:""} tab`,ref:$},h.createElement(bn,{"aria-hidden":d===w&&g?"false":"true","aria-label":`Press delete to remove ${"string"==typeof t?t:""} tab`}))),F=a??g;return M?h.createElement(te,{label:t,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0},h.createElement(B,f({},s,{"aria-controls":k,"aria-disabled":r,"aria-selected":d===w,ref:O,id:L,role:"tab",className:D,disabled:r,title:t,onClick:e=>{r||(p(w),i?.(e))},onKeyDown:P,tabIndex:d===w?"0":"-1",type:"button"}),h.createElement("div",{className:`${u}--tabs__nav-item-label-wrapper`},h.createElement(ce,{className:`${u}--tabs__nav-item-label`},t)),x&&o&&h.createElement(ce,{as:"div",className:`${u}--tabs__nav-item-secondary-label`,title:o},o))):h.createElement(h.Fragment,null,h.createElement(B,f({},s,{"aria-controls":k,"aria-disabled":r,"aria-selected":d===w,ref:O,id:L,role:"tab",className:D,disabled:r,onClick:e=>{r||(p(w),i?.(e))},onKeyDown:P,tabIndex:d===w?"0":"-1",type:"button"}),h.createElement("div",{className:`${u}--tabs__nav-item-label-wrapper`},g&&a&&h.createElement("div",{className:`${u}--tabs__nav-item--icon-left`},h.createElement(a,{size:16})),h.createElement(ce,{className:`${u}--tabs__nav-item-label`},t),!g&&a&&h.createElement("div",{className:b()(`${u}--tabs__nav-item--icon`,{[`${u}--visually-hidden`]:!F})},!g&&a&&h.createElement(a,{size:16}))),x&&o&&h.createElement(ce,{as:"div",className:`${u}--tabs__nav-item-secondary-label`,title:o},o),!r&&N&&(ei||(ei=h.createElement(re,null)))),z)});si.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,disabled:m().bool,onClick:m().func,onKeyDown:m().func,renderButton:m().func,renderIcon:m().oneOfType([m().func,m().object]),secondaryLabel:m().string};const ci=(0,h.createContext)(!1);h.forwardRef(({badgeIndicator:e,children:t,className:n,defaultOpen:r=!1,enterDelayMs:i,leaveDelayMs:l,label:o,...a},s)=>{const c=I(),u=(0,h.useMemo)(()=>({badgeIndicator:e}),[e]),d=(0,h.isValidElement)(t)&&(20===t.props.size||"20"===t.props.size),p=b()(`${c}--tabs__nav-item--icon-only`,n,{[`${c}--tabs__nav-item--icon-only__20`]:d});return h.createElement(ci.Provider,{value:u},h.createElement(te,{align:"bottom",defaultOpen:r,className:`${c}--icon-tooltip`,enterDelayMs:i,label:o,leaveDelayMs:l},h.createElement(si,f({className:p,ref:s},a),t)))}).propTypes={badgeIndicator:m().bool,children:m().node,className:m().string,defaultOpen:m().bool,enterDelayMs:m().number,label:m().node.isRequired,leaveDelayMs:m().number};const ui=h.forwardRef(({children:e,className:t,...n},r)=>{const i=I(),{selectedIndex:l,baseId:o}=h.useContext(ti),a=h.useContext(ii),s=`${o}-tabpanel-${a}`,c=`${o}-tab-${a}`,u=b()(`${i}--tab-content`,t);return h.createElement("div",f({},n,{"aria-labelledby":c,id:s,className:u,ref:r,role:"tabpanel",hidden:l!==a}),e)});function di({children:e}){const t=I(),n=(0,h.useRef)([]),r=(0,h.useRef)([]);return E(()=>{const e=n.current[0]?.previousElementSibling,i=e?.classList.contains(`${t}--tabs--vertical`),l=e?.parentElement?.style.height;if(i&&!l){r.current=n.current.map(e=>e?.hidden||!1),n.current.forEach(e=>{e&&(e.hidden=!1)});const t=n.current.map(e=>e?.offsetHeight||0),i=Math.max(...t);e instanceof HTMLElement&&(e.style.height=i+"px"),n.current.forEach((e,t)=>{e&&(e.hidden=r.current[t])})}}),h.createElement(h.Fragment,null,h.Children.map(e,(e,t)=>(0,h.isValidElement)(e)?h.createElement(ii.Provider,{value:t},(0,h.cloneElement)(e,{ref:e=>{n.current[t]=e}})):null))}ui.propTypes={children:m().node,className:m().string},di.propTypes={children:m().node};const fi=(e,t,n="character",r="characters")=>{if(void 0===t)return null;const i=t-e;return i<=10&&i>0?`${i} ${1===i?n:r} left.`:i<=0?`Maximum ${r} reached.`:null},pi=(0,h.forwardRef)((e,t)=>{const{className:n,decorator:r,disabled:i=!1,id:l,labelText:o,hideLabel:a,onChange:s=Le,onClick:c=Le,onKeyDown:u=Le,invalid:d=!1,invalidText:p="",helperText:m,light:g,placeholder:v="",enableCounter:w=!1,maxCount:x,counterMode:_="character",warn:C=!1,warnText:N="",rows:$=4,slug:T,...O}=e,S=I(),{isFluid:R}=(0,h.useContext)(xn),{defaultValue:L,value:k}=O,M=J(),A=(0,h.useRef)(null),D=(0,h.useRef)(null),B=(0,h.useRef)(null),V=(0,h.useRef)(null),P=(0,h.useRef)(null),z=y([t,D]);function F(){const e=(L||k||D.current?.value||"").toString();return"character"===_?e.length:e.match(/\p{L}+/gu)?.length||0}const[W,H]=(0,h.useState)(F());(0,h.useEffect)(()=>{H(F())},[k,L,_]),E(()=>{if(O.cols&&D.current?(D.current.style.width="",D.current.style.resize="none"):D.current&&(D.current.style.width="100%"),!A.current)return;const e=new ResizeObserver(([e])=>{var t;t=e.contentRect.width,[B,V,P].forEach(e=>{e.current&&(e.current.style.maxWidth=`${t}px`,e.current.style.overflowWrap="break-word")})});return e.observe(A.current),()=>e&&e.disconnect()},[O.cols,d,C]);const j={id:l,onKeyDown:e=>{if(!i&&w&&"word"===_){const t=e.which;(x&&W>=x&&32===t||x&&W>=x&&13===t)&&e.preventDefault()}!i&&u&&u(e)},onPaste:e=>{if(!i&&"word"===_&&w&&void 0!==x&&null!==D.current){const t=D.current.value.match(/\p{L}+/gu)||[],n=e.clipboardData.getData("Text").match(/\p{L}+/gu)||[];if(t.length+n.length>x){e.preventDefault();const r=t.concat(n).slice(0,x);setTimeout(()=>{H(x)},0),D.current.value=r.join(" ")}}},onChange:e=>{if(!i){if("character"==_)e?.persist?.(),setTimeout(()=>{H(e.target?.value?.length)},0);else if("word"==_)if(e.target.value){if(w&&void 0!==x&&null!==D.current){const t=e.target?.value?.match(/\p{L}+/gu);t&&t.length<=x?(D.current.removeAttribute("maxLength"),setTimeout(()=>{H(t.length)},0)):t&&t.length>x&&setTimeout(()=>{H(t.length)},0)}}else setTimeout(()=>{H(0)},0);s&&s(e)}},onClick:e=>{!i&&c&&c(e)}},q=b()(`${S}--form-item`,n),K=b()(`${S}--text-area__wrapper`,{[`${S}--text-area__wrapper--cols`]:O.cols,[`${S}--text-area__wrapper--readonly`]:O.readOnly,[`${S}--text-area__wrapper--warn`]:C,[`${S}--text-area__wrapper--slug`]:T,[`${S}--text-area__wrapper--decorator`]:r}),U=b()(`${S}--label`,{[`${S}--visually-hidden`]:a&&!R,[`${S}--label--disabled`]:i}),Z=b()(`${S}--text-area`,{[`${S}--text-area--light`]:g,[`${S}--text-area--invalid`]:d,[`${S}--text-area--warn`]:C}),G=b()(`${S}--label`,{[`${S}--label--disabled`]:i,[`${S}--text-area__label-counter`]:!0}),Y=b()(`${S}--form__helper-text`,{[`${S}--form__helper-text--disabled`]:i}),X=null!=o&&h.createElement(ce,{as:"label",htmlFor:l,className:U},o),Q=w&&x&&("character"===_||"word"===_)?h.createElement(ce,{as:"div",className:G,"aria-hidden":"true"},`${W}/${x}`):null,ee=w&&x?`${l}-counter-desc`:void 0,te=null!=m,ne=te?`text-area-helper-text-${M}`:void 0,re=te&&h.createElement(ce,{as:"div",id:ne,className:Y,ref:B},m),ie=l+"-error-msg",le=d?h.createElement(ce,{as:"div",role:"alert",className:`${S}--form-requirement`,id:ie,ref:V},p,R&&h.createElement(Re,{className:`${S}--text-area__invalid-icon`})):null,oe=l+"-warn-msg",ae=C?h.createElement(ce,{as:"div",role:"alert",className:`${S}--form-requirement`,id:oe,ref:P},N,R&&h.createElement(Se,{className:`${S}--text-area__invalid-icon ${S}--text-area__invalid-icon--warning`})):null;let se;if(d)se=ie;else if(C&&!R)se=oe;else{const e=[];!R&&te&&ne&&e.push(ne),ee&&e.push(ee),se=e.length>0?e.join(" "):void 0}w&&"character"==_&&(j.maxLength=x);const ue=(0,h.useRef)(null),[de,fe]=(0,h.useState)(""),pe=fi(W,x,"word"===_?"word":void 0,"word"===_?"words":void 0);(0,h.useEffect)(()=>{if(pe&&pe!==de){const e=ue.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=pe,fe(pe))},"word"===_?2e3:1e3);return()=>{t&&clearTimeout(t)}}}},[pe,de,_]);const me=h.createElement("textarea",f({},O,j,{placeholder:v,"aria-readonly":O.readOnly,className:Z,"aria-invalid":d,"aria-describedby":se,disabled:i,rows:$,readOnly:O.readOnly,ref:z})),he=T??r,ge=Ue(he,Ke)?(0,h.cloneElement)(he,{size:"mini"}):he;return h.createElement("div",{className:q},h.createElement("div",{className:`${S}--text-area__label-wrapper`},X,Q),w&&x&&h.createElement("span",{id:ee,className:`${S}--visually-hidden`},"word"===_?`Word limit ${x}`:`Character limit ${x}`),h.createElement("div",{ref:A,className:K,"data-invalid":d||null},d&&!R&&h.createElement(Re,{className:`${S}--text-area__invalid-icon`}),C&&!d&&!R&&h.createElement(Se,{className:`${S}--text-area__invalid-icon ${S}--text-area__invalid-icon--warning`}),me,T?ge:r?h.createElement("div",{className:`${S}--text-area__inner-wrapper--decorator`},ge):"",h.createElement("span",{className:`${S}--text-area__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:ue},pe),R&&h.createElement("hr",{className:`${S}--text-area__divider`}),R&&d?le:null,R&&C&&!d?ae:null),d||C||R?null:re,d&&!R?le:null,!C||d||R?null:ae)});pi.displayName="TextArea",pi.propTypes={className:m().string,cols:m().number,counterMode:m().oneOf(["character","word"]),decorator:m().node,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,enableCounter:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:L(m().bool),maxCount:m().number,onChange:m().func,onClick:m().func,onKeyDown:m().func,placeholder:m().string,readOnly:m().bool,rows:m().number,slug:L(m().node),value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node};const mi=e=>({"data-invalid":!0,"aria-invalid":!0,"aria-describedby":e}),hi=e=>({"aria-describedby":e}),gi=e=>({"aria-describedby":e}),bi=(0,h.forwardRef)(({className:e,decorator:t,disabled:n=!1,helperText:r,hideLabel:i,id:l,inline:o=!1,invalid:a=!1,invalidText:s,labelText:c,light:u,onChange:d=()=>{},onClick:f=()=>{},placeholder:p,readOnly:m,size:g,type:v="text",warn:w=!1,warnText:E,enableCounter:x=!1,maxCount:_,slug:C,...N},$)=>{const T=I(),{defaultValue:O,value:S}=N,R=(0,h.useRef)(null),L=y([$,R]);function k(){return(O||S||R.current?.value||"").toString().length}const[M,A]=(0,h.useState)(k());(0,h.useEffect)(()=>{A(k())},[S,O,x]);const D=nr({id:l,readOnly:m,disabled:n,invalid:a,invalidText:s,warn:w,warnText:E}),B={id:l,onChange:e=>{D.disabled||(A(e.target.value?.length),d(e))},onClick:e=>{D.disabled||f(e)},placeholder:p,type:v,ref:L,className:b()(`${T}--text-input`,{[`${T}--text-input--light`]:u,[`${T}--text-input--invalid`]:D.invalid,[`${T}--text-input--warning`]:D.warn,[`${T}--text-input--${g}`]:g,[`${T}--layout--size-${g}`]:g}),title:p,disabled:D.disabled,readOnly:m,"aria-describedby":r&&D.helperId,...N};x&&(B.maxLength=_);const V=b()([b()(`${T}--form-item`,e)],`${T}--text-input-wrapper`,{[`${T}--text-input-wrapper--readonly`]:m,[`${T}--text-input-wrapper--light`]:u,[`${T}--text-input-wrapper--inline`]:o,[`${T}--text-input-wrapper--inline--invalid`]:o&&D.invalid}),P=b()(`${T}--label`,{[`${T}--visually-hidden`]:i,[`${T}--label--disabled`]:D.disabled,[`${T}--label--inline`]:o,[`${T}--label--inline--${g}`]:o&&!!g}),z=b()(`${T}--form__helper-text`,{[`${T}--form__helper-text--disabled`]:D.disabled,[`${T}--form__helper-text--inline`]:o}),F=b()(`${T}--text-input__field-outer-wrapper`,{[`${T}--text-input__field-outer-wrapper--inline`]:o}),W=b()(`${T}--text-input__field-wrapper`,{[`${T}--text-input__field-wrapper--warning`]:D.warn,[`${T}--text-input__field-wrapper--slug`]:C,[`${T}--text-input__field-wrapper--decorator`]:t}),H=b()({[`${T}--text-input__invalid-icon`]:D.invalid||D.warn,[`${T}--text-input__invalid-icon--warning`]:D.warn}),j=b()(`${T}--label`,{[`${T}--label--disabled`]:n,[`${T}--text-input__label-counter`]:!0}),q=x&&_?h.createElement(ce,{as:"div",className:j},`${M}/${_}`):null,K=null!=c&&h.createElement(ce,{as:"label",htmlFor:l,className:P},c),U=h.createElement("div",{className:`${T}--text-input__label-wrapper`},K,q),Z=null!=r&&h.createElement(ce,{as:"div",id:D.helperId,className:z},r),G=h.createElement("input",(({sharedTextInputProps:e,invalid:t,invalidId:n,warn:r,warnId:i,hasHelper:l,helperId:o})=>({...e,...t?mi(n):{},...r?hi(i):{},...l?gi(o):{}}))({sharedTextInputProps:B,invalid:D.invalid,invalidId:D.invalidId,warn:D.warn,warnId:D.warnId})),{isFluid:Y}=(0,h.useContext)(xn),X=(0,h.useRef)(null),[J,Q]=(0,h.useState)(""),ee=fi(M,_);(0,h.useEffect)(()=>{if(ee&&ee!==J){const e=X.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=ee,Q(ee))},1e3);return()=>{t&&clearTimeout(t)}}}},[ee,J]);const te=D.icon,ne=C??t,re=Ue(ne,Ke)?(0,h.cloneElement)(ne,{size:"mini"}):ne;return h.createElement("div",{className:V},o?h.createElement("div",{className:`${T}--text-input__label-helper-wrapper`},U,!Y&&(D.validation||Z)):U,h.createElement("div",{className:F},h.createElement("div",{className:W,"data-invalid":D.invalid||null},te&&h.createElement(te,{className:H}),G,C?re:t?h.createElement("div",{className:`${T}--text-input__field-inner-wrapper--decorator`},re):"",h.createElement("span",{className:`${T}--text-input__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:X},ee),Y&&h.createElement("hr",{className:`${T}--text-input__divider`}),Y&&!o&&D.validation),!Y&&!o&&(D.validation||Z)))});bi.displayName="TextInput",bi.propTypes={className:m().string,decorator:m().node,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,enableCounter:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,inline:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:L(m().bool),maxCount:m().number,onChange:m().func,onClick:m().func,placeholder:m().string,readOnly:m().bool,size:m().oneOf(["sm","md","lg"]),slug:L(m().node),type:m().string,value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node}},5581(e,t){Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.server_context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.suspense_list"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.for("react.offscreen");Symbol.for("react.module.reference")},4353(e,t,n){n(5581)},8493(e,t,n){var r=n(6072),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=r.useState,o=r.useEffect,a=r.useLayoutEffect,s=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=l({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a(function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})},[e,n,t]),o(function(){return c(i)&&u({inst:i}),e(function(){c(i)&&u({inst:i})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},9888(e,t,n){e.exports=n(8493)}}]);
package/dist/499.js DELETED
@@ -1 +0,0 @@
1
- (globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[499],{2499(e,n,t){"use strict";t.r(n),t.d(n,{blueBox:()=>m,brandBox:()=>d,importTranslation:()=>p,prescriptionsActionButton:()=>f,redBox:()=>l,root:()=>_,startupApp:()=>u});var r=t(7224),o={casualGreeting:{_type:r.Type.Boolean,_default:!1,_description:"Whether to use a casual greeting (or a formal one)."},whoToGreet:{_type:r.Type.Array,_default:["World"],_description:"Who should be greeted. Names will be separated by a comma and space.",_elements:{_type:r.Type.String},_validators:[(0,r.validator)(function(e){return e.length>0},"At least one person must be greeted.")]}},c=t(6072),i=t(2076);var s="@cc-openmrs/cc-esm-active-prescriptions",a={featureName:"active-prescriptions",moduleName:s},p=t(4767);function u(){(0,r.defineConfigSchema)(s,o)}var l=(0,r.getAsyncLifecycle)(function(){return t.e(319).then(t.bind(t,4319))},a),m=(0,r.getAsyncLifecycle)(function(){return t.e(966).then(t.bind(t,966))},a),d=(0,r.getAsyncLifecycle)(function(){return t.e(537).then(t.bind(t,1537))},a),f=(0,r.getSyncLifecycle)(function(){var e=(0,(0,i.useTranslation)().t)("activePrescriptions","Active prescriptions");return c.createElement(r.ActionMenuButton2,{icon:function(e){return c.createElement(r.EventsIcon,e)},label:e,workspaceToLaunch:{workspaceName:"active-prescriptions-workspace"}})},a),_=(0,r.getAsyncLifecycle)(function(){return Promise.all([t.e(961),t.e(779),t.e(464),t.e(465),t.e(63)]).then(t.bind(t,1063))},a)},4767(e,n,t){var r={"./am.json":[1197,[197]],"./en.json":[4300,[300]],"./es.json":[3099,[99]],"./fr.json":[4055,[55]],"./he.json":[4652,[652]],"./km.json":[4335,[335]],"./pt.json":[6679,[679]]};function o(e){try{if(!t.o(r,e))return Promise.resolve().then(()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n})}catch(e){return Promise.reject(e)}var n=r[e],o=n[0];return t.e(n[1][0]).then(()=>t(o))}o.keys=()=>Object.keys(r),o.id=4767,e.exports=o}}]);
package/dist/63.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[63],{6052(e,n,t){t.d(n,{A:()=>l});var a=t(2996),i=t.n(a),o=t(159),r=t.n(o)()(i());r.push([e.id,".-cc-esm-active-prescriptions__root__workspace___\\+xqk5{padding:2rem;display:flex;flex-direction:column;gap:1.5rem;background-color:var(--cds-layer, #ffffff);min-height:100%}.-cc-esm-active-prescriptions__root__header___G1X3T{display:flex;flex-direction:column;gap:.5rem}.-cc-esm-active-prescriptions__root__subtitle___kRieu{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px);color:var(--cds-text-secondary, #525252);margin:0;max-width:48rem}.-cc-esm-active-prescriptions__root__section___61mCr{background-color:var(--cds-layer-accent, #f4f4f4);padding:1rem;border-radius:.25rem;box-shadow:0 1px 2px rgba(0,0,0,.08)}.-cc-esm-active-prescriptions__root__fieldLabel___F2zAd{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px);margin-bottom:.5rem}.-cc-esm-active-prescriptions__root__tabContent___DnbmQ{padding:1rem 0 0;display:flex;flex-direction:column;gap:1.5rem}.-cc-esm-active-prescriptions__root__fieldGroup___3aiba{display:flex;flex-direction:column;gap:.5rem}.-cc-esm-active-prescriptions__root__helperText___sr2T2{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:var(--cds-text-secondary, #525252);margin:0}.-cc-esm-active-prescriptions__root__ordersList___jcCvy{border:1px solid var(--cds-border-subtle, #e0e0e0);border-radius:.25rem;padding:.75rem;display:flex;flex-direction:column;gap:.5rem;background-color:var(--cds-layer, #ffffff)}.-cc-esm-active-prescriptions__root__orderLabel___3oBY3{display:flex;flex-direction:column;align-items:flex-start;gap:.125rem}.-cc-esm-active-prescriptions__root__orderName___QGKUy{font-size:var(--cds-body-compact-01-font-size, 0.875rem);font-weight:var(--cds-body-compact-01-font-weight, 400);line-height:var(--cds-body-compact-01-line-height, 1.28572);letter-spacing:var(--cds-body-compact-01-letter-spacing, 0.16px);font-weight:600}.-cc-esm-active-prescriptions__root__orderMeta___S7cGO{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:var(--cds-text-secondary, #525252)}.-cc-esm-active-prescriptions__root__selectionSummary___TD9ka{font-size:var(--cds-label-01-font-size, 0.75rem);font-weight:var(--cds-label-01-font-weight, 400);line-height:var(--cds-label-01-line-height, 1.33333);letter-spacing:var(--cds-label-01-letter-spacing, 0.32px);color:var(--cds-text-secondary, #525252);margin:.25rem 0 0}","",{version:3,sources:["webpack://./src/root.scss","webpack://./node_modules/@carbon/layout/scss/generated/_spacing.scss","webpack://./node_modules/@carbon/type/scss/_styles.scss"],names:[],mappings:"AAGA,wDACE,YCqCW,CDpCX,YAAA,CACA,qBAAA,CACA,UC6BW,CD5BX,0CAAA,CACA,eAAA,CAGF,oDACE,YAAA,CACA,qBAAA,CACA,SCMW,CDHb,sDEg1BI,gDAAA,CAAA,+CAAA,CAAA,mDAAA,CAAA,wDAAA,CF90BF,wCAAA,CACA,QAAA,CACA,eAAA,CAGF,qDACE,iDAAA,CACA,YCIW,CDHX,oBCZW,CDaX,oCAAA,CAGF,wDEk0BI,2DAAA,CAAA,0DAAA,CAAA,8DAAA,CAAA,mEAAA,CFh0BF,mBCbW,CDgBb,wDACE,gBAAA,CACA,YAAA,CACA,qBAAA,CACA,UCLW,CDQb,wDACE,YAAA,CACA,qBAAA,CACA,SC1BW,CD6Bb,wDEgzBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CF9yBF,wCAAA,CACA,QAAA,CAGF,wDACE,kDAAA,CACA,oBC1CW,CD2CX,cCjCW,CDkCX,YAAA,CACA,qBAAA,CACA,SCzCW,CD0CX,0CAAA,CAGF,wDACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,WC3DW,CD8Db,uDEyxBI,wDAAA,CAAA,uDAAA,CAAA,2DAAA,CAAA,gEAAA,CFvxBF,eAAA,CAGF,uDEoxBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CFlxBF,wCAAA,CAGF,8DE+wBI,gDAAA,CAAA,gDAAA,CAAA,oDAAA,CAAA,yDAAA,CF7wBF,wCAAA,CACA,iBAAA",sourcesContent:["@use '@carbon/layout';\n@use '@carbon/type';\n\n.workspace {\n padding: layout.$spacing-07;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-06;\n background-color: var(--cds-layer, #ffffff);\n min-height: 100%;\n}\n\n.header {\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-03;\n}\n\n.subtitle {\n @include type.type-style('body-01');\n color: var(--cds-text-secondary, #525252);\n margin: 0;\n max-width: 48rem;\n}\n\n.section {\n background-color: var(--cds-layer-accent, #f4f4f4);\n padding: layout.$spacing-05;\n border-radius: layout.$spacing-02;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n\n.fieldLabel {\n @include type.type-style('heading-compact-01');\n margin-bottom: layout.$spacing-03;\n}\n\n.tabContent {\n padding: layout.$spacing-05 0 0;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-06;\n}\n\n.fieldGroup {\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-03;\n}\n\n.helperText {\n @include type.type-style('label-01');\n color: var(--cds-text-secondary, #525252);\n margin: 0;\n}\n\n.ordersList {\n border: 1px solid var(--cds-border-subtle, #e0e0e0);\n border-radius: layout.$spacing-02;\n padding: layout.$spacing-04;\n display: flex;\n flex-direction: column;\n gap: layout.$spacing-03;\n background-color: var(--cds-layer, #ffffff);\n}\n\n.orderLabel {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: layout.$spacing-01;\n}\n\n.orderName {\n @include type.type-style('body-compact-01');\n font-weight: 600;\n}\n\n.orderMeta {\n @include type.type-style('label-01');\n color: var(--cds-text-secondary, #525252);\n}\n\n.selectionSummary {\n @include type.type-style('label-01');\n color: var(--cds-text-secondary, #525252);\n margin: layout.$spacing-02 0 0;\n}\n","// Code generated by @carbon/layout. DO NOT EDIT.\n//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-01: 0.125rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-02: 0.25rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-03: 0.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-04: 0.75rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-05: 1rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-06: 1.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-07: 2rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-08: 2.5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-09: 3rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-10: 4rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-11: 5rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-12: 6rem !default;\n\n/// @type Number\n/// @access public\n/// @group @carbon/layout\n$spacing-13: 10rem !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/layout\n$spacing: (\n spacing-01: $spacing-01,\n spacing-02: $spacing-02,\n spacing-03: $spacing-03,\n spacing-04: $spacing-04,\n spacing-05: $spacing-05,\n spacing-06: $spacing-06,\n spacing-07: $spacing-07,\n spacing-08: $spacing-08,\n spacing-09: $spacing-09,\n spacing-10: $spacing-10,\n spacing-11: $spacing-11,\n spacing-12: $spacing-12,\n spacing-13: $spacing-13,\n);\n","//\n// Copyright IBM Corp. 2018, 2023\n//\n// This source code is licensed under the Apache-2.0 license found in the\n// LICENSE file in the root directory of this source tree.\n//\n\n// stylelint-disable number-max-precision\n\n@use 'sass:map';\n@use 'sass:math';\n@use '@carbon/grid/scss/config' as gridconfig;\n@use '@carbon/grid/scss/breakpoint' as grid;\n@use 'prefix' as *;\n@use 'font-family';\n@use 'scale';\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$caption-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$label-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-01: (\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$legal-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-01: (\n font-size: scale.type-scale(1),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @deprecated\n/// @group @carbon/type\n$helper-text-02: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-01: $body-short-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-01: $body-long-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-short-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-compact-02: $body-short-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-long-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$body-02: $body-long-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-01: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(1),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.33333,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$code-02: (\n font-family: font-family.font-family('mono'),\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.42857,\n letter-spacing: 0.32px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.42857,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-01: (\n font-size: scale.type-scale(2),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.28572,\n letter-spacing: 0.16px,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-01: $productive-heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.5,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-02: (\n font-size: scale.type-scale(3),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.375,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-compact-02: $productive-heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-03: $productive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-04: $productive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-05: $productive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-06: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n // Extra digit needed for precision in Chrome\n line-height: 1.199,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-06: $productive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$productive-heading-07: (\n font-size: scale.type-scale(12),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$heading-07: $productive-heading-07 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-01: $heading-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-02: $heading-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-03: (\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.4,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(5),\n line-height: 1.4,\n ),\n max: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-03: $expressive-heading-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-04: (\n font-size: scale.type-scale(7),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.28572,\n letter-spacing: 0,\n breakpoints: (\n xlg: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n font-weight: font-family.font-weight('regular'),\n ),\n max: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-04: $expressive-heading-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-05: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n font-weight: font-family.font-weight('light'),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-05: $expressive-heading-05 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-heading-06: (\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-heading-06: $expressive-heading-06 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$expressive-paragraph-01: (\n font-size: scale.type-scale(6),\n font-weight: font-family.font-weight('light'),\n line-height: 1.334,\n letter-spacing: 0,\n breakpoints: (\n lg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n);\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-paragraph-01: $expressive-paragraph-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-01: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(5),\n font-weight: font-family.font-weight('regular'),\n line-height: 1.3,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(5),\n ),\n lg: (\n font-size: scale.type-scale(6),\n line-height: 1.334,\n ),\n xlg: (\n font-size: scale.type-scale(7),\n line-height: 1.28572,\n ),\n max: (\n font-size: scale.type-scale(8),\n line-height: 1.25,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-01: $quotation-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$quotation-02: (\n font-family: font-family.font-family('serif'),\n font-size: scale.type-scale(8),\n font-weight: font-family.font-weight('light'),\n line-height: 1.25,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(9),\n line-height: 1.22,\n ),\n lg: (\n font-size: scale.type-scale(10),\n line-height: 1.19,\n ),\n xlg: (\n font-size: scale.type-scale(11),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(13),\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-quotation-02: $quotation-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-01: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.17,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-01: $display-01 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-02: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('semibold'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(10),\n ),\n lg: (\n font-size: scale.type-scale(12),\n ),\n xlg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n ),\n max: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-02: $display-02 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-03: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(12),\n line-height: 1.18,\n ),\n lg: (\n font-size: scale.type-scale(13),\n line-height: 1.16,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(15),\n line-height: 1.13,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(16),\n line-height: 1.11,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-03: $display-03 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$display-04: (\n font-size: scale.type-scale(10),\n font-weight: font-family.font-weight('light'),\n line-height: 1.19,\n letter-spacing: 0,\n breakpoints: (\n md: (\n font-size: scale.type-scale(14),\n line-height: 1.15,\n ),\n lg: (\n font-size: scale.type-scale(17),\n line-height: 1.11,\n letter-spacing: -0.64px,\n ),\n xlg: (\n font-size: scale.type-scale(20),\n line-height: 1.07,\n letter-spacing: -0.64px,\n ),\n max: (\n font-size: scale.type-scale(23),\n line-height: 1.05,\n letter-spacing: -0.96px,\n ),\n ),\n) !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$fluid-display-04: $display-04 !default;\n\n/// @type Map\n/// @access public\n/// @group @carbon/type\n$tokens: (\n caption-01: $caption-01,\n caption-02: $caption-02,\n label-01: $label-01,\n label-02: $label-02,\n helper-text-01: $helper-text-01,\n helper-text-02: $helper-text-02,\n body-short-01: $body-short-01,\n body-short-02: $body-short-02,\n body-long-01: $body-long-01,\n body-long-02: $body-long-02,\n code-01: $code-01,\n code-02: $code-02,\n heading-01: $heading-01,\n heading-02: $heading-02,\n productive-heading-01: $productive-heading-01,\n productive-heading-02: $productive-heading-02,\n productive-heading-03: $productive-heading-03,\n productive-heading-04: $productive-heading-04,\n productive-heading-05: $productive-heading-05,\n productive-heading-06: $productive-heading-06,\n productive-heading-07: $productive-heading-07,\n expressive-paragraph-01: $expressive-paragraph-01,\n expressive-heading-01: $expressive-heading-01,\n expressive-heading-02: $expressive-heading-02,\n expressive-heading-03: $expressive-heading-03,\n expressive-heading-04: $expressive-heading-04,\n expressive-heading-05: $expressive-heading-05,\n expressive-heading-06: $expressive-heading-06,\n quotation-01: $quotation-01,\n quotation-02: $quotation-02,\n display-01: $display-01,\n display-02: $display-02,\n display-03: $display-03,\n display-04: $display-04,\n // V11 Tokens\n legal-01: $legal-01,\n legal-02: $legal-02,\n body-compact-01: $body-compact-01,\n body-compact-02: $body-compact-02,\n heading-compact-01: $heading-compact-01,\n heading-compact-02: $heading-compact-02,\n body-01: $body-01,\n body-02: $body-02,\n heading-03: $heading-03,\n heading-04: $heading-04,\n heading-05: $heading-05,\n heading-06: $heading-06,\n heading-07: $heading-07,\n fluid-heading-03: $fluid-heading-03,\n fluid-heading-04: $fluid-heading-04,\n fluid-heading-05: $fluid-heading-05,\n fluid-heading-06: $fluid-heading-06,\n fluid-paragraph-01: $fluid-paragraph-01,\n fluid-quotation-01: $fluid-quotation-01,\n fluid-quotation-02: $fluid-quotation-02,\n fluid-display-01: $fluid-display-01,\n fluid-display-02: $fluid-display-02,\n fluid-display-03: $fluid-display-03,\n fluid-display-04: $fluid-display-04,\n) !default;\n\n/// @param {Map} $map\n/// @access public\n/// @group @carbon/type\n@mixin properties($map) {\n @each $name, $value in $map {\n #{$name}: $value;\n }\n}\n\n/// @param {Number} $value - Number with units\n/// @return {Number} Without units\n/// @access public\n/// @group @carbon/type\n@function strip-unit($value) {\n @return math.div($value, $value * 0 + 1);\n}\n\n/// This helper includes fluid type styles for the given token value. Fluid type\n/// means that the `font-size` is computed using `calc()` in order to be\n/// determined by the screen size instead of a breakpoint. As a result, fluid\n/// styles should be used with caution in fixed width contexts.\n///\n/// In addition, we make use of %-based line-heights so that the line-height of\n/// each type style is computed correctly due to the dynamic nature of the\n/// `font-size`.\n///\n/// Most of the logic for this work comes from CSS Tricks:\n/// https://css-tricks.com/snippets/css/fluid-typography/\n///\n/// @param {Map} $type-styles - The value of a given type token\n/// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {\n // Include the initial styles for the given token by default without any\n // media query guard. This includes `font-size` as a fallback in the case\n // that a browser does not support `calc()`\n @include properties(map.remove($type-styles, breakpoints));\n // We also need to include the `sm` styles by default since they don't\n // appear in the fluid styles for tokens\n @include fluid-type-size($type-styles, sm, $breakpoints);\n\n // Finally, we need to go through all the breakpoints defined in the type\n // token and apply the properties and fluid type size for that given\n // breakpoint\n @each $name, $values in map.get($type-styles, breakpoints) {\n @include grid.breakpoint($name) {\n @include properties($values);\n @include fluid-type-size($type-styles, $name, $breakpoints);\n }\n }\n}\n\n/// Computes the fluid `font-size` for a given type style and breakpoint\n/// @param {Map} $type-styles - The styles for a given token\n/// @param {String} $name - The name of the breakpoint to which we apply the fluid\n/// @param {Map} $breakpoints [$grid-breakpoints] - The breakpoints for the grid system\n/// @access public\n/// @group @carbon/type\n@mixin fluid-type-size(\n $type-styles,\n $name,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n // Get the information about the breakpoint we're currently working in. Useful\n // for getting initial width information\n $breakpoint: map.get($breakpoints, $name);\n\n // Our fluid styles are captured under the 'breakpoints' property in our type\n // styles map. These define what values to treat as `max-` variables below\n $fluid-sizes: map.get($type-styles, breakpoints);\n $fluid-breakpoint: ();\n // Special case for `sm` because the styles for small are on the type style\n // directly\n @if $name == sm {\n $fluid-breakpoint: map.remove($type-styles, breakpoints);\n } @else {\n $fluid-breakpoint: map.get($fluid-sizes, $name);\n }\n\n // Initialize our font-sizes to the default size for the type style\n $max-font-size: map.get($type-styles, font-size);\n $min-font-size: map.get($type-styles, font-size);\n @if map.has-key($fluid-breakpoint, font-size) {\n $min-font-size: map.get($fluid-breakpoint, font-size);\n }\n\n // Initialize our min and max width to the width of the current breakpoint\n $max-vw: map.get($breakpoint, width);\n $min-vw: map.get($breakpoint, width);\n\n // We can use `breakpoint-next` to see if there is another breakpoint we can\n // use to update `max-font-size` and `max-vw` with larger values\n $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);\n $next-fluid-breakpoint-name: null;\n\n // We need to figure out what the next available fluid breakpoint is for our\n // given $type-styles. In this loop we try and iterate through breakpoints\n // until we either manually set $next-breakpoint-available to null or\n // `breakpoint-next` returns null.\n @while $next-breakpoint-available {\n @if map.has-key($fluid-sizes, $next-breakpoint-available) {\n $next-fluid-breakpoint-name: $next-breakpoint-available;\n $next-breakpoint-available: null;\n } @else {\n $next-breakpoint-available: grid.breakpoint-next(\n $next-breakpoint-available,\n $breakpoints\n );\n }\n }\n\n // If we have found the next available fluid breakpoint name, then we know\n // that we have values that we can use to set max-font-size and max-vw as both\n // values derive from the next breakpoint\n @if $next-fluid-breakpoint-name {\n $next-fluid-breakpoint: map.get($breakpoints, $next-fluid-breakpoint-name);\n $max-font-size: map.get(\n map.get($fluid-sizes, $next-fluid-breakpoint-name),\n font-size\n );\n $max-vw: map.get($next-fluid-breakpoint, width);\n\n // prettier-ignore\n font-size: calc(#{$min-font-size} +\n #{strip-unit($max-font-size - $min-font-size)} *\n ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)})\n );\n } @else {\n // Otherwise, just default to setting the font size found from the type\n // style or the given fluid breakpoint in the type style\n font-size: $min-font-size;\n }\n}\n\n// TODO: move following variable and `custom-property` mixin into shared file for\n// both `@carbon/type` and `@carbon/themes`\n\n/// @access private\n/// @group @carbon/type\n@mixin custom-properties($name, $value) {\n @each $property, $value in $value {\n #{$property}: var(\n --#{$custom-property-prefix}-#{$name}-#{$property},\n #{$value}\n );\n }\n}\n\n/// Helper mixin to include the styles for a given token in any selector in your\n/// project. Also includes an optional fluid option that will enable fluid\n/// styles for the token if they are defined. Fluid styles will cause the\n/// token's font-size to be computed based on the viewport size. As a result, use\n/// with caution in fixed contexts.\n/// @param {String} $name - The name of the token to get the styles for\n/// @param {Boolean} $fluid [false] - Specify whether to include fluid styles for the\n/// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use\n/// @access public\n/// @group @carbon/type\n@mixin type-style(\n $name,\n $fluid: false,\n $breakpoints: gridconfig.$grid-breakpoints\n) {\n @if not map.has-key($tokens, $name) {\n @error 'Unable to find a token with the name: `#{$name}`';\n }\n\n $token: map.get($tokens, $name);\n\n // If $fluid is set to true and the token has breakpoints defined for fluid\n // styles, delegate to the fluid-type helper for the given token\n @if $fluid == true and map.has-key($token, 'breakpoints') {\n @include fluid-type($token, $breakpoints);\n } @else {\n @include custom-properties($name, $token);\n }\n}\n"],sourceRoot:""}]),r.locals={workspace:"-cc-esm-active-prescriptions__root__workspace___+xqk5",header:"-cc-esm-active-prescriptions__root__header___G1X3T",subtitle:"-cc-esm-active-prescriptions__root__subtitle___kRieu",section:"-cc-esm-active-prescriptions__root__section___61mCr",fieldLabel:"-cc-esm-active-prescriptions__root__fieldLabel___F2zAd",tabContent:"-cc-esm-active-prescriptions__root__tabContent___DnbmQ",fieldGroup:"-cc-esm-active-prescriptions__root__fieldGroup___3aiba",helperText:"-cc-esm-active-prescriptions__root__helperText___sr2T2",ordersList:"-cc-esm-active-prescriptions__root__ordersList___jcCvy",orderLabel:"-cc-esm-active-prescriptions__root__orderLabel___3oBY3",orderName:"-cc-esm-active-prescriptions__root__orderName___QGKUy",orderMeta:"-cc-esm-active-prescriptions__root__orderMeta___S7cGO",selectionSummary:"-cc-esm-active-prescriptions__root__selectionSummary___TD9ka"};const l=r},1063(e,n,t){t.r(n),t.d(n,{default:()=>q});var a=t(6072);function i(e,n,t,a,i,o,r){try{var l=e[o](r),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(a,i)}function o(e,n){for(var t=0;t<n.length;t++){var a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var r=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,t;return n=e,t=[{key:"createPrescription",value:function(e){return(n=function(){return function(e,n){var t,a,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(r,"next",{value:s(0)}),l(r,"throw",{value:s(1)}),l(r,"return",{value:s(2)}),"function"==typeof Symbol&&l(r,Symbol.iterator,{value:function(){return this}}),r;function s(l){return function(s){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(o=0)),o;)try{if(t=1,a&&(i=2&l[0]?a.return:l[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;switch(a=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,a=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=n.call(e,o)}catch(e){l=[6,e],a=0}finally{t=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,function(n){return[2,fetch("/api/prescriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})]})},function(){var e=this,t=arguments;return new Promise(function(a,o){var r=n.apply(e,t);function l(e){i(r,a,o,l,s,"next",e)}function s(e){i(r,a,o,l,s,"throw",e)}l(void 0)})})();var n}}],null&&o(n.prototype,null),t&&o(n,t),e}(),l=t(7224),s=t(793),c=t(2076),p=t(5072),u=t.n(p),d=t(7825),f=t.n(d),g=t(7659),h=t.n(g),y=t(5056),m=t.n(y),b=t(540),v=t.n(b),$=t(1113),A=t.n($),x=t(6052),w={};w.styleTagTransform=A(),w.setAttributes=m(),w.insert=h().bind(null,"head"),w.domAPI=f(),w.insertStyleElement=v(),u()(x.A,w);const _=x.A&&x.A.locals?x.A.locals:void 0;var k=t(9324);function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function z(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function E(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],r=!0,l=!1;try{for(t=t.call(e);!(r=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);r=!0);}catch(e){l=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(l)throw i}}return o}}(e,n)||function(e,n){if(e){if("string"==typeof e)return C(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(e,n):void 0}}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var M=[{value:"mg"},{value:"ml"},{value:"g"},{value:"mcg"},{value:"comprimido(s)"}],S=[{value:"Oral"},{value:"Intravenoso (IV)"},{value:"Intramuscular (IM)"},{value:"Subcutâneo (SC)"},{value:"Tópico"},{value:"Inalatório"},{value:"Sublingual"}],T=[{value:"1x ao dia"},{value:"2x ao dia"},{value:"3x ao dia"},{value:"4x ao dia"},{value:"6/6h"},{value:"8/8h"},{value:"12/12h"},{value:"Se necessário"}];const D=function(e){var n,t,i,o,r,p,u,d,f,g,h,y,m,b,v=e.initialData,$=e.onSave,A=e.onCancel,x=(0,c.useTranslation)().t,w=E((0,a.useState)(null!==(n=null==v||null===(b=v.drug)||void 0===b?void 0:b.name)&&void 0!==n?n:""),2),_=w[0],C=w[1],D=E((0,a.useState)(null!==(t=null==v?void 0:v.drug)&&void 0!==t?t:null),2),N=D[0],I=D[1],B=E((0,a.useState)(null!==(i=null==v?void 0:v.dosage)&&void 0!==i?i:""),2),P=B[0],q=B[1],O=E((0,a.useState)(null!==(o=null==v?void 0:v.unit)&&void 0!==o?o:""),2),L=O[0],F=O[1],j=E((0,a.useState)(null!==(r=null==v?void 0:v.route)&&void 0!==r?r:""),2),G=j[0],W=j[1],U=E((0,a.useState)(null!==(p=null==v?void 0:v.frequency)&&void 0!==p?p:""),2),K=U[0],Y=U[1],R=E((0,a.useState)(null!==(u=null==v?void 0:v.patientInstructions)&&void 0!==u?u:""),2),X=R[0],H=R[1],Q=E((0,a.useState)(null!==(d=null==v?void 0:v.asNeeded)&&void 0!==d&&d),2),V=Q[0],J=Q[1],Z=E((0,a.useState)(null!==(f=null==v?void 0:v.asNeededCondition)&&void 0!==f?f:""),2),ee=Z[0],ne=Z[1],te=E((0,a.useState)(null!==(g=null==v?void 0:v.indication)&&void 0!==g?g:""),2),ae=te[0],ie=te[1],oe=function(e){var n,t,a=(null==e?void 0:e.length)>=3?"".concat(l.restBaseUrl,"/drug?q=").concat(encodeURIComponent(e),"&v=custom:(uuid,name,display)&limit=10"):null,i=(0,k.Ay)(a,l.openmrsFetch),o=i.data,r=i.isValidating;return{drugs:null!==(n=null==o||null===(t=o.data)||void 0===t?void 0:t.results)&&void 0!==n?n:[],isLoading:r}}(_),re=oe.drugs,le=oe.isLoading;return a.createElement("form",{onSubmit:function(e){e.preventDefault(),N&&P&&L&&K&&$({drug:N,dosage:P,unit:L,route:G,frequency:K,patientInstructions:X||void 0,asNeeded:V,asNeededCondition:V&&ee||void 0,indication:ae||void 0})},style:{display:"flex",flexDirection:"column",gap:"1rem"}},a.createElement(s.a32,{id:"drug-search",titleText:x("drugName","Medicamento"),placeholder:x("drugSearchPlaceholder","Digite para buscar (mín. 3 letras)..."),items:re.map(function(e){return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},a=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.forEach(function(n){z(e,n,t[n])})}return e}({id:e.uuid,label:e.display||e.name},e)}),itemToString:function(e){var n;return null!==(n=null==e?void 0:e.label)&&void 0!==n?n:""},selectedItem:N?{id:N.uuid,label:N.display}:null,onInputChange:function(e){C(e),e||I(null)},onChange:function(e){var n,t=e.selectedItem;t&&I({uuid:t.uuid,name:t.name,display:null!==(n=t.display)&&void 0!==n?n:t.name})},disabled:le,helperText:le?x("searching","Buscando..."):void 0}),a.createElement(s.ksK,{id:"dosage",labelText:x("dosage","Dose"),value:P,onChange:function(e){return q(e.target.value)},required:!0}),a.createElement(s.a32,{id:"unit",titleText:x("unit","Unidade"),items:M,itemToString:function(e){var n;return null!==(n=null==e?void 0:e.value)&&void 0!==n?n:""},selectedItem:null!==(h=M.find(function(e){return e.value===L}))&&void 0!==h?h:null,onChange:function(e){var n,t=e.selectedItem;return F(null!==(n=null==t?void 0:t.value)&&void 0!==n?n:"")}}),a.createElement(s.a32,{id:"route",titleText:x("route","Via de administração"),items:S,itemToString:function(e){var n;return null!==(n=null==e?void 0:e.value)&&void 0!==n?n:""},selectedItem:null!==(y=S.find(function(e){return e.value===G}))&&void 0!==y?y:null,onChange:function(e){var n,t=e.selectedItem;return W(null!==(n=null==t?void 0:t.value)&&void 0!==n?n:"")}}),a.createElement(s.a32,{id:"frequency",titleText:x("frequency","Frequência"),items:T,itemToString:function(e){var n;return null!==(n=null==e?void 0:e.value)&&void 0!==n?n:""},selectedItem:null!==(m=T.find(function(e){return e.value===K}))&&void 0!==m?m:null,onChange:function(e){var n,t=e.selectedItem;return Y(null!==(n=null==t?void 0:t.value)&&void 0!==n?n:"")}}),a.createElement(s.ksK,{id:"patient-instructions",labelText:x("patientInstructions","Instruções ao paciente"),value:X,onChange:function(e){return H(e.target.value)}}),a.createElement(s.Sc0,{id:"as-needed",labelText:x("asNeeded","Tomar se necessário (P.R.N.)"),checked:V,onChange:function(e,n){var t=n.checked;return J(t)}}),V&&a.createElement(s.ksK,{id:"as-needed-condition",labelText:x("asNeededCondition","Motivo P.R.N."),value:ee,onChange:function(e){return ne(e.target.value)}}),a.createElement(s.ksK,{id:"indication",labelText:x("indication","Indicação"),value:ae,onChange:function(e){return ie(e.target.value)}}),a.createElement("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"}},a.createElement(s.$nd,{type:"submit",kind:"primary",disabled:!(N&&P&&L&&K)},x("saveMedication","Salvar medicamento")),a.createElement(s.$nd,{type:"button",kind:"secondary",onClick:A},x("cancel","Cancelar"))))};function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}function I(e,n,t,a,i,o,r){try{var l=e[o](r),s=l.value}catch(e){return void t(e)}l.done?n(s):Promise.resolve(s).then(a,i)}function B(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,o=[],r=!0,l=!1;try{for(t=t.call(e);!(r=(a=t.next()).done)&&(o.push(a.value),!n||o.length!==n);r=!0);}catch(e){l=!0,i=e}finally{try{r||null==t.return||t.return()}finally{if(l)throw i}}return o}}(e,n)||P(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,n){if(e){if("string"==typeof e)return N(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?N(e,n):void 0}}const q=function(e){var n=e.patientUuid,t=e.patient,i=(0,c.useTranslation)().t,o=B((0,a.useState)("new"),2),p=o[0],u=o[1],d=B((0,a.useState)(null),2),f=d[0],g=d[1],h=B((0,a.useState)(""),2),y=h[0],m=h[1],b=B((0,a.useState)(!1),2),v=b[0],$=b[1],A=B((0,a.useState)(!1),2),x=A[0],w=A[1],k=B((0,a.useState)(""),2),C=k[0],z=k[1],E=B((0,a.useState)(!1),2),M=E[0],S=E[1],T=B((0,a.useState)(null),2),q=T[0],O=T[1],L=B((0,a.useState)([]),2),F=L[0],j=L[1],G=B((0,a.useState)(!1),2),W=G[0],U=G[1],K=B((0,a.useState)(null),2),Y=K[0],R=K[1],X=(0,l.useLocations)(),H=(0,a.useMemo)(function(){return null!=X?X:[]},[X]);return a.createElement(l.Workspace2,{title:i("activePrescriptionsWorkspaceTitle","Prescrições ativas"),hasUnsavedChanges:!1},a.createElement("div",{className:_.workspace},a.createElement("div",{className:_.header},a.createElement("h2",null,i("activePrescriptionsWorkspaceTitle","Prescrições ativas")),a.createElement("p",{className:_.subtitle},i("activePrescriptionsHelper","Revise o contexto do paciente, escolha os detalhes da visita e adicione os medicamentos à prescrição."))),a.createElement("section",{className:_.section},a.createElement("p",{className:_.fieldLabel},i("visitTimingLabel","A visita é")),a.createElement(s.tUM,{selectedIndex:"new"===p?0:1,onChange:function(e){var n=e.selectedIndex;return u(0===n?"new":"past")}},a.createElement(s.wbY,{"aria-label":i("visitTimingLabel","A visita é")},a.createElement(s.ozo,null,i("visitTimingNew","Nova")),a.createElement(s.ozo,null,i("visitTimingPast","No passado"))),a.createElement(s.T2N,null,a.createElement(s.KpK,{className:_.tabContent},a.createElement("div",{className:_.fieldGroup},a.createElement(s.a32,{id:"visit-location",items:H,itemToString:function(e){var n;return null!==(n=null==e?void 0:e.display)&&void 0!==n?n:""},selectedItem:f,onChange:function(e){var n=e.selectedItem;return g(null!=n?n:null)},placeholder:i("visitLocationPlaceholder","Selecione o local"),titleText:i("visitLocationHeading","Local da visita"),helperText:i("visitLocationHelper","Selecione onde a visita ocorrerá.")})),a.createElement("div",{className:_.fieldGroup},a.createElement(s.ksK,{id:"insurance-policy",labelText:i("insurancePolicyNumberLabel","Número da apólice (opcional)"),placeholder:i("insurancePolicyNumberPlaceholder","Digite o número da apólice"),value:y,onChange:function(e){return m(e.target.value)}})),a.createElement("div",{className:_.fieldGroup},a.createElement(s.Sc0,{id:"sign-prescription-checkbox",labelText:i("signPrescriptionLabel","Assinar digitalmente a prescrição"),checked:v,onChange:function(e,n){var t=n.checked;return $(t)}}),a.createElement(s.Sc0,{id:"print-prescription-checkbox",labelText:i("printPrescriptionLabel","Imprimir a prescrição"),checked:x,onChange:function(e,n){var t=n.checked;return w(t)}})),a.createElement("div",{className:_.fieldGroup},a.createElement(s.fs1,{id:"observations",labelText:i("observations","Observações"),placeholder:i("observationsPlaceholder","Observações da prescrição..."),value:C,onChange:function(e){return z(e.target.value)},rows:3})),a.createElement("div",{className:_.fieldGroup},a.createElement("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8}},a.createElement("h3",{style:{margin:0}},i("medicationsList","Medicamentos")),a.createElement(s.$nd,{size:"sm",hasIconOnly:!0,kind:"ghost",renderIcon:function(){return a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M16 6V26",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),a.createElement("path",{d:"M6 16H26",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}))},iconDescription:i("addMedication","Adicionar medicamento"),onClick:function(){R(null),U(!0)}})),0===F.length?a.createElement("p",null,i("noMedicationsAdded","Nenhum medicamento adicionado ainda.")):a.createElement("ul",{className:_.medicationsList},F.map(function(e,n){return a.createElement("li",{key:n,className:_.medicationItem},a.createElement("span",null,a.createElement("b",null,e.drug.display)," — ",e.dosage," ",e.unit,e.route?" · ".concat(e.route):""," · ",e.frequency),a.createElement(s.$nd,{size:"sm",kind:"ghost",onClick:function(){return function(e){R(e),U(!0)}(n)}},i("edit","Editar")),a.createElement(s.$nd,{size:"sm",kind:"danger--ghost",onClick:function(){return function(e){j(function(n){return n.filter(function(n,t){return t!==e})})}(n)}},i("remove","Remover")))}))),W&&a.createElement("div",{className:_.overlayForm},a.createElement("div",{className:_.overlayContent},a.createElement("h3",{style:{marginTop:0}},null!==Y?i("editMedication","Editar medicamento"):i("addMedication","Adicionar medicamento")),a.createElement(D,{initialData:null!==Y?F[Y]:void 0,onSave:function(e){null!==Y?(j(function(n){return n.map(function(n,t){return t===Y?e:n})}),R(null)):j(function(n){return(t=n,function(e){if(Array.isArray(e))return N(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||P(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e]);var t}),U(!1)},onCancel:function(){U(!1),R(null)}}))),q&&a.createElement(s.jeF,{lowContrast:!0,kind:"error",title:i("submitError","Erro ao salvar a prescrição."),subtitle:q,onCloseButtonClick:function(){return O(null)}}),a.createElement("div",{style:{display:"flex",gap:8,marginTop:16}},a.createElement(s.$nd,{kind:"primary",disabled:!n||!f||0===F.length||M,onClick:function(){return(e=function(){var e,a,o,l,s,c,p;return function(e,n){var t,a,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(r,"next",{value:s(0)}),l(r,"throw",{value:s(1)}),l(r,"return",{value:s(2)}),"function"==typeof Symbol&&l(r,Symbol.iterator,{value:function(){return this}}),r;function s(l){return function(s){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(o=0)),o;)try{if(t=1,a&&(i=2&l[0]?a.return:l[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,l[1])).done)return i;switch(a=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,a=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=n.call(e,o)}catch(e){l=[6,e],a=0}finally{t=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}(this,function(u){switch(u.label){case 0:if(!n||!f||0===F.length)return[2];S(!0),O(null),u.label=1;case 1:return u.trys.push([1,3,4,5]),s={patientUuid:n,patientName:(null==t||null===(o=t.name)||void 0===o?void 0:o[0])?"".concat(null===(l=t.name[0].given)||void 0===l?void 0:l.join(" ")," ").concat(t.name[0].family).trim():"",patientBirthDate:null!==(e=null==t?void 0:t.birthDate)&&void 0!==e?e:"",patientGender:null!==(a=null==t?void 0:t.gender)&&void 0!==a?a:"",providerUuid:"",providerName:"",locationUuid:f.uuid,locationName:f.display,policyNumber:y,orderUuids:F.map(function(e){return e.drug.uuid}),digitallySigned:v,printRequested:x,observations:C},[4,r.createPrescription(s)];case 2:return u.sent(),j([]),g(null),m(""),$(!1),w(!1),z(""),[3,5];case 3:return c=u.sent(),O(null!==(p=null==c?void 0:c.message)&&void 0!==p?p:i("submitError","Erro ao salvar a prescrição.")),[3,5];case 4:return S(!1),[7];case 5:return[2]}})},function(){var n=this,t=arguments;return new Promise(function(a,i){var o=e.apply(n,t);function r(e){I(o,a,i,r,l,"next",e)}function l(e){I(o,a,i,r,l,"throw",e)}r(void 0)})})();var e}},M?a.createElement(s.OuH,{description:i("saving","Salvando...")}):i("createPrescriptionButtonLabel","Salvar Prescrição")))),a.createElement(s.KpK,{className:_.tabContent},a.createElement(s.jeF,{lowContrast:!0,kind:"info",title:i("inPastTabPlaceholderTitle","Receitas históricas em breve"),subtitle:i("inPastTabPlaceholderSubtitle","Volte para Nova para gerenciar medicamentos atuais.")})))))))}}}]);
package/dist/779.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 779.js.LICENSE.txt */
2
- (globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions=globalThis.webpackChunk_cc_openmrs_cc_esm_active_prescriptions||[]).push([[779],{159(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var c=0;c<e.length;c++){var s=[].concat(e[c]);r&&o[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},2996(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}e.exports=function(e){var n,r,o=(r=4,function(e){if(Array.isArray(e))return e}(n=e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,i=[],a=!0,c=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}}(n,r)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[1],a=o[3];if(!a)return i;if("function"==typeof btoa){var c=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(c),l="/*# ".concat(s," */"),u=a.sources.map(function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")});return[i].concat(u).concat([l]).join("\n")}return[i].join("\n")}},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},115(e){var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var c,s,l,u;if(Array.isArray(e)){if((c=e.length)!=a.length)return!1;for(s=c;0!==s--;)if(!i(e[s],a[s]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!a.has(s.value[0]))return!1;for(u=e.entries();!(s=u.next()).done;)if(!i(s.value[1],a.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(s=u.next()).done;)if(!a.has(s.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((c=e.length)!=a.length)return!1;for(s=c;0!==s--;)if(e[s]!==a[s])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof a.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof a.toString)return e.toString()===a.toString();if((c=(l=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(s=c;0!==s--;)if(!Object.prototype.hasOwnProperty.call(a,l[s]))return!1;if(t&&e instanceof Element)return!1;for(s=c;0!==s--;)if(("_owner"!==l[s]&&"__v"!==l[s]&&"__o"!==l[s]||!e.$$typeof)&&!i(e[l[s]],a[l[s]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return i(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},1020(e,t,n){"use strict";var r=n(6072),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,i={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:l,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},4848(e,t,n){"use strict";e.exports=n(1020)},5072(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],c=0;c<e.length;c++){var s=e[c],l=r.base?s[0]+r.base:s[0],u=i[l]||0,f="".concat(l," ").concat(u);i[l]=u+1;var d=n(f),p={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var m=o(p,r);r.byIndex=c,t.splice(c,0,{identifier:f,updater:m,references:1})}a.push(f)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var c=n(i[a]);t[c].references--}for(var s=r(e,o),l=0;l<i.length;l++){var u=n(i[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=s}}},7659(e){"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056(e,t,n){"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},7825(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},9054(e,t,n){"use strict";n.d(t,{Kr:()=>v});var r=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),o="undefined"==typeof Element,i=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!o&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},c=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):c(e.parentNode))},s=function(e,t,n){for(var o=[],a=Array.from(e);a.length;){var l=a.shift();if(!c(l,!1))if("SLOT"===l.tagName){var u=l.assignedElements(),f=u.length?u:l.children,d=s(f,!0,n);n.flatten?o.push.apply(o,d):o.push({scopeParent:l,candidates:d})}else{i.call(l,r)&&n.filter(l)&&(t||!e.includes(l))&&o.push(l);var p=l.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(l),m=!c(p,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(l));if(p&&m){var h=s(!0===p?l.children:p.children,!0,n);n.flatten?o.push.apply(o,h):o.push({scopeParent:l,candidates:h})}else a.unshift.apply(a,l.children)}}return o},l=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},u=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!l(e)?0:e.tabIndex},f=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},p=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},m=function(e,t){return!(t.disabled||function(e){return d(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=i.call(e,"details>summary:first-of-type")?e.parentElement:e;if(i.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return p(e)}else{if("function"==typeof r){for(var c=e;e;){var s=e.parentElement,l=a(e);if(s&&!s.shadowRoot&&!0===r(s))return p(e);e=e.assignedSlot?e.assignedSlot:s||l===e.ownerDocument?s:l.host}e=c}if(function(e){var t,n,r,o,i=e&&a(e),c=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=c)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(c)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&c;){var l,u,f;s=!(null===(u=c=null===(l=i=a(c))||void 0===l?void 0:l.host)||void 0===u||null===(f=u.ownerDocument)||void 0===f||!f.contains(c))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!i.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},h=function(e,t){return!(function(e){return function(e){return d(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||a(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||u(t)<0||!m(e,t))},g=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},y=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=function(e,t){var n=u(e);return n<0&&t&&!l(e)?0:n}(i,o),c=o?y(e.candidates):i;0===a?o?t.push.apply(t,c):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:c})}),n.sort(f).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},v=function(e,t){var n;return n=(t=t||{}).getShadowRoot?s([e],t.includeContainer,{filter:h.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):function(e,t,n){if(c(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(r));return t&&i.call(e,r)&&o.unshift(e),o.filter(n)}(e,t.includeContainer,h.bind(null,t)),y(n)}},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},76(e,t,n){"use strict";n.d(t,{UE:()=>Q,ll:()=>Y,rD:()=>X,UU:()=>G,jD:()=>Z,cY:()=>J});const r=["top","right","bottom","left"],o=Math.min,i=Math.max,a=Math.round,c=Math.floor,s=e=>({x:e,y:e}),l={left:"right",right:"left",bottom:"top",top:"bottom"};function u(e,t,n){return i(e,o(t,n))}function f(e,t){return"function"==typeof e?e(t):e}function d(e){return e.split("-")[0]}function p(e){return e.split("-")[1]}function m(e){return"y"===e?"height":"width"}function h(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e){return"x"===h(e)?"y":"x"}function y(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const v=["left","right"],w=["right","left"],b=["top","bottom"],x=["bottom","top"];function R(e){const t=d(e);return l[t]+e.slice(t.length)}function E(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function S(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function C(e,t,n){let{reference:r,floating:o}=e;const i=h(t),a=g(t),c=m(a),s=d(t),l="y"===i,u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,y=r[c]/2-o[c]/2;let v;switch(s){case"top":v={x:u,y:r.y-o.height};break;case"bottom":v={x:u,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(p(t)){case"start":v[a]-=y*(n&&l?-1:1);break;case"end":v[a]+=y*(n&&l?-1:1)}return v}async function T(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:s}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=f(t,e),h=E(m),g=c[p?"floating"===d?"reference":"floating":d],y=S(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:s})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:w,strategy:s}):v);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function O(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L(e){return r.some(t=>e[t]>=0)}const A=new Set(["left","top"]);var k=n(6635);function _(e){const t=(0,k.L9)(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=(0,k.sb)(e),i=o?e.offsetWidth:n,c=o?e.offsetHeight:r,s=a(n)!==i||a(r)!==c;return s&&(n=i,r=c),{width:n,height:r,$:s}}function P(e){return(0,k.vq)(e)?e:e.contextElement}function D(e){const t=P(e);if(!(0,k.sb)(t))return s(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=_(t);let c=(i?a(n.width):n.width)/r,l=(i?a(n.height):n.height)/o;return c&&Number.isFinite(c)||(c=1),l&&Number.isFinite(l)||(l=1),{x:c,y:l}}const I=s(0);function U(e){const t=(0,k.zk)(e);return(0,k.Tc)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:I}function M(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=P(e);let a=s(1);t&&(r?(0,k.vq)(r)&&(a=D(r)):a=D(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==(0,k.zk)(e))&&t}(i,n,r)?U(i):s(0);let l=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const e=(0,k.zk)(i),t=r&&(0,k.vq)(r)?(0,k.zk)(r):r;let n=e,o=(0,k._m)(n);for(;o&&r&&t!==n;){const e=D(o),t=o.getBoundingClientRect(),r=(0,k.L9)(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,u*=e.y,f*=e.x,d*=e.y,l+=i,u+=a,n=(0,k.zk)(o),o=(0,k._m)(n)}}return S({width:f,height:d,x:l,y:u})}function N(e,t){const n=(0,k.CP)(e).scrollLeft;return t?t.left+n:M((0,k.ep)(e)).left+n}function V(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-N(e,n),y:n.top+t.scrollTop}}function F(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=(0,k.zk)(e),r=(0,k.ep)(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,s=0;if(o){i=o.width,a=o.height;const e=(0,k.Tc)();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,s=o.offsetTop)}const l=N(r);if(l<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else l<=25&&(i+=l);return{width:i,height:a,x:c,y:s}}(e,n);else if("document"===t)r=function(e){const t=(0,k.ep)(e),n=(0,k.CP)(e),r=e.ownerDocument.body,o=i(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=i(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+N(e);const s=-n.scrollTop;return"rtl"===(0,k.L9)(r).direction&&(c+=i(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:c,y:s}}((0,k.ep)(e));else if((0,k.vq)(t))r=function(e,t){const n=M(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=(0,k.sb)(e)?D(e):s(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=U(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function j(e,t){const n=(0,k.$4)(e);return!(n===t||!(0,k.vq)(n)||(0,k.eu)(n))&&("fixed"===(0,k.L9)(n).position||j(n,t))}function q(e,t,n){const r=(0,k.sb)(t),o=(0,k.ep)(t),i="fixed"===n,a=M(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=s(0);function u(){l.x=N(o)}if(r||!r&&!i)if(("body"!==(0,k.mq)(t)||(0,k.ZU)(o))&&(c=(0,k.CP)(t)),r){const e=M(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const f=!o||r||i?s(0):V(o,c);return{x:a.left+c.scrollLeft-l.x-f.x,y:a.top+c.scrollTop-l.y-f.y,width:a.width,height:a.height}}function B(e){return"static"===(0,k.L9)(e).position}function W(e,t){if(!(0,k.sb)(e)||"fixed"===(0,k.L9)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,k.ep)(e)===n&&(n=n.ownerDocument.body),n}function z(e,t){const n=(0,k.zk)(e);if((0,k.Tf)(e))return n;if(!(0,k.sb)(e)){let t=(0,k.$4)(e);for(;t&&!(0,k.eu)(t);){if((0,k.vq)(t)&&!B(t))return t;t=(0,k.$4)(t)}return n}let r=W(e,t);for(;r&&(0,k.Lv)(r)&&B(r);)r=W(r,t);return r&&(0,k.eu)(r)&&B(r)&&!(0,k.sQ)(r)?n:r||(0,k.gJ)(e)||n}const H={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=(0,k.ep)(r),c=!!t&&(0,k.Tf)(t.floating);if(r===a||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=s(1);const f=s(0),d=(0,k.sb)(r);if((d||!d&&!i)&&(("body"!==(0,k.mq)(r)||(0,k.ZU)(a))&&(l=(0,k.CP)(r)),d)){const e=M(r);u=D(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}const p=!a||d||i?s(0):V(a,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}},getDocumentElement:k.ep,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const c=[..."clippingAncestors"===n?(0,k.Tf)(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=(0,k.v9)(e,[],!1).filter(e=>(0,k.vq)(e)&&"body"!==(0,k.mq)(e)),o=null;const i="fixed"===(0,k.L9)(e).position;let a=i?(0,k.$4)(e):e;for(;(0,k.vq)(a)&&!(0,k.eu)(a);){const t=(0,k.L9)(a),n=(0,k.sQ)(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||(0,k.ZU)(a)&&!n&&j(e,a))?r=r.filter(e=>e!==a):o=t,a=(0,k.$4)(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=F(t,c[0],a);let l=s.top,u=s.right,f=s.bottom,d=s.left;for(let e=1;e<c.length;e++){const n=F(t,c[e],a);l=i(n.top,l),u=o(n.right,u),f=o(n.bottom,f),d=i(n.left,d)}return{width:u-d,height:f-l,x:d,y:l}},getOffsetParent:z,getElementRects:async function(e){const t=this.getOffsetParent||z,n=this.getDimensions,r=await n(e.floating);return{reference:q(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=_(e);return{width:t,height:n}},getScale:D,isElement:k.vq,isRTL:function(e){return"rtl"===(0,k.L9)(e).direction}};function $(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Y(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,d=P(e),p=a||s?[...d?(0,k.v9)(d):[],...t?(0,k.v9)(t):[]]:[];p.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});const m=d&&u?function(e,t){let n,r=null;const a=(0,k.ep)(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function l(u,f){void 0===u&&(u=!1),void 0===f&&(f=1),s();const d=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=d;if(u||t(),!h||!g)return;const y={rootMargin:-c(m)+"px "+-c(a.clientWidth-(p+h))+"px "+-c(a.clientHeight-(m+g))+"px "+-c(p)+"px",threshold:i(0,o(1,f))||1};let v=!0;function w(t){const r=t[0].intersectionRatio;if(r!==f){if(!v)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||$(d,e.getBoundingClientRect())||l(),v=!1}try{r=new IntersectionObserver(w,{...y,root:a.ownerDocument})}catch(e){r=new IntersectionObserver(w,y)}r.observe(e)}(!0),s}(d,n):null;let h,g=-1,y=null;l&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),d&&!f&&y.observe(d),t&&y.observe(t));let v=f?M(e):null;return f&&function t(){const r=M(e);v&&!$(v,r)&&n(),v=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{a&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,f&&cancelAnimationFrame(h)}}const J=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:c}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=d(n),c=p(n),s="y"===h(n),l=A.has(a)?-1:1,u=i&&s?-1:1,m=f(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:v}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&"number"==typeof v&&(y="end"===c?-1*v:v),s?{x:y*u,y:g*l}:{x:g*l,y:y*u}}(t,e);return a===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},G=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:c,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:E=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:O=!0,...L}=f(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const A=d(o),k=h(c),_=d(c)===c,P=await(null==s.isRTL?void 0:s.isRTL(l.floating)),D=S||(_||!O?[R(c)]:function(e){const t=R(e);return[y(e),t,y(t)]}(c)),I="none"!==T;!S&&I&&D.push(...function(e,t,n,r){const o=p(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?w:v:t?v:w;case"left":case"right":return t?b:x;default:return[]}}(d(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(y)))),i}(c,O,T,P));const U=[c,...D],M=await s.detectOverflow(t,L),N=[];let V=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&N.push(M[A]),E){const e=function(e,t,n){void 0===n&&(n=!1);const r=p(e),o=g(e),i=m(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=R(a)),[a,R(a)]}(o,a,P);N.push(M[e[0]],M[e[1]])}if(V=[...V,{placement:o,overflows:N}],!N.every(e=>e<=0)){var F,j;const e=((null==(F=i.flip)?void 0:F.index)||0)+1,t=U[e];if(t&&("alignment"!==E||k===h(t)||V.every(e=>h(e.placement)!==k||e.overflows[0]>0)))return{data:{index:e,overflows:V},reset:{placement:t}};let n=null==(j=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(C){case"bestFit":{var q;const e=null==(q=V.filter(e=>{if(I){const t=h(e.placement);return t===k||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:q[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},Z=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=f(e,t);switch(o){case"referenceHidden":{const e=O(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:L(e)}}}case"escaped":{const e=O(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:L(e)}}}default:return{}}}}},Q=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:c,elements:s,middlewareData:l}=t,{element:d,padding:h=0}=f(e,t)||{};if(null==d)return{};const y=E(h),v={x:n,y:r},w=g(i),b=m(w),x=await c.getDimensions(d),R="y"===w,S=R?"top":"left",C=R?"bottom":"right",T=R?"clientHeight":"clientWidth",O=a.reference[b]+a.reference[w]-v[w]-a.floating[b],L=v[w]-a.reference[w],A=await(null==c.getOffsetParent?void 0:c.getOffsetParent(d));let k=A?A[T]:0;k&&await(null==c.isElement?void 0:c.isElement(A))||(k=s.floating[T]||a.floating[b]);const _=O/2-L/2,P=k/2-x[b]/2-1,D=o(y[S],P),I=o(y[C],P),U=D,M=k-x[b]-I,N=k/2-x[b]/2+_,V=u(U,N,M),F=!l.arrow&&null!=p(i)&&N!==V&&a.reference[b]/2-(N<U?D:I)-x[b]/2<0,j=F?N<U?N-U:N-M:0;return{[w]:v[w]+j,data:{[w]:V,centerOffset:N-V-j,...F&&{alignmentOffset:j}},reset:F}}}),X=(e,t,n)=>{const r=new Map,o={platform:H,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=a.detectOverflow?a:{...a,detectOverflow:T},s=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=C(l,r,s),d=r,p=0;const m={};for(let n=0;n<i.length;n++){const h=i[n];if(!h)continue;const{name:g,fn:y}=h,{x:v,y:w,data:b,reset:x}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:l,platform:c,elements:{reference:e,floating:t}});u=null!=v?v:u,f=null!=w?w:f,m[g]={...m[g],...b},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(l=!0===x.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:f}=C(l,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})}},4743(e,t,n){"use strict";n.d(t,{UE:()=>h,UU:()=>p,cY:()=>d,jD:()=>m,we:()=>f});var r=n(76),o=n(6072),i=n(961),a="undefined"!=typeof document?o.useLayoutEffect:function(){};function c(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!c(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||c(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function s(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l(e,t){const n=s(e);return Math.round(t*n)/n}function u(e){const t=o.useRef(e);return a(()=>{t.current=e}),t}function f(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:f=[],platform:d,elements:{reference:p,floating:m}={},transform:h=!0,whileElementsMounted:g,open:y}=e,[v,w]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,x]=o.useState(f);c(b,f)||x(f);const[R,E]=o.useState(null),[S,C]=o.useState(null),T=o.useCallback(e=>{e!==k.current&&(k.current=e,E(e))},[]),O=o.useCallback(e=>{e!==_.current&&(_.current=e,C(e))},[]),L=p||R,A=m||S,k=o.useRef(null),_=o.useRef(null),P=o.useRef(v),D=null!=g,I=u(g),U=u(d),M=u(y),N=o.useCallback(()=>{if(!k.current||!_.current)return;const e={placement:t,strategy:n,middleware:b};U.current&&(e.platform=U.current),(0,r.rD)(k.current,_.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};V.current&&!c(P.current,t)&&(P.current=t,i.flushSync(()=>{w(t)}))})},[b,t,n,U,M]);a(()=>{!1===y&&P.current.isPositioned&&(P.current.isPositioned=!1,w(e=>({...e,isPositioned:!1})))},[y]);const V=o.useRef(!1);a(()=>(V.current=!0,()=>{V.current=!1}),[]),a(()=>{if(L&&(k.current=L),A&&(_.current=A),L&&A){if(I.current)return I.current(L,A,N);N()}},[L,A,N,I,D]);const F=o.useMemo(()=>({reference:k,floating:_,setReference:T,setFloating:O}),[T,O]),j=o.useMemo(()=>({reference:L,floating:A}),[L,A]),q=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=l(j.floating,v.x),r=l(j.floating,v.y);return h?{...e,transform:"translate("+t+"px, "+r+"px)",...s(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,h,j.floating,v.x,v.y]);return o.useMemo(()=>({...v,update:N,refs:F,elements:j,floatingStyles:q}),[v,N,F,j,q])}const d=(e,t)=>{const n=(0,r.cY)(e);return{name:n.name,fn:n.fn,options:[e,t]}},p=(e,t)=>{const n=(0,r.UU)(e);return{name:n.name,fn:n.fn,options:[e,t]}},m=(e,t)=>{const n=(0,r.jD)(e);return{name:n.name,fn:n.fn,options:[e,t]}},h=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:o}="function"==typeof e?e(t):e;return n&&(i=n,{}.hasOwnProperty.call(i,"current"))?null!=n.current?(0,r.UE)({element:n.current,padding:o}).fn(t):{}:n?(0,r.UE)({element:n,padding:o}).fn(t):{};var i}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}}},3245(e,t,n){"use strict";n.d(t,{we:()=>v,SV:()=>l});var r=n(6072),o=n.t(r,2),i="undefined"!=typeof document?r.useLayoutEffect:function(){};const a={...o}.useInsertionEffect||(e=>e());n(4848);var c=n(6635),s=(n(961),n(4743));function l(e){const t=r.useRef(void 0),n=r.useCallback(t=>{const n=e.map(e=>{if(null!=e){if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return r.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)}const u={...o};let f=!1,d=0;const p=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+d++,m=u.useId||function(){const[e,t]=r.useState(()=>f?p():void 0);return i(()=>{null==e&&t(p())},[]),r.useEffect(()=>{f=!0},[]),e};const h=r.createContext(null),g=r.createContext(null);function y(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=m(),c=r.useRef({}),[s]=r.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}()),l=null!=((null==(u=r.useContext(h))?void 0:u.id)||null);var u;const[f,d]=r.useState(o.reference),p=function(e){const t=r.useRef(()=>{});return a(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}((e,t,r)=>{c.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),g=r.useMemo(()=>({setPositionReference:d}),[]),y=r.useMemo(()=>({reference:f||o.reference||null,floating:o.floating||null,domReference:o.reference}),[f,o.reference,o.floating]);return r.useMemo(()=>({dataRef:c,open:t,onOpenChange:p,elements:y,events:s,floatingId:i,refs:g}),[t,p,y,s,i,g])}function v(e){void 0===e&&(e={});const{nodeId:t}=e,n=y({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,a=o.elements,[l,u]=r.useState(null),[f,d]=r.useState(null),p=(null==a?void 0:a.domReference)||l,m=r.useRef(null),h=r.useContext(g);i(()=>{p&&(m.current=p)},[p]);const v=(0,s.we)({...e,elements:{...a,...f&&{reference:f}}}),w=r.useCallback(e=>{const t=(0,c.vq)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),v.refs.setReference(t)},[v.refs]),b=r.useCallback(e=>{((0,c.vq)(e)||null===e)&&(m.current=e,u(e)),((0,c.vq)(v.refs.reference.current)||null===v.refs.reference.current||null!==e&&!(0,c.vq)(e))&&v.refs.setReference(e)},[v.refs]),x=r.useMemo(()=>({...v.refs,setReference:b,setPositionReference:w,domReference:m}),[v.refs,b,w]),R=r.useMemo(()=>({...v.elements,domReference:p}),[v.elements,p]),E=r.useMemo(()=>({...v,...o,refs:x,elements:R,nodeId:t}),[v,x,R,t,o]);return i(()=>{o.dataRef.current.floatingContext=E;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===t);e&&(e.context=E)}),r.useMemo(()=>({...v,context:E,refs:x,elements:R}),[v,x,R,E])}},6635(e,t,n){"use strict";function r(){return"undefined"!=typeof window}function o(e){return c(e)?(e.nodeName||"").toLowerCase():"#document"}function i(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function a(e){var t;return null==(t=(c(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function c(e){return!!r()&&(e instanceof Node||e instanceof i(e).Node)}function s(e){return!!r()&&(e instanceof Element||e instanceof i(e).Element)}function l(e){return!!r()&&(e instanceof HTMLElement||e instanceof i(e).HTMLElement)}function u(e){return!(!r()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof i(e).ShadowRoot)}function f(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=R(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function d(e){return/^(table|td|th)$/.test(o(e))}function p(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}n.d(t,{$4:()=>S,CP:()=>E,L9:()=>R,Lv:()=>d,Tc:()=>b,Tf:()=>p,ZU:()=>f,_m:()=>O,ep:()=>a,eu:()=>x,gJ:()=>w,mq:()=>o,sQ:()=>v,sb:()=>l,v9:()=>T,vq:()=>s,zk:()=>i});const m=/transform|translate|scale|rotate|perspective|filter/,h=/paint|layout|strict|content/,g=e=>!!e&&"none"!==e;let y;function v(e){const t=s(e)?R(e):e;return g(t.transform)||g(t.translate)||g(t.scale)||g(t.rotate)||g(t.perspective)||!b()&&(g(t.backdropFilter)||g(t.filter))||m.test(t.willChange||"")||h.test(t.contain||"")}function w(e){let t=S(e);for(;l(t)&&!x(t);){if(v(t))return t;if(p(t))return null;t=S(t)}return null}function b(){return null==y&&(y="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),y}function x(e){return/^(html|body|#document)$/.test(o(e))}function R(e){return i(e).getComputedStyle(e)}function E(e){return s(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function S(e){if("html"===o(e))return e;const t=e.assignedSlot||e.parentNode||u(e)&&e.host||a(e);return u(t)?t.host:t}function C(e){const t=S(e);return x(t)?e.ownerDocument?e.ownerDocument.body:e.body:l(t)&&f(t)?t:C(t)}function T(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=C(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),c=i(o);if(a){const e=O(c);return t.concat(c,c.visualViewport||[],f(o)?o:[],e&&n?T(e):[])}return t.concat(o,T(o,[],n))}function O(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}},9324(e,t,n){"use strict";n.d(t,{Ay:()=>l,BE:()=>s});var r=n(6072),o=n(9888),i=n(8465);const a=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),c={dedupe:!0},s=i.OBJECT.defineProperty(i.SWRConfig,"defaultValue",{value:i.defaultConfig}),l=(0,i.withArgs)((e,t,n)=>{const{cache:s,compare:l,suspense:u,fallbackData:f,revalidateOnMount:d,revalidateIfStale:p,refreshInterval:m,refreshWhenHidden:h,refreshWhenOffline:g,keepPreviousData:y}=n,[v,w,b,x]=i.SWRGlobalState.get(s),[R,E]=(0,i.serialize)(e),S=(0,r.useRef)(!1),C=(0,r.useRef)(!1),T=(0,r.useRef)(R),O=(0,r.useRef)(t),L=(0,r.useRef)(n),A=()=>L.current,k=()=>A().isVisible()&&A().isOnline(),[_,P,D,I]=(0,i.createCacheHelper)(s,R),U=(0,r.useRef)({}).current,M=(0,i.isUndefined)(f)?n.fallback[R]:f,N=(e,t)=>{for(const n in U){const r=n;if("data"===r){if(!l(e[r],t[r])){if(!(0,i.isUndefined)(e[r]))return!1;if(!l($,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},V=(0,r.useMemo)(()=>{const e=!!R&&!!t&&((0,i.isUndefined)(d)?!A().isPaused()&&!u&&(!!(0,i.isUndefined)(p)||p):d),n=t=>{const n=(0,i.mergeObjects)(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=_(),o=I(),a=n(r),c=r===o?a:n(o);let s=a;return[()=>{const e=n(_());return N(e,s)?(s.data=e.data,s.isLoading=e.isLoading,s.isValidating=e.isValidating,s.error=e.error,s):(s=e,e)},()=>c]},[s,R]),F=(0,o.useSyncExternalStore)((0,r.useCallback)(e=>D(R,(t,n)=>{N(n,t)||e()}),[s,R]),V[0],V[1]),j=!S.current,q=v[R]&&v[R].length>0,B=F.data,W=(0,i.isUndefined)(B)?M:B,z=F.error,H=(0,r.useRef)(W),$=y?(0,i.isUndefined)(B)?H.current:B:W,Y=!(q&&!(0,i.isUndefined)(z))&&(j&&!(0,i.isUndefined)(d)?d:!A().isPaused()&&(u?!(0,i.isUndefined)(W)&&p:(0,i.isUndefined)(W)||p)),J=!!(R&&t&&j&&Y),G=(0,i.isUndefined)(F.isValidating)?J:F.isValidating,Z=(0,i.isUndefined)(F.isLoading)?J:F.isLoading,Q=(0,r.useCallback)(async e=>{const t=O.current;if(!R||!t||C.current||A().isPaused())return!1;let r,o,a=!0;const c=e||{},s=!b[R]||!c.dedupe,u=()=>i.IS_REACT_LEGACY?!C.current&&R===T.current&&S.current:R===T.current,f={isValidating:!1,isLoading:!1},d=()=>{P(f)},p=()=>{const e=b[R];e&&e[1]===o&&delete b[R]},m={isValidating:!0};(0,i.isUndefined)(_().data)&&(m.isLoading=!0);try{if(s&&(P(m),n.loadingTimeout&&(0,i.isUndefined)(_().data)&&setTimeout(()=>{a&&u()&&A().onLoadingSlow(R,n)},n.loadingTimeout),b[R]=[t(E),(0,i.getTimestamp)()]),[r,o]=b[R],r=await r,s&&setTimeout(p,n.dedupingInterval),!b[R]||b[R][1]!==o)return s&&u()&&A().onDiscarded(R),!1;f.error=i.UNDEFINED;const e=w[R];if(!(0,i.isUndefined)(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),s&&u()&&A().onDiscarded(R),!1;const c=_().data;f.data=l(c,r)?c:r,s&&u()&&A().onSuccess(r,R,n)}catch(e){p();const t=A(),{shouldRetryOnError:n}=t;t.isPaused()||(f.error=e,s&&u()&&(t.onError(e,R,t),(!0===n||(0,i.isFunction)(n)&&n(e))&&(A().revalidateOnFocus&&A().revalidateOnReconnect&&!k()||t.onErrorRetry(e,R,t,e=>{const t=v[R];t&&t[0]&&t[0](i.revalidateEvents.ERROR_REVALIDATE_EVENT,e)},{retryCount:(c.retryCount||0)+1,dedupe:!0}))))}return a=!1,d(),!0},[R,s]),X=(0,r.useCallback)((...e)=>(0,i.internalMutate)(s,T.current,...e),[]);if((0,i.useIsomorphicLayoutEffect)(()=>{O.current=t,L.current=n,(0,i.isUndefined)(B)||(H.current=B)}),(0,i.useIsomorphicLayoutEffect)(()=>{if(!R)return;const e=Q.bind(i.UNDEFINED,c);let t=0;const n=(0,i.subscribeCallback)(R,v,(n,r={})=>{if(n==i.revalidateEvents.FOCUS_EVENT){const n=Date.now();A().revalidateOnFocus&&n>t&&k()&&(t=n+A().focusThrottleInterval,e())}else if(n==i.revalidateEvents.RECONNECT_EVENT)A().revalidateOnReconnect&&k()&&e();else{if(n==i.revalidateEvents.MUTATE_EVENT)return Q();if(n==i.revalidateEvents.ERROR_REVALIDATE_EVENT)return Q(r)}});return C.current=!1,T.current=R,S.current=!0,P({_k:E}),Y&&((0,i.isUndefined)(W)||i.IS_SERVER?e():(0,i.rAF)(e)),()=>{C.current=!0,n()}},[R]),(0,i.useIsomorphicLayoutEffect)(()=>{let e;function t(){const t=(0,i.isFunction)(m)?m(_().data):m;t&&-1!==e&&(e=setTimeout(n,t))}function n(){_().error||!h&&!A().isVisible()||!g&&!A().isOnline()?t():Q(c).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[m,h,g,R]),(0,r.useDebugValue)($),u&&(0,i.isUndefined)(W)&&R){if(!i.IS_REACT_LEGACY&&i.IS_SERVER)throw new Error("Fallback data is required when using suspense in SSR.");O.current=t,L.current=n,C.current=!1;const e=x[R];if(!(0,i.isUndefined)(e)){const t=X(e);a(t)}if(!(0,i.isUndefined)(z))throw z;{const e=Q(c);(0,i.isUndefined)($)||(e.status="fulfilled",e.value=!0),a(e)}}return{mutate:X,get data(){return U.data=!0,$},get error(){return U.error=!0,z},get isValidating(){return U.isValidating=!0,G},get isLoading(){return U.isLoading=!0,Z}}})}}]);
File without changes