@integrativedesigndevelopment/dashboard-core 0.0.12 → 0.1.1

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.
Files changed (136) hide show
  1. package/README.md +15 -5
  2. package/dist/components/ActivityProvider/index.d.ts +7 -9
  3. package/dist/components/ActivityProvider/index.d.ts.map +1 -1
  4. package/dist/components/ActivityProvider/types.d.ts +15 -0
  5. package/dist/components/ActivityProvider/types.d.ts.map +1 -0
  6. package/dist/components/CancelActionButton/index.d.ts +1 -1
  7. package/dist/components/CancelActionButton/index.d.ts.map +1 -1
  8. package/dist/components/Card/index.d.ts +6 -5
  9. package/dist/components/Card/index.d.ts.map +1 -1
  10. package/dist/components/ConfirmActionButton/index.d.ts +1 -1
  11. package/dist/components/ConfirmActionButton/index.d.ts.map +1 -1
  12. package/dist/components/ErrorBoundary/index.d.ts +9 -3
  13. package/dist/components/ErrorBoundary/index.d.ts.map +1 -1
  14. package/dist/components/{forms → Forms}/FormField/index.d.ts.map +1 -1
  15. package/dist/components/{forms → Forms}/FormField/index.improved.d.ts.map +1 -1
  16. package/dist/components/{forms → Forms}/SubmitButton/index.d.ts.map +1 -1
  17. package/dist/components/{forms → Forms}/SubmitButton/index.improved.d.ts.map +1 -1
  18. package/dist/components/{forms → Forms}/TermsCheckbox/index.d.ts.map +1 -1
  19. package/dist/components/{forms → Forms}/TermsCheckbox/index.improved.d.ts.map +1 -1
  20. package/dist/components/IDDLinkInputItem/index.d.ts +4 -4
  21. package/dist/components/IDDLinkInputItem/index.d.ts.map +1 -1
  22. package/dist/components/Layout/SimpleLayout.d.ts.map +1 -1
  23. package/dist/components/Layout/index.d.ts +1 -0
  24. package/dist/components/Layout/index.d.ts.map +1 -1
  25. package/dist/components/Loader/index.d.ts +5 -3
  26. package/dist/components/Loader/index.d.ts.map +1 -1
  27. package/dist/components/Modal/index.d.ts +18 -6
  28. package/dist/components/Modal/index.d.ts.map +1 -1
  29. package/dist/components/Password/index.d.ts +16 -3
  30. package/dist/components/Password/index.d.ts.map +1 -1
  31. package/dist/components/PasswordStrengthIndicator/index.d.ts +20 -7
  32. package/dist/components/PasswordStrengthIndicator/index.d.ts.map +1 -1
  33. package/dist/components/SimpleButton/index.d.ts +4 -0
  34. package/dist/components/SimpleButton/index.d.ts.map +1 -1
  35. package/dist/components/TextInput/index.d.ts +24 -1
  36. package/dist/components/TextInput/index.d.ts.map +1 -1
  37. package/dist/components/index.d.ts +8 -0
  38. package/dist/components/index.d.ts.map +1 -1
  39. package/dist/components/utils/componentWrapper.d.ts +16 -4
  40. package/dist/components/utils/componentWrapper.d.ts.map +1 -1
  41. package/dist/hooks/index.d.ts +2 -0
  42. package/dist/hooks/index.d.ts.map +1 -1
  43. package/dist/hooks/useAsyncOperation.d.ts +2 -0
  44. package/dist/hooks/useAsyncOperation.d.ts.map +1 -1
  45. package/dist/hooks/useUpdateUser.d.ts +6 -2
  46. package/dist/hooks/useUpdateUser.d.ts.map +1 -1
  47. package/dist/hooks/useUserManagement.d.ts +15 -36
  48. package/dist/hooks/useUserManagement.d.ts.map +1 -1
  49. package/dist/index.d.ts +6 -12
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.esm.js +1 -1
  52. package/dist/index.esm.js.map +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/index.js.map +1 -1
  55. package/dist/metrics/clsMetrics.d.ts +2 -2
  56. package/dist/metrics/clsMetrics.d.ts.map +1 -1
  57. package/dist/metrics/fcpMetrics.d.ts +2 -2
  58. package/dist/metrics/fcpMetrics.d.ts.map +1 -1
  59. package/dist/metrics/fidMetrics.d.ts +2 -2
  60. package/dist/metrics/fidMetrics.d.ts.map +1 -1
  61. package/dist/metrics/index.d.ts +2 -2
  62. package/dist/metrics/index.d.ts.map +1 -1
  63. package/dist/metrics/lcpMetrics.d.ts +2 -2
  64. package/dist/metrics/lcpMetrics.d.ts.map +1 -1
  65. package/dist/metrics/ttfbMetrics.d.ts +2 -2
  66. package/dist/metrics/ttfbMetrics.d.ts.map +1 -1
  67. package/dist/metrics/types.d.ts +9 -0
  68. package/dist/metrics/types.d.ts.map +1 -0
  69. package/dist/plugin-system/PluginManager/components/PluginContent/index.d.ts +12 -0
  70. package/dist/plugin-system/PluginManager/components/PluginContent/index.d.ts.map +1 -0
  71. package/dist/plugin-system/PluginManager/components/PluginList/index.d.ts +15 -0
  72. package/dist/plugin-system/PluginManager/components/PluginList/index.d.ts.map +1 -0
  73. package/dist/plugin-system/PluginManager/components/index.d.ts +3 -0
  74. package/dist/plugin-system/PluginManager/components/index.d.ts.map +1 -0
  75. package/dist/plugin-system/PluginManager/index.d.ts +15 -0
  76. package/dist/plugin-system/PluginManager/index.d.ts.map +1 -0
  77. package/dist/plugin-system/core/Dashboard/tab0.d.ts.map +1 -1
  78. package/dist/plugin-system/core/Dashboard/views/DashboardView/index.d.ts.map +1 -1
  79. package/dist/plugin-system/index.d.ts +2 -0
  80. package/dist/plugin-system/index.d.ts.map +1 -1
  81. package/dist/plugin-system/types.d.ts +3 -3
  82. package/dist/plugin-system/types.d.ts.map +1 -1
  83. package/dist/services/errorServices/components/ErrorToast/index.d.ts +9 -0
  84. package/dist/services/errorServices/components/ErrorToast/index.d.ts.map +1 -0
  85. package/dist/services/errorServices/components/ErrorToastContainer/index.d.ts +3 -0
  86. package/dist/services/errorServices/components/ErrorToastContainer/index.d.ts.map +1 -0
  87. package/dist/services/errorServices/context.d.ts +9 -0
  88. package/dist/services/errorServices/context.d.ts.map +1 -0
  89. package/dist/services/errorServices/index.d.ts +5 -0
  90. package/dist/services/errorServices/index.d.ts.map +1 -0
  91. package/dist/services/{errorServices.d.ts → errorServices/types.d.ts} +5 -17
  92. package/dist/services/errorServices/types.d.ts.map +1 -0
  93. package/dist/types/index.d.ts +14 -8
  94. package/dist/types/index.d.ts.map +1 -1
  95. package/dist/utils/array-utils.d.ts +6 -0
  96. package/dist/utils/array-utils.d.ts.map +1 -0
  97. package/dist/utils/helpers.d.ts +10 -11
  98. package/dist/utils/helpers.d.ts.map +1 -1
  99. package/dist/utils/index.d.ts +9 -0
  100. package/dist/utils/index.d.ts.map +1 -0
  101. package/dist/utils/isDeepEqual.d.ts +1 -2
  102. package/dist/utils/isDeepEqual.d.ts.map +1 -1
  103. package/dist/utils/location-utils.d.ts +12 -0
  104. package/dist/utils/location-utils.d.ts.map +1 -0
  105. package/dist/utils/logger.d.ts +1 -1
  106. package/dist/utils/logger.d.ts.map +1 -1
  107. package/dist/utils/role-utils.d.ts +10 -0
  108. package/dist/utils/role-utils.d.ts.map +1 -0
  109. package/dist/utils/sanitize.d.ts +10 -0
  110. package/dist/utils/sanitize.d.ts.map +1 -0
  111. package/dist/utils/string-utils.d.ts +5 -0
  112. package/dist/utils/string-utils.d.ts.map +1 -0
  113. package/package.json +26 -5
  114. package/dist/components/LoginBackground/index.d.ts +0 -29
  115. package/dist/components/LoginBackground/index.d.ts.map +0 -1
  116. package/dist/components/LoginBackground/index.improved.d.ts +0 -16
  117. package/dist/components/LoginBackground/index.improved.d.ts.map +0 -1
  118. package/dist/components/LoginBackground/types.d.ts +0 -25
  119. package/dist/components/LoginBackground/types.d.ts.map +0 -1
  120. package/dist/components/LoginBackground/utils.d.ts +0 -28
  121. package/dist/components/LoginBackground/utils.d.ts.map +0 -1
  122. package/dist/components/PasswordStrengthIndicator/index.improved.d.ts +0 -47
  123. package/dist/components/PasswordStrengthIndicator/index.improved.d.ts.map +0 -1
  124. package/dist/plugin-system/PluginManager.d.ts +0 -9
  125. package/dist/plugin-system/PluginManager.d.ts.map +0 -1
  126. package/dist/plugin-system/core/Dashboard/Icon.d.ts +0 -6
  127. package/dist/plugin-system/core/Dashboard/Icon.d.ts.map +0 -1
  128. package/dist/plugin-system/core/Dashboard/views/DashboardView/index.stories.d.ts +0 -13
  129. package/dist/plugin-system/core/Dashboard/views/DashboardView/index.stories.d.ts.map +0 -1
  130. package/dist/services/errorServices.d.ts.map +0 -1
  131. /package/dist/components/{forms → Forms}/FormField/index.d.ts +0 -0
  132. /package/dist/components/{forms → Forms}/FormField/index.improved.d.ts +0 -0
  133. /package/dist/components/{forms → Forms}/SubmitButton/index.d.ts +0 -0
  134. /package/dist/components/{forms → Forms}/SubmitButton/index.improved.d.ts +0 -0
  135. /package/dist/components/{forms → Forms}/TermsCheckbox/index.d.ts +0 -0
  136. /package/dist/components/{forms → Forms}/TermsCheckbox/index.improved.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("@integrativedesigndevelopment/idd-common"),s=require("@integrativedesigndevelopment/idd-icons");function o(e,r,t,s){return new(t||(t=Promise))(function(o,a){function i(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var r;e.done?o(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(i,n)}l((s=s.apply(e,r||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;class a extends r.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,r){console.error("ErrorBoundary caught an error:",e,r)}render(){return this.state.hasError?this.props.fallback||e.jsx("div",{className:"flex items-center justify-center h-full w-full p-4",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Something went wrong"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"An error occurred while loading this component."}),e.jsx("button",{onClick:()=>this.setState({hasError:!1,error:void 0}),className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Try again"})]})}):this.props.children}}const i={loginBackground:{type:"color",value:"#f3f4f6",fallback:"#ffffff",backgroundSize:"cover",backgroundPosition:"center",additionalStyles:{}}},n=e=>{try{const r="undefined"!=typeof window?window.location.origin:"http://localhost";return new URL(e,r),!0}catch(e){return!1}},l=e=>{const r=[];return e.type&&["image","color","gradient"].includes(e.type)||r.push('Invalid background type. Must be "image", "color", or "gradient".'),e.value||r.push("Background value is required."),e.fallback||r.push("Fallback color is required."),"image"!==e.type||n(e.value)||r.push("Invalid image URL provided."),r},d=()=>({type:i.loginBackground.type,value:i.loginBackground.value,fallback:i.loginBackground.fallback,backgroundSize:i.loginBackground.backgroundSize,backgroundPosition:i.loginBackground.backgroundPosition,additionalStyles:i.loginBackground.additionalStyles}),c=e=>new Promise((r,t)=>{const s=new Image;s.onload=()=>r(s),s.onerror=t,s.src=e});var u;exports.PasswordStrength=void 0,(u=exports.PasswordStrength||(exports.PasswordStrength={}))[u.VERY_WEAK=0]="VERY_WEAK",u[u.WEAK=1]="WEAK",u[u.FAIR=2]="FAIR",u[u.GOOD=3]="GOOD",u[u.STRONG=4]="STRONG";const g=e=>e/4*100,p=r.memo(({analysis:r,showDetails:t=!0,className:s=""})=>{const o=g(r.score);return e.jsxs("div",{className:`password-strength-indicator ${s}`,role:"status","aria-live":"polite",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2",role:"progressbar","aria-valuenow":r.score,"aria-valuemin":0,"aria-valuemax":4,children:e.jsx("div",{className:"h-2 rounded-full transition-all duration-300",style:{width:`${o}%`}})}),e.jsx("span",{className:"text-sm font-medium",children:r.label})]}),t&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-xs text-gray-600",children:[e.jsxs("span",{children:["Entropy: ",r.entropy," bits"]}),e.jsxs("span",{children:["Crack time: ",r.crackTime]})]}),r.warnings.length>0&&e.jsx("div",{className:"space-y-1",children:r.warnings.map((r,t)=>e.jsxs("div",{className:"flex items-start gap-2 text-xs text-amber-600",children:[e.jsx("span",{className:"text-amber-500 mt-0.5",children:"⚠"}),e.jsx("span",{children:r})]},t))}),r.suggestions.length>0&&e.jsx("div",{className:"space-y-1",children:r.suggestions.map((r,t)=>e.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-600",children:[e.jsx("span",{className:"text-blue-500 mt-0.5",children:"💡"}),e.jsx("span",{children:r})]},t))}),e.jsx("div",{className:"text-xs font-medium "+(r.isAcceptable?"text-green-600":"text-red-600"),children:r.isAcceptable?"✓ Password meets security requirements":"✗ Password does not meet security requirements"})]})]})}),m=r.memo(({score:r,className:t=""})=>{const s=g(r);return e.jsx("div",{className:`w-full bg-gray-200 rounded-full h-1 ${t}`,children:e.jsx("div",{className:`h-1 rounded-full transition-all duration-300 ${(e=>{switch(e){case exports.PasswordStrength.VERY_WEAK:return"bg-red-500";case exports.PasswordStrength.WEAK:return"bg-orange-500";case exports.PasswordStrength.FAIR:return"bg-yellow-500";case exports.PasswordStrength.GOOD:return"bg-lime-500";case exports.PasswordStrength.STRONG:return"bg-green-500";default:return"bg-gray-300"}})(r)}`,style:{width:`${s}%`}})})}),h={title:"IDD Dashboard",pages:[],plugins:["Dashboard"],categories:[],sub_categories:{},style:{colors:{"idd-red":"#DD3150","idd-red-20":"#F6CBD3","idd-orange":"#D1823B","idd-orange-20":"#F3DFCE","idd-yellow":"#D9C982","idd-yellow-20":"#F4EFDA","idd-green":"#98BD83","idd-green-20":"#E5EEE0","idd-blue":"#00A89D","idd-blue-20":"#6F6F5","idd-purple":"#4040D8","idd-purple-20":"#CFCFF5","idd-brown":"#7A6C53","idd-brown-20":"#F2F0EE","idd-black":"#19191c","idd-black-20":"#C5C5C6","idd-grey":"#6D6E81","idd-grey-20":"#DCDCE1","idd-white":"#fff","idd-transparent":"transparent","idd-primary-color":"#292929","idd-secondary-color":"#5f696d","idd-tertiary-color":"#d8dfe7","idd-tertiary-color-20":"#ECECEC","idd-active-color":"#ad0000","idd-inactive-color":"#DCDCE1","idd-primary-background":"#ad0000","idd-secondary-background":"#f2f0ee","idd-tertiary-background":"#F6F6F9","idd-active-background":"#7a6c53","idd-inactive-background":"#7a6c531a","idd-shadow-color":"rgba(50,69,71,0.17)"},fontFamily:{"idd-primary-font":"Gotham-Book","idd-primary-font-light":"Gotham-Light","idd-primary-font-regular":"Gotham-Book","idd-primary-font-medium":"Gotham-Medium","idd-primary-font-bold":"Gotham-Bold","idd-secondary-font":"Rubik-Regular","idd-secondary-font-light":"Rubik-Light","idd-secondary-font-regular":"Rubik-Regular","idd-secondary-font-medium":"Rubik-Medium","idd-secondary-font-bold":"Rubik-Bold"},fontStyle:{"idd-font-style":"normal"},fontWeight:{"idd-light-font-weight":"300","idd-regular-font-weight":"normal","idd-medium-font-weight":"medium","idd-bold-font-weight":"bold"},fontSize:{"idd-primary-font-size":"1rem","idd-xtrasmall-font-size":"0.25rem","idd-small-font-size":"0.5rem","idd-medium-font-size":"1.125rem","idd-large-font-size":"1.25rem","idd-xtralarge-font-size":"1.5rem"},letterSpacing:{"idd-character-spacing":"0","idd-body-character-spacing":"0.05"},lineHeight:{"idd-primary-line-spacing":"1.5"},backgroundImage:{"gradient-radial":"radial-gradient(var(--tw-gradient-stops))","gradient-conic":"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))","signup-theme":"linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/signup-theme.png')"},borderRadius:{"idd-border-radius":"0.3125rem"}}};let x=h;const b=()=>x,f=()=>b(),y={primary:{base:"text-idd-white bg-idd-active-color hover:bg-idd-primary-color focus:bg-idd-primary-color",disabled:"opacity-50 cursor-not-allowed"},secondary:{base:"text-idd-active-color bg-idd-tertiary-background border border-idd-active-color hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white",disabled:"opacity-50 cursor-not-allowed"},tertiary:{base:"text-idd-black bg-idd-tertiary-background hover:bg-idd-grey-20 focus:bg-idd-grey-20",disabled:"opacity-50 cursor-not-allowed"},outline:{base:"text-idd-active-color bg-transparent border border-idd-active-color hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white",disabled:"opacity-50 cursor-not-allowed"},ghost:{base:"text-idd-grey bg-transparent hover:bg-idd-grey-20 hover:text-idd-black focus:bg-idd-grey-20 focus:text-idd-black",disabled:"opacity-50 cursor-not-allowed"},danger:{base:"text-idd-white bg-idd-red hover:opacity-90 focus:opacity-90",disabled:"opacity-50 cursor-not-allowed"},success:{base:"text-idd-white bg-idd-green hover:opacity-90 focus:opacity-90",disabled:"opacity-50 cursor-not-allowed"}},v={button:"font-idd-primary-font-medium text-idd-primary-font-size text-center py-2 px-4 rounded-[0.3125rem] focus:outline-none focus-visible:outline-none transition-colors duration-200",input:"w-full h-[3.125rem] rounded-[0.3125rem]",error:"font-idd-primary-font text-idd-primary-font-size !mb-0",label:"font-idd-primary-font-medium text-idd-primary-font-size"},w=(e="primary",r=!1,t="")=>{const s=y[e];return`${v.button} ${r?s.disabled:s.base} ${t}`.trim()},k=({children:r,onPress:s,onClick:o,disabled:a=!1,type:i="button",className:n="",variant:l="primary","data-testid":d})=>{const c=s||o||(()=>{});return e.jsx(t.IDDButton,{type:i,onPress:c,disabled:a,buttonClass:w(l,a,n),"data-testid":d,children:r})},C=r.memo(({label:r,type:t,value:s,onChange:o,errors:a=[],required:i=!1,autoComplete:n,placeholder:l,disabled:d=!1,showErrors:c=!1,showPasswordToggle:u=!1,onTogglePassword:g,showPassword:p=!1})=>{const m=c&&a.length>0,h=`field-${r.toLowerCase().replace(/\s+/g,"-")}`;return e.jsxs("div",{className:"form-field "+(m?"form-field--error":""),children:[e.jsxs("label",{htmlFor:h,className:"form-field__label",children:[r,i&&e.jsx("span",{className:"form-field__required","aria-label":"required",children:"*"})]}),e.jsxs("div",{className:"form-field__input-wrapper",children:[e.jsx("input",{id:h,type:t,value:s,onChange:e=>o(e.target.value),autoComplete:n,placeholder:l,disabled:d,required:i,className:"form-field__input "+(m?"form-field__input--error":""),"aria-invalid":m,"aria-required":i,"aria-describedby":m?`${h}-errors`:void 0}),u&&e.jsx(k,{type:"button",onPress:g,variant:"ghost",className:"form-field__password-toggle",disabled:d,"data-testid":"password-toggle",children:p?"👁️":"👁️‍🗨️"})]}),m&&e.jsx("div",{id:`${h}-errors`,className:"form-field__errors",role:"alert",children:a.map((r,t)=>e.jsx("div",{className:"form-field__error",children:r},t))})]})}),j=({size:r="medium",message:s="Loading...",show:o=!0,color:a,className:i="","data-testid":n})=>{var l,d;const c=f();return o?(a||null===(d=null===(l=c.style)||void 0===l?void 0:l.colors)||void 0===d||d["idd-active-color"],e.jsxs("div",{className:`flex flex-col items-center justify-center space-y-4 ${i}`,"data-testid":n,children:[e.jsx(t.IDDLoader,{}),s&&e.jsx("p",{className:"text-sm text-gray-600 font-medium",children:s})]})):null},E=r.memo(({isLoading:r,disabled:t=!1,text:s,loadingText:o,className:a=""})=>e.jsxs(k,{type:"submit",disabled:t||r,variant:"primary",className:a,"aria-busy":r,"aria-disabled":t||r,children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[r&&e.jsx("div",{className:"inline-block",children:e.jsx(j,{show:!0,size:"small"})}),e.jsx("span",{className:"submit-button__text",children:r?o:s})]}),r&&e.jsx("span",{id:"submit-loading-text",className:"sr-only",children:"Please wait while we process your request"})]})),N=r.memo(({checked:r,onChange:t,errors:s=[],disabled:o=!1,showErrors:a=!1,termsUrl:i="/terms",privacyUrl:n="/privacy"})=>{const l=a&&s.length>0,d="terms-checkbox";return e.jsxs("div",{className:"terms-checkbox "+(l?"terms-checkbox--error":""),children:[e.jsxs("div",{className:"terms-checkbox__wrapper",children:[e.jsx("input",{id:d,type:"checkbox",checked:r,onChange:e=>t(e.target.checked),disabled:o,className:"terms-checkbox__input "+(l?"terms-checkbox__input--error":""),"aria-invalid":l,"aria-describedby":l?`${d}-errors`:void 0,required:!0}),e.jsxs("label",{htmlFor:d,className:"terms-checkbox__label",children:[e.jsx("span",{className:"terms-checkbox__checkmark","aria-hidden":"true",children:r?"✓":""}),e.jsxs("span",{className:"terms-checkbox__text",children:["I agree to the"," ",e.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"terms-checkbox__link",children:"Terms of Service"})," ","and"," ",e.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"terms-checkbox__link",children:"Privacy Policy"}),e.jsx("span",{className:"terms-checkbox__required","aria-label":"required",children:"*"})]})]})]}),l&&e.jsx("div",{id:`${d}-errors`,className:"terms-checkbox__errors",role:"alert",children:s.map((r,t)=>e.jsx("div",{className:"terms-checkbox__error",children:r},t))})]})}),S={SET_PLUGINS:"set_plugins",SET_CURRENT_PLUGIN:"set_current_plugin",SET_CURRENT_TAB:"set_current_tab",SET_CURRENT_STATE:"set_current_state",SET_CURRENT_VIEW:"set_current_view",SET_CURRENT_ITEM:"set_current_item",COLLAPSED_TOGGLE:"toggle_collapsed",SET_COLOR_MODE:"set_color_mode",TOGGLE_NOTIFICATIONS:"toggle_notifications",SET_SETTING:"set_setting",SET_JWT:"SET_JWT",SET_USER:"SET_USER",RESET:"reset"},_=e=>({type:S.SET_CURRENT_PLUGIN,payload:e}),T=e=>({type:S.SET_CURRENT_TAB,payload:e}),D=e=>({type:S.SET_CURRENT_STATE,payload:e});const I=[],P=r.createContext(void 0);function A(e){return Array.isArray(e)?e:[]}const L=(e,...r)=>o(void 0,[e,...r],void 0,function*(e,r=5e3){return e.startsWith("data:")||e.startsWith("url(")?{exists:!0,fallbackUsed:!1}:new Promise(t=>{const s=new Image,o=setTimeout(()=>{t({exists:!1,error:"Asset loading timeout",fallbackUsed:!0})},r);s.onload=()=>{clearTimeout(o),t({exists:!0,fallbackUsed:!1})},s.onerror=()=>{clearTimeout(o),t({exists:!1,error:"Asset failed to load",fallbackUsed:!0})},s.src=e})}),R=(e,r)=>o(void 0,void 0,void 0,function*(){const t=e.map(e=>o(void 0,void 0,void 0,function*(){return{path:e,result:yield L(e,r)}}));return(yield Promise.all(t)).reduce((e,{path:r,result:t})=>(e[r]=t,e),{})}),O={SIGNUP_THEME:"/signup-theme.png",LOGO_ENVIROME:"/logo-envirome.png",BVOC:"/bvoc.png",LOGO:"/logo.png"};function B(e){if(!e)return e;if("undefined"!=typeof window){const r=document.createElement("div");r.textContent=e;return r.innerHTML.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").replace(/style\s*=/gi,"").replace(/<iframe/gi,"&lt;iframe").replace(/<object/gi,"&lt;object").replace(/<embed/gi,"&lt;embed").replace(/<form/gi,"&lt;form")}return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function z(e){return/<[a-z][\s\S]*>/i.test(e)}function $(e,r){for(let t=0;t<e.length;t++){let s=!1;if(s=z(e[t]),s){const s={text:e[t],hasLinks:!0};r.push(s)}else{const s={text:e[t],hasLinks:!1};r.push(s)}}}const F=r.createContext(null),U=()=>{const e=r.useContext(F);if(!e)throw new Error("useError must be used within an ErrorProvider");return e},G=({error:r,onClose:o})=>e.jsxs("div",{className:`text-white p-4 rounded-lg shadow-lg ring-2 ${(()=>{switch(r.type){case"success":return"ring-idd-green";case"warning":return"ring-idd-yellow";case"info":return"ring-idd-purple";default:return"ring-idd-active-color"}})()} flex items-start gap-3 max-w-md`,children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:(()=>{switch(r.type){case"success":return e.jsx(s.IDDOutlineCheckmarkIcon,{});case"warning":default:return e.jsx(s.IDDOutlineWarningIcon,{});case"info":return e.jsx(s.IDDInfoIcon,{})}})()}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"font-idd-primary-font-regular text-lg leading-relaxed",children:[e.jsx("span",{className:"font-idd-primary-font-bold text-lg",children:(()=>{switch(r.type){case"success":return"Success: ";case"warning":return"Warning: ";case"info":return"Info: ";default:return"Error: "}})()})," ",r.message]})}),e.jsx(t.IDDButton,{buttonClass:"border-0 bg-idd-transparent ms-auto",onPress:()=>o(r.id),"aria-label":"Close",children:e.jsx(s.IDDXIcon,{})})]});exports.ActionTypes=S,exports.CancelActionButton=({children:r,onPress:s,disabled:o=!1,type:a="button",className:i="",variant:n="outline","data-testid":l})=>e.jsx(t.IDDButton,{type:a,onPress:s||(()=>{}),disabled:o,buttonClass:w(n,o,`px-5 ${i}`),"data-testid":l,children:r}),exports.Card=({children:r,title:s,subtitle:o,className:a="",padding:i="medium",shadow:n="medium",border:l=!0,"data-testid":d})=>{const c=["bg-white rounded-lg",{none:"",small:"shadow-sm",medium:"shadow-md",large:"shadow-lg"}[n],l?"border border-gray-200":"",a].filter(Boolean).join(" "),u={none:"",small:"p-3",medium:"p-6",large:"p-8"}[i];return e.jsx(t.IDDCard,{"data-testid":d,children:e.jsx("div",{className:c,children:e.jsxs("div",{className:u,children:[(s||o)&&e.jsxs("div",{className:"mb-4",children:[s&&e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-1",children:s}),o&&e.jsx("p",{className:"text-sm text-gray-600",children:o})]}),r]})})})},exports.ConfirmActionButton=({children:r,onPress:s,disabled:o=!1,type:a="submit",className:i="",variant:n="primary","data-testid":l})=>e.jsx(t.IDDButton,{type:a,onPress:s||(()=>{}),disabled:o,buttonClass:w(n,o,`px-5 ${i}`),"data-testid":l,children:r}),exports.ContentItem=({type:r,style:t,text:s,items:o,orderedListStyle:a="",unorderedListStyle:i="",paragraphStyle:n=""})=>{if("list"===r){if("ordered"===t){const r=[];return o&&$(o,r),e.jsx("ol",{className:a,children:r.map((r,t)=>r.hasLinks?e.jsx("li",{dangerouslySetInnerHTML:{__html:B(r.text)}},t):e.jsx("li",{children:r.text},t))})}{const r=[];return o&&$(o,r),e.jsx("ul",{className:i,children:r.map((r,t)=>r.hasLinks?e.jsx("li",{dangerouslySetInnerHTML:{__html:B(r.text)}},t):e.jsx("li",{children:r.text},t))})}}{let r;return s?(r=z(s),r?e.jsx("p",{className:n,dangerouslySetInnerHTML:{__html:B(s)}}):e.jsx("p",{className:n,children:s})):e.jsx("p",{className:n,children:s})}},exports.DEFAULT_ASSET_PATHS=O,exports.DEFAULT_FALLBACK_COLORS={PRIMARY:"#ad0000",SECONDARY:"#0066cc",NEUTRAL:"#666666",SUCCESS:"#00A89D",WARNING:"#DD3150"},exports.DashboardProvider=({config:t,children:s})=>{const[o,a]=r.useState(t),i={config:o,updateConfig:e=>{a(r=>Object.assign(Object.assign({},r),e))}};return e.jsx(P.Provider,{value:i,children:s})},exports.ErrorBoundary=a,exports.ErrorProvider=({children:t})=>{const[s,o]=r.useState([]),a=r.useRef(new Map),i=r.useCallback(e=>{const r=a.current.get(e);r&&(clearTimeout(r),a.current.delete(e)),o(r=>r.filter(r=>r.id!==e))},[]),n=r.useCallback((e,r="error",t=!0,s=1e4)=>{const n=`error_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,l={id:n,type:r,message:e,timestamp:Date.now(),autoHide:t,duration:s};if(o(t=>t.some(t=>t.message===e&&t.type===r)?t:[...t,l]),t&&s){const e=setTimeout(()=>{i(n)},s);a.current.set(n,e)}return n},[i]),l=r.useCallback(()=>{a.current.forEach(e=>{clearTimeout(e)}),a.current.clear(),o([])},[]),d=r.useCallback((e,r=!0)=>n(e,"error",r),[n]),c=r.useCallback((e,r=!0)=>n(e,"success",r),[n]),u=r.useCallback((e,r=!0)=>n(e,"warning",r),[n]),g=r.useCallback((e,r=!0)=>n(e,"info",r),[n]);r.useEffect(()=>()=>{a.current.forEach(e=>{clearTimeout(e)}),a.current.clear()},[]);const p={errors:s,addError:n,removeError:i,clearErrors:l,showError:d,showSuccess:c,showWarning:u,showInfo:g};return e.jsx(F.Provider,{value:p,children:t})},exports.ErrorToast=G,exports.ErrorToastContainer=()=>{const{errors:r,removeError:t}=U();return 0===r.length?null:e.jsx("div",{className:"fixed bottom-10 right-10 flex flex-col gap-3",style:{zIndex:1e3},children:r.map(r=>e.jsx("div",{className:"bg-idd-white mt-3",children:e.jsx(G,{error:r,onClose:t})},r.id))})},exports.FormField=C,exports.IDDLinkInputItem=({id:o,idsArray:a,onDelete:i=()=>{},onBlur:n=()=>{},link:l,className:d=""})=>{const c=f(),u=t.useTailwindConfig(c.style),[g,p]=r.useState(u.colors["idd-black"]),[m,h]=r.useState({id:"",text:"",url:""});return r.useEffect(()=>{l&&(l.path&&l.path.length>0?h({id:l.id,text:l.text,url:l.path}):h(l))},[l]),e.jsxs("div",{className:`flex justify-between items-center ${d}`,onBlur:e=>{e.stopPropagation(),n(m)},children:[e.jsx(t.IDDInput,{id:`link-${o}`,componentClass:"w-[45%]",type:"text",label:"Link Text",labelClass:"text-capitalize",showLabel:!!(m&&m.text&&m.text.length>0),placeholder:"Link Text",value:m.text,inputClass:"ps-3 active-primary-black",onChange:e=>{h(Object.assign(Object.assign({},m),{text:e.target.value}))}}),e.jsx(t.IDDInput,{id:`url-${o}`,componentClass:"w-45",type:"url",label:"URL",showLabel:!!(m&&m.url&&m.url.length>0),placeholder:"URL",value:m.url,inputClass:"ps-3 active-primary-black",onChange:e=>{h(Object.assign(Object.assign({},m),{url:e.target.value}))}}),e.jsx(t.IDDButton,{id:`removeLink-${o}`,onPress:()=>{if(a){let e=[...a];e=e.filter(e=>e!==o),h({id:"",text:"",url:""}),i(e)}},onMouseEnter:()=>p("var(--idd-red)"),onFocus:()=>p("var(--idd-red)"),onMouseLeave:()=>p("var(--idd-primary-black)"),onBlur:()=>p("var(--idd-primary-black)"),isSecondary:!0,buttonClass:"flex items-center justify-center border-0 rounded-sm w-[1.5625rem] h-[1.5625rem] p-0",children:e.jsxs(r.Fragment,{children:[e.jsx("span",{className:"sr-only",children:"remove link"}),e.jsx(s.IDDXIcon,{wrapperClass:"flex justify-center items-center",color:g})]})})]})},exports.Layout=({children:r,className:t="flex items-center justify-center min-h-screen w-full p-5"})=>e.jsx(a,{children:e.jsx("div",{className:`bg-signup-theme bg-cover bg-center bg-no-repeat ${t}`,children:r})}),exports.Loader=j,exports.LoginBackground=({config:t,className:s="",children:i,onImageError:n,onImageLoad:u,"data-testid":g="login-background"})=>{const[p,m]=r.useState(!1),[h,x]=r.useState(!1),[b,f]=r.useState(!1),y=t||d(),v=l(y);v.length>0&&console.warn("LoginBackground configuration errors:",v);const w=r.useCallback(()=>o(void 0,void 0,void 0,function*(){if("image"===y.type){f(!0),x(!1);try{yield c(y.value),m(!0),x(!1),null==u||u(new Event("load"))}catch(e){x(!0),m(!1),null==n||n(new Event("error")),console.warn("Failed to load background image:",y.value)}finally{f(!1)}}}),[y.type,y.value,n,u]);r.useEffect(()=>{w()},[w]),r.useEffect(()=>{const e=document.documentElement;"image"===y.type?e.style.setProperty("--login-bg-image",`url('${y.value}')`):"color"===y.type?(e.style.setProperty("--login-bg-image","none"),e.style.setProperty("--login-bg-color",y.value)):"gradient"===y.type&&e.style.setProperty("--login-bg-image",y.value),e.style.setProperty("--login-bg-fallback",y.fallback),y.backgroundSize&&e.style.setProperty("--login-bg-size",y.backgroundSize),y.backgroundPosition&&e.style.setProperty("--login-bg-position",y.backgroundPosition),"image"===y.type&&(h||b)&&(e.style.setProperty("--login-bg-image","none"),e.style.setProperty("--login-bg-color",y.fallback))},[y,h,b]);const k=y.additionalStyles||{},C=["bg-login","transition-all duration-300 ease-in-out","min-h-full w-full",s].filter(Boolean).join(" "),j=a;return e.jsx(j,{fallback:e.jsx("div",{children:"Something went wrong with the background"}),children:e.jsx("div",{className:C,style:k,"data-testid":g,"data-background-type":y.type,"data-image-loaded":"image"===y.type?p:void 0,"aria-label":"image"===y.type?`Background image: ${y.value}`:"Background styling",children:i})})},exports.Modal=({children:r,isOpen:t,onClose:s,title:o,showCloseButton:a=!0,size:i="medium",className:n="","data-testid":l})=>{if(!t)return null;return e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center min-h-screen p-4 z-50",onClick:e=>{e.target===e.currentTarget&&s()},onKeyDown:e=>{"Escape"===e.key&&s()},"data-testid":l,role:"dialog","aria-modal":"true",tabIndex:-1,children:e.jsxs("div",{className:`bg-white rounded-lg shadow-xl ${{small:"max-w-md",medium:"max-w-lg",large:"max-w-2xl",full:"max-w-full mx-4"}[i]} w-full ${n}`,children:[o&&e.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-gray-200",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:o}),a&&e.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 focus:outline-none focus:text-gray-600","aria-label":"Close modal",children:e.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"p-6",children:r})]})})},exports.Password=({onChange:o=()=>{},label:a="Password",value:i,componentClass:n="",appendToInputClass:l="",error:d="",errorColor:c="",isErrorOnlyColor:u=!0})=>{const[g,p]=r.useState(!1),[m,h]=r.useState(!1),x=f(),b=t.useTailwindConfig(x.style);return e.jsx(t.IDDInput,{label:a,value:i,type:g?"text":"password",componentClass:n,inputWrapperClass:"w-full h-14 rounded-[0.3125rem] border border-idd-grey",inputClass:"px-4 py-2",appendToInputClass:`me-4 ${l}`,activeTextColor:b.colors["idd-black"],inactiveTextColor:!i||"string"==typeof i&&0===i.length?b.colors["idd-grey"]:b.colors["idd-black"],activeColor:b.colors["idd-black"],inactiveColor:!i||"string"==typeof i&&0===i.length?b.colors["idd-grey"]:b.colors["idd-black"],activeLabelColor:b.colors["idd-black"],inactiveLabelColor:!i||"string"==typeof i&&0===i.length?b.colors["idd-grey"]:b.colors["idd-black"],errors:d,errorColor:u?!i||"string"==typeof i&&0===i.length?b.colors["idd-grey"]:b.colors["idd-black"]:c,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:u?{color:b.colors["idd-active-color"]}:{},onFocus:()=>h(!0),onBlur:()=>h(!1),appendToInput:e.jsx(t.IDDButton,{buttonClass:"p-1 rounded-sm focus:outline focus-visible:outline focus:outline-1 focus-visible:outline-1offset-1 focus:outline-idd-black focus-visible:outline-idd-black",onPress:()=>p(!g),children:e.jsxs(r.Fragment,{children:[e.jsx("span",{className:"sr-only",children:g?"password shown":"password hidden"}),g?e.jsx(s.IDDShowPasswordIcon,{color:m?b.colors["idd-black"]:b.colors["idd-grey"]}):e.jsx(s.IDDHidePasswordIcon,{color:m?b.colors["idd-black"]:b.colors["idd-grey"]})]})}),onChange:e=>{if(o)if(e&&"object"==typeof e&&"target"in e)o(e);else if("string"==typeof e){o({target:{value:e}})}}})},exports.PasswordRequirements=({requirements:r,password:t,className:s=""})=>e.jsxs("div",{className:`password-requirements ${s}`,children:[e.jsx("div",{className:"text-sm font-medium text-gray-700 mb-2",children:"Password Requirements:"}),e.jsx("ul",{className:"space-y-1",children:r.map((r,s)=>{const o=!!t&&(e=>{if(e.includes("lowercase"))return/[a-z]/.test(t);if(e.includes("uppercase"))return/[A-Z]/.test(t);if(e.includes("number"))return/[0-9]/.test(t);if(e.includes("special character"))return/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(t);if(e.includes("characters long")){const r=e.match(/(\d+)-(\d+) characters/);if(r){const e=parseInt(r[1]),s=parseInt(r[2]);return t.length>=e&&t.length<=s}}return!1})(r);return e.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[e.jsx("span",{className:"mt-0.5 "+(o?"text-green-500":"text-gray-400"),children:o?"✓":"○"}),e.jsx("span",{className:o?"text-green-600":"text-gray-600",children:r})]},s)})})]}),exports.PasswordStrengthBar=m,exports.PasswordStrengthIndicator=p,exports.PluginManager=({plugins:t,children:s})=>{const[o,a]=r.useState(t.length>0?t[0].id:null),[i,n]=r.useState(0);return e.jsxs("div",{className:"plugin-manager",children:[s,0===t.length?null:e.jsxs("div",{className:"plugin-list mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Available Plugins:"}),e.jsx("div",{className:"space-x-2",children:t.map(r=>e.jsx("button",{onClick:()=>{a(r.id),n(0)},className:"px-3 py-1 rounded "+(o===r.id?"bg-blue-500 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"),children:r.name},r.id))})]}),e.jsx("div",{className:"plugin-content",children:(()=>{if(!o||0===t.length)return null;const e=t.find(e=>e.id===o);if(!e||!e.tabs||0===e.tabs.length)return null;return(e.tabs[i]||e.tabs[0]).content})()})]})},exports.SimpleButton=k,exports.SubmitButton=E,exports.TermsCheckbox=N,exports.TextInput=({label:r,onChange:s=()=>{},value:o,placeholder:a,type:i="text",readOnly:n=!1,error:l="",errorColor:d="",isErrorOnlyColor:c=!0})=>{const u=f(),g=t.useTailwindConfig(u.style);return e.jsx(t.IDDInput,{label:r,value:o,onChange:s,placeholder:a,type:i,readOnly:n,activeColor:n?g.colors["idd-grey"]:g.colors["idd-black"],inactiveColor:!o||"string"==typeof o&&0===o.length?g.colors["idd-grey"]:g.colors["idd-black"],activeLabelColor:n?g.colors["idd-grey"]:g.colors["idd-black"],inactiveLabelColor:!o||"string"==typeof o&&0===o.length?g.colors["idd-grey"]:g.colors["idd-black"],activeTextColor:n?g.colors["idd-grey"]:g.colors["idd-black"],inactiveTextColor:!o||"string"==typeof o&&0===o.length?g.colors["idd-grey"]:g.colors["idd-black"],inputWrapperClass:"w-full h-[3.125rem] rounded-[0.3125rem] border border-idd-grey",inputClass:n?"pointer-events-none px-4":"px-4",errors:l,errorColor:c?!o||"string"==typeof o&&0===o.length?g.colors["idd-grey"]:g.colors["idd-black"]:d,errorClass:"font-idd-primary-font text-idd-primary-font-size !mb-0",errorStyle:c?{color:g.colors["idd-active-color"]}:{}})},exports.buttonVariants=y,exports.commonStyles=v,exports.createDefaultConfig=d,exports.createValidationResult=(e,r=[])=>({isValid:e,errors:r}),exports.debounce=(e,r)=>{let t;return(...s)=>{clearTimeout(t),t=setTimeout(()=>e(...s),r)}},exports.defaultConfig=h,exports.ensureArray=A,exports.flatten=function e(r){return(r||[]).reduce((r,t)=>r.concat(Array.isArray(t)?e(t):t),[])},exports.generateBackgroundStyles=e=>{const r={backgroundRepeat:"no-repeat"};switch("image"===e.type&&(r.backgroundSize=e.backgroundSize||"cover",r.backgroundPosition=e.backgroundPosition||"center"),e.type){case"image":r.backgroundImage=`url('${e.value}')`,r.backgroundColor=e.fallback;break;case"color":r.backgroundColor=e.value;break;case"gradient":r.backgroundImage=e.value,r.backgroundColor=e.fallback;break;default:r.backgroundColor=e.fallback}return r},exports.getArraysDiff=function(e,r){const t=r||[];return(e||[]).filter(e=>!t.includes(e))},exports.getBackgroundStyle=(e,r)=>{if(((null==r?void 0:r.fallbackUsed)||!1===(null==r?void 0:r.exists))&&e.fallback)return{backgroundColor:e.fallback,backgroundImage:"none"};return{backgroundImage:e.path.startsWith("url(")||e.path.startsWith("data:")?e.path:`url('${e.path}')`}},exports.getButtonStyles=w,exports.getConfig=b,exports.getLocationString=e=>{let r="";return e&&(r=e.address_1&&e.address_1.length>0?e.address_1+", ":"",e.address_2&&e.address_2.length>0?r+=e.address_2+", ":r+="",e.city&&e.city.length>0?r+=e.city+", ":r+="",e.state&&e.state.length>0?r+=e.state:r+="",e.zip&&e.zip.length>0&&(r+=" "+e.zip)),r},exports.get_all_plugins=e=>I.flatMap(e=>Array.isArray(e)?e:[e]),exports.isAlpha=e=>/^[a-zA-Z]+$/.test(e),exports.isAlphanumeric=e=>/^[a-zA-Z0-9]+$/.test(e),exports.isEmpty=e=>!e||0===e.trim().length,exports.isLengthValid=(e,r,t)=>{const s=e?e.length:0;return s>=r&&s<=t},exports.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},exports.isNumeric=e=>/^\d+$/.test(e),exports.isURL=function(e){return/^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/.test(e)},exports.isValidDate=e=>{const r=new Date(e);return!isNaN(r.getTime())},exports.isValidEmail=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),exports.isValidImageUrl=n,exports.isValidPhone=e=>/^[\d\s\-\(\)\+]+$/.test(e)&&e.replace(/\D/g,"").length>=10,exports.isValidUrl=e=>{try{return new URL(e),!0}catch(e){return!1}},exports.mapUserRole=e=>"EVALUATOR"===e?"MODERATOR":e,exports.matchesPattern=(e,r)=>r.test(e),exports.normalizeWhitespace=e=>e.replace(/\s+/g," ").trim(),exports.preloadImage=c,exports.resetReducer=()=>({type:S.RESET}),exports.safeFilter=function(e,r){return A(e).filter(r)},exports.safeFind=function(e,r){return A(e).find(r)},exports.safeLength=function(e){return A(e).length},exports.safeMap=function(e,r){return A(e).map(r)},exports.safeSome=function(e,r){return A(e).some(r)},exports.sanitizeInput=e=>e&&"string"==typeof e?e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<[^>]+>/g,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").trim():"",exports.setConfig=e=>{x=Object.assign(Object.assign({},h),e)},exports.setCurrentItem=e=>({type:S.SET_CURRENT_ITEM,payload:e}),exports.setCurrentPlugin=_,exports.setCurrentPluginAndTab=(e,r)=>(t,s)=>{t(_(e)),t(T(0));const{session:o}=s(),a=[...o.currentState||[]],i=a.findIndex(r=>r.pluginID===e);-1!==i?a[i]={pluginID:e,tabID:r}:a.push({pluginID:e,tabID:r}),t(D(a))},exports.setCurrentState=D,exports.setCurrentTab=T,exports.setCurrentTabAndState=(e,r)=>(t,s)=>{t(T(e));const{session:o}=s(),a=o.current.id,i=[...o.currentState||[]],n=i.findIndex(e=>e.pluginID===a);-1!==n?i[n]={pluginID:a,tabID:r}:i.push({pluginID:a,tabID:r}),t(D(i))},exports.setCurrentView=e=>({type:S.SET_CURRENT_VIEW,payload:e}),exports.setPlugins=e=>({type:S.SET_PLUGINS,payload:e}),exports.setSetting=(e,r)=>({type:S.SET_SETTING,payload:{key:e,value:r}}),exports.toggleCollapsed=()=>({type:S.COLLAPSED_TOGGLE}),exports.toggleNotifications=()=>({type:S.TOGGLE_NOTIFICATIONS}),exports.truncate=(e,r)=>e&&e.length>r?e.slice(0,r)+"...":e,exports.useAssetValidation=(e,t)=>{const[s,a]=r.useState({exists:!0,fallbackUsed:!1}),[i,n]=r.useState(!0);return r.useEffect(()=>{let r=!0;return o(void 0,void 0,void 0,function*(){n(!0);const s=yield L(e,t);r&&(a(s),n(!1))}),()=>{r=!1}},[e,t]),{result:s,isLoading:i}},exports.useConfig=f,exports.useDashboard=()=>{const e=r.useContext(P);if(!e)throw new Error("useDashboard must be used within a DashboardProvider");return e},exports.useError=U,exports.useErrorBoundary=()=>{const{showError:e}=U();return{handleError:r.useCallback((r,t)=>{console.error("Error caught by boundary:",r,t),e("An unexpected error occurred. Please try again.")},[e])}},exports.useIDDTheme=()=>{const e=f(),r=t.useTailwindConfig(e.style);return{config:e,tailwindConfig:r,colors:r.colors}},exports.useLoginBackground=()=>r.useCallback(e=>{if("undefined"==typeof window||"undefined"==typeof document)return;const r=document.documentElement;try{if("image"===e.type&&e.value){const t=e.value.replace(/[<>"']/g,"");r.style.setProperty("--login-bg-image",`url('${t}')`)}else if("color"===e.type&&e.value){/^(#[0-9A-F]{6}|#[0-9A-F]{3}|rgb\(|rgba\(|hsl\(|hsla\()/i.test(e.value)&&(r.style.setProperty("--login-bg-image","none"),r.style.setProperty("--login-bg-color",e.value))}else"gradient"===e.type&&e.value&&e.value.includes("gradient(")&&r.style.setProperty("--login-bg-image",e.value);if(e.fallback){const t=e.fallback.replace(/[<>"']/g,"");r.style.setProperty("--login-bg-fallback",t)}if(e.backgroundSize){(["cover","contain","auto","100%"].includes(e.backgroundSize)||/^\d+(px|%|em|rem)$/.test(e.backgroundSize))&&r.style.setProperty("--login-bg-size",e.backgroundSize)}if(e.backgroundPosition){/^(center|left|right|top|bottom|\d+(px|%|em|rem)|\s)+$/.test(e.backgroundPosition)&&r.style.setProperty("--login-bg-position",e.backgroundPosition)}}catch(e){console.warn("Failed to set login background styles:",e)}},[]),exports.useWindowDimensions=()=>{const[e,t]=r.useState({width:0,height:0});return r.useEffect(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e},exports.validateAsset=L,exports.validateAssets=R,exports.validateCommonAssets=()=>o(void 0,void 0,void 0,function*(){return R(Object.values(O))}),exports.validateConfig=l,exports.warnMissingAssets=e=>{if("development"!==process.env.NODE_ENV)return;const r=Object.entries(e).filter(([,e])=>!e.exists).map(([e])=>e);r.length>0&&console.warn("⚠️ IDD Dashboard: Missing optional assets detected:",r,"\nSee https://github.com/integrativedesigndevelopment/idd-dashboard/blob/main/docs/guides/required-assets.md for details.")};
1
+ "use strict";var e,t=require("react/jsx-runtime"),r=require("react"),s=require("@integrativedesigndevelopment/idd-common"),n=require("@integrativedesigndevelopment/idd-icons"),i=require("react-tracker");exports.PasswordStrength=void 0,(e=exports.PasswordStrength||(exports.PasswordStrength={}))[e.VERY_WEAK=0]="VERY_WEAK",e[e.WEAK=1]="WEAK",e[e.FAIR=2]="FAIR",e[e.GOOD=3]="GOOD",e[e.STRONG=4]="STRONG";const a=e=>Math.min(100,Math.max(0,e/4*100)),o=e=>({[exports.PasswordStrength.VERY_WEAK]:"bg-red-500",[exports.PasswordStrength.WEAK]:"bg-orange-500",[exports.PasswordStrength.FAIR]:"bg-yellow-500",[exports.PasswordStrength.GOOD]:"bg-lime-500",[exports.PasswordStrength.STRONG]:"bg-green-500"}[e]||"bg-gray-300"),l=r.memo(({analysis:e})=>{var s,n,i;const a=e.warnings.length>0?e.warnings:(null===(s=e.feedback)||void 0===s?void 0:s.warning)?[e.feedback.warning]:[],o=e.suggestions.length>0?e.suggestions:null!==(i=null===(n=e.feedback)||void 0===n?void 0:n.suggestions)&&void 0!==i?i:[],l=a.length>0,u=o.length>0;return t.jsxs("div",{className:"space-y-2",role:"status",children:[(void 0!==e.entropy||e.crackTime)&&t.jsxs("div",{className:"flex justify-between text-xs text-gray-600","aria-label":"Security metrics",children:[void 0!==e.entropy&&t.jsxs("span",{children:["Entropy: ",Math.round(e.entropy)," bits"]}),e.crackTime&&t.jsxs("span",{children:["Crack time: ",e.crackTime]})]}),l&&t.jsx("div",{className:"space-y-1",role:"alert","aria-label":"Password warnings",children:a.map((e,r)=>t.jsxs("div",{className:"flex items-start gap-2 text-xs text-amber-600",children:[t.jsx("span",{className:"text-amber-500 mt-0.5","aria-hidden":"true",children:"⚠"}),t.jsx("span",{children:e})]},`warning-${e}-${r}`))}),u&&t.jsx("div",{className:"space-y-1","aria-label":"Password improvement suggestions",children:o.map((e,r)=>t.jsxs("div",{className:"flex items-start gap-2 text-xs text-blue-600",children:[t.jsx("span",{className:"text-blue-500 mt-0.5","aria-hidden":"true",children:"💡"}),t.jsx("span",{children:e})]},`suggestion-${e}-${r}`))}),void 0!==e.isAcceptable&&t.jsx("div",{className:"text-xs font-medium "+(e.isAcceptable?"text-green-600":"text-red-600"),role:"status","aria-live":"assertive",children:e.isAcceptable?t.jsxs(r.Fragment,{children:[t.jsx("span",{"aria-hidden":"true",children:"✓"})," Password meets security requirements"]},"acceptance-status-true"):t.jsxs(r.Fragment,{children:[t.jsx("span",{"aria-hidden":"true",children:"✗"})," Password does not meet security requirements"]},"acceptance-status-false")})]})});l.displayName="StrengthDetails";const u=r.memo(({score:e,className:s="",label:n})=>{const i=r.useMemo(()=>a(e),[e]),l=r.useMemo(()=>o(e),[e]),u=r.useMemo(()=>({width:`${i}%`,transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)"}),[i]);return t.jsx("div",{className:`w-full bg-gray-200 rounded-full h-1 overflow-hidden ${s}`,role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":4,"aria-label":n||`Password strength: ${e} out of 4`,children:t.jsx("div",{className:`h-1 rounded-full ${l}`,style:u,"data-testid":"password-strength-bar"})})});u.displayName="PasswordStrengthBar";const c={lowercase:{pattern:/[a-z]/},uppercase:{pattern:/[A-Z]/},number:{pattern:/[0-9]/},special:{pattern:/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/},symbol:{pattern:/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/}},d=/\b(no|not|without|must not|cannot)\b/i,h=r.memo(({requirements:e,password:s,custom_check:n,className:i="",title:a="Password Requirements:"})=>{const o=r.useCallback((e,t)=>{const r=null==n?void 0:n(e,t);return void 0!==r?r:function(e,t){if(!t)return!1;const r=e.toLowerCase();let s=!1;for(const[n,i]of Object.entries(c)){if(!r.includes(n))continue;s=!0;const a=i.pattern.test(t);if(d.test(e)&&e.toLowerCase().indexOf(n)>e.toLowerCase().search(d)){if(a)return!1}else if(!a)return!1}const n=e.match(/(\d+)(?:\s*-\s*(\d+))?\s*characters?/i);if(n){s=!0;const e=parseInt(n[1],10),r=n[2]?parseInt(n[2],10):1/0;if(t.length<e||t.length>r)return!1}const i=e.match(/at\s+least\s+(\d+)/i);if(i){s=!0;const e=parseInt(i[1],10);if(t.length<e)return!1}return s}(e,t)},[n]),l=r.useMemo(()=>e.map(e=>({requirement:e,is_met:o(e,s)})),[e,s,o]),u=r.useMemo(()=>l.every(({is_met:e})=>e),[l]);return t.jsxs("div",{className:`password-requirements ${i}`,role:"group","aria-label":a,children:[t.jsx("div",{className:"text-sm font-medium text-gray-700 mb-2",children:a}),t.jsx("ul",{className:"space-y-1",role:"list",children:l.map(({requirement:e,is_met:r})=>t.jsxs("li",{className:"flex items-start gap-2 text-xs",role:"listitem",children:[t.jsx("span",{className:"mt-0.5 transition-colors duration-200 "+(r?"text-green-500":"text-gray-400"),"aria-hidden":"true",children:r?"✓":"○"}),t.jsxs("span",{className:"transition-colors duration-200 "+(r?"text-green-600":"text-gray-600"),children:[e,r&&t.jsx("span",{className:"sr-only",children:" (met)"}),!r&&t.jsx("span",{className:"sr-only",children:" (not met)"})]})]},e))}),u&&t.jsx("div",{className:"sr-only",role:"status","aria-live":"polite",children:"All password requirements have been met"})]})});h.displayName="PasswordRequirements";const m=r.memo(({analysis:e,showDetails:s=!0,className:n="","aria-describedby":i})=>{const u=r.useMemo(()=>a(e.score),[e.score]),c=r.useMemo(()=>o(e.score),[e.score]),d=r.useMemo(()=>e.label||`Strength: ${e.score}/4`,[e.label,e.score]),h=r.useMemo(()=>({width:`${u}%`,transition:"width 0.3s ease, background-color 0.3s ease"}),[u]);return t.jsxs("div",{className:`password-strength-indicator ${n}`,role:"region","aria-label":"Password strength indicator","aria-live":"polite","aria-atomic":"true",children:[t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2 overflow-hidden",role:"progressbar","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":4,"aria-valuetext":d,children:t.jsx("div",{className:`h-2 rounded-full ${c}`,style:h,"data-testid":"strength-bar"})}),t.jsx("span",{className:"text-sm font-medium min-w-[80px] text-right",id:i,children:d})]}),s&&t.jsx(l,{analysis:e})]})});m.displayName="PasswordStrengthIndicator";const f={title:"IDD Dashboard",pages:[],plugins:["Dashboard"],categories:[],sub_categories:{},style:{colors:{"idd-red":"#DD3150","idd-red-20":"#F6CBD3","idd-orange":"#D1823B","idd-orange-20":"#F3DFCE","idd-yellow":"#D9C982","idd-yellow-20":"#F4EFDA","idd-green":"#98BD83","idd-green-20":"#E5EEE0","idd-blue":"#00A89D","idd-blue-20":"#6F6F5","idd-purple":"#4040D8","idd-purple-20":"#CFCFF5","idd-brown":"#7A6C53","idd-brown-20":"#F2F0EE","idd-black":"#19191c","idd-black-20":"#C5C5C6","idd-grey":"#6D6E81","idd-grey-20":"#DCDCE1","idd-white":"#fff","idd-transparent":"transparent","idd-primary-color":"#292929","idd-secondary-color":"#5f696d","idd-tertiary-color":"#d8dfe7","idd-tertiary-color-20":"#ECECEC","idd-active-color":"#ad0000","idd-inactive-color":"#DCDCE1","idd-primary-background":"#ad0000","idd-secondary-background":"#f2f0ee","idd-tertiary-background":"#F6F6F9","idd-active-background":"#7a6c53","idd-inactive-background":"#7a6c531a","idd-shadow-color":"rgba(50,69,71,0.17)"},fontFamily:{"idd-primary-font":"Gotham-Book","idd-primary-font-light":"Gotham-Light","idd-primary-font-regular":"Gotham-Book","idd-primary-font-medium":"Gotham-Medium","idd-primary-font-bold":"Gotham-Bold","idd-secondary-font":"Rubik-Regular","idd-secondary-font-light":"Rubik-Light","idd-secondary-font-regular":"Rubik-Regular","idd-secondary-font-medium":"Rubik-Medium","idd-secondary-font-bold":"Rubik-Bold"},fontStyle:{"idd-font-style":"normal"},fontWeight:{"idd-light-font-weight":"300","idd-regular-font-weight":"normal","idd-medium-font-weight":"medium","idd-bold-font-weight":"bold"},fontSize:{"idd-primary-font-size":"1rem","idd-xtrasmall-font-size":"0.25rem","idd-small-font-size":"0.5rem","idd-medium-font-size":"1.125rem","idd-large-font-size":"1.25rem","idd-xtralarge-font-size":"1.5rem"},letterSpacing:{"idd-character-spacing":"0","idd-body-character-spacing":"0.05"},lineHeight:{"idd-primary-line-spacing":"1.5"},backgroundImage:{"gradient-radial":"radial-gradient(var(--tw-gradient-stops))","gradient-conic":"conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))","signup-theme":"linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/signup-theme.png')"},borderRadius:{"idd-border-radius":"0.3125rem"}}};let p=f;const g=()=>p,y=()=>g(),b=({label:e="Password",onChange:i=()=>{},value:a,componentClass:o="",inputWrapperClass:l="w-full h-[3.125rem] rounded-[0.3125rem] border border-idd-grey",inputClass:u="px-4",appendToInputClass:c="",error:d="",errorColor:h="",errorClass:m="font-idd-primary-font text-idd-primary-font-size !mb-0",isErrorOnlyColor:f=!0,iconColorActive:p="idd-black",iconColorInactive:g="idd-grey",textColorActive:b="idd-black",textColorInactive:w="idd-grey",labelColorActive:v="idd-black",labelColorInactive:x="idd-grey",borderColorActive:k="idd-grey",borderColorInactive:S="idd-grey",toggleVisibilityButtonClass:N="p-1 rounded-sm focus:outline focus-visible:outline focus:outline-1 focus-visible:offset-1 focus:outline-idd-black focus-visible:outline-idd-black",readOnly:T=!1})=>{const[C,O]=r.useState(!1),[D,E]=r.useState(!1),I=y(),j=s.useTailwindConfig(I.style).colors;return t.jsx(s.IDDInput,{label:e,value:a,type:C?"text":"password",componentClass:o,inputWrapperClass:l,inputClass:u,appendToInputClass:`me-4 ${c}`,readOnly:T,activeTextColor:b,inactiveTextColor:w,activeColor:k,inactiveColor:S,activeLabelColor:v,inactiveLabelColor:x,errors:d,errorColor:f?!a||"string"==typeof a&&0===a.length?j[w]:j[b]:h,errorClass:m,errorStyle:f?{color:j["idd-active-color"]}:{},onFocus:()=>E(!0),onBlur:()=>E(!1),appendToInput:t.jsx(s.IDDButton,{buttonClass:N,onPress:()=>O(!C),children:t.jsxs(r.Fragment,{children:[t.jsx("span",{className:"sr-only",children:C?"Hide password":"Show password"}),C?t.jsx("span",{"data-testid":"show-password-icon",children:t.jsx(n.IDDShowPasswordIcon,{color:D?j[p]:j[g]})}):t.jsx("span",{"data-testid":"hide-password-icon",children:t.jsx(n.IDDHidePasswordIcon,{color:D?j[p]:j[g]})})]})}),onChange:e=>{(e=>!!e&&"object"==typeof e&&"target"in e)(e)?i(e):"string"==typeof e&&i({target:{value:e}})}})};b.displayName="Password";const w={default:{base:"",disabled:"opacity-50 cursor-not-allowed"},primary:{base:"text-idd-primary-color bg-idd-tertiary-background border border-idd-transparent hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white focus-visible:bg-idd-active-color focus-visible:text-idd-white",disabled:"bg-idd-tertiary-background text-idd-primary-color cursor-not-allowed"},secondary:{base:"text-idd-active-color bg-idd-white border border-idd-transparent hover:border-idd-active-color focus:border-idd-active-color focus-visible:border-idd-active-color",disabled:"opacity-50 cursor-not-allowed"},tertiary:{base:"text-idd-primary-color bg-idd-white border-0 outline-none hover:underline hover:ouline-none focus:underline focus:ouline-none focus-visible:underline focus-visible:ouline-none",disabled:"opacity-50 cursor-not-allowed"},outline:{base:"text-idd-active-color bg-transparent border border-idd-active-color hover:bg-idd-active-color hover:text-idd-white focus:bg-idd-active-color focus:text-idd-white",disabled:"opacity-50 cursor-not-allowed"},ghost:{base:"text-idd-grey bg-transparent hover:bg-idd-grey-20 hover:text-idd-black focus:bg-idd-grey-20 focus:text-idd-black",disabled:"opacity-50 cursor-not-allowed"},link:{base:"text-idd-active-color bg-transparent border-0 hover:underline hover:decoration-idd-active-color focus:underline focus:decoration-idd-active-color",disabled:"opacity-50 cursor-not-allowed"},danger:{base:"text-idd-white bg-idd-red hover:opacity-90 focus:opacity-90",disabled:"opacity-50 cursor-not-allowed"},success:{base:"text-idd-white bg-idd-green hover:opacity-90 focus:opacity-90",disabled:"opacity-50 cursor-not-allowed"},inverse:{base:"text-idd-white bg-idd-black hover:bg-idd-active-color focus:bg-idd-active-color",disabled:"bg-idd-tertiary-background text-idd-primary-color cursor-not-allowed"}},v={button:"font-idd-primary-font-medium text-idd-primary-font-size text-center py-2 px-4 rounded-[0.3125rem] focus:outline-none focus-visible:outline-none transition-colors duration-200",input:"w-full h-[3.125rem] rounded-[0.3125rem]",error:"font-idd-primary-font text-idd-primary-font-size !mb-0",label:"font-idd-primary-font-medium text-idd-primary-font-size"},x=(e="primary",t=!1,r="")=>{const s=w[e];return`${v.button} ${t?s.disabled:s.base} ${r}`.trim()},k=({children:e,onPress:r,onClick:n,disabled:i=!1,type:a="button",className:o="",variant:l="primary",id:u,role:c,"data-testid":d,"aria-controls":h,"aria-selected":m})=>{const f=r||n||(()=>{});return t.jsx(s.IDDButton,{type:a,id:u,role:c,onPress:f,disabled:i,buttonClass:x(l,i,o),"data-testid":d,"aria-controls":h,"aria-selected":m,children:e})};k.displayName="SimpleButton";const S=r.memo(({label:e,type:r,value:s,onChange:n,errors:i=[],required:a=!1,autoComplete:o,placeholder:l,disabled:u=!1,showErrors:c=!1,showPasswordToggle:d=!1,onTogglePassword:h,showPassword:m=!1})=>{const f=c&&i.length>0,p=`field-${e.toLowerCase().replace(/\s+/g,"-")}`;return t.jsxs("div",{className:"form-field "+(f?"form-field--error":""),children:[t.jsxs("label",{htmlFor:p,className:"form-field__label",children:[e,a&&t.jsx("span",{className:"form-field__required","aria-label":"required",children:"*"})]}),t.jsxs("div",{className:"form-field__input-wrapper",children:[t.jsx("input",{id:p,type:r,value:s,onChange:e=>n(e.target.value),autoComplete:o,placeholder:l,disabled:u,required:a,className:"form-field__input "+(f?"form-field__input--error":""),"aria-invalid":f,"aria-required":a,"aria-describedby":f?`${p}-errors`:void 0}),d&&t.jsx(k,{type:"button",onPress:h,variant:"ghost",className:"form-field__password-toggle",disabled:u,"data-testid":"password-toggle",children:m?"👁️":"👁️‍🗨️"})]}),f&&t.jsx("div",{id:`${p}-errors`,className:"form-field__errors",role:"alert",children:i.map((e,r)=>t.jsx("div",{className:"form-field__error",children:e},r))})]})});function N(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(s=Object.getOwnPropertySymbols(e);n<s.length;n++)t.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(e,s[n])&&(r[s[n]]=e[s[n]])}return r}function T(e,t,r,s){return new(r||(r=Promise))(function(n,i){function a(e){try{l(s.next(e))}catch(e){i(e)}}function o(e){try{l(s.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,o)}l((s=s.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const C=r.memo(e=>{var r,n,{message:i="Loading...",message_class:a="text-idd-primary-font-size text-idd-grey font-idd-primary-font-medium",show:o=!0,size:l,color:u,className:c="","data-testid":d}=e,h=N(e,["message","message_class","show","size","color","className","data-testid"]);const m=y();if(!o)return null;const f=["flex flex-col items-center justify-center",c].join(" "),p=u||(null===(n=null===(r=m.style)||void 0===r?void 0:r.colors)||void 0===n?void 0:n["idd-active-color"])||"#ad0000";return t.jsxs("div",{className:f,"data-testid":d,role:"status","aria-live":"polite","aria-busy":!0,children:[t.jsx(s.IDDLoader,Object.assign({},h,null!=l?{size:l}:{},{squareColor:p})),(null==i?void 0:i.trim())&&t.jsx("p",{className:a,children:i})]})});C.displayName="Loader";const O=r.memo(({isLoading:e,disabled:r=!1,text:s,loadingText:n,className:i=""})=>t.jsxs(k,{type:"submit",disabled:r||e,variant:"primary",className:i,"aria-busy":e,"aria-disabled":r||e,children:[t.jsxs("div",{className:"flex items-center space-x-2",children:[e&&t.jsx("div",{className:"inline-block",children:t.jsx(C,{show:!0,size:"small"})}),t.jsx("span",{className:"submit-button__text",children:e?n:s})]}),e&&t.jsx("span",{id:"submit-loading-text",className:"sr-only",children:"Please wait while we process your request"})]})),D=r.memo(({checked:e,onChange:r,errors:s=[],disabled:n=!1,showErrors:i=!1,termsUrl:a="/terms",privacyUrl:o="/privacy"})=>{const l=i&&s.length>0,u="terms-checkbox";return t.jsxs("div",{className:"terms-checkbox "+(l?"terms-checkbox--error":""),children:[t.jsxs("div",{className:"terms-checkbox__wrapper",children:[t.jsx("input",{id:u,type:"checkbox",checked:e,onChange:e=>r(e.target.checked),disabled:n,className:"terms-checkbox__input "+(l?"terms-checkbox__input--error":""),"aria-invalid":l,"aria-describedby":l?`${u}-errors`:void 0,required:!0}),t.jsxs("label",{htmlFor:u,className:"terms-checkbox__label",children:[t.jsx("span",{className:"terms-checkbox__checkmark","aria-hidden":"true",children:e?"✓":""}),t.jsxs("span",{className:"terms-checkbox__text",children:["I agree to the"," ",t.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"terms-checkbox__link",children:"Terms of Service"})," ","and"," ",t.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"terms-checkbox__link",children:"Privacy Policy"}),t.jsx("span",{className:"terms-checkbox__required","aria-label":"required",children:"*"})]})]})]}),l&&t.jsx("div",{id:`${u}-errors`,className:"terms-checkbox__errors",role:"alert",children:s.map((e,r)=>t.jsx("div",{className:"terms-checkbox__error",children:e},r))})]})}),E={SET_PLUGINS:"set_plugins",SET_CURRENT_PLUGIN:"set_current_plugin",SET_CURRENT_TAB:"set_current_tab",SET_CURRENT_STATE:"set_current_state",SET_CURRENT_VIEW:"set_current_view",SET_CURRENT_ITEM:"set_current_item",COLLAPSED_TOGGLE:"toggle_collapsed",SET_COLOR_MODE:"set_color_mode",TOGGLE_NOTIFICATIONS:"toggle_notifications",SET_SETTING:"set_setting",SET_JWT:"SET_JWT",SET_USER:"SET_USER",RESET:"reset"},I=e=>({type:E.SET_CURRENT_PLUGIN,payload:e}),j=e=>({type:E.SET_CURRENT_TAB,payload:e}),M=e=>({type:E.SET_CURRENT_STATE,payload:e});class _ extends Error{}class L extends _{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class V extends _{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class F extends _{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class $ extends _{}class A extends _{constructor(e){super(`Invalid unit ${e}`)}}class W extends _{}class z extends _{constructor(){super("Zone is an abstract class")}}const P="numeric",Z="short",R="long",q={year:P,month:P,day:P},U={year:P,month:Z,day:P},H={year:P,month:Z,day:P,weekday:Z},B={year:P,month:R,day:P},G={year:P,month:R,day:P,weekday:R},Y={hour:P,minute:P},J={hour:P,minute:P,second:P},X={hour:P,minute:P,second:P,timeZoneName:Z},K={hour:P,minute:P,second:P,timeZoneName:R},Q={hour:P,minute:P,hourCycle:"h23"},ee={hour:P,minute:P,second:P,hourCycle:"h23"},te={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Z},re={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:R},se={year:P,month:P,day:P,hour:P,minute:P},ne={year:P,month:P,day:P,hour:P,minute:P,second:P},ie={year:P,month:Z,day:P,hour:P,minute:P},ae={year:P,month:Z,day:P,hour:P,minute:P,second:P},oe={year:P,month:Z,day:P,weekday:Z,hour:P,minute:P},le={year:P,month:R,day:P,hour:P,minute:P,timeZoneName:Z},ue={year:P,month:R,day:P,hour:P,minute:P,second:P,timeZoneName:Z},ce={year:P,month:R,day:P,weekday:R,hour:P,minute:P,timeZoneName:R},de={year:P,month:R,day:P,weekday:R,hour:P,minute:P,second:P,timeZoneName:R};class he{get type(){throw new z}get name(){throw new z}get ianaName(){return this.name}get isUniversal(){throw new z}offsetName(e,t){throw new z}formatOffset(e,t){throw new z}offset(e){throw new z}equals(e){throw new z}get isValid(){throw new z}}let me=null;class fe extends he{static get instance(){return null===me&&(me=new fe),me}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Lt(e,t,r)}formatOffset(e,t){return At(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const pe=new Map;const ge={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const ye=new Map;class be extends he{static create(e){let t=ye.get(e);return void 0===t&&ye.set(e,t=new be(e)),t}static resetCache(){ye.clear(),pe.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=be.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return Lt(e,t,r,this.name)}formatOffset(e,t){return At(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=function(e){let t=pe.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),pe.set(e,t)),t}(this.name);let[s,n,i,a,o,l,u]=r.formatToParts?function(e,t){const r=e.formatToParts(t),s=[];for(let e=0;e<r.length;e++){const{type:t,value:n}=r[e],i=ge[t];"era"===t?s[i]=n:mt(i)||(s[i]=parseInt(n,10))}return s}(r,t):function(e,t){const r=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,n,i,a,o,l,u,c]=s;return[a,n,i,o,l,u,c]}(r,t);"BC"===a&&(s=1-Math.abs(s));let c=+t;const d=c%1e3;return c-=d>=0?d:1e3+d,(It({year:s,month:n,day:i,hour:24===o?0:o,minute:l,second:u,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let we={};const ve=new Map;function xe(e,t={}){const r=JSON.stringify([e,t]);let s=ve.get(r);return void 0===s&&(s=new Intl.DateTimeFormat(e,t),ve.set(r,s)),s}const ke=new Map;const Se=new Map;let Ne=null;const Te=new Map;function Ce(e){let t=Te.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Te.set(e,t)),t}const Oe=new Map;function De(e,t,r,s){const n=e.listingMode();return"error"===n?null:"en"===n?r(t):s(t)}class Ee{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:n,...i}=r;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...r};r.padTo>0&&(t.minimumIntegerDigits=r.padTo),this.inf=function(e,t={}){const r=JSON.stringify([e,t]);let s=ke.get(r);return void 0===s&&(s=new Intl.NumberFormat(e,t),ke.set(r,s)),s}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return kt(this.floor?Math.floor(e):Ct(e,3),this.padTo)}}class Ie{constructor(e,t,r){let s;if(this.opts=r,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,r=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&be.create(r).valid?(s=r,this.dt=e):(s="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const n={...this.opts};n.timeZone=n.timeZone||s,this.dtf=xe(t,n)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class je{constructor(e,t,r){this.opts={style:"long",...r},!t&&gt()&&(this.rtf=function(e,t={}){const{base:r,...s}=t,n=JSON.stringify([e,s]);let i=Se.get(n);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),Se.set(n,i)),i}(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,r="always",s=!1){const n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&i){const r="days"===e;switch(t){case 1:return r?"tomorrow":`next ${n[e][0]}`;case-1:return r?"yesterday":`last ${n[e][0]}`;case 0:return r?"today":`this ${n[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=n[e],c=s?l?u[1]:u[2]||u[1]:l?n[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Me={firstDay:1,minimalDays:4,weekend:[6,7]};class _e{static fromOpts(e){return _e.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,s,n=!1){const i=e||Xe.defaultLocale,a=i||(n?"en-US":Ne||(Ne=(new Intl.DateTimeFormat).resolvedOptions().locale,Ne)),o=t||Xe.defaultNumberingSystem,l=r||Xe.defaultOutputCalendar,u=vt(s)||Xe.defaultWeekSettings;return new _e(a,o,l,u,i)}static resetCache(){Ne=null,ve.clear(),ke.clear(),Se.clear(),Te.clear(),Oe.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:s}={}){return _e.create(e,t,r,s)}constructor(e,t,r,s,n){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const r=e.indexOf("-u-");if(-1===r)return[e];{let t,s;try{t=xe(e).resolvedOptions(),s=e}catch(n){const i=e.substring(0,r);t=xe(i).resolvedOptions(),s=i}const{numberingSystem:n,calendar:i}=t;return[s,n,i]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=r||o||null,this.weekSettings=s,this.intl=function(e,t,r){return r||t?(e.includes("-u-")||(e+="-u"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===Ce(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?_e.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,vt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return De(this,e,Rt,()=>{const r="ja"===this.intl||this.intl.startsWith("ja-"),s=(t&=!r)?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";if(!this.monthsCache[n][e]){const t=r?e=>this.dtFormatter(e,s).format():e=>this.extract(e,s,"month");this.monthsCache[n][e]=function(e){const t=[];for(let r=1;r<=12;r++){const s=Gs.utc(2009,r,1);t.push(e(s))}return t}(t)}return this.monthsCache[n][e]})}weekdays(e,t=!1){return De(this,e,Bt,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=function(e){const t=[];for(let r=1;r<=7;r++){const s=Gs.utc(2016,11,13+r);t.push(e(s))}return t}(e=>this.extract(e,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return De(this,void 0,()=>Gt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Gs.utc(2016,11,13,9),Gs.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return De(this,e,Kt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Gs.utc(-40,1,1),Gs.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,r){const s=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===r);return s?s.value:null}numberFormatter(e={}){return new Ee(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ie(e,this.intl,t)}relFormatter(e={}){return new je(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const r=JSON.stringify([e,t]);let s=we[r];return s||(s=new Intl.ListFormat(e,t),we[r]=s),s}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Ce(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:yt()?function(e){let t=Oe.get(e);if(!t){const r=new Intl.Locale(e);t="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,"minimalDays"in t||(t={...Me,...t}),Oe.set(e,t)}return t}(this.locale):Me}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Le=null;class Ve extends he{static get utcInstance(){return null===Le&&(Le=new Ve(0)),Le}static instance(e){return 0===e?Ve.utcInstance:new Ve(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Ve(Vt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${At(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${At(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return At(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class Fe extends he{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function $e(e,t){if(mt(e)||null===e)return t;if(e instanceof he)return e;if("string"==typeof e){const r=e.toLowerCase();return"default"===r?t:"local"===r||"system"===r?fe.instance:"utc"===r||"gmt"===r?Ve.utcInstance:Ve.parseSpecifier(r)||be.create(e)}return ft(e)?Ve.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new Fe(e)}const Ae={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},We={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ze=Ae.hanidec.replace(/[\[|\]]/g,"").split("");const Pe=new Map;function Ze({numberingSystem:e},t=""){const r=e||"latn";let s=Pe.get(r);void 0===s&&(s=new Map,Pe.set(r,s));let n=s.get(t);return void 0===n&&(n=new RegExp(`${Ae[r]}${t}`),s.set(t,n)),n}let Re,qe=()=>Date.now(),Ue="system",He=null,Be=null,Ge=null,Ye=60,Je=null;class Xe{static get now(){return qe}static set now(e){qe=e}static set defaultZone(e){Ue=e}static get defaultZone(){return $e(Ue,fe.instance)}static get defaultLocale(){return He}static set defaultLocale(e){He=e}static get defaultNumberingSystem(){return Be}static set defaultNumberingSystem(e){Be=e}static get defaultOutputCalendar(){return Ge}static set defaultOutputCalendar(e){Ge=e}static get defaultWeekSettings(){return Je}static set defaultWeekSettings(e){Je=vt(e)}static get twoDigitCutoffYear(){return Ye}static set twoDigitCutoffYear(e){Ye=e%100}static get throwOnInvalid(){return Re}static set throwOnInvalid(e){Re=e}static resetCaches(){_e.resetCache(),be.resetCache(),Gs.resetCache(),Pe.clear()}}class Ke{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Qe=[0,31,59,90,120,151,181,212,243,273,304,334],et=[0,31,60,91,121,152,182,213,244,274,305,335];function tt(e,t){return new Ke("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function rt(e,t,r){const s=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const n=s.getUTCDay();return 0===n?7:n}function st(e,t,r){return r+(Ot(e)?et:Qe)[t-1]}function nt(e,t){const r=Ot(e)?et:Qe,s=r.findIndex(e=>e<t);return{month:s+1,day:t-r[s]}}function it(e,t){return(e-t+7)%7+1}function at(e,t=4,r=1){const{year:s,month:n,day:i}=e,a=st(s,n,i),o=it(rt(s,n,i),r);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=s-1,u=Mt(l,t,r)):u>Mt(s,t,r)?(l=s+1,u=1):l=s,{weekYear:l,weekNumber:u,weekday:o,...Wt(e)}}function ot(e,t=4,r=1){const{weekYear:s,weekNumber:n,weekday:i}=e,a=it(rt(s,1,t),r),o=Dt(s);let l,u=7*n+i-a-7+t;u<1?(l=s-1,u+=Dt(l)):u>o?(l=s+1,u-=Dt(s)):l=s;const{month:c,day:d}=nt(l,u);return{year:l,month:c,day:d,...Wt(e)}}function lt(e){const{year:t,month:r,day:s}=e;return{year:t,ordinal:st(t,r,s),...Wt(e)}}function ut(e){const{year:t,ordinal:r}=e,{month:s,day:n}=nt(t,r);return{year:t,month:s,day:n,...Wt(e)}}function ct(e,t){if(!mt(e.localWeekday)||!mt(e.localWeekNumber)||!mt(e.localWeekYear)){if(!mt(e.weekday)||!mt(e.weekNumber)||!mt(e.weekYear))throw new $("Cannot mix locale-based week fields with ISO-based week fields");return mt(e.localWeekday)||(e.weekday=e.localWeekday),mt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),mt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function dt(e){const t=pt(e.year),r=xt(e.month,1,12),s=xt(e.day,1,Et(e.year,e.month));return t?r?!s&&tt("day",e.day):tt("month",e.month):tt("year",e.year)}function ht(e){const{hour:t,minute:r,second:s,millisecond:n}=e,i=xt(t,0,23)||24===t&&0===r&&0===s&&0===n,a=xt(r,0,59),o=xt(s,0,59),l=xt(n,0,999);return i?a?o?!l&&tt("millisecond",n):tt("second",s):tt("minute",r):tt("hour",t)}function mt(e){return void 0===e}function ft(e){return"number"==typeof e}function pt(e){return"number"==typeof e&&e%1==0}function gt(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function yt(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function bt(e,t,r){if(0!==e.length)return e.reduce((e,s)=>{const n=[t(s),s];return e&&r(e[0],n[0])===e[0]?e:n},null)[1]}function wt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function vt(e){if(null==e)return null;if("object"!=typeof e)throw new W("Week settings must be an object");if(!xt(e.firstDay,1,7)||!xt(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!xt(e,1,7)))throw new W("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function xt(e,t,r){return pt(e)&&e>=t&&e<=r}function kt(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function St(e){return mt(e)||null===e||""===e?void 0:parseInt(e,10)}function Nt(e){return mt(e)||null===e||""===e?void 0:parseFloat(e)}function Tt(e){if(!mt(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Ct(e,t,r="round"){const s=10**t;switch(r){case"expand":return e>0?Math.ceil(e*s)/s:Math.floor(e*s)/s;case"trunc":return Math.trunc(e*s)/s;case"round":return Math.round(e*s)/s;case"floor":return Math.floor(e*s)/s;case"ceil":return Math.ceil(e*s)/s;default:throw new RangeError(`Value rounding ${r} is out of range`)}}function Ot(e){return e%4==0&&(e%100!=0||e%400==0)}function Dt(e){return Ot(e)?366:365}function Et(e,t){const r=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===r?Ot(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function It(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function jt(e,t,r){return-it(rt(e,1,t),r)+t-1}function Mt(e,t=4,r=1){const s=jt(e,t,r),n=jt(e+1,t,r);return(Dt(e)-s+n)/7}function _t(e){return e>99?e:e>Xe.twoDigitCutoffYear?1900+e:2e3+e}function Lt(e,t,r,s=null){const n=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(r,a).formatToParts(n).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function Vt(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const s=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-s:s)}function Ft(e){const t=Number(e);if("boolean"==typeof e||""===e||!Number.isFinite(t))throw new W(`Invalid unit value ${e}`);return t}function $t(e,t){const r={};for(const s in e)if(wt(e,s)){const n=e[s];if(null==n)continue;r[t(s)]=Ft(n)}return r}function At(e,t){const r=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),n=e>=0?"+":"-";switch(t){case"short":return`${n}${kt(r,2)}:${kt(s,2)}`;case"narrow":return`${n}${r}${s>0?`:${s}`:""}`;case"techie":return`${n}${kt(r,2)}${kt(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Wt(e){return function(e,t){return t.reduce((t,r)=>(t[r]=e[r],t),{})}(e,["hour","minute","second","millisecond"])}const zt=["January","February","March","April","May","June","July","August","September","October","November","December"],Pt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zt=["J","F","M","A","M","J","J","A","S","O","N","D"];function Rt(e){switch(e){case"narrow":return[...Zt];case"short":return[...Pt];case"long":return[...zt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const qt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ut=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ht=["M","T","W","T","F","S","S"];function Bt(e){switch(e){case"narrow":return[...Ht];case"short":return[...Ut];case"long":return[...qt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Gt=["AM","PM"],Yt=["Before Christ","Anno Domini"],Jt=["BC","AD"],Xt=["B","A"];function Kt(e){switch(e){case"narrow":return[...Xt];case"short":return[...Jt];case"long":return[...Yt];default:return null}}function Qt(e,t){let r="";for(const s of e)s.literal?r+=s.val:r+=t(s.val);return r}const er={D:q,DD:U,DDD:B,DDDD:G,t:Y,tt:J,ttt:X,tttt:K,T:Q,TT:ee,TTT:te,TTTT:re,f:se,ff:ie,fff:le,ffff:ce,F:ne,FF:ae,FFF:ue,FFFF:de};class tr{static create(e,t={}){return new tr(e,t)}static parseFormat(e){let t=null,r="",s=!1;const n=[];for(let i=0;i<e.length;i++){const a=e.charAt(i);"'"===a?((r.length>0||s)&&n.push({literal:s||/^\s+$/.test(r),val:""===r?"'":r}),t=null,r="",s=!s):s||a===t?r+=a:(r.length>0&&n.push({literal:/^\s+$/.test(r),val:r}),r=a,t=a)}return r.length>0&&n.push({literal:s||/^\s+$/.test(r),val:r}),n}static macroTokenToFormatOpts(e){return er[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,r=void 0){if(this.opts.forceSimple)return kt(e,t);const s={...this.opts};return t>0&&(s.padTo=t),r&&(s.signDisplay=r),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const r="en"===this.loc.listingMode(),s=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,n=(t,r)=>this.loc.extract(e,t,r),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>r?function(e){return Gt[e.hour<12?0:1]}(e):n({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,s)=>r?function(e,t){return Rt(t)[e.month-1]}(e,t):n(s?{month:t}:{month:t,day:"numeric"},"month"),l=(t,s)=>r?function(e,t){return Bt(t)[e.weekday-1]}(e,t):n(s?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const r=tr.macroTokenToFormatOpts(t);return r?this.formatWithSystemDefault(e,r):t},c=t=>r?function(e,t){return Kt(t)[e.year<0?0:1]}(e,t):n({era:t},"era");return Qt(tr.parseFormat(t),t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return s?n({day:"numeric"},"day"):this.num(e.day);case"dd":return s?n({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?n({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?n({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return s?n({month:"numeric"},"month"):this.num(e.month);case"MM":return s?n({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return s?n({year:"numeric"},"year"):this.num(e.year);case"yy":return s?n({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?n({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?n({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(t)}})}formatDurationFromString(e,t){const r="negativeLargestOnly"===this.opts.signMode?-1:1,s=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},n=tr.parseFormat(t),i=n.reduce((e,{literal:t,val:r})=>t?e:e.concat(r),[]),a=e.shiftTo(...i.map(s).filter(e=>e));return Qt(n,((e,t)=>n=>{const i=s(n);if(i){const s=t.isNegativeDuration&&i!==t.largestUnit?r:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*s,n.length,a)}return n})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const rr=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function sr(...e){const t=e.reduce((e,t)=>e+t.source,"");return RegExp(`^${t}$`)}function nr(...e){return t=>e.reduce(([e,r,s],n)=>{const[i,a,o]=n(t,s);return[{...e,...i},a||r,o]},[{},null,1]).slice(0,2)}function ir(e,...t){if(null==e)return[null,null];for(const[r,s]of t){const t=r.exec(e);if(t)return s(t)}return[null,null]}function ar(...e){return(t,r)=>{const s={};let n;for(n=0;n<e.length;n++)s[e[n]]=St(t[r+n]);return[s,null,r+n]}}const or=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,lr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ur=RegExp(`${lr.source}${`(?:${or.source}?(?:\\[(${rr.source})\\])?)?`}`),cr=RegExp(`(?:[Tt]${ur.source})?`),dr=ar("weekYear","weekNumber","weekDay"),hr=ar("year","ordinal"),mr=RegExp(`${lr.source} ?(?:${or.source}|(${rr.source}))?`),fr=RegExp(`(?: ${mr.source})?`);function pr(e,t,r){const s=e[t];return mt(s)?r:St(s)}function gr(e,t){return[{hours:pr(e,t,0),minutes:pr(e,t+1,0),seconds:pr(e,t+2,0),milliseconds:Tt(e[t+3])},null,t+4]}function yr(e,t){const r=!e[t]&&!e[t+1],s=Vt(e[t+1],e[t+2]);return[{},r?null:Ve.instance(s),t+3]}function br(e,t){return[{},e[t]?be.create(e[t]):null,t+1]}const wr=RegExp(`^T?${lr.source}$`),vr=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function xr(e){const[t,r,s,n,i,a,o,l,u]=e,c="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&c)?-e:e;return[{years:h(Nt(r)),months:h(Nt(s)),weeks:h(Nt(n)),days:h(Nt(i)),hours:h(Nt(a)),minutes:h(Nt(o)),seconds:h(Nt(l),"-0"===l),milliseconds:h(Tt(u),d)}]}const kr={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Sr(e,t,r,s,n,i,a){const o={year:2===t.length?_t(St(t)):St(t),month:Pt.indexOf(r)+1,day:St(s),hour:St(n),minute:St(i)};return a&&(o.second=St(a)),e&&(o.weekday=e.length>3?qt.indexOf(e)+1:Ut.indexOf(e)+1),o}const Nr=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Tr(e){const[,t,r,s,n,i,a,o,l,u,c,d]=e,h=Sr(t,n,s,r,i,a,o);let m;return m=l?kr[l]:u?0:Vt(c,d),[h,new Ve(m)]}const Cr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Or=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Er(e){const[,t,r,s,n,i,a,o]=e;return[Sr(t,n,s,r,i,a,o),Ve.utcInstance]}function Ir(e){const[,t,r,s,n,i,a,o]=e;return[Sr(t,o,r,s,n,i,a),Ve.utcInstance]}const jr=sr(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,cr),Mr=sr(/(\d{4})-?W(\d\d)(?:-?(\d))?/,cr),_r=sr(/(\d{4})-?(\d{3})/,cr),Lr=sr(ur),Vr=nr(function(e,t){return[{year:pr(e,t),month:pr(e,t+1,1),day:pr(e,t+2,1)},null,t+3]},gr,yr,br),Fr=nr(dr,gr,yr,br),$r=nr(hr,gr,yr,br),Ar=nr(gr,yr,br);const Wr=nr(gr);const zr=sr(/(\d{4})-(\d\d)-(\d\d)/,fr),Pr=sr(mr),Zr=nr(gr,yr,br);const Rr="Invalid Duration",qr={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Ur={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...qr},Hr=365.2425,Br=30.436875,Gr={years:{quarters:4,months:12,weeks:52.1775,days:Hr,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:Br,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...qr},Yr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Jr=Yr.slice(0).reverse();function Xr(e,t,r=!1){const s={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new ts(s)}function Kr(e,t){let r=t.milliseconds??0;for(const s of Jr.slice(1))t[s]&&(r+=t[s]*e[s].milliseconds);return r}function Qr(e,t){const r=Kr(e,t)<0?-1:1;Yr.reduceRight((s,n)=>{if(mt(t[n]))return s;if(s){const i=t[s]*r,a=e[n][s],o=Math.floor(i/a);t[n]+=o*r,t[s]-=o*a*r}return n},null),Yr.reduce((r,s)=>{if(mt(t[s]))return r;if(r){const n=t[r]%1;t[r]-=n,t[s]+=n*e[r][s]}return s},null)}function es(e){const t={};for(const[r,s]of Object.entries(e))0!==s&&(t[r]=s);return t}class ts{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let r=t?Gr:Ur;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||_e.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return ts.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new W("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new ts({values:$t(e,ts.normalizeUnit),loc:_e.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ft(e))return ts.fromMillis(e);if(ts.isDuration(e))return e;if("object"==typeof e)return ts.fromObject(e);throw new W(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=function(e){return ir(e,[vr,xr])}(e);return r?ts.fromObject(r,t):ts.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=function(e){return ir(e,[wr,Wr])}(e);return r?ts.fromObject(r,t):ts.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new W("need to specify a reason the Duration is invalid");const r=e instanceof Ke?e:new Ke(e,t);if(Xe.throwOnInvalid)throw new F(r);return new ts({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new A(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?tr.create(this.loc,r).formatDurationFromString(this,e):Rr}toHuman(e={}){if(!this.isValid)return Rr;const t=!1!==e.showZeros,r=Yr.map(r=>{const s=this.values[r];return mt(s)||0===s&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(s)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Ct(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return Gs.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Kr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ts.fromDurationLike(e),r={};for(const e of Yr)(wt(t.values,e)||wt(this.values,e))&&(r[e]=t.get(e)+this.get(e));return Xr(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=ts.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=Ft(e(this.values[r],r));return Xr(this,{values:t},!0)}get(e){return this[ts.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Xr(this,{values:{...this.values,...$t(e,ts.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:s}={}){return Xr(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:r})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Qr(this.matrix,e),Xr(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Xr(this,{values:es(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map(e=>ts.normalizeUnit(e));const t={},r={},s=this.toObject();let n;for(const i of Yr)if(e.indexOf(i)>=0){n=i;let e=0;for(const t in r)e+=this.matrix[t][i]*r[t],r[t]=0;ft(s[i])&&(e+=s[i]);const a=Math.trunc(e);t[i]=a,r[i]=(1e3*e-1e3*a)/1e3}else ft(s[i])&&(r[i]=s[i]);for(const e in r)0!==r[e]&&(t[n]+=e===n?r[e]:r[e]/this.matrix[n][e]);return Qr(this.matrix,t),Xr(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Xr(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return Xr(this,{values:es(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const r of Yr)if(!t(this.values[r],e.values[r]))return!1;return!0}}const rs="Invalid Interval";class ss{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new W("need to specify a reason the Interval is invalid");const r=e instanceof Ke?e:new Ke(e,t);if(Xe.throwOnInvalid)throw new V(r);return new ss({invalid:r})}static fromDateTimes(e,t){const r=Ys(e),s=Ys(t),n=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?ss.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:ss.invalid("missing or invalid end"):ss.invalid("missing or invalid start")}(r,s);return null==n?new ss({start:r,end:s}):n}static after(e,t){const r=ts.fromDurationLike(t),s=Ys(e);return ss.fromDateTimes(s,s.plus(r))}static before(e,t){const r=ts.fromDurationLike(t),s=Ys(e);return ss.fromDateTimes(s.minus(r),s)}static fromISO(e,t){const[r,s]=(e||"").split("/",2);if(r&&s){let e,n,i,a;try{e=Gs.fromISO(r,t),n=e.isValid}catch(s){n=!1}try{i=Gs.fromISO(s,t),a=i.isValid}catch(s){a=!1}if(n&&a)return ss.fromDateTimes(e,i);if(n){const r=ts.fromISO(s,t);if(r.isValid)return ss.after(e,r)}else if(a){const e=ts.fromISO(r,t);if(e.isValid)return ss.before(i,e)}}return ss.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const r=this.start.startOf(e,t);let s;return s=t?.useLocaleWeeks?this.end.reconfigure({locale:r.locale}):this.end,s=s.startOf(e,t),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?ss.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[];let{s:s}=this,n=0;for(;s<this.e;){const e=t[n]||this.e,i=+e>+this.e?this.e:e;r.push(ss.fromDateTimes(s,i)),s=i,n+=1}return r}splitBy(e){const t=ts.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r,{s:s}=this,n=1;const i=[];for(;s<this.e;){const e=this.start.plus(t.mapUnits(e=>e*n));r=+e>+this.e?this.e:e,i.push(ss.fromDateTimes(s,r)),s=r,n+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e===+e.s}abutsEnd(e){return!!this.isValid&&+e.e===+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:ss.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return ss.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const s=[],n=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...n).sort((e,t)=>e.time-t.time);for(const e of i)r+="s"===e.type?1:-1,1===r?t=e.time:(t&&+t!==+e.time&&s.push(ss.fromDateTimes(t,e.time)),t=null);return ss.merge(s)}difference(...e){return ss.xor([this].concat(e)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:rs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=q,t={}){return this.isValid?tr.create(this.s.loc.clone(t),e).formatInterval(this):rs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:rs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:rs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:rs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:rs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ts.invalid(this.invalidReason)}mapEndpoints(e){return ss.fromDateTimes(e(this.s),e(this.e))}}class ns{static hasDST(e=Xe.defaultZone){const t=Gs.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return be.isValidZone(e)}static normalizeZone(e){return $e(e,Xe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:n="gregory"}={}){return(s||_e.create(t,r,n)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:n="gregory"}={}){return(s||_e.create(t,r,n)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||_e.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||_e.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _e.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _e.create(t,null,"gregory").eras(e)}static features(){return{relative:gt(),localeWeek:yt()}}}function is(e,t){const r=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=r(t)-r(e);return Math.floor(ts.fromMillis(s).as("days"))}function as(e,t,r,s){let[n,i,a,o]=function(e,t,r){const s=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const r=is(e,t);return(r-r%7)/7}],["days",is]],n={},i=e;let a,o;for(const[l,u]of s)r.indexOf(l)>=0&&(a=l,n[l]=u(e,t),o=i.plus(n),o>t?(n[l]--,(e=i.plus(n))>t&&(o=e,n[l]--,e=i.plus(n))):e=o);return[e,n,o,a]}(e,t,r);const l=t-n,u=r.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(a<t&&(a=n.plus({[o]:1})),a!==n&&(i[o]=(i[o]||0)+l/(a-n)));const c=ts.fromObject(i,s);return u.length>0?ts.fromMillis(l,s).shiftTo(...u).plus(c):c}function os(e,t=e=>e){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);if(-1!==e[r].search(Ae.hanidec))t+=ze.indexOf(e[r]);else for(const e in We){const[r,n]=We[e];s>=r&&s<=n&&(t+=s-r)}}return parseInt(t,10)}return t}(e))}}const ls=`[ ${String.fromCharCode(160)}]`,us=new RegExp(ls,"g");function cs(e){return e.replace(/\./g,"\\.?").replace(us,ls)}function ds(e){return e.replace(/\./g,"").replace(us," ").toLowerCase()}function hs(e,t){return null===e?null:{regex:RegExp(e.map(cs).join("|")),deser:([r])=>e.findIndex(e=>ds(r)===ds(e))+t}}function ms(e,t){return{regex:e,deser:([,e,t])=>Vt(e,t),groups:t}}function fs(e){return{regex:e,deser:([e])=>e}}const ps={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let gs=null;function ys(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const r=vs(tr.macroTokenToFormatOpts(e.val),t);return null==r||r.includes(void 0)?e:r}(e,t)))}class bs{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=ys(tr.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const r=Ze(t),s=Ze(t,"{2}"),n=Ze(t,"{3}"),i=Ze(t,"{4}"),a=Ze(t,"{6}"),o=Ze(t,"{1,2}"),l=Ze(t,"{1,3}"),u=Ze(t,"{1,6}"),c=Ze(t,"{1,9}"),d=Ze(t,"{2,4}"),h=Ze(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return hs(t.eras("short"),0);case"GG":return hs(t.eras("long"),0);case"y":return os(u);case"yy":case"kk":return os(d,_t);case"yyyy":case"kkkk":return os(i);case"yyyyy":return os(h);case"yyyyyy":return os(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return os(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return os(s);case"MMM":return hs(t.months("short",!0),1);case"MMMM":return hs(t.months("long",!0),1);case"LLL":return hs(t.months("short",!1),1);case"LLLL":return hs(t.months("long",!1),1);case"o":case"S":return os(l);case"ooo":case"SSS":return os(n);case"u":return fs(c);case"uu":return fs(o);case"uuu":case"E":case"c":return os(r);case"a":return hs(t.meridiems(),0);case"EEE":return hs(t.weekdays("short",!1),1);case"EEEE":return hs(t.weekdays("long",!1),1);case"ccc":return hs(t.weekdays("short",!0),1);case"cccc":return hs(t.weekdays("long",!0),1);case"Z":case"ZZ":return ms(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return ms(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return fs(/[a-z_+-/]{1,256}?/i);case" ":return fs(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(r=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,r];this.regex=RegExp(e,"i"),this.handlers=t}var r}explainFromTokens(e){if(this.isValid){const[t,r]=function(e,t,r){const s=e.match(t);if(s){const e={};let t=1;for(const n in r)if(wt(r,n)){const i=r[n],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(s.slice(t,t+a))),t+=a}return[s,e]}return[s,{}]}(e,this.regex,this.handlers),[s,n,i]=r?function(e){let t,r=null;return mt(e.z)||(r=be.create(e.z)),mt(e.Z)||(r||(r=new Ve(e.Z)),t=e.Z),mt(e.q)||(e.M=3*(e.q-1)+1),mt(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),mt(e.u)||(e.S=Tt(e.u)),[Object.keys(e).reduce((t,r)=>{const s=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(r);return s&&(t[s]=e[r]),t},{}),r,t]}(r):[null,null,void 0];if(wt(r,"a")&&wt(r,"H"))throw new $("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:s,zone:n,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ws(e,t,r){return new bs(e,r).explainFromTokens(t)}function vs(e,t){if(!e)return null;const r=tr.create(t,e).dtFormatter((gs||(gs=Gs.fromMillis(1555555555555)),gs)),s=r.formatToParts(),n=r.resolvedOptions();return s.map(t=>function(e,t,r){const{type:s,value:n}=e;if("literal"===s){const e=/^\s+$/.test(n);return{literal:!e,val:e?" ":n}}const i=t[s];let a=s;"hour"===s&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":r.hour12?"hour12":"hour24");let o=ps[a];if("object"==typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,n))}const xs="Invalid DateTime",ks=864e13;function Ss(e){return new Ke("unsupported zone",`the zone "${e.name}" is not supported`)}function Ns(e){return null===e.weekData&&(e.weekData=at(e.c)),e.weekData}function Ts(e){return null===e.localWeekData&&(e.localWeekData=at(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Cs(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Gs({...r,...t,old:r})}function Os(e,t,r){let s=e-60*t*1e3;const n=r.offset(s);if(t===n)return[s,t];s-=60*(n-t)*1e3;const i=r.offset(s);return n===i?[s,n]:[e-60*Math.min(n,i)*1e3,Math.max(n,i)]}function Ds(e,t){const r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Es(e,t,r){return Os(It(e),t,r)}function Is(e,t){const r=e.o,s=e.c.year+Math.trunc(t.years),n=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:s,month:n,day:Math.min(e.c.day,Et(s,n))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=ts.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=It(i);let[l,u]=Os(o,r,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function js(e,t,r,s,n,i){const{setZone:a,zone:o}=r;if(e&&0!==Object.keys(e).length||t){const s=t||o,n=Gs.fromObject(e,{...r,zone:s,specificOffset:i});return a?n:n.setZone(o)}return Gs.invalid(new Ke("unparsable",`the input "${n}" can't be parsed as ${s}`))}function Ms(e,t,r=!0){return e.isValid?tr.create(_e.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function _s(e,t,r){const s=e.c.year>9999||e.c.year<0;let n="";if(s&&e.c.year>=0&&(n+="+"),n+=kt(e.c.year,s?6:4),"year"===r)return n;if(t){if(n+="-",n+=kt(e.c.month),"month"===r)return n;n+="-"}else if(n+=kt(e.c.month),"month"===r)return n;return n+=kt(e.c.day),n}function Ls(e,t,r,s,n,i,a){let o=!r||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=kt(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=kt(e.c.minute),"minute"===a)break;o&&(l+=":",l+=kt(e.c.second))}else{if(l+=kt(e.c.minute),"minute"===a)break;o&&(l+=kt(e.c.second))}if("second"===a)break;!o||s&&0===e.c.millisecond||(l+=".",l+=kt(e.c.millisecond,3))}return n&&(e.isOffsetFixed&&0===e.offset&&!i?l+="Z":e.o<0?(l+="-",l+=kt(Math.trunc(-e.o/60)),l+=":",l+=kt(Math.trunc(-e.o%60))):(l+="+",l+=kt(Math.trunc(e.o/60)),l+=":",l+=kt(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const Vs={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Fs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},$s={ordinal:1,hour:0,minute:0,second:0,millisecond:0},As=["year","month","day","hour","minute","second","millisecond"],Ws=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],zs=["year","ordinal","hour","minute","second","millisecond"];function Ps(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new A(e);return t}function Zs(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ps(e)}}function Rs(e,t){const r=$e(t.zone,Xe.defaultZone);if(!r.isValid)return Gs.invalid(Ss(r));const s=_e.fromObject(t);let n,i;if(mt(e.year))n=Xe.now();else{for(const t of As)mt(e[t])&&(e[t]=Vs[t]);const t=dt(e)||ht(e);if(t)return Gs.invalid(t);const s=function(e){if(void 0===Hs&&(Hs=Xe.now()),"iana"!==e.type)return e.offset(Hs);const t=e.name;let r=Bs.get(t);return void 0===r&&(r=e.offset(Hs),Bs.set(t,r)),r}(r);[n,i]=Es(e,s,r)}return new Gs({ts:n,zone:r,loc:s,o:i})}function qs(e,t,r){const s=!!mt(r.round)||r.round,n=mt(r.rounding)?"trunc":r.rounding,i=(e,i)=>{e=Ct(e,s||r.calendary?0:2,r.calendary?"round":n);return t.loc.clone(r).relFormatter(r).format(e,i)},a=s=>r.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(r.unit)return i(a(r.unit),r.unit);for(const e of r.units){const t=a(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,r.units[r.units.length-1])}function Us(e){let t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}let Hs;const Bs=new Map;class Gs{constructor(e){const t=e.zone||Xe.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new Ke("invalid input"):null)||(t.isValid?null:Ss(t));this.ts=mt(e.ts)?Xe.now():e.ts;let s=null,n=null;if(!r){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,n]=[e.old.c,e.old.o];else{const i=ft(e.o)&&!e.old?e.o:t.offset(this.ts);s=Ds(this.ts,i),r=Number.isNaN(s.year)?new Ke("invalid input"):null,s=r?null:s,n=r?null:i}}this._zone=t,this.loc=e.loc||_e.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=n,this.isLuxonDateTime=!0}static now(){return new Gs({})}static local(){const[e,t]=Us(arguments),[r,s,n,i,a,o,l]=t;return Rs({year:r,month:s,day:n,hour:i,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=Us(arguments),[r,s,n,i,a,o,l]=t;return e.zone=Ve.utcInstance,Rs({year:r,month:s,day:n,hour:i,minute:a,second:o,millisecond:l},e)}static fromJSDate(e,t={}){const r=(s=e,"[object Date]"===Object.prototype.toString.call(s)?e.valueOf():NaN);var s;if(Number.isNaN(r))return Gs.invalid("invalid input");const n=$e(t.zone,Xe.defaultZone);return n.isValid?new Gs({ts:r,zone:n,loc:_e.fromObject(t)}):Gs.invalid(Ss(n))}static fromMillis(e,t={}){if(ft(e))return e<-ks||e>ks?Gs.invalid("Timestamp out of range"):new Gs({ts:e,zone:$e(t.zone,Xe.defaultZone),loc:_e.fromObject(t)});throw new W(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ft(e))return new Gs({ts:1e3*e,zone:$e(t.zone,Xe.defaultZone),loc:_e.fromObject(t)});throw new W("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=$e(t.zone,Xe.defaultZone);if(!r.isValid)return Gs.invalid(Ss(r));const s=_e.fromObject(t),n=$t(e,Zs),{minDaysInFirstWeek:i,startOfWeek:a}=ct(n,s),o=Xe.now(),l=mt(t.specificOffset)?r.offset(o):t.specificOffset,u=!mt(n.ordinal),c=!mt(n.year),d=!mt(n.month)||!mt(n.day),h=c||d,m=n.weekYear||n.weekNumber;if((h||u)&&m)throw new $("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&u)throw new $("Can't mix ordinal dates with month/day");const f=m||n.weekday&&!h;let p,g,y=Ds(o,l);f?(p=Ws,g=Fs,y=at(y,i,a)):u?(p=zs,g=$s,y=lt(y)):(p=As,g=Vs);let b=!1;for(const e of p){mt(n[e])?n[e]=b?g[e]:y[e]:b=!0}const w=f?function(e,t=4,r=1){const s=pt(e.weekYear),n=xt(e.weekNumber,1,Mt(e.weekYear,t,r)),i=xt(e.weekday,1,7);return s?n?!i&&tt("weekday",e.weekday):tt("week",e.weekNumber):tt("weekYear",e.weekYear)}(n,i,a):u?function(e){const t=pt(e.year),r=xt(e.ordinal,1,Dt(e.year));return t?!r&&tt("ordinal",e.ordinal):tt("year",e.year)}(n):dt(n),v=w||ht(n);if(v)return Gs.invalid(v);const x=f?ot(n,i,a):u?ut(n):n,[k,S]=Es(x,l,r),N=new Gs({ts:k,zone:r,o:S,loc:s});return n.weekday&&h&&e.weekday!==N.weekday?Gs.invalid("mismatched weekday",`you can't specify both a weekday of ${n.weekday} and a date of ${N.toISO()}`):N.isValid?N:Gs.invalid(N.invalid)}static fromISO(e,t={}){const[r,s]=function(e){return ir(e,[jr,Vr],[Mr,Fr],[_r,$r],[Lr,Ar])}(e);return js(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=function(e){return ir(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Nr,Tr])}(e);return js(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=function(e){return ir(e,[Cr,Er],[Or,Er],[Dr,Ir])}(e);return js(r,s,t,"HTTP",t)}static fromFormat(e,t,r={}){if(mt(e)||mt(t))throw new W("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:n=null}=r,i=_e.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0}),[a,o,l,u]=function(e,t,r){const{result:s,zone:n,specificOffset:i,invalidReason:a}=ws(e,t,r);return[s,n,i,a]}(i,e,t);return u?Gs.invalid(u):js(a,o,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return Gs.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,s]=function(e){return ir(e,[zr,Vr],[Pr,Zr])}(e);return js(r,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new W("need to specify a reason the DateTime is invalid");const r=e instanceof Ke?e:new Ke(e,t);if(Xe.throwOnInvalid)throw new L(r);return new Gs({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=vs(e,_e.fromObject(t));return r?r.map(e=>e?e.val:null).join(""):null}static expandFormat(e,t={}){return ys(tr.parseFormat(e),_e.fromObject(t)).map(e=>e.val).join("")}static resetCache(){Hs=void 0,Bs.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ns(this).weekYear:NaN}get weekNumber(){return this.isValid?Ns(this).weekNumber:NaN}get weekday(){return this.isValid?Ns(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ts(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ts(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ts(this).weekYear:NaN}get ordinal(){return this.isValid?lt(this.c).ordinal:NaN}get monthShort(){return this.isValid?ns.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ns.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ns.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ns.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=It(this.c),s=this.zone.offset(r-e),n=this.zone.offset(r+e),i=this.zone.offset(r-s*t),a=this.zone.offset(r-n*t);if(i===a)return[this];const o=r-i*t,l=r-a*t,u=Ds(o,i),c=Ds(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Cs(this,{ts:o}),Cs(this,{ts:l})]:[this]}get isInLeapYear(){return Ot(this.year)}get daysInMonth(){return Et(this.year,this.month)}get daysInYear(){return this.isValid?Dt(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:s}=tr.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Ve.instance(e),t)}toLocal(){return this.setZone(Xe.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if((e=$e(e,Xe.defaultZone)).equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||r){const t=e.offset(this.ts),r=this.toObject();[s]=Es(r,t,e)}return Cs(this,{ts:s,zone:e})}return Gs.invalid(Ss(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){return Cs(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=$t(e,Zs),{minDaysInFirstWeek:r,startOfWeek:s}=ct(t,this.loc),n=!mt(t.weekYear)||!mt(t.weekNumber)||!mt(t.weekday),i=!mt(t.ordinal),a=!mt(t.year),o=!mt(t.month)||!mt(t.day),l=a||o,u=t.weekYear||t.weekNumber;if((l||i)&&u)throw new $("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&i)throw new $("Can't mix ordinal dates with month/day");let c;n?c=ot({...at(this.c,r,s),...t},r,s):mt(t.ordinal)?(c={...this.toObject(),...t},mt(t.day)&&(c.day=Math.min(Et(c.year,c.month),c.day))):c=ut({...lt(this.c),...t});const[d,h]=Es(c,this.o,this.zone);return Cs(this,{ts:d,o:h})}plus(e){if(!this.isValid)return this;return Cs(this,Is(this,ts.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Cs(this,Is(this,ts.fromDurationLike(e).negate()))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},s=ts.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0}if("weeks"===s)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(r.weekNumber=this.weekNumber-1),r.weekday=e}else r.weekday=1;if("quarters"===s){const e=Math.ceil(this.month/3);r.month=3*(e-1)+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?tr.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):xs}toLocaleString(e=q,t={}){return this.isValid?tr.create(this.loc.clone(t),e).formatDateTime(this):xs}toLocaleParts(e={}){return this.isValid?tr.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:n=!1,precision:i="milliseconds"}={}){if(!this.isValid)return null;const a="extended"===e;let o=_s(this,a,i=Ps(i));return As.indexOf(i)>=3&&(o+="T"),o+=Ls(this,a,t,r,s,n,i),o}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?_s(this,"extended"===e,Ps(t)):null}toISOWeekDate(){return Ms(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:n=!1,format:i="extended",precision:a="milliseconds"}={}){if(!this.isValid)return null;return a=Ps(a),(s&&As.indexOf(a)>=3?"T":"")+Ls(this,"extended"===i,t,e,r,n,a)}toRFC2822(){return Ms(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ms(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?_s(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(r&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ms(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():xs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return ts.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},n=(o=t,Array.isArray(o)?o:[o]).map(ts.normalizeUnit),i=e.valueOf()>this.valueOf(),a=as(i?this:e,i?e:this,n,s);var o;return i?a.negate():a}diffNow(e="milliseconds",t={}){return this.diff(Gs.now(),e,t)}until(e){return this.isValid?ss.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const s=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(t,r)<=s&&s<=n.endOf(t,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Gs.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(s=e.unit,n=void 0),qs(t,this.plus(r),{...e,numeric:"always",units:s,unit:n})}toRelativeCalendar(e={}){return this.isValid?qs(e.base||Gs.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Gs.isDateTime))throw new W("min requires all arguments be DateTimes");return bt(e,e=>e.valueOf(),Math.min)}static max(...e){if(!e.every(Gs.isDateTime))throw new W("max requires all arguments be DateTimes");return bt(e,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:s=null,numberingSystem:n=null}=r;return ws(_e.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return Gs.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:s=null}=t,n=_e.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new bs(n,e)}static fromFormatParser(e,t,r={}){if(mt(e)||mt(t))throw new W("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:n=null}=r,i=_e.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0});if(!i.equals(t.locale))throw new W(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:u}=t.explainFromTokens(e);return u?Gs.invalid(u):js(a,o,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return q}static get DATE_MED(){return U}static get DATE_MED_WITH_WEEKDAY(){return H}static get DATE_FULL(){return B}static get DATE_HUGE(){return G}static get TIME_SIMPLE(){return Y}static get TIME_WITH_SECONDS(){return J}static get TIME_WITH_SHORT_OFFSET(){return X}static get TIME_WITH_LONG_OFFSET(){return K}static get TIME_24_SIMPLE(){return Q}static get TIME_24_WITH_SECONDS(){return ee}static get TIME_24_WITH_SHORT_OFFSET(){return te}static get TIME_24_WITH_LONG_OFFSET(){return re}static get DATETIME_SHORT(){return se}static get DATETIME_SHORT_WITH_SECONDS(){return ne}static get DATETIME_MED(){return ie}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return oe}static get DATETIME_FULL(){return le}static get DATETIME_FULL_WITH_SECONDS(){return ue}static get DATETIME_HUGE(){return ce}static get DATETIME_HUGE_WITH_SECONDS(){return de}}function Ys(e){if(Gs.isDateTime(e))return e;if(e&&e.valueOf&&ft(e.valueOf()))return Gs.fromJSDate(e);if(e&&"object"==typeof e)return Gs.fromObject(e);throw new W(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Js="join-time",Xs="time-spent",Ks=(e,t)=>({type:"PAGE_VIEW",data:{pageId:e,userId:t}}),Qs=Ks,en=new i.Tracker([(e,t)=>{"undefined"!=typeof window&&void 0!==window.dataLayer&&window.dataLayer.push(e)}]);class tn extends r.Component{constructor(){super(...arguments),this.state={hasError:!1},this.handle_retry=()=>{var e,t;null===(t=(e=this.props).onRetry)||void 0===t||t.call(e),this.setState({hasError:!1,error:void 0})}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidUpdate(e){e.children!==this.props.children&&this.state.hasError&&this.setState({hasError:!1,error:void 0})}componentDidCatch(e,t){var r,s;console.error("ErrorBoundary caught an error:",e,t),null===(s=(r=this.props).onError)||void 0===s||s.call(r,e,t)}render(){var e;if(this.state.hasError&&this.state.error){const e=this.props.fallback;return"function"==typeof e?e(this.state.error):null!=e?e:this.render_default_fallback()}return null!==(e=this.props.children)&&void 0!==e?e:null}render_default_fallback(){return t.jsx("div",{className:"flex items-center justify-center h-full w-full p-4",role:"alert","aria-live":"assertive","aria-describedby":"error-boundary-message",children:t.jsxs("div",{className:"text-center",id:"error-boundary-message",children:[t.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Something went wrong"}),t.jsx("p",{className:"text-gray-600 mb-4",children:"An error occurred while loading this component."}),t.jsx(s.IDDButton,{type:"button",onPress:this.handle_retry,buttonClass:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600","aria-label":"Try again",children:"Try again"})]})})}}tn.displayName="ErrorBoundary";const rn=r.memo(({id:e,idsArray:i,onDelete:a=()=>{},onBlur:o=()=>{},link:l,className:u=""})=>{var c,d,h,m;const f=y(),p=s.useTailwindConfig(f.style),[g,b]=r.useState(p.colors["idd-primary-black"]),[w,v]=r.useState({id:"",text:"",url:""});r.useEffect(()=>{l&&(l.path&&l.path.length>0?v({id:l.id,text:l.text,url:l.path}):v(l))},[l]);return t.jsxs("div",{className:`flex justify-between items-center ${u}`,onBlur:t=>{t.stopPropagation(),o(Object.assign(Object.assign({},w),{id:e}))},children:[t.jsx(s.IDDInput,{id:`link-${e}`,componentClass:"w-[45%]",type:"text",label:"Link Text",labelClass:"text-capitalize",showLabel:Boolean(null===(c=w.text)||void 0===c?void 0:c.length),placeholder:"Link Text",value:null!==(d=w.text)&&void 0!==d?d:"",inputClass:"ps-3",onChange:e=>{v(t=>Object.assign(Object.assign({},t),{text:e.target.value}))}}),t.jsx(s.IDDInput,{id:`url-${e}`,componentClass:"w-[45%]",type:"url",label:"URL",showLabel:Boolean(null===(h=w.url)||void 0===h?void 0:h.length),placeholder:"URL",value:null!==(m=w.url)&&void 0!==m?m:"",inputClass:"ps-3",onChange:e=>{v(t=>Object.assign(Object.assign({},t),{url:e.target.value}))}}),t.jsx(s.IDDButton,{id:`removeLink-${e}`,onPress:()=>{const t=i?i.filter(t=>t!==e):[];a(t)},onMouseEnter:()=>b(p.colors["idd-red"]),onFocus:()=>b(p.colors["idd-red"]),onMouseLeave:()=>b(p.colors["idd-primary-black"]),onBlur:()=>b(p.colors["idd-primary-black"]),isSecondary:!0,buttonClass:"flex items-center justify-center border-0 rounded-sm w-[1.5625rem] h-[1.5625rem] p-0",children:t.jsxs(r.Fragment,{children:[t.jsx("span",{className:"sr-only",children:"remove link"}),t.jsx(n.IDDXIcon,{wrapperClass:"flex justify-center items-center",color:g})]})})]})}),sn={signup:"bg-signup-theme",default:"bg-signup-theme"},nn=({children:e,className:r,variant:s="signup"})=>{const n=[`${sn[s]} bg-cover bg-center bg-no-repeat`,null!=r?r:"flex items-center justify-center min-h-screen w-full p-5"].filter(Boolean).join(" ");return t.jsx(tn,{children:t.jsx("div",{className:n,children:e})})};nn.displayName="Layout";const an=({label:e,labelClass:r,componentClass:n,id:i,onChange:a,value:o,placeholder:l,type:u="text",readOnly:c=!1,disabled:d,required:h,disableHtmlValidation:m=!1,onBlur:f,onFocus:p,error:g="",errorColor:b="",errorClass:w="font-idd-primary-font text-idd-primary-font-size !mb-0",isErrorOnlyColor:v=!0,inputWrapperClass:x="w-full h-[3.125rem] rounded-[0.3125rem] border border-idd-grey",inputClass:k="px-4",activeColor:S="idd-black",inactiveColor:N="idd-grey",activeTextColor:T="idd-black",inactiveTextColor:C="idd-grey",activeLabelColor:O="idd-black",inactiveLabelColor:D="idd-grey",disabledColor:E="idd-grey"})=>{const I=y(),j=s.useTailwindConfig(I.style).colors,M=(e,t="idd-black")=>{var r,s;return null!==(s=null!==(r=j[e])&&void 0!==r?r:j[t])&&void 0!==s?s:""},_=c?E:S,L=null==o||"string"==typeof o&&0===o.length?N:S,V=`${c?"pointer-events-none":""} ${k}`,F=m&&"email"===u?"text":u,$=Object.assign(Object.assign({id:i,label:e,labelClass:r,componentClass:n,value:o,placeholder:l,type:F,readOnly:c,disabled:d,onBlur:f,onFocus:p,activeColor:M(_),inactiveColor:M(L),activeLabelColor:M(O),inactiveLabelColor:M(D),activeTextColor:M(T),inactiveTextColor:M(C),inputWrapperClass:x,inputClass:V,errors:g,errorColor:v?M(L):b,errorClass:w,errorStyle:v?{color:M(_)}:{}},null!=a&&{onChange:a}),void 0!==h&&!m&&{required:h});return t.jsx(s.IDDInput,Object.assign({},$))};an.displayName="TextInput";const on={small:"max-w-md",medium:"max-w-lg",large:"max-w-2xl",full:"max-w-full mx-4"},ln=e=>{var{children:r,isOpen:n,onClose:i,title:a="Modal",anchorClass:o="",titleClass:l="sr-only",bodyClass:u="p-6",headerClass:c="flex items-center justify-between p-6 border-b border-gray-200",showCloseButton:d=!0,showSubmitButton:h=!1,submitText:m="Submit",size:f="",className:p="",onSubmit:g=()=>{},xWidth:y="1rem",xHeight:b="1rem",activeXColor:w="#AD0000",inactiveXColor:v="#292929",modalXClass:x="hover:bg-idd-white focus:bg-idd-white focus-visible:bg-idd-white hover:!outline-idd-active-color focus:!outline-idd-active-color focus-visible:!outline-idd-active-color p-3 rounded-sm"}=e,k=N(e,["children","isOpen","onClose","title","anchorClass","titleClass","bodyClass","headerClass","showCloseButton","showSubmitButton","submitText","size","className","onSubmit","xWidth","xHeight","activeXColor","inactiveXColor","modalXClass"]);if(!n)return null;const S=`bg-white rounded-lg ${f in on?on[f]:""} w-full ${p}`.trim(),T=Object.assign(Object.assign({},k),{title:a,titleClass:l,onCancel:i,xCancel:d,showCancelButton:!1,submitText:m,submitClass:h?"":"hidden",bodyClass:u,backdrop:!0,backdropCancel:!0,contentClass:S,headerClass:c,onSubmit:g,xWidth:y,xHeight:b,activeXColor:w,inactiveXColor:v,modalXClass:x});return t.jsx(s.IDDModal,Object.assign({},T,{children:r}))};ln.displayName="Modal";const un=e=>{var{children:r,title:n,subtitle:i,subtitleClass:a="text-sm text-gray-600",className:o="border-gray-200 rounded-lg",headerSize:l=s.HeaderSize.H3,padding:u="medium",shadow:c="medium",border:d=!0,"data-testid":h}=e,m=N(e,["children","title","subtitle","subtitleClass","className","headerSize","padding","shadow","border","data-testid"]);const f=["bg-white",{none:"",small:"shadow-sm",medium:"shadow-md",large:"shadow-lg"}[c],d?"border":"",o].filter(Boolean).join(" "),p={none:"",small:"p-3",medium:"p-6",large:"p-8"}[u];return t.jsx(s.IDDCard,Object.assign({headerText:n,headerSize:l,containerClass:f,"data-testid":h},m,{children:t.jsxs("div",{className:p,children:[i&&t.jsx("div",{className:a,children:i}),r]})}))};un.displayName="Card";const cn=[],dn=r.createContext(void 0),hn=({plugins:e,current_plugin_id:r,on_select_plugin:s,tab_panel_id:n,pluginListWrapperClass:i="mb-4",pluginListHeadingClass:a="text-lg text-idd-primary-font-medium mb-2",pluginListButtonsWrapperClass:o="flex flex-wrap gap-2",pluginListButtonClass:l=""})=>{if(0===e.length)return null;return t.jsxs("div",{className:i,"data-testid":"plugin-list",children:[t.jsx("h3",{id:"plugin-list-heading",className:a,children:"Available Plugins:"}),t.jsx("div",{role:"tablist","aria-labelledby":"plugin-list-heading",className:o,onKeyDown:t=>{if("ArrowLeft"===t.key||"ArrowRight"===t.key){const n=e.findIndex(e=>e.id===r);if(n<0)return;const i="ArrowLeft"===t.key?n-1:n+1,a=e[i];a&&(t.preventDefault(),s(a.id))}},children:e.map(e=>{const i=r===e.id;return t.jsx(k,{id:`plugin-tab-${e.id}`,role:"tab",onPress:()=>s(e.id),"aria-controls":n,"aria-selected":i,variant:i?"primary":"tertiary",className:l,"data-testid":`plugin-list-item-${e.id}`,children:e.name},e.id)})})]})},mn=({plugins:e,current_plugin_id:r,current_tab_index:s,tab_panel_id:n,plugin_content_wrapper_class:i=""})=>{if(!r||0===e.length)return null;const a=e.find(e=>e.id===r);if(!a||!a.tabs||0===a.tabs.length)return null;const o=a.tabs[s];return o&&o.content?t.jsx("div",{id:n,className:i,role:"tabpanel","aria-label":o.name,"aria-labelledby":`plugin-tab-${r}`,children:o.content}):null};function fn(e,t){var r;if(!(null===(r=null==e?void 0:e.tabs)||void 0===r?void 0:r.length))return 0;const s=e.tabs.length-1;return Math.max(0,Math.min(t,s))}function pn(e){return Array.isArray(e)?e:[]}function gn(e,t){const r=pn(e),s=pn(t);return r.filter(e=>!s.includes(e))}const yn=(e,...t)=>T(void 0,[e,...t],void 0,function*(e,t=5e3){return e.startsWith("data:")||e.startsWith("url(")?{exists:!0,fallbackUsed:!1}:new Promise(r=>{const s=new Image,n=setTimeout(()=>{r({exists:!1,error:"Asset loading timeout",fallbackUsed:!0})},t);s.onload=()=>{clearTimeout(n),r({exists:!0,fallbackUsed:!1})},s.onerror=()=>{clearTimeout(n),r({exists:!1,error:"Asset failed to load",fallbackUsed:!0})},s.src=e})}),bn=(e,t)=>T(void 0,void 0,void 0,function*(){const r=e.map(e=>T(void 0,void 0,void 0,function*(){return{path:e,result:yield yn(e,t)}}));return(yield Promise.all(r)).reduce((e,{path:t,result:r})=>(e[t]=r,e),{})}),wn={SIGNUP_THEME:"/signup-theme.png",LOGO_ENVIROME:"/logo-envirome.png",BVOC:"/bvoc.png",LOGO:"/logo.png"};function vn(e){let t="";if(e){const r=e;t=r.address_1&&r.address_1.length>0?r.address_1+", ":"",r.address_2&&r.address_2.length>0?t+=r.address_2+", ":t+="",r.city&&r.city.length>0?t+=r.city+", ":t+="",r.state&&r.state.length>0?t+=r.state:t+="",r.zip&&r.zip.length>0&&(t+=" "+r.zip)}return t}function xn(e){return"EVALUATOR"===e?"MODERATOR":e}const kn=["a","b","i","em","strong","br","p","span"];function Sn(e){if(!e)return e;if("undefined"!=typeof window){return require("dompurify").sanitize(e,{ALLOWED_TAGS:kn})}return function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}(e)}function Nn(e,t){return e&&e.length>t?e.slice(0,t)+"...":e}function Tn(e){return/<[a-z][\s\S]*>/i.test(e)}function Cn(e,t){var r;for(let s=0;s<e.length;s++){const n=String(null!==(r=e[s])&&void 0!==r?r:""),i=Tn(n);t.push({text:n,has_links:i})}}const On=Nn,Dn=gn,En=vn,In=xn,jn=r.createContext(null),Mn=()=>{const e=r.useContext(jn);if(!e)throw new Error("useError must be used within an ErrorProvider");return e},_n=({error:e,onClose:r})=>t.jsxs("div",{className:`text-white p-4 rounded-lg shadow-lg ring-2 ${(()=>{switch(e.type){case"success":return"ring-idd-green";case"warning":return"ring-idd-yellow";case"info":return"ring-idd-purple";default:return"ring-idd-active-color"}})()} flex items-start gap-3 max-w-md`,children:[t.jsx("div",{className:"flex-shrink-0 mt-0.5",children:(()=>{switch(e.type){case"success":return t.jsx(n.IDDOutlineCheckmarkIcon,{});case"warning":return t.jsx(n.IDDOutlineWarningIcon,{});case"info":return t.jsx(n.IDDInfoIcon,{});default:return t.jsx(n.IDDOutlineXIcon,{})}})()}),t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("div",{className:"font-idd-primary-font-regular text-lg leading-relaxed",children:[t.jsx("span",{className:"font-idd-primary-font-bold text-lg",children:(()=>{switch(e.type){case"success":return"Success: ";case"warning":return"Warning: ";case"info":return"Info: ";default:return"Error: "}})()})," ",e.message]})}),t.jsx(s.IDDButton,{buttonClass:"border-0 bg-idd-transparent ms-auto",onPress:()=>r(e.id),"aria-label":"Close",children:t.jsx(n.IDDXIcon,{})})]});exports.ActionTypes=E,exports.ActivityProvider=function({children:e}){return r.useEffect(()=>{const e=Gs.local();return localStorage.setItem(Js,JSON.stringify(e.toSeconds())),()=>{const e=Gs.local(),t=localStorage.getItem(Xs),r=localStorage.getItem(Js);if(null===r)return;const s=parseFloat(r);if(Number.isNaN(s))return;const n=(null!==t?parseFloat(t):0)+(e.toSeconds()-s)/60;localStorage.setItem(Xs,JSON.stringify(n))}},[]),t.jsx(i.TrackerProvider,{tracker:en,children:e})},exports.CancelActionButton=({children:e,onPress:r,disabled:n=!1,type:i="button",className:a="",variant:o="outline","data-testid":l})=>t.jsx(s.IDDButton,{type:i,onPress:r||(()=>{}),disabled:n,buttonClass:x(o,n,`px-5 ${a}`),"data-testid":l,children:e}),exports.Card=un,exports.ConfirmActionButton=({children:e,onPress:r,disabled:n=!1,type:i="submit",className:a="font-idd-primary-font-medium text-idd-primary-font-size",variant:o="primary","data-testid":l})=>t.jsx(s.IDDButton,{type:i,onPress:r||(()=>{}),disabled:n,buttonClass:x(o,n,`px-5 text-idd-primary-font-size ${a}`),"data-testid":l,children:e}),exports.ContentItem=({type:e,style:r,text:s,items:n,orderedListStyle:i="",unorderedListStyle:a="",paragraphStyle:o=""})=>{if("list"===e){if("ordered"===r){const e=[];return n&&Array.isArray(n)&&Cn(n,e),t.jsx("ol",{className:i,children:e.map((e,r)=>e.has_links?t.jsx("li",{dangerouslySetInnerHTML:{__html:Sn(e.text)}},r):t.jsx("li",{children:e.text},r))})}{const e=[];return n&&Array.isArray(n)&&Cn(n,e),t.jsx("ul",{className:a,children:e.map((e,r)=>e.has_links?t.jsx("li",{dangerouslySetInnerHTML:{__html:Sn(e.text)}},r):t.jsx("li",{children:e.text},r))})}}if(s){return Tn(s)?t.jsx("p",{className:o,dangerouslySetInnerHTML:{__html:Sn(s)}}):t.jsx("p",{className:o,children:s})}return t.jsx("p",{className:o})},exports.DEFAULT_ASSET_PATHS=wn,exports.DEFAULT_FALLBACK_COLORS={PRIMARY:"#ad0000",SECONDARY:"#0066cc",NEUTRAL:"#666666",SUCCESS:"#00A89D",WARNING:"#DD3150"},exports.DashboardProvider=({config:e,children:s})=>{const[n,i]=r.useState(e),a={config:n,updateConfig:e=>{i(t=>Object.assign(Object.assign({},t),e))}};return t.jsx(dn.Provider,{value:a,children:s})},exports.ErrorBoundary=tn,exports.ErrorContext=jn,exports.ErrorProvider=({children:e})=>{const s=r.useId(),[n,i]=r.useState([]),a=r.useRef(new Map),o=r.useCallback(e=>{const t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e)),i(t=>t.filter(t=>t.id!==e))},[]),l=r.useCallback((e,t="error",r=!0,n=1e4)=>{const l=`${s}-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,u={id:l,type:t,message:e,timestamp:Date.now(),autoHide:r,duration:n},c={id:"",added:!1};if(i(r=>{const s=r.find(r=>r.message===e&&r.type===t);return s?(c.id=s.id,c.added=!1,r):(c.id=l,c.added=!0,[...r,u])}),c.added&&r&&n){const e=setTimeout(()=>{o(l)},n);a.current.set(l,e)}return c.id},[s,o]),u=r.useCallback(()=>{a.current.forEach(e=>{clearTimeout(e)}),a.current.clear(),i([])},[]),c=r.useCallback((e,t=!0)=>l(e,"error",t),[l]),d=r.useCallback((e,t=!0)=>l(e,"success",t),[l]),h=r.useCallback((e,t=!0)=>l(e,"warning",t),[l]),m=r.useCallback((e,t=!0)=>l(e,"info",t),[l]);r.useEffect(()=>()=>{a.current.forEach(e=>{clearTimeout(e)}),a.current.clear()},[]);const f=r.useMemo(()=>({errors:n,addError:l,removeError:o,clearErrors:u,showError:c,showSuccess:d,showWarning:h,showInfo:m}),[n,l,o,u,c,d,h,m]);return t.jsx(jn.Provider,{value:f,children:e})},exports.ErrorToast=_n,exports.ErrorToastContainer=()=>{const{errors:e,removeError:r}=Mn();return 0===e.length?null:t.jsx("div",{className:"fixed bottom-10 right-10 flex flex-col gap-3",style:{zIndex:1e3},children:e.map(e=>t.jsx("div",{className:"bg-idd-white mt-3",children:t.jsx(_n,{error:e,onClose:r})},e.id))})},exports.FormField=S,exports.IDDLinkInputItem=rn,exports.Layout=nn,exports.Loader=C,exports.Modal=ln,exports.Password=b,exports.PasswordRequirements=h,exports.PasswordStrengthBar=u,exports.PasswordStrengthIndicator=m,exports.PluginContent=mn,exports.PluginList=hn,exports.PluginManager=({plugins:e,children:s,pmClassName:n="",plWrapperClass:i,plHeadingClass:a,plButtonsWrapperClass:o,plButtonClass:l,pcWrapperClass:u})=>{const c=r.useMemo(()=>[...e].sort((e,t)=>e.order-t.order),[e]),[d,h]=r.useState(()=>c.length>0?c[0].id:null),[m,f]=r.useState(0),p=fn(c.find(e=>e.id===d),m);r.useEffect(()=>{if(0===c.length)return void h(null);if(!c.some(e=>e.id===d))return h(c[0].id),void f(0);const e=c.find(e=>e.id===d);f(t=>fn(e,t))},[c,d]);const g=r.useCallback(e=>{h(e),f(0)},[]),y=r.useId();return t.jsxs("div",{className:n,children:[s,t.jsx(hn,{plugins:c,current_plugin_id:d,on_select_plugin:g,tab_panel_id:y,pluginListWrapperClass:i,pluginListHeadingClass:a,pluginListButtonsWrapperClass:o,pluginListButtonClass:l}),t.jsx(mn,{plugins:c,current_plugin_id:d,current_tab_index:p,tab_panel_id:y,plugin_content_wrapper_class:u})]})},exports.SimpleButton=k,exports.SubmitButton=O,exports.TermsCheckbox=D,exports.TextInput=an,exports.buttonVariants=w,exports.commonStyles=v,exports.createValidationResult=(e,t=[])=>({isValid:e,errors:t}),exports.defaultConfig=f,exports.ensureArray=pn,exports.flatten=function e(t){return pn(t).reduce((t,r)=>t.concat(Array.isArray(r)?e(r):[r]),[])},exports.getArraysDiff=Dn,exports.getBackgroundStyle=(e,t)=>{if(((null==t?void 0:t.fallbackUsed)||!1===(null==t?void 0:t.exists))&&e.fallback)return{backgroundColor:e.fallback,backgroundImage:"none"};return{backgroundImage:e.path.startsWith("url(")||e.path.startsWith("data:")?e.path:`url('${e.path}')`}},exports.getButtonStyles=x,exports.getConfig=g,exports.getLocationString=En,exports.get_all_plugins=e=>cn.flatMap(e=>Array.isArray(e)?e:[e]),exports.get_arrays_diff=gn,exports.get_location_string=vn,exports.isAlpha=e=>/^[a-zA-Z]+$/.test(e),exports.isAlphanumeric=e=>/^[a-zA-Z0-9]+$/.test(e),exports.isEmpty=e=>!e||0===e.trim().length,exports.isLengthValid=(e,t,r)=>{const s=e?e.length:0;return s>=t&&s<=r},exports.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},exports.isNumeric=e=>/^\d+$/.test(e),exports.isURL=function(e){return/^(?:\w+:)?\/\/([^\s.]+\.\S{2}|localhost[:?\d]*)\S*$/.test(e)},exports.isValidDate=e=>{const t=new Date(e);return!isNaN(t.getTime())},exports.isValidEmail=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),exports.isValidPhone=e=>/^[\d\s\-\(\)\+]+$/.test(e)&&e.replace(/\D/g,"").length>=10,exports.isValidUrl=e=>{try{return new URL(e),!0}catch(e){return!1}},exports.mapUserRole=In,exports.map_user_role=xn,exports.matchesPattern=(e,t)=>t.test(e),exports.normalizeWhitespace=e=>e.replace(/\s+/g," ").trim(),exports.pageViewEvent=Qs,exports.page_view_event=Ks,exports.resetReducer=()=>({type:E.RESET}),exports.safeFilter=function(e,t){return pn(e).filter(t)},exports.safeFind=function(e,t){return pn(e).find(t)},exports.safeLength=function(e){return pn(e).length},exports.safeMap=function(e,t){return pn(e).map(t)},exports.safeSome=function(e,t){return pn(e).some(t)},exports.sanitizeInput=e=>e&&"string"==typeof e?e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<[^>]+>/g,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").trim():"",exports.setConfig=e=>{p=Object.assign(Object.assign({},f),e)},exports.setCurrentItem=e=>({type:E.SET_CURRENT_ITEM,payload:e}),exports.setCurrentPlugin=I,exports.setCurrentPluginAndTab=(e,t)=>(r,s)=>{r(I(e)),r(j(0));const{session:n}=s(),i=[...n.currentState||[]],a=i.findIndex(t=>t.pluginID===e);-1!==a?i[a]={pluginID:e,tabID:t}:i.push({pluginID:e,tabID:t}),r(M(i))},exports.setCurrentState=M,exports.setCurrentTab=j,exports.setCurrentTabAndState=(e,t)=>(r,s)=>{r(j(e));const{session:n}=s(),i=n.current.id,a=[...n.currentState||[]],o=a.findIndex(e=>e.pluginID===i);-1!==o?a[o]={pluginID:i,tabID:t}:a.push({pluginID:i,tabID:t}),r(M(a))},exports.setCurrentView=e=>({type:E.SET_CURRENT_VIEW,payload:e}),exports.setPlugins=e=>({type:E.SET_PLUGINS,payload:e}),exports.setSetting=(e,t)=>({type:E.SET_SETTING,payload:{key:e,value:t}}),exports.toggleCollapsed=()=>({type:E.COLLAPSED_TOGGLE}),exports.toggleNotifications=()=>({type:E.TOGGLE_NOTIFICATIONS}),exports.truncate=On,exports.truncate_str=Nn,exports.useAssetValidation=(e,t)=>{const[s,n]=r.useState({exists:!0,fallbackUsed:!1}),[i,a]=r.useState(!0);return r.useEffect(()=>{let r=!0;return T(void 0,void 0,void 0,function*(){a(!0);const s=yield yn(e,t);r&&(n(s),a(!1))}),()=>{r=!1}},[e,t]),{result:s,isLoading:i}},exports.useConfig=y,exports.useDashboard=()=>{const e=r.useContext(dn);if(!e)throw new Error("useDashboard must be used within a DashboardProvider");return e},exports.useError=Mn,exports.useErrorBoundary=()=>{const{showError:e}=Mn();return{handleError:r.useCallback((t,r)=>{console.error("Error caught by boundary:",t,r),e("An unexpected error occurred. Please try again.")},[e])}},exports.useIDDTheme=()=>{const e=y(),t=s.useTailwindConfig(e.style);return{config:e,tailwindConfig:t,colors:t.colors}},exports.useWindowDimensions=()=>{const[e,t]=r.useState({width:0,height:0});return r.useEffect(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight})}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e},exports.validateAsset=yn,exports.validateAssets=bn,exports.validateCommonAssets=()=>T(void 0,void 0,void 0,function*(){return bn(Object.values(wn))}),exports.warnMissingAssets=e=>{if("development"!==process.env.NODE_ENV)return;const t=Object.entries(e).filter(([,e])=>!e.exists).map(([e])=>e);t.length>0&&console.warn("⚠️ IDD Dashboard: Missing optional assets detected:",t,"\nSee https://github.com/integrativedesigndevelopment/idd-dashboard/blob/main/docs/guides/required-assets.md for details.")};
2
2
  //# sourceMappingURL=index.js.map